<<prev file | next file >>    view single page | view frames    summary: fields | routine    details: routine

Grid/

computegrid.pro

compute the grid parameters (cm_4mesh) common domains sizes: --------------- jpi, jpj, jpk, jpiglo, jpjglo, jpkglo, jpidta, jpjdta, jpkdta domains positions regarding to the original grid: -------------------------------------------------- ixminmesh, ixmaxmesh, iyminmesh, iymaxmesh, izminmesh, izmaxmesh ixmindta, ixmaxdta, iymindta, iymaxdta, izmindta, izmaxdta horizontal parameters: ---------------------- glamt, glamf, gphit, gphit, e1t, e2t additional horizontal parameters if FULLCGRID keyword is defined: ----------------------------------------------------------------- glamu, glamv, gphiu, gphiv, e1u, e1v, e1f, e2u, e2v, e2f verticals parameters: --------------------- gdept, gdepw, e3t, e3w masks: ------ tmask additional masks if FULLCGRID keyword is defined: ------------------------------------------------- umaskred, vmaskred, fmaskredx, fmaskredy triangles_list: --------------- triangulation key_* variables: ---------------- key_onearth, key_periodic, key_shift, key_stride, key_partialstep, key_yreverse, key_zreverse, key_gridtype xxx related variables: ---------------------- ccmeshparameters, ccreadparameters

topcomputegrid Grid

computegrid[, startx][, starty][, stepxin][, stepyin][, nxin][, nyin], XAXIS=1D or 2D array, YAXIS=1D or 2D array, ZAXIS=1D, MASK=2D or 3D array, GLAMBOUNDARY=2 elements vector, XMINMESH=scalar, XMAXMESH=scalar, YMINMESH=scalar, YMAXMESH=scalar, ZMINMESH=scalar, ZMAXMESH=scalar, ONEARTH=scalar: 0 or 1, PERIODIC=scalar: 0 or 1, PLAIN=scalar: 0 or 1, SHIFT=scalar, STRIDE=3 elements vector, YREVERSE=scalar, ZREVERSE=scalar, FULLCGRID=scalar: 0 or 1, XYINDEX=XYINDEX, UBASE2TBASE=UBASE2TBASE, VBASE2TBASE=VBASE2TBASE, FBASE2TBASE=FBASE2TBASE, STRCALLING=scalar string, ROMSH=2D array, _EXTRA=_EXTRA

Parameters

startx        in optional type: scalar

x starting point, optional if [XY]AXIS keyword is used

starty        in optional type: scalar

y starting point, optional if [XY]AXIS keyword is used

stepxin        in optional type: scalar or vector

x direction step, optional if [XY]AXIS keyword is used, must be > 0 if stepxin is a vector nx is not used

stepyin        in optional type: scalar or vector

y direction step, optional if [XY]AXIS keyword is used, could be > 0 (south to north) or < 0 (north to south) if stepyin is a vector ny is not used

nxin        in optional type: scalar

number of points in x direction, optional if [XY]AXIS keyword is used or stepxin is a vector

nyin        in optional type: scalar

number of points in y direction, optional if [XY]AXIS keyword is used or stepyin is a vector

Keywords

XAXIS        type: 1D or 2D array

Specify longitudes 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        type: 1D or 2D array

Specify latitudes 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 decreasing order (along each column if 2d array).

ZAXIS        type: 1D

Specify the vertical axis. Must be sorted in the increasing or decreasing order

MASK        type: 2D or 3D array default: array of 1

Specify the land(0)/sea(1) mask

GLAMBOUNDARY        type: 2 elements vector default: those defined in the file

Longitude boundaries that should be used to visualize the data. lon2 > lon1 lon2 - lon1 le 360 By default, the common (cm_4mesh) variable key_shift will be automatically defined according to GLAMBOUNDARY.

XMINMESH        type: scalar default: 0L

Define common (cm_4mesh) variables ixminmesh used to define the localization of the first point of the grid along the x direction in a zoom of the original grid

XMAXMESH        type: scalar default: jpiglo-1

Define common (cm_4mesh) variables ixmaxmesh used to define the localization of the last point of the grid along the x direction in a zoom of the original grid Note that if XMAXMESH < 0 then ixmaxmesh is defined as ixmaxmesh = jpiglo -1 + xmaxmesh

YMINMESH        type: scalar default: 0L

Define common (cm_4mesh) variables iyminmesh used to define the localization of the first point of the grid along the y direction in a zoom of the original grid

YMAXMESH        type: scalar default: jpjglo-1

Define common (cm_4mesh) variables iymaxmesh used to define the localization of the last point of the grid along the y direction in a zoom of the original grid Note that if YMAXMESH < 0 then iymaxmesh is defined as iymaxmesh = jpjglo -1 + ymaxmesh

ZMINMESH        type: scalar default: 0L

Define common (cm_4mesh) variables izminmesh used to define the localization of the first point of the grid along the z direction in a zoom of the original grid

ZMAXMESH        type: scalar default: jpkglo-1

Define common (cm_4mesh) variables izmaxmesh used to define the localization of the last point of the grid along the z direction in a zoom of the original grid Note that if ZMAXMESH < 0 then izmaxmesh is defined as izmaxmesh = jpkglo -1 + maxmesh

ONEARTH        type: scalar: 0 or 1 default: 1

Force the manual definition of data localization on the earth or not 0) if the data are not on the earth 1) if the data are on earth (in that case we can for example use the labels 'longitude', 'latitude' in plots). The resulting value will be stored in the common (cm_4mesh) variable key_onearth ONEARTH=0 forces PERIODIC=0, SHIFT=0 and is cancelling GLAMBOUNDARY

PERIODIC        type: scalar: 0 or 1 default: computed by using the first line of glamt

Force the manual definition of the grid zonal periodicity. The resulting value will be stored in the common (cm_4mesh) variable key_periodic PERIODIC=0 forces SHIFT=0

PLAIN        type: scalar: 0 or 1 default: 0

Force YREVERSE=0, ZREVERSE=0, 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        type: scalar default: computed according to glamboundary

Force the manual definition of the zonal shift that must be apply to the data. The resulting value will be stored in the common (cm_4mesh) variable key_shift Note that if key_periodic=0 then in any case key_shift=0.

STRIDE        type: 3 elements vector default: [1, 1, 1]

Specify the stride in x, y and z direction. The resulting value will be stored in the common (cm_4mesh) variable key_stride

YREVERSE        type: scalar default: computed according to gphit[0, 1:jpj-1] LT gphit[0, 0:jpj-2]

Force the manual definition of the y reverse that must be apply to the data. The resulting value will be stored in the common (cm_4mesh) variable key_yreverse

ZREVERSE        type: scalar default: computed according to gdept[0] GT gdept[1]

Force the manual definition of the z reverse that must be apply to the data. The resulting value will be stored in the common (cm_4mesh) variable key_zreverse

FULLCGRID        type: scalar: 0 or 1 default: 0

Activate to specify that you want to compute all the C grid parameters: definition 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

UBASE2TBASE       

Activate when the model is a C grid based on a U point (with a U point at the bottom-left corner and a T point at the upper-right corner). In this case, we ignore - if the grid is not x-periodic, the first column of F and U points - if the grid is not x-periodic, the last column of T and V points. => we are back to a C grid based on T point as for OPA model. Note that in that case, key_gridtype = 'c_u' and not 'c' (-> used in read_ncdf) Note that activate UBASE2TBASE forces FULLCGRID=1

VBASE2TBASE       

Activate when the model is a C grid based on a V point (with a V point at the bottom-left corner and a T point at the upper-right corner). In this case, we ignore - the first line of F and V points - the last line of T and U points => we are back to a C grid based on T point as for OPA model. Note that in that case, key_gridtype = 'c_v' and not 'c' (-> used in read_ncdf) Note that activate VBASE2TBASE forces FULLCGRID=1

FBASE2TBASE       

Activate when the model is a C grid based on a F point (with a F point at the bottom-left corner and a T point at the upper-right corner). In this case, we ignore - the first line of F and V points - the last line of T and U points - if the grid is not x-periodic, the first column of F and U points - if the grid is not x-periodic, the last column of T and V points. => we are back to a C grid based on T point as for OPA model. Note that in that case, key_gridtype = 'c_f' and not 'c' (-> used in read_ncdf) Note that activate FBASE2TBASE forces FULLCGRID=1

STRCALLING        type: scalar string

a string containing the calling command used to call computegrid (this is used by xxx) Used by xxx...

ROMSH        type: 2D array

This array is the final bathymetry at RHO-points. It is stored in the common variable (cm_4mesh) romszinfos.h Used when the model is a ROMS C-grid with one more point in longitude for T and V grid and one more point in latitude for T and U grid. In this case, we ignore - the last line of T and U points - the last column of T and V points. => we are back to a C grid based on T point as for OPA model. Note that activate ROMSH forces FULLCGRID=1

_EXTRA       

not used in the present case ...

Version history

Version

$Id: computegrid.pro 399 2009-07-02 08:38:54Z smasson $

History

Sebastien Masson (smasson@lodyc.jussieu.fr) 2000-04-20 Sept 2004, several bug fix to suit C grid type... Aug 2005, rewritte almost everything...

Known issues

Restrictions

if the grid has x/y periodicity overlap and/or if the mask has 0 everywhere at the border (like a closed 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 it be forced to use cell_fill = 1). FUV points definition is not exact if the grid is irregular

Other attributes

Uses routines

Statistics

McCabe cyclic 241
McCabe essential 1
McCabe modular design 1
Produced by IDLdoc 2.0.