FORTRAN integer ezgdef, gdid gdid = ezgdef(ni, nj, grtyp, grref, ig1, ig2, ig3, ig4, ax, ay) integer ni, nj, ig1, ig2, ig3, ig4 character*1 grtyp character*4 grref real ax(*), ay(*) |
C gdid = c_ezgdef(int ni, int nj, char *grtyp, char *grref, int ig1, int ig2, int ig3, int ig4, float *ax, float *ay) |
Routine description
|
This function is the most general entry point of the ezscint package to define a grid in conformance with the RPN standard file grid descriptors. It is applicable to both regular and irregular (‘Y’, ‘Z’) grids. It also has a simpler front-end, ezqkdef. ezgdef insert a grid entry into the list of grids managed by the ezscint package. On completion, it returns "gdid", a token that can be used in later calls as a key to identify the grid, like the keys used in the RPN standard files. The values of the IG1-IG4 parameters will change depending on the context. If grtyp='Y' or 'Z', and grref='FILE', the routine automatically loads the associated positional records ('^^') and (`>>`). The IG1 thru IG4 are those associated with a 'Z' grid; they are normally obtained from a call to FSTPRM on a regular data field ('GZ', 'TT', 'UU'). If grtyp='Y' or 'Z', and grref='E', 'G', 'L', 'N', or 'S', the positional records are read from ax and ay, and the values of IG1 thru IG4 are those associated with the reference grid; they are normally obtained from a call to FSTPRM on the positional parameters ('^^', '>>'), and are referred to IG1REF thru IG4REF. |
Description of parameters
ni, nj |
horizontal dimensions of the grid |
grtyp |
type of grid ('A', 'B', 'E', 'G', 'L', 'N', 'S','Y', 'Z') |
grref |
Can be set to 'FILE' if the user wants the package to load the descriptors automatically. Any other reference grid type ('E', 'G', 'L', 'N', 'S') implies that the positional axes are to be read from "ax" and "ay". |
ig1, ig2, ig3, ig4 or ig1ref, ig2ref, ig3ref, ig4ref |
RPN standard file grid parameters. ig4 containts FORTRAN logical unit of the file containing the navigational records, if grtyp = 'Y' or 'Z'.
RPN standard file grid parameters of the positional parameters ('^^', '>>'), if the deformations axes, ax and ay, are given from memory. |
ax, ay |
positional axes. ax is mapped to the '>>' record, ay to '^^'. If grtyp == 'Z', the dimensions of ax=ni and ay=nj. If grtyp == 'Y', the dimensions of ax=ay=ni*nj. |
The following functions can be invoked to get supplemental information about the grid.
value of the positional records |
|
lat-lon coordinates of the grid points |
|
grid attributes of grid |
|
standard file attributes of the positional records |
Sample FORTRAN code :
We want to interpolate data from any grid to a 400x200 Gaussian grid. Assume necessary memory space has been allocated.
datev = -1 etiket = ' ' typvar = ' ' nomvar = 'GZ' ip1 = 500 ip2 = 0 ip3 = -1 iun = 13 *** read fld info and data key = FSTINF(iun, NI, NJ, NK, datev, etiket, ip1, ip2, ip3, typvar, $ nomvar) ier = FSTPRM(key, DATEO, DEET, NPAS, NI, NJ, NK, NBITS, DATYP, IP1, $ IP2, IP3, TYPVAR, NOMVAR, ETIKET, GRTYP, IG1, IG2, IG3, $ IG4, SWA, LNG, DLTF, UBC, EX1, EX2, EX3) ier = FSTLUK(zgem, key, NI, NJ, NK) *** Define input grid gdgem = ezgdef(nigem,njgem ,'Z','FILE', ig1, ig2, ig3, iun, unused, unused) *** Define output grid and define grid set gdgauss = ezgdef(nigauss, njgauss, 'G', 0,0,0,0,unused, unused) ier = ezdefset(gdgauss, gdgem) *** Now call ezsint ier = ezsint(zgauss, zgem)
Go to the list of functions, or the general index.