RE: [ncl-talk] The problem caused by reorder coordinates

From: Debasish Pai Mazumder <debasish_at_nyahnyahspammersnyahnyah>
Date: Thu, 1 Feb 2007 01:24:05 -0900

Dear Lawrence,

 

Please check the site

 

http://www.ncl.ucar.edu/Document/Graphics/error_msg.shtml

 

where the reasons of the warning massages are described clearly.

 

Thanks

 

Debasish

 

  _____

From: ncl-talk-bounces_at_ucar.edu [mailto:ncl-talk-bounces_at_ucar.edu] On Behalf
Of Lawrence
Sent: Wednesday, January 31, 2007 11:18 PM
To: ncl-talk_at_ucar.edu
Subject: The problem caused by reorder coordinates

 

Hi NCL users,

   

     I encounted a strange problem today, when I reorder the coordinates
before draw the plots, I allways get the following warning message:

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

   My code is something like this:

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

begin

file1 = addfile("/data/ERA40/t_jja_mean.nc","r")
tera_in = short2flt(file1->t(0,12:22,::-1,:))
tera = tera_in(longitude|:,latitude|:,levelist|:)

wks = gsn_open_wks("x11" ,"plot1")
gsn_define_colormap(wks,"testcmap")
res = True
 <mailto:res_at_cnFillOn> res_at_cnFillOn = True
 <mailto:res_at_gsnSpreadColors> res_at_gsnSpreadColors = True
 <mailto:res_at_mpCenterLonF> res_at_mpCenterLonF = 180
plot = gsn_csm_contour_map_ce(wks, tera(:,:,0), res )

end

 

     I tried to use "printVarSummary(tera&longitude)" and got hte following:

Variable: longitude (coordinate)
Type: float
Total Size: 576 bytes
            144 values
Number of Dimensions: 1
Dimensions and sizes: [longitude | 144]
Coordinates:
Number Of Attributes: 3
  long_name : longitude
  units : degrees_east
  standard_name : longitude

   The results show that the units of coordinate is all right. So can anyone
tell me what the problem is? Any help will be appreciated.

 

Thank you!

Lawrence

 

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Feb 01 2007 - 03:24:05 MST

This archive was generated by hypermail 2.2.0 : Tue Feb 06 2007 - 15:01:55 MST