[ncl-talk] ncl plot problem
Komal Shukla
komalshukla1992 at gmail.com
Tue Nov 27 06:13:49 MST 2018
Hi,
I have being using ncl scripts to plot wrf_chem model outputs. It has been
working well so far, Recently I needed to plot for a variable named "eth" .
I have already plotted many variables of same category, and basically all I
had to do was to change the variable name to eth and get the plot.
When I ran the below mentioned script, my plot is getting values of a range
332000 to 440000, wherein the rreal range of data is in decimals, ranging
somewhere around 0.06-0.12.
I opened the netcdf data files and checked the vales, they were around
0.06-0.12 range only.
I am not understanding why my plot output is showing such axis values.
Can you look into this? The script is pasted below.
begin
a = addfile("../wrfout_d02_2016-05-01_00:00:00.nc","r")
it = 0 ; first time step
hgt = wrf_user_getvar(a,"HGT_M",it) ; Terrain elevation
hgt at lat2d = wrf_user_getvar(a,"XLAT",it) ; latitude/longitude
hgt at lon2d = wrf_user_getvar(a,"XLONG",it) ; required for plotting
wks = gsn_open_wks("png","eth")
FILES = systemfunc ("ls ../wrfout_d02_2016-05-01*") ; file paths
numFILES = dimsizes(FILES)
aa = addfiles (FILES+".nc", "r") ;add multiple files
eth = wrf_user_getvar(aa,"eth",-1) ; 3D tc
eth_avg=dim_avg_n(eth,0)
eth_avg2D=eth_avg(0,:,:)
eth_avg2D at lat2d = wrf_user_getvar(a,"XLAT",it) ; latitude/longitude
eth_avg2D at lon2d = wrf_user_getvar(a,"XLONG",it) ; required for plotting
;---Set some basic plot options
res = True
res at gsnMaximize = True ; maximize plot in frame
res at cnFillOn = True
res at cnLinesOn = False
res at mpProjection = "CylindricalEquidistant" ; The default
res at gsnAddCyclic = False
;---Additional resources desired
res at pmTickMarkDisplayMode = "Always" ; nicer tickmarks
res at mpDataBaseVersion = "MediumRes" ; better and more map outlines
res at mpDataSetName = "Earth..4"
res at mpOutlineBoundarySets = "AllBoundaries"
res at mpOutlineOn = True
res at lbOrientation = "Vertical"
res at tiMainOffsetYF = -0.03 ; Move the title down
contour = gsn_csm_contour_map(wks,eth_avg2D,res)
draw(contour)
frame(wks)
---
Thanks
Komal Shukla
PhD Research Scholar
Indian Institute of Technology Delhi (IIT Delhi)
Hauz Khas, Delhi-110016
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181127/032d66af/attachment.html>
More information about the ncl-talk
mailing list