<div dir="ltr">Yes, wrf outputs are hourly files. Each hourly file has 10 multiple times (6 mins interval). <div><br></div><div>Thanks,</div><div>Anil</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 4, 2020 at 12:42 PM Ehsan Taghizadeh <<a href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:"bookman old style","new york",times,serif;font-size:16px"><div style="font-size:16px"></div>
<div dir="ltr" style="font-size:16px">Dear Dr. Anil</div><div dir="ltr" style="font-size:16px">Are your wrfout files hourly?</div><div dir="ltr" style="font-size:16px">However, why you don't use wrf_user_list_times to extract the list of available times?</div><div dir="ltr" style="font-size:16px"><br></div><div dir="ltr" style="font-size:16px"><div dir="ltr"><pre style="margin-top:0px;margin-bottom:0px;padding:0px;font-size:13.3333px;line-height:12pt;font-family:courier;border-style:solid;border-width:0px 0px 15px;border-color:transparent;color:rgb(0,0,0)"><div><span style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif">fs1 = systemfunc("ls ../WRFV3/run/wrfout_d01*")</span><br style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif"><span style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif">nfs1= dimsizes(fs1)</span></div><div dir="ltr">do i = 0, nfs1-1<br style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif"><span style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif"> f1 = addfile(fs1(i)+".nc","r")</span></div> times = <strong style="font-size:13.3333px;margin:0px;padding:0px">wrf_user_list_times</strong><span style="font-size:13.3333px">(f1) ; get times in the file</span><span><pre style="white-space:pre-wrap;color:rgb(0,0,0);margin-top:0px;margin-bottom:0px;padding:0px;font-size:13.3333px;line-height:12pt;font-family:courier;border-style:solid;border-width:0px 0px 15px;border-color:transparent"><span><pre style="white-space:pre-wrap;color:rgb(0,0,0);margin-top:0px;margin-bottom:0px;padding:0px;font-size:13.3333px;line-height:12pt;font-family:courier;border-style:solid;border-width:0px 0px 15px;border-color:transparent"> ntimes = <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/dimsizes.shtml" style="color:rgb(133,45,133);text-decoration-line:underline;margin:0px;padding:0px;font-family:verdana,sans-serif" rel="nofollow" target="_blank">dimsizes</a>(times) ; number of times in the file(s)
end do</pre></span></pre></span></pre><div><i><font size="2">Sincerely</font></i><br></div></div></div><div dir="ltr"><i><font size="2">Ehsan</font></i></div><div style="font-size:16px"><br></div>
</div><div id="gmail-m_-6870564047640681917yahoo_quoted_7525134985">
<div style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;color:rgb(38,40,42)">
<div>
On Friday, December 4, 2020, 05:57:54 PM GMT+3:30, Anil Kumar - NOAA Affiliate via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="gmail-m_-6870564047640681917yiv8589827172"><div dir="ltr">Hi,<div>I am trying to read multiple wrfout files. I am reading okay..no problem with the code extracting variables. </div><div>Problem comes, when each file has multiple times in it and then I don't know how to extract the time series of variables . </div><div>Below is the code, please let me know how to modify code to read many times within each file.</div><div><div>************************</div><div>fs1 = systemfunc("ls ../WRFV3/run/wrfout_d01*")<br> nfs1= dimsizes(fs1)<br> f1 = addfiles(fs1+".nc","r")<br> ntimes1 = dimsizes(f1) ; number of times in the file(s)<br><br>loc1 = wrf_user_ij_to_ll(f1, 593., 546., True)<br> print("lon/lat locations are: " + loc)<br>uu1 = new((/ntimes1/),float)<br>vv1 = new((/ntimes1/),float)<br>psfc1 = new((/ntimes1/),float)<br>i1=0<br>do while (i1.le.ntimes1-1)<br>uu1(i1) = f1[i1]->U(:,0,546,593) ; (time, lat,lon) ; (2,64,128)<br>vv1(i1) = f1[i1]->V(:,0,546,593) ; V10(:,29.301,-94.797)<br>psfc1(i1) = f1[i1]->PSFC(:,546,593)<br>i1 = i1 + 1<br>end do<br> model_wspd1 = sqrt(uu1^2+vv1^2) ;wind_speed(uu,vv)<br> model_wdir1 = wind_direction(uu1,vv1,0)<br> model_psfc1 = psfc1/100.<br></div><div>************************</div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dr. Anil Kumar<div>Environmental Modeling Center/NCEP/NWS/NOAA<br><div>College Park, MD, USA </div></div><div><br></div><div><br></div></div></div></div></div></div></div></div></div></div></div>_______________________________________________<br>ncl-talk mailing list<br><a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>List instructions, subscriber options, unsubscribe:<br><a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></div>
</div>
</div></div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dr. Anil Kumar<div>Environmental Modeling Center/NCEP/NWS/NOAA<br><div cols="72">College Park, MD, USA </div></div><div><br></div><div><br></div></div></div></div></div></div></div></div>