<div dir="ltr">NCL version : NCL -6.1.0<div>Os :UBUNTU</div><div><br></div><div>dear sir</div><div><br></div><div>please suggest how to plot average of any variables over a cetain time intervals(say daily,monthly,weekly) for hourly generated wrf output files generated every hour.</div>
<div><br></div><div>here is a  sample script that plots &quot;slp&quot; but it plots for each time step and in sepearte pdf file for each time step.,i want the plot daily avereage &quot;slp&quot; for say 3 months in a pdf file will multiple pages for every day.</div>
<div><br></div><div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;</div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl&quot;</div><div><br></div><div>begin</div><div><br></div>
<div>; Make a list of all files we are interested in</div><div>DATADir = &quot;/home/cee1/Music/Build_WRF_and_WPS.V351/WRF_and_WPS_src/WRFV3/test/em_real/2k5/&quot;</div><div>FILES = systemfunc (&quot; ls -1 &quot; + DATADir + &quot;wrfout_d01_2005-01-01* &quot;)</div>
<div>numFILES = dimsizes(FILES)</div><div><br></div><div>; We generate plots, but what kind do we prefer?</div><div>type = &quot;pdf&quot;</div><div><br></div><div>res = True ; Set up some basic plot resources</div><div>res@MainTitle = &quot;WRF OUT FILES&quot;</div>
<div>res@Footer = False</div><div>pltres = True</div><div>mpres = True</div><div>opts = res</div><div>opts@cnFillOn = True</div><div>do ifil = 0,numFILES-1</div><div>wks = gsn_open_wks(type,&quot;plt_wrfout&quot;+ifil)</div>
<div><br></div><div>a = addfile(FILES(ifil)+&quot;.nc&quot;,&quot;r&quot;) ; Open the next file</div><div>slp = wrf_user_getvar(a,&quot;PSFC&quot;,0) ; Get sea level pressure from file</div><div>contour = wrf_contour(a,wks,slp,opts)</div>
<div>plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)</div><div><br></div><div>end do</div><div>end</div></div><div><br></div><div><br clear="all"><div><br></div>-- <br><div dir="ltr"><font style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif"><span>With regards</span><span></span></font><font style="font-family:arial,helvetica,sans-serif"><span style="color:rgb(0,0,0)"><span><br>
</span></span></font><font style="font-family:arial,helvetica,sans-serif"><span style="color:rgb(0,0,0)"><span>Saurabh Kumar singh</span><span></span>
</span></font><br style="color:rgb(51,204,0)"><br><font style="color:rgb(102,102,102)" size="1"> <b><i><span style="font-family:Webdings" lang="EN-GB">P</span></i></b><b><i><span style="font-family:Tahoma,sans-serif" lang="EN-GB"> : </span></i></b><b><i><span style="font-family:Arial,sans-serif" lang="EN-GB"> </span></i></b><b><i><span style="font-family:Tahoma,sans-serif" lang="EN-GB">Please consider the environment before printing this e-mail</span></i></b> </font><br style="color:rgb(102,102,102)">
<br><br><br></div>
</div></div>