Re: fatal:Undefined identifier: (gsn_csm_contour) is undefined, can't continue

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Mar 07 2011 - 08:44:10 MST

Wei,

It would help if you could provide the data. We can't tell just from looking at your script what the problem might be.

Please see:

http://www.ncl.ucar.edu/report_bug.shtml

for information on how to ftp the data to our ftp account.

Thanks,

--Mary

On Mar 5, 2011, at 8:54 AM, wei huang wrote:

> Hi,
> First of all thanks for your valuable guidance and response. Here the two figures are attached. In Fig-1 the plot is okay but in the Fig-2 there are missing contours. These two figures are created at different times from the same wrf output. For interpolating the wrf data I used (rcm2rgrid) NCL function and for vertical interpolation used the function given below:
> plvl = int2p(theta(time|:,lat|:,lon|:,lev|:), \
> ; p(time|:,lat|:,lon|:,lev|:), lvl,0)
> plvl = int2p_n(theta, p,lvl,0,1)
> plvl = int2p_n_Wrap(theta,p,lvl,0,1)
>
> After testing several times they produced the same results as shown in (Fig.1 & 2)
> There are many vertically and horizontally cross sectional examples are available on the WRF site but I’m interested to plot the figure (as I attached).
> So I would like to know what is the reason either the code is not correct or something else/ data missing problem? Print VarSummary (plvl_r) is attached herewith.
> Please your suggestion and comments will be highly appreciated.
> Thanks and regards,
> wei
>
>
> Variable: plvl
> Type: float
> Total Size: 39487500 bytes
> 9871875 values
> Number of Dimensions: 4
> Dimensions and sizes: [time | 25] x [lat | 195] x [lon | 135] x [lvl | 15]
> Coordinates:
> Number Of Attributes: 1
> _FillValue : 9.96921e+36
>
> Variable: plvl_r
> Type: float
> Total Size: 39487500 bytes
> 9871875 values
> Number of Dimensions: 4
> Dimensions and sizes: [time | 25] x [lvl | 15] x [lat | 195] x [lon | 135]
> Coordinates:
> time: [0.5..24.5]
> lvl: [300..370]
> lat: [40.87445..45.88511]
> lon: [90.85538..100.10556]
> Number Of Attributes: 1
> _FillValue : 9.96921e+36
>
>
> On Fri, Mar 4, 2011 at 2:17 AM, Dennis Shea <shea@ucar.edu> wrote:
>
>
> [1] If you are using classic WRF data, the lat/lon are curvilinear:
>
> float XLAT(Time, south_north, west_east)
> float XLONG(Time, south_north, west_east)
>
> You can *not* use the coordinate variable syntax {...}
>
> plvl_r(10,:,{40:45},{92})
>
> By netCDF definition, coordinate variables are
> one dimensional, monotonic {in/de}creasing variables [*].
>
> [2] You should always include a "printVarSummary" of the
> specific variable.
> printVarSummary(plvl_r)
> Also, in this case
> printVarSummary(plvl_r(10,:,{40:45},{92}))
> This will help you determine the problem.
>
> [3] The WRF project has their own suite of NCL examples. Please see:
>
>
> http://www.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/NCL_examples.htm
>
> They even have cross-section examples.
> Please send *all* questions related to these examples to
> wrfhelp@ucar.edu
> ===
> [4] If you do use 'int2p', I suggest that you use 'int2p_n' or 'int2p_n_Wrap'
>
> plvl = int2p_n(theta,p,lvl,0,1)
> or
> plvl = int2p_n_Wrap(theta,p,lvl,0,1)
>
> http://www.ncl.ucar.edu/Document/Functions/Contributed/int2p_n_Wrap.shtml
>
>
> On 03/03/2011 10:22 AM, wei huang wrote:
> Hi,
>
> Thanks for your help, it is working but inside the figure (attached)
> contours are missing at some places. Please your advice/suggestion will
> be appreciated. some part of script and print summary is attached
> herewith.here i'm using wrf data.
> thanks again,
> wei
> ***********************************
>
> ; Create a pressure field on the specified theta surface
>
> plvl = int2p(theta(time|:,lat|:,lon|:,lev|:), \
>
> p(time|:,lat|:,lon|:,lev|:), lvl,0)
>
> plvl!1="lev"
>
> printVarSummary(plvl)
>
> plvl!0= "time"; name dimensions
>
> plvl!1= "lat"
>
> plvl!2= "lon"
>
> plvl!3= "lvl"
>
> printVarSummary(plvl)
>
> ;exit
>
> plvl&time =p&time; assign coordinates
>
> plvl&lvl=lvl; isentropic levels
>
> plvl&lat=p&lat
>
> plvl&lon=p&lon
>
> plvl_r = plvl(time|:,lvl|:,lat|:,lon|:)
>
> ;***********************************
>
> ; Map resources
>
> wks= gsn_open_wks("x11","th_z")
>
> res= True; plot mods desired
>
> res@cnLineColor= "Blue"; color of second contours
>
> res@cnLineThicknessF = 2.; line thickness
>
> res@gsnAddCyclic = False
>
> res@tmYLMode = "Explicit"
>
> res@tmYLValues = ispan(300,370,10)
>
> res@tmYLLabels = ispan(300,370,10)
>
> res@gsnRightString= ""
>
> res@gsnLeftString= ""
>
> res@gsnCenterString= ""
>
> res@cnLevelSelectionMode = "ExplicitLevels"; set manual contour levels
>
> res@cnLevels = ispan(100,1000,50)
>
> plot= gsn_csm_contour(wks, plvl_r(10,:,{40:45},{92}), res )
>
> end
>
> Variable: theta
>
> Type: float
>
> Total Size: 102667500 bytes
>
> 25666875 values
>
> Number of Dimensions: 4
>
> Dimensions and sizes:[Time | 25] x [bottom_top | 39] x [south_north |
> 195] x [west_east | 135]
>
> Coordinates:
>
> Number Of Attributes: 6
>
> coordinates : XLONG XLAT
>
> stagger :
>
> units :K
>
> description : Potential Temperature (theta)
>
> MemoryOrder : XYZ
>
> FieldType :104
>
> Variable: theta
>
> Type: float
>
> Total Size: 102667500 bytes
>
> 25666875 values
>
> Number of Dimensions: 4
>
> Dimensions and sizes:[time | 25] x [lev | 39] x [lat | 195] x [lon | 135]
>
> Coordinates:
>
> Number Of Attributes: 6
>
> coordinates : XLONG XLAT
>
> stagger :
>
> units :K
>
> description : Potential Temperature (theta)
>
> MemoryOrder : XYZ
>
> FieldType :104
>
> Variable: time (coordinate)
>
> Type: float
>
> Total Size: 100 bytes
>
> 25 values
>
> Number of Dimensions: 1
>
> Dimensions and sizes:[time | 25]
>
> Coordinates:
>
> Variable: p
>
> Type: float
>
> Total Size: 102667500 bytes
>
> 25666875 values
>
> Number of Dimensions: 4
>
> Dimensions and sizes:[time | 25] x [lev | 39] x [lat | 195] x [lon | 135]
>
> Coordinates:
>
> time: [0.5..24.5]
>
> Number Of Attributes: 6
>
> coordinates : XLONG XLAT
>
> stagger :
>
> units :hPa
>
> description : Pressure
>
> MemoryOrder : XYZ
>
> FieldType :104
>
> Variable: plvl
>
> Type: float
>
> Total Size: 39487500 bytes
>
> 9871875 values
>
> Number of Dimensions: 4
>
> Dimensions and sizes:[25] x [lev | 195] x [135] x [15]
>
> Coordinates:
>
> Number Of Attributes: 1
>
> _FillValue :9.96921e+36
>
> Variable: plvl
>
> Type: float
>
> Total Size: 39487500 bytes
>
> 9871875 values
>
> Number of Dimensions: 4
>
> Dimensions and sizes:[time | 25] x [lat | 195] x [lon | 135] x [lvl | 15]
>
> Coordinates:
>
> Number Of Attributes: 1
>
> _FillValue :9.96921e+36
>
>
>
> On Thu, Mar 3, 2011 at 1:45 AM, Rick Brownrigg <brownrig@ucar.edu
> <mailto:brownrig@ucar.edu>> wrote:
>
> Hi,
>
> It sounds like you are not loading the requisite script libraries (?)
>
> load"$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load"$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>
> See:
>
> http://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_contour.shtml
>
> On Mar 2, 2011, at 10:41 AM, wei huang wrote:
>
> Hi,
> please I'm getting an error given below. could anyone help me how
> to fix it?
> thanks
> wei
> ; options for pressure plotting
> plvl_r = plvl(time|:,lvl|:,lat|:,lon|:)
> printVarSummary(plvl_r)
> res@cnLevelSelectionMode = "ExplicitLevels"; set manual contour levels
> res@cnLevels = ispan(100,1000,50)
> plot= gsn_csm_contour(wks,plvl_r(0,:,{40:45},{92}),res)
> end
>
> ;*****************************
> Variable: plvl_r
> Type: float
> Total Size: 55282500 bytes
> 13820625 values
> Number of Dimensions: 4
> Dimensions and sizes:[time | 25] x [lvl | 21] x [lat | 195] x [lon
> | 135]
> Coordinates:
> time: [0.5..24.5]
> lvl: [270..370]
> lat: [40.87445..45.88511]
> lon: [90.85538..100.10556]
> Number Of Attributes: 1
> _FillValue :9.96921e+36
> fatal:Undefined identifier: (gsn_csm_contour) is undefined, can't
> continue
> fatal:Execute: Error occurred at or near line 116 in file
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> --
> ======================================================
> Dennis J. Shea tel: 303-497-1361 |
> P.O. Box 3000 fax: 303-497-1333 |
> Climate Analysis Section |
> Climate & Global Dynamics Div. |
> National Center for Atmospheric Research |
> Boulder, CO 80307 |
> USA email: shea 'at' ucar.edu |
> ======================================================
>
> <Fig.pdf>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Mar 7 08:44:17 2011

This archive was generated by hypermail 2.1.8 : Mon Mar 07 2011 - 15:20:57 MST