ezdefset

FORTRAN

integer ezdefset, iset
iset = ezdefset(gdout, gdin)
integer gdout, gdin

C

iset = c_ezdefset(int gdout, int gdin)

Routine description

This function is used to define the input and output grid that will be used in the functions eszint, ezwdint and ezuvint. gdout and gdin have to be valid grid identifiers.

Although this function returns a key that may be kept for later use, it is recommended to call it everytime one wants to change the grid set. This function is not very costly.

Description of parameters

gdout

a valid grid identifier (returned by ezqkdef or ezgdef) that will be used as the target (output) grid.

gdin

a valid grid identifier (returned by ezqkdef or ezgdef) that will be used as the source (input) grid.

?

Sample FORTRAN code :

We want to interpolate data from a GEM grid to a 400x200 Gaussian grid, amd then back into the GEM 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 = ezqkdef(nigem,njgem ,'Z',ig1, ig2, ig3, ig4, iun)
*** Define output grid and define grid set
gdgauss = ezqkdef(nigauss, njgauss, 'G', 0,0,0,0,0)
ier = ezdefset(gdgauss, gdgem)

*** Now call ezsint
ier = ezsint(zgauss, zgem)
*** Now re-interpolate the values from the gaussian grid back to the gem grid (a method
*** that could be used in coupled models).
ier = ezdefset(gdgem, gdgauss)

*** Now call ezsint
ier = ezsint(zgem2, zgauss)

Go to the list of functions, or the general index