units assign error

From: Ioana Colfescu <colfescu_at_nyahnyahspammersnyahnyah>
Date: Mon Feb 14 2011 - 10:49:58 MST

Hi,

I try to assign dimensions/coordinates to the variables I read from a binary. My code is :

  nlat = 46
  nlon = 128
  nrec=1560
  ts = new((/nrec,nlat,nlon/),float)
  time=new((/nrec/),float)
  lat=new((/nlat/),float)
  lon=new((/nlon/),float)
  path = ("/data/oldfarm2/colfi/cam3.1.p2/CCSM/IEt42_test1/temp/ts_anom.dat")

  do ir=0,1559
  rec=ir
  ts(ir,:,:)=fbindirread(path,rec,(/nlat,nlon/),"float")
  end do
  ts!0="time"

  ts!1="lat"
  ts!2="lon"
  ts&time=time
  ts&lon=lon
  ts&lat=lat
; ts&lat@units="degrees_north"
; ts&lon@units="degrees_east"

I get the following error :

(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'
/data/oldfarm2/colfi/cam3.1.p2/CCSM/IEt42_test1/scripts[259]

And if I assign the units I still get an error another one but still an error. Could someone please tell me what should I do about it ?

Thank you,

Ioana

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Feb 14 10:50:04 2011

This archive was generated by hypermail 2.1.8 : Tue Feb 15 2011 - 09:43:19 MST