Dear NCL help,
I am trying to run a script (shown below), it is working fine. But I am
unable to place the label bar* **"Vertically"*.
Please help me to sort it.
= = = = = = = = = = = = =
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
datadir = "./wrfout/"
FILES = systemfunc ("ls -1 " + datadir + "wrfout_d01* " )
numFILES = dimsizes(FILES)
type = "ps"
res = True
res@MainTitle = "Eq pot temp Variation"
pltres = True
mpres = True
opts = res
opts@cnFillOn = True
do ifil = 0,numFILES-1
a = addfile(FILES(ifil)+".nc","r")
; What times and how many time steps are in the data set?
times = wrf_user_list_times(a) ; get times in the file
ntimes = dimsizes(times) ; number of times in the file
; The specific pressure levels that we want the data interpolated to.
plevs = (/ 925., 850./) ; pressure levels to plot
nlevels = dimsizes(plevs) ; number of pressure levels
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
do it = 0,ntimes-1,2 ; TIME LOOP
print("Working on time: " + times(it) )
res@TimeLabel = times(it) ; Set Valid time to use on plots
day = systemfunc("echo "+times(it) +"|cut -c6-7")
yr = systemfunc("echo "+times(it) +"|cut -c1-4")
mon = systemfunc("date '+%b'|tr [a-z] [A-Z]")
hr = systemfunc("echo "+times(it) +"|cut -c12-13")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; First get the variables we will need
T = wrf_user_getvar(a,"tc",it)
P = wrf_user_getvar(a,"P",it)
PB = wrf_user_getvar(a,"PB",it)
qv = wrf_user_getvar(a,"QVAPOR",it)
T = T + 300.
P = P + PB
tk = wrf_tk(P,T)
eth = wrf_eth(qv,tk,P)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
do level = 0,nlevels-1 ; LOOP OVER LEVELS
pressure = plevs(level)
p = wrf_user_getvar(a, "pressure",it) ; pressure is our vertical coordinate
ethp = wrf_user_intrp3d(eth,p,"h",pressure,0.,False)
wks = gsn_open_wks(type,"eth_"+pressure+"hPa"+"_"+day+mon+yr+"_"+hr+"Z")
; Plotting options for Equivalent pot temp
opts = res
opts@cnFillOn = True
opts@lbOrientation = "vertical"
opts@lbLabelStrings =
(/"275","285","295","305","315","330","345","360","375"/)
contour_ethp = wrf_contour(a,wks,ethp,opts)
plot = wrf_map_overlays(a,wks,(/contour_ethp/),pltres,mpres)
if ( pressure .eq. 925 ) then ; plot rh
plot = wrf_map_overlays(a,wks,contour_ethp,pltres,mpres)
end if
if ( pressure .eq. 850 ) then ; plot rh
plot = wrf_map_overlays(a,wks,contour_ethp,pltres,mpres)
end if
end do
end do
end do
end
= = = = = = = = = = = = =
thanking you,
Sahidul
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jun 30 11:43:21 2010
This archive was generated by hypermail 2.1.8 : Fri Jul 02 2010 - 07:45:13 MDT