[ncl-talk] Contours not showing while plotting wrf out file

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Sat Aug 6 11:36:07 MDT 2022


Anie, your data ranges look good, and there are no missing values.  Let's
test your basic NCL installation.  Try running the same example on a
different data file from the NCL website:
https://www.ncl.ucar.edu/Applications/Data/cdf/wrfout_d01_2005-08-28_00:00:00

Use the original script example wrf_gsn_1.ncl, with no changes except for
the file name.  This works for me.  I get a full color plot with no missing
areas.  Let us know if that works.


On Sat, Aug 6, 2022 at 6:36 AM Anie K Lal <Anieklal at cas.iitd.ac.in> wrote:

> Hi,
>
> (1) Output from
>
> "printVarSummary (hgt)
> printMinMax (hgt)
> print (num (ismissing (hgt))
>
> printMinMax (hgt at lat2d)
> printMinMax (hgt at lon2d)"  are:
>
> ----------------------------------------------------------------------------
> Variable: hgt
> Type: float
> Total Size: 88804 bytes
>              22201 values
> Number of Dimensions: 2
> Dimensions and sizes:    [south_north | 149] x [west_east | 149]
> Coordinates:
> Number Of Attributes: 8
>    lon2d :    <ARRAY of 22201 elements>
>    lat2d :    <ARRAY of 22201 elements>
>    FieldType :    104
>    MemoryOrder :    XY
>    description :    Terrain Height
>    units :    m
>    stagger :
>    coordinates :    XLONG XLAT XTIME
> (0)
> (0)    Terrain Height (m) : min=0   max=6044.23
> (0)    0
> (0)
> (0)    min=16.1061   max=39.9454
> (0)
> (0)    min=63.4411   max=90.7589
>
> ----------------------------------------------------------------------------
>
> (2) No messages where printed when I ran the program. No errors or
> warnings.
>
> (3) Yes, I ran the original example script by just changing the path and
> location of my data file. Still its showing the same output, without
> contours.
>
> Kindly advice
> Thank you
>
>
> Subject: Re: [ncl-talk] Contours not showing while plotting wrf out file
> Date: 05.08.2022 22:01
>  From: Dave Allured - NOAA Affiliate <dave.allured at noaa.gov>
> To: Anie K Lal <Anieklal at cas.iitd.ac.in>
>
> Anie, minimal diagnostic information is needed to be able to help you.
>
> (1)  Please show output from:
>
> printVarSummary (hgt)
> printMinMax (hgt)
> print (num (ismissing (hgt))
>
> printMinMax (hgt at lat2d)
> printMinMax (hgt at lon2d)
>
> (2)  Please show any messages that were printed when you ran your
> program.
>
> (3)  Please run the original example wrf_gsn_1.ncl with no changes
> except the path and location of your data file.  Does that make a
> valid contour map?
>
> On Fri, Aug 5, 2022 at 9:23 AM Anie K Lal via ncl-talk
> <ncl-talk at mailman.ucar.edu> wrote:
>
> > Hi all,
> >
> > I am trying to plot WRF-ARW data using gsn_csm_contour_map. I have
> > followed the script in
> > https://www.ncl.ucar.edu/Applications/wrfgsn.shtml.
> >
> > But unfortunately I am not getting the contours. I am attaching the
> > script I used and the plot I got.
> >
> ________________________________________________________________________-
> > d1 = addfile("/home/anie/Documents/WRF_Chem/EXP01/wrfout_d01.nc
> > [1]", "r")
> >
> > it        = 0     ; first time step
> > hgt       = wrf_user_getvar(d1,"HGT",it)    ; Terrain elevation
> > hgt at lat2d = wrf_user_getvar(d1,"XLAT",it)   ; latitude/longitude
> > hgt at lon2d = wrf_user_getvar(d1,"XLONG",it)  ; required for
> > plotting
> >
> > wks = gsn_open_wks("png","wrf_gsn")
> >
> > ;---Set some basic plot options
> > res               = True
> >
> > res at gsnMaximize   = True   ; maximize plot in frame
> >
> > ; res at tiMainString  = filename
> >
> > res at cnFillOn      = True
> > res at cnFillPalette = "OceanLakeLandSnow"
> > res at cnLinesOn     = False
> >
> > res at mpProjection  = "CylindricalEquidistant"    ; The default
> > res at mpDataBaseVersion = "MediumRes"
> >
> > res at gsnAddCyclic      = False
> >
> > ;---Zoom in on plot
> > res at mpMinLatF     = min(hgt at lat2d)
> > res at mpMaxLatF     = max(hgt at lat2d)
> > res at mpMinLonF     = min(hgt at lon2d)
> > res at mpMaxLonF     = max(hgt at lon2d)
> >
> > contour = gsn_csm_contour_map(wks,hgt,res)
> >
>
> _________________________________________________________________________________________
> >
> > Kindly help me identify the issue.
> >
> > Looking forward to any kind of help.
> >
> > Thank you
>
> CAUTION: This email originated from outside of IIT Delhi. Do not click
> links or open attachments unless you recognize the sender and know the
> content is safe.
>
> Links:
> ------
> [1] http://wrfout_d01.nc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220806/8f7878c9/attachment.htm>


More information about the ncl-talk mailing list