[Thread Prev][Thread Next][Index]

Re: Grid/region problem



Donald,

You cannot expect Ferret to have any smarts about regions with your
dataset because Ferret understands regions by converting
/X=lo:hi/Y=lo:hi limits into /I=lo:hi/J=lo:hi limits so that it can find
and access the data.  In your case the mapping is neither 1 dimensional
nor linear and Ferret cannot figure this out.

When you are working in with a grid which is not lat-lon you need to
restrict the region by setting /I=lo:hi/J=lo:hi directly. 
Unfortunately, it is up to you to figure out what index limits
correspond to the world coordinates you are interested in.

Here are a few suggestions for you:

1) You should be able to work with your data without using the
3-argument version of shade.

yes?  shade h

should work just fine and show your data's rectangular grid but you
won't be able to overlay other data with lat-lon grids.


2) I'd recommend converting your negative longitudes to all positive by
adding 360.  Ferret hates negative longitudes and will give you warning
messages if you have, for example, -120 as a longitude.


3) You should have a look at the following FAQ demonstrating the use of
polar gridded data similar to yours in conjunction with map projections
and lat-lon gridded data.  This FAQ doesn't help you set regions for
your polar data but does explain what's going on with map projections
and non lat-lon data.

http://ferret.wrc.noaa.gov/Ferret/FAQ/graphics/mp_curvi_data.html


I hope that helps.


-- Jonathan Callahan
 

"Donald S. Dunbar" wrote:
> 
> I have data on a 100x100 grid that is rectangular only when drawn on a polar
> stereographic projection.  I know the (lon,lat) coordinates of each vertex.
> Presently, I use ferret as follows:
> 
> define axis/x=1:100:1 ax
> define axis/y=1:100:1 ay
> define grid/x=ax/y=ay g
> file/grid=g/var=h,lon,lat data_file
> shade h,lon,lat
> 
> I use (lon,lat)=(-4,62), for example, in "data_file" for (4W,62N).  This
> does what I want, sort of.  What I really want to do, though, is something
> like:
> 
> define region/x=5w:16e/y=62n:69n reg
> set region reg
> shade h,lon,lat
> 
> That is, I want to be able to control the region that I'm plotting, and
> maybe apply a map projection.
> 
> This doesn't work though, apparently because the underlying axes of h don't
> overlap the region.  But why doesn't ferret use the (lon,lat) information
> provided in the shade command to override these?  Aren't I telling ferret to
> ignore the axes and plot data at the locations given by (lon,lat)?
> 
> How can I specify axes for h in some other way so that this works?  More to
> the point, what is the best way to handle this type of gridded data?
> 
> I've used ferret for a long time and I feel I'm missing something basic
> here.


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement