[ncl-talk] average plots difficulties

Saurabh Singh saurabhsingh123op at gmail.com
Thu Aug 14 07:19:26 MDT 2014


NCL version : NCL -6.1.0
Os :UBUNTU

dear sir

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.

here is a  sample script that plots "slp" but it plots for each time step
and in sepearte pdf file for each time step.,i want the plot daily avereage
"slp" for say 3 months in a pdf file will multiple pages for every day.

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"

begin

; Make a list of all files we are interested in
DATADir =
"/home/cee1/Music/Build_WRF_and_WPS.V351/WRF_and_WPS_src/WRFV3/test/em_real/2k5/"
FILES = systemfunc (" ls -1 " + DATADir + "wrfout_d01_2005-01-01* ")
numFILES = dimsizes(FILES)

; We generate plots, but what kind do we prefer?
type = "pdf"

res = True ; Set up some basic plot resources
res at MainTitle = "WRF OUT FILES"
res at Footer = False
pltres = True
mpres = True
opts = res
opts at cnFillOn = True
do ifil = 0,numFILES-1
wks = gsn_open_wks(type,"plt_wrfout"+ifil)

a = addfile(FILES(ifil)+".nc","r") ; Open the next file
slp = wrf_user_getvar(a,"PSFC",0) ; Get sea level pressure from file
contour = wrf_contour(a,wks,slp,opts)
plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)

end do
end



-- 
With regards
Saurabh Kumar singh

 *P** : * *Please consider the environment before printing this e-mail*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140814/747c56ad/attachment.html 


More information about the ncl-talk mailing list