[ncl-talk] ncl plot problem
Bill Ladwig
ladwig at ucar.edu
Tue Nov 27 09:16:52 MST 2018
When you use wrf_user_getvar with the diagnostic "eth", that triggers a
calculation to compute equivalent potential temperature, which should have
values near 300-350 K at the lower levels. None of the numbers you quoted
above make sense for equivalent potential temperature, so do you have an
already created 'eth' variable in your files that isn't equivalent
potential temperature? If so, then don't use wrf_user_getvar to get the
variable out, since this is going to trigger the computation (and it
appears there may be a unit issue causing those weird numbers). You can use
the regular netcdf variable extraction:
For example:
eth = aa[:]->eth
Hope this helps,
Bill
On Tue, Nov 27, 2018 at 6:15 AM Komal Shukla <komalshukla1992 at gmail.com>
wrote:
> 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
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181127/1589ae82/attachment.html>
More information about the ncl-talk
mailing list