[Thread Prev][Thread Next][Index]
Re: Curvilinear grids and subregions...
*** better Ferret email answers through DODS access ***
Hi Gary,
A general tip for getting solutions from other users (not be directly pertinent to
your current question):
If your question pertains to a particular netCDF data set that illustrates
particular problems, consider dropping that data set into your DODS netCDF server.
Then send out your sample Ferret command lines using the DODS URL instead of the
local file path.
The advantage of this approach is that anyone who wants to contribute an answer can
actually run the Ferret commands and generate the plot (or error message as the
case may be) in question.
- steve
======================================================
Gary Strand wrote:
> I've got some data on the PCM POP grid (see http://www.cgd.ucar.edu/pcm for
> more about it) and the necessary grid information for it.
>
> In what order should I do the following calls to get a subregion (say, the Gulf
> Stream) of that grid properly plotted? I've been stumped for a couple days on
> this!
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> use pop_data.nc
> use gridinfo.nc
> !
> let xmin = -90; let xmax = 10
> let ymin = 20; let ymax = 80
> let xdel = 10; let ydel = 10
> let mid_lon = `xmin+(xmax-xmin)/2`
> let mid_lat = `ymin+(ymax-ymin)/2`
> !
> go mp_lambert_cyl `mid_lon` `mid_lat`
> set region/x=`xmin`:`xmax`/y=`ymin`:`ymax`
> let mp_lambda = lon[d=gridinfo.nc] * deg2rad
> let mp_phi = lat[d=gridinfo.nc] * deg2rad
> set grid `var[d=1],return=grid`
> shade var[d=1]*mp_mask, x_page, y_page
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>
> The above doesn't work - the "set region" command uses the i,j of the original
> data, which is only "indexical" space, not geographic space.
>
> I'm hoping I just need to rearrange the order of the calls to get it to work
> right!
>
> Thanks.
> --
> /\ Gary Strand (303) 497-1336 NCAR ML262A
> \_][ www.cgd.ucar.edu/ccr/strandwg 1850 Table Mesa Dr
> \___strandwg@ucar.edu Boulder, Colorado, USA 80305
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement