[ncl-talk] Troubles with global ERA-INTERIM data when plotting sub-domain.

Rabah Hachelaf hachelaf at sca.uqam.ca
Wed Jun 3 16:47:56 MDT 2015


Hi all,

Why i still getting this troubles :

Variable: W
Type: integer
Total Size: 13881600 bytes
            3470400 values
Number of Dimensions: 4
Dimensions and sizes:   [15] x [2] x [241] x [480] (Time,Le
vels,Latitude,Longitude)
Coordinates:
Number Of Attributes: 1
  _FillValue :  -32767
warning:Dimension (2) has not been defined
(0)     lonFlip: warning: last dimension is not named
(0)
(0)     min=-2.01933   max=1.308
(0)
(0)     min=-2.44533   max=2.15867
(0)     check_for_y_lat_coord: Warning: Data either does not contain a
valid latitude coordinate array or doesn't contain one at all.
(0)     A valid latitude coordinate array should have a 'units' attribute
equal to one of the following values:
(0)         'degrees_north' 'degrees-north' 'degree_north' 'degrees north'
'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
(0)     check_for_lon_coord: Warning: Data either does not contain a valid
longitude coordinate array or doesn't contain one at all.
(0)     A valid longitude coordinate array should have a 'units' attribute
equal to one of the following values:
(0)         'degrees_east' 'degrees-east' 'degree_east' 'degrees east'
'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'
warning:ContourPlotDraw: out of range coordinates encountered; standard
AreaFill rendering method may be unreliable;
 consider setting the resource trGridType to "TriangularMesh" if
coordinates contain missing values

here is my script :
I want to plot a temporal average of W variable in one of levels , When i
turn one
;   WM&latitude at units="degrees_north"
;   WM&longitude at units="degrees_east"
I get this :
warning:Dimension (2) has not been defined
(0)     lonFlip: warning: last dimension is not named
fatal:No coordinate variable exists for dimension (latitude) in variable
(WM)
fatal:(latitude) is not coordinate variable in variable(WM).
fatal:["Execute.c":8578]:Execute: Error occurred at or near line 26 in file
read_w.ncl

I am using global ERA-INTERIM Reanalysis.


;***************************************************************************
; era_1.ncl
;
;***************************************************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"

begin


a = addfile ("w_jja.nc", "r")

W = a->w/100

printVarSummary(W)
lat=a->latitude
lon=a->longitude
WM=dim_avg_n(W,0)/100

WM=lonFlip(WM)
WM!1="latitude"
WM!2="longitude"



;   WM&latitude at units="degrees_north"
;   WM&longitude at units="degrees_east"



printMinMax(WM(0,:,:),True)
printMinMax(WM(1,:,:),True)

;*********************************************************************
  wks  = gsn_open_wks ("png", "era_djf")          ; open workstation
  gsn_define_colormap (wks,"gui_default")         ; choose color map

  res                   = True
  res at gsnAddCyclic = False
  res at mpProjection      = "Mercator"       ; choose projection
  res at mpGridAndLimbOn   = True             ; turn on lat/lon lines
  res at mpPerimOn         = False             ; turn off box around plot
  res at mpFillOn          = False
  res at cnLinesOn         = False
  res at mpOutlineOn       = True
  res at cnFillOn          = True              ; color plot desired
  res at cnLineLabelsOn    = False             ; turn off contour lines
   res at mpLimitMode  = "LatLon"
   res at mpMinLatF            = 15  ;5.0
    res at mpMaxLatF           =  85  ;35.0
    res at mpMinLonF           = -180 ;105
    res at mpMaxLonF           = -50 ;140

 res at cnLevelSelectionMode = "ManualLevels"  ; manual contour levels
  res at cnMinLevelValF       = -1           ; min level
  res at cnMaxLevelValF       =  0           ; max level
  res at cnLevelSpacingF      =  0.1           ; interval

  res at cnFillOn             = True            ; turn on color



  plot = gsn_csm_contour_map(wks,W(2,0,:,:),res)                 ; Draw
original grid on map

end





-- 
------------------------------
Cordialement,
Best regards,
Rabah Hachelaf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150603/4debddfc/attachment.html 


More information about the ncl-talk mailing list