Grid/
computegrid.pro
compute the grid parameters from cm_4mesh common:
computegrid, startx, starty, stepx, stepy, nx, ny
computegrid, startx, starty, stepx, stepy
computegrid, xaxis = xaxis, yaxis = yaxis
or a suitable mix...
glamt
glamf
gphit
gphit
e1t
e2t
horizontal parameters
glamu {in}
glamv {in}
gphiu {in}
gphiv {in}
e1u {in}
e1v {in}
e1f {in}
e2u {in}
e2v {in}
e2f {in}
horizontal parameters if FULLCGRID keyword is defined
gdept
gdepw
e3t
e3w
verticals parameters
tmask
masks
umaskred {in}
vmaskred {in}
fmaskredx {in}
fmaskredy {in}
masks if FULLCGRID keyword is defined
triangles_list
triangulation
computegrid
Grid
computegrid, startx, starty, stepxin, stepyin, nxin, nyin, XAXIS=XAXIS, YAXIS=YAXIS, ZAXIS=ZAXIS, MASK=MASK, GLAMBOUNDARY=GLAMBOUNDARY, XMINMESH=XMINMESH, XMAXMESH=XMAXMESH, YMINMESH=YMINMESH, YMAXMESH=YMAXMESH, ZMINMESH=ZMINMESH, ZMAXMESH=ZMAXMESH, ONEARTH=ONEARTH, PERIODIC=PERIODIC, PLAIN=PLAIN, SHIFT=SHIFT, STRIDE=STRIDE, FULLCGRID=FULLCGRID, XYINDEX=XYINDEX, FBASE2TBASE=FBASE2TBASE, STRCALLING=string, _extra=_extra
Parameters
startx
in
required
scalar, x starting point
starty
in
required
scalar, y starting point
stepxin
in
required
scalar or vector: x direction step, must be > 0
if vector nx is not used
stepyin
in
required
scalar or vector: y direction step,
could be > 0 (south to north) or < 0 (north to south)
if vector ny is not used
nxin
in
required
scalar, number of points in x direction
nyin
in
required
scalar, number of points in y direction
Keywords
XAXIS
to specify longitude1 with a 1 or 2 dimension array, in
this case startx, stepx and nx are not used but could be
necessary if the y axis is not defined with yaxis. It must be
possible to sort the first line of xaxis in the increasing
order by shifting its elements.
YAXIS
to specify latitudes with a 1 or 2 dimension array, in
this case starty, stepy and ny are not used but starty and
stepy could be necessary if the x axis is not defined with xaxis.
It must be sorted in the increasing or deceasing order
(along each column if 2d array).
ZAXIS
to specify the vertical axis with a 1 dimension
array. Must be sorted in the increasing or deceasing order
MASK
to specify the mask with a 2 or 3 dimension array
GLAMBOUNDARY
a 2 elements vector, [lon1,lon2], the longitude
boundaries that should be used to visualize the data.
we must have lon2 > lon1 and lon2 - lon1 le 360
key_shift will be defined automaticaly computed according to
glamboundary by using the FIRST LINE of glamt but
key_shift will /= 0 only if key_periodic = 1
XMINMESH
default: 0L
XMAXMESH
default: jpiglo-1
YMINMESH
default: 0L
YMAXMESH
default: jpjglo-1
ZMINMESH
default: 0L
to define the common variables i[xyz]minmesh
used to define the grid only in a zoomed part of the original
grid. max value is [XYZ]MAXMESH
ZMAXMESH
default: jpkglo-1
to define the common variables i[xyz]maxmesh
used to define the grid only in a zoomed part of the original
grid. max value is jp[ijk]glo-1.
if [XYZ]MAXMESH is negative, then we define i[xyz]maxmesh as
jp[ijk]glo - 1 + [XYZ]MAXMESH instead of [XYZ]MAXMESH
ONEARTH
default: key_onearth
= 0 or 1 to force the manual definition of
key_onearth (to specify if the data are on earth -> use longitude
/latitude etc...).
note that ONEARTH = 0 forces PERIODIC = 0, SHIFT = 0,
and is cancelling GLAMBOUNDARY
PERIODIC
default: key_periodic is automatically computed by using the first line of glamt
= 0 or 1 to force the manual definition of key_periodic.
PLAIN
force PERIODIC = 0, SHIFT = 0, STRIDE = [1, 1, 1] and
suppress the automatic redefinition of the domain in case of
x periodicity overlap, y periodicity overlap (ORCA type only)
and mask border to 0.
SHIFT
= scalar to force the manual definition of key_shift. By
default, key_shift is automatically computed according to
glamboundary (when defined) by using the FIRST LINE of glamt. if
key_periodic=0 then in any case key_shift = 0.
STRIDE
default: [1, 1, 1]
a 3 elements vector to specify the stride in x, y, z
direction. The resulting value
will be stored in the common (cm_4mesh) variable key_stride
FULLCGRID
activate to specify that you want to compute
all the parameters of a C grid. Computation of glam[uv],
gphi[uv], e1[uvf], e2[uvf], [uv]maskred and fmaskred[xy]
will be add to the default computations
XYINDEX
activate to specify that the horizontal grid should
be simply defined by using the index of the points
(xaxis = findgen(nx) and yaxis = findgen(ny))
using this keyword forces key_onearth=0
FBASE2TBASE
STRCALLING
type: string
a string containing the calling command used to
call computegrid (this is used by xxx.pro)
_extra
used to pass your keywords to the created function.
Version history
Version
$Id: computegrid.pro 157 2006-08-21 09:01:50Z navarro $
History
Sebastien Masson (smasson@lodyc.jussieu.fr)
2000-04-20
Sept 2004, several bug fixs to suit C grid type...
Aug 2005, rewritte almost everything...
Known issues
Restrictions
if the grid has x/y periodicity orverlap and/or if
the mask has 0 everywhere at the border (like a close sea) and
if (we did not activate /plain and xminmesh, xmaxmesh, yminmesh,
ymaxmesh keywords are defined to their default values), we redefine
xminmesh, xmaxmesh, yminmesh, ymaxmesh in order to reove the
overlapping part and/or to open the domain (avoid ti be forced
to use cell_fill = 1).
FUV points definition...
Other attributes
Uses routines
cm_4mesh cm_4data cm_4cal
Produced by IDLdoc 2.0 on Tue Aug 29 14:49:11 2006.