ezsint
FORTRAN integer ier, ezsint ier = ezsint(zout, zin) real zout(*), zin(*) |
C ier = c_ezsint(float *zout, float *zin) |
Routine description
ezsint does a bi-dimensional interpolation on the values contained in zin to generate zout. This pre-supposes that 2 functions of the ezscint package have been called, either ezqkdef or ezgdef, and ezdefset. |
Description of parameters
zout |
Output (interpolated) field. zout is assumed to have the dimensions referred by gdout (the output grid). |
zin |
Input (source) field. zin is assumed to have the dimensions referred by gdin (the input grid). |
?
It is the responsibility of the coder to make sure that zout and zin have dimensions consistent with the definition of gdout and gdin. Unpredictable results will follow if zout is not mapped 1:1 to gdout and zin to gdin. In fact, zout and zin are mere address locations used to inform the package where zin and zout can be found. |
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