ezuvint

FORTRAN

integer ier, ezuvint
ier = ezuvint(uuout, vvout, uuin, vvin)
real uuout(*), vvout(*), uuin(*), vvin(*)

C

int c_ezuvint(float *uuout, float *vvout, float *uuin, float *vvin)

Routine description

ezuvint does a bi-dimensional interpolation on the values contained in uuin and vvin to generate uuout and vvout. This pre-supposes that 2 functions of the ezscint package have been called, either ezqkdef or ezgdef, and ezdefset.

Description of parameters

uuout, vvout

Output (interpolated) winds, in the output grid coordinate system. uuout and vvout are assumed to have the dimensions referred by gdout (the output grid). The output winds are GRID winds.

uuin, vvin

Input (source) winds, in the input grid coordinate system (i.e. as normally read from an RPN standard file, without modification). uuin and vvin are assumed to have the dimensions referred by gdin (the input grid).

?

It is the responsibility of the coder to make sure that uuout, vvout, uuin and vvin have dimensions consistent with the definition of gdout and gdin. Unpredictable results will follow if the fields arenot mapped 1:1 to gdout and gdin. In fact, the parameters 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 = ' '
      eastwnd = 'UU'
      northwnd= 'VV'
      
      ip1 = 500
      ip2 = 0
      ip3 = -1
      iun = 13
      
***   read fld info and data
      keyuu = FSTINF(iun, NI, NJ, NK, datev, etiket, ip1, ip2, ip3, typvar,
     $        eastwnd) 
      keyvv = FSTINF(iun, NI, NJ, NK, datev, etiket, ip1, ip2, ip3, typvar,
     $        northwnd) 
      ier = FSTPRM(keyuu, DATEO, DEET, NPAS, NI, NJ, NK, NBITS, DATYP, IP1,
     $             IP2, IP3, TYPVAR, EASTWND, ETIKET, GRTYP, IG1, IG2, IG3,
     $             IG4, SWA, LNG, DLTF, UBC, EX1, EX2, EX3)
      ier = FSTLUK(uugem, keyuu, NI, NJ, NK)
      ier = FSTLUK(vvgem, keyvv, 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 ezuvint
      ier = ezuvint(uugauss, vvgauss, uugem, vvgem)

*** 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 ezuvint
      ier = ezuvint(uugem, vvgem, uugauss, vvgauss)

Go to the list of functions, or the general index.