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

Anie K Lal Anieklal at cas.iitd.ac.in
Fri Aug 5 09:23:07 MDT 2022


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", "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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrf_gsn.png
Type: image/png
Size: 43949 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220805/b8e4c702/attachment.png>


More information about the ncl-talk mailing list