Why can't I draw correct contour over the map?

From: Xuguang Sun (sunxg007 AT XXXXXX)
Date: Wed Jul 28 2004 - 00:04:43 MDT


Hi,
  I'm now trying to read a variable from a binary file
with fbindirread() and to draw it with
gsn_csm_contour_map, but there come some warnings,
like,

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

 And at the same time, the location of the contour is
not consistent with the map, that means the contours
that should be in the eastern hemisphere appear in the
western hemisphere..
  Here, I wonder what is going wrong with my ncl
script? Thanks a lot.
  The ncl script is as following,

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

 nf=fbindirread("ncepAnosea.dat",4,(/73,144/),"float")
 ;==========================================
 ; Create lon and lat coordinates variables
 ;==========================================
 lat=new(73,float)
 lat=fspan(-90,90,73)
 lat!0="lat"
 lat@long_name="latitude"
 lat@units="degrees-north"
 lat&lat=lat

 lon=new(144,float)
 lon=fspan(0,357.5,144)
 lon!0="lon"
 lon@long_name="longitude"
 lon@units="degrees-east"
 lon&lon=lon

 nf!0="lat"
 nf!1="lon"
 nf&lat=fspan(-90,90,73)
 nf&lon=fspan(0,357.5,144)
 nf@long_name="Geopotential Height (500mb)"
 nf@units="10m"
 printVarSummary(nf)

 ;=======================
 ; draw variable
 ;=======================
 wks=gsn_open_wks("x11","example")
 res = True
 plot=gsn_csm_contour_map(wks,nf,res)

end

=====
SUN Xuguang
Department of Atmospheric Sciences
22 Hankou Road, Nanjing University, 210093
Nanjing, P.R.China

_________________________________________________________
Do You Yahoo!?
150万曲MP3疯狂搜,您闯入音乐殿堂
http://music.yisou.com/
美女明星应有尽有,搜遍美图、艳图和酷图
http://image.yisou.com
100兆邮箱够不够用?雅虎电邮自助扩容!
http://cn.rd.yahoo.com/mail_cn/tag/100m/*http://cn.promo.yahoo.com/minisite/100m/
_______________________________________________
ncl-talk mailing list
ncl-talk AT ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Wed Jul 28 2004 - 07:23:55 MDT