Re: latGlobeFo question

From: Tong Qi <tongqi2_at_nyahnyahspammersnyahnyah>
Date: Mon May 10 2010 - 10:51:15 MDT

Dennis,

For some reason, this approach does not seem to work for HDF4 files. It had
worked for an HDF-EOS2 file, but I get the error
"fatal:Coordinate variables must be the same dimension as their dimension"
when I try the assignments "data&lat=lat" and "data&lon=lon."

Here's a snippet of my script:

x=addfile("3B42.100331.21.6A.HDF", "r")
data=x->precipitation(0,:,:)
data!0="lat"
data!1="lon"

lon=lonGlobeFo(1440, "lon", "longitude", "degrees_east")
lon=(/ lon - 180. /)
lon&lon=lon

lat=fspan(-49.75,49.75,400)
lat=lat(::-1)
lat!0="lat"
lat@units="degrees_north"
lat&lat=lat

data&lat=lat
data&lon=lon

On Mon, May 10, 2010 at 11:03 AM, Dennis Shea <shea@ucar.edu> wrote:

> Some variation
>
> latS = 15
> latN = 45.
> lonL = 95.
> lonR = 135.
>
>
> dlat = 0.25
> dlon = 0.25
>
> nlat = floattointeger((latN-latS)/dlat + 1 )
> mlon = floattointeger((lonR-lonL)/dlon + 1 )
>
> lat = fspan(latS,latN,nlat)
> lon = fspan(lonL,lonR,mlon)
> lat!0 = "lat"
> lon!0 = "lon"
> lat@units = "degrees_north"
> lon@units = "degrees_east"
> lat&lat = lat
> lon&lon = lon
>
>
> On 5/10/10 9:57 AM, Tong Qi wrote:
> > Hello ncl-talk,
> >
> > I was wondering if there was a way to set the latitude bounds of the
> > latGlobeFo function to 50N to 50S instead of its standard 90N to 90S. If
> > not, is there some other way to generate latitudes and associated
> > metadata for the smaller range?
> >
> > Thanks,
> > Tong
> >
> >
> >
> > _______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon May 10 10:51:24 2010

This archive was generated by hypermail 2.1.8 : Thu May 13 2010 - 10:03:00 MDT