[Thread Prev][Thread Next][Index]

Re: [ferret_users] define grid



Hi David,
It looks to me as if what you may want is a SET REGION command, rather than DEFINE GRID:

let imax = `raz[d=1],return=iend`
let jmax = `raz[d=1],return=jend`
set region/I=2:`imax-1`/J=2:`jmax-1`

You can also use DEFINE REGION to give your region a name, and use that name to store a particular region setting.


To use DEFINE GRID, you need axis names, not index ranges. So the following would keep the Z and T axis of the grid of your variable, and create new axes using the same units and coordinates as the original axis for the variable.

let imax = `raz[d=1],return=iend`
let jmax = `raz[d=1],return=jend`
define axis/x/units=`raz[d=1],return=xunits` newxax = x[gx=raz[d=1],i=2:`imax-1`]
define axis/y/units=`raz[d=1],return=yunits` newyax = y[gx=raz[d=1],j=2:`jmax-1`]
define grid/like=raz[d=1]/x=newxax/y=newyax newgrid

Ansley

David Wang wrote:

Hello Ferreters,

I'm intending to use a subset of an existing grid to define a new grid, onto which another variable will be regridded by the transformation @ASN. I tried something like:

let imax = `raz[d=1],return=iend`
let jmax = `raz[d=1],return=jend`
define grid/like=raz[d=1]/I=2:`imax-1`/J=2:`jmax-1` newgrid

but it didn't go through, and told me:
**ERROR: unknown command qualifier: I=2:`imax-1`

Any hints?

Thanks,
- David









[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement