error message when plotting data from ASCII files

From: MUHTARJAN osman (muhterjan AT hotmail.com)
Date: Tue Oct 25 2005 - 12:28:37 MDT


Hi-
  I tried to plot some fields read from ASCII files. I think I added LAT/LON
information already, but stiil have error message like this:

(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'
fatal:ContourPlotDraw: ARSCAM/ARPRAM - ALGORITHM FAILURE
fatal:ContourPlotDraw: draw error
fatal:ContourPlotDraw: draw error
fatal:PlotManagerDraw: error in plot draw
fatal:_NhlPlotManagerDraw: Draw error

The following is how I read the data and specify the LAT/LON attributes:

NLAT=40
MLON=48

afld3_1d = asciiread("./bias_73by144.txt",(/10512,1/),"float")
afld3_2d = onedtond(afld3_1d,(/73,144/))
afld3rg = f2fsh(afld3_2d,(/NLAT,MLON/)) ; regridding to R15

eof2d_raw=asciiread("./eof.txt",(/192,10/),"float")
eof1d = ndtooned(eof2d_raw)
eof2d_180 = onedtond(eof1d,(/NLAT,MLON/))

eof2d = eof2d_180
eof2d(:,0:23)=eof2d_180(:,24:47) ; change longitude starting point from
180E to 0

LAT=new((/NLAT/),float)
LON=new((/MLON/),float)

do i=0,MLON-1
   LON(i)=0+i*7.5
end do

do j=0,NLAT-1
   LAT(j)=-86.5979542+j*2*86.5979542/(NLAT-1)
end do

                LAT@units = "degrees_north"
                LAT@long_name = "Latitude"
                LAT!0="LAT"
                LAT@LAT=LAT

                LON@units = "degrees_east"
                LON@long_name = "Longitude"
                LON!0="LON"
                LON@LON=LON

printVarSummary(LAT)
printVarSummary(LON)

afld3rg!0="LAT"
afld3rg@LAT=LAT
afld3rg!1="LON"
afld3rg@LON=LON
printVarSummary(afld3rg)

eof2d!0="LAT"
eof2d@LAT=LAT
eof2d!1="LON"
eof2d@LON=LON
printVarSummary(eof2d)

..............

plot4 = gsn_csm_contour_map_polar(wks,afld3rg,res4)

plot5 = gsn_csm_contour_map_polar(wks,eof2d,res5)

................

Thank you.

Regards,

Muhtarjan Osman
ASGG
LAWR
UC Davis

_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Wed Oct 26 2005 - 18:25:10 MDT