<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Dear Elham, I am giving you a simple code to read and plot a time series for T2m and 10-m wind speed  for two locations defined by "locs", "lats", "lons". You can add more locations if you like or choose a sub-period by defining "it".</p>
<p><br /></p>
<p><br /></p>
<p><br /></p>
<p>a = addfile("wrf_file.nc","r") </p>
<p>; Get variables for 10-m wind</p>
<p>uvmet = wrf_user_getvar(a, "<em>uvmet10</em>", -1)</p>
<p>u = uvmet(0,:,:,:) <br />v = uvmet(1,:,:,:) </p>
<p>; Get Temp at 2m in Kelvin</p>
<pre> tc2 = <strong>wrf_user_getvar</strong>(a,"T2",-1)  </pre>
<p>it = 0 ; first time step, ignore it if you want a time-series</p>
<p>locs = (/ "1st Location", "2nd Location" /)  ; define the locations </p>
<p>lats = (/ 37.5938, 40.6401 /) <br />lons = (/ 23.4375, 22.9444/)</p>
<p><br />nlocs = dimsizes(locs) <br />loc = wrf_user_ll_to_ij(a, lons, lats, True)  ; find the indices of the closest WRF grid points to locations</p>
<p>do iloc = 0, nlocs-1<br /><br />print("Working for " + locs(iloc))</p>
<p>locX = loc(0, iloc) - 1<br />locY = loc(1, iloc) - 1</p>
<p>wind= sqrt(u(:, locY, locX)*u(:, locY, locX) + v(:, locY, locX)*v(:, locY, locX)) ; replace ":" with "it" if you want one time-step only</p>
<p><span>temp = tc2(:, locY, locX)   ; if you want only one time step: temp = tc2(it, locY, locX)</span></p>
<p><br /></p>
<p>print( ""+wind+"   "+temp+"")</p>
<p><br /></p>
<p>end do</p>
<p><br /></p>
<p><br /></p>
<p>regards,</p>
<p><br /></p>
<p>-- </p>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Stavros NTAFIS (DAFIS)<br />-----------------------------------------------<br />Physicist - Meteorologist, M.Sc.<br />Ph.D. Candidate, Polytechnic School of Paris, France<br />Laboratory of Dynamic Meteorology (LMD)<br />Research Associate, National Observatory of Athens (NOA/IERSD)<br />ORCID: <a href="https://orcid.org/0000-0002-1513-1930" target="_blank" rel="noopener noreferrer">https://orcid.org/0000-0002-1513-1930</a><br />Tel. : (+33)1 69 33 51 64<br />(+33)9 81 94 22 12<br />Mobile: (+33) 066 030 0147<br />(+30) 697 04 20 242<br />---------------<br />Weather charts:<br /> <a href="http://www.meteo.gr" target="_blank" rel="noopener noreferrer">http://www.meteo.gr</a><br /> <a href="http://www.meteo.gr/meteomaps/" target="_blank" rel="noopener noreferrer">http://www.meteo.gr/meteomaps/</a></div>
<p><br /></p>
<p>Στις 2018-12-15 11:54, E Mobarak έγραψε:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div class="ydp196b94c9yahoo-style-wrap" style="font-family: times new roman, new york, times, serif; font-size: 16px;">Hi dear ncl usr</div>
<div class="ydp196b94c9yahoo-style-wrap" style="font-family: times new roman, new york, times, serif; font-size: 16px;">I want plot some data for example temperature or wind speed in some time step from wrf out data file in one location</div>
<div class="ydp196b94c9yahoo-style-wrap" style="font-family: times new roman, new york, times, serif; font-size: 16px;">how i should it?</div>
<div class="ydp196b94c9yahoo-style-wrap" style="font-family: times new roman, new york, times, serif; font-size: 16px;">Best Regarads</div>
<div class="ydp196b94c9yahoo-style-wrap" style="font-family: times new roman, new york, times, serif; font-size: 16px;">Elham</div>
<!-- html ignored --><br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">_______________________________________________<br /> ncl-talk mailing list<br /> <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br /> List instructions, subscriber options, unsubscribe:<br /> <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank" rel="noopener noreferrer">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></div>
</blockquote>
<p><br /></p>

</body></html>