<div dir="ltr">Hi,<div><br><div>Can someone please look into this? It might be very simple.</div><div><br> I use the below mentioned script in ncl to generate a monthly average plot for a variable from wrfout files(wrfchem). It works really well. I get =  1 file/30 days (monthly average)<div>Each of my wrfoutfile is written for 24 hours in it ( 0 to 23 hours), and I have 30 such files for a month.</div><div><br></div><div>Case 1 : I need to get the monthly average of only 16 to 21 hours. My script is giving monthly average of 0 to 23 hours.</div><div><br></div><div>Case2 : I am trying to form 24 plots from these 30 files. Hourly average plots. Each plot representing an hours average over the month(30 files). I want = 24 files/30 days (hourly average)</div><div><br></div><div><br><br></div><div>My script is written here, I am unable to write the script change/loop for the above case, can someone please change the script for both the cases to help me get the mentioned plots?</div><div><br></div><div><br><br>begin<br> a = addfile("../wrfout_d02_2016-11-01_00:00:<a href="http://00.nc">00.nc</a>","r")<br> it        = 0     ; first time step<br>  hgt       = wrf_user_getvar(a,"HGT_M",it)    ; Terrain elevation<br>  hgt@lat2d = wrf_user_getvar(a,"XLAT",it)   ; latitude/longitude<br>  hgt@lon2d = wrf_user_getvar(a,"XLONG",it)  ; required for plotting<br>  wks = gsn_open_wks("png","OR1")<br>    FILES = systemfunc ("ls ../wrfout_d02_2016-11-01*") ; file paths<br>numFILES = dimsizes(FILES)<br> aa    = addfiles (FILES+".nc", "r")     ;add multiple files<br> OR1= wrf_user_getvar(aa,"OR1",-1)      ; 3D tc<br>  OR1_avg=dim_avg_n(OR1,0)<br> OR1_avg2D=OR1_avg(0,:,:)<br>  OR1_avg2D@lat2d = wrf_user_getvar(a,"XLAT",it)   ; latitude/longitude<br>  OR1_avg2D@lon2d = wrf_user_getvar(a,"XLONG",it)  ; required for plotting<br>--removing additional plot design options--<br>contour = gsn_csm_contour_map(wks,OR1_avg2D,res)<br>draw(contour)<br>  frame(wks)<br><br></div><div>Thanks</div><div><br></div><div>Komal</div></div></div></div>