Help on coordinate variable

From: Xin Xi <xxi_at_nyahnyahspammersnyahnyah>
Date: Wed Feb 08 2012 - 16:33:49 MST

Hi there,
I am trying to create a netcdf file with a variable that is regrided to a
wrf domain. I have problems in assigning the coordinate variables. I got
the error below:

fatal:Coordinate variables must be the same dimension as their dimension
fatal:No coordinate variable exists for dimension (lat2d) in variable (znt)

And here is the ncl script:

lat2d=wrf_file->XLAT
lon2d=wrf_file->XLONG
tmp = rgrid2rcm(lat1d, lon1d, p_znt, lat2d(0,:,:), lon2d(0,:,:))

dimll=dimsizes(lat2d)
nlat=dimll(1)
nlon=dim(2)
znt=new(/1,nlat,nlon/,double)
znt(0,:,:)=tmp

znt!0="time"
znt!1="lat2d"
znt!2="lon2d"

znt&time=0
znt&lat2d=lat2d(0,:,:)
znt&lon2d=lon2d(0,:,:)
....

Thanks!

-- 
*Xin Xi
School of Earth and Atmospheric Sciences
Georgia Institute of Technology
311 Ferst Drive, Atlanta, GA 30332-0340*

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Feb 8 16:34:01 2012

This archive was generated by hypermail 2.1.8 : Thu Feb 09 2012 - 13:33:26 MST