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

From: wei huang <whua27_at_nyahnyahspammersnyahnyah>
Date: Thu Mar 03 2011 - 10:22:46 MST

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> 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

Received on Thu Mar 3 10:22:57 2011

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