IGUVINT |
Interpolation routines |
IGUVINT |
iguvint - Vectorial interpolation routine from cartesian irregular grids
integer li, lj | Destination grid dimension |
real SPDOUT(li,lj) | Destination field, contains the modulus of the wind |
real DIROUT(li,lj) | Destination field, contains the meteorological directton of the wind (ie. °east wind is 90 °, northwest wind is 330 °. |
real xlat(li,lj) | Latitudes of grid points on destination grid |
real xlon(li,lj) | Longitudes of grid points on destination grid |
integer ni, nj | Source grid dimension |
real uuin(ni,nj) | Source field, contains the x-component of the wind |
real vvin(ni,nj) | Source field, contains the y-component of the wind |
character*1 grtyp | Type of the source grid ('Z'-only allowed value) |
character*1 grref | Type of Reference grid ('A','B','E','G','L','N','S') |
integer ig1ref, ig2ref, ig3ref, ig4ref | Grid parameters of the reference grid |
logical sym |
Logical flag indicating if the field is treated treated symetrically or antisymetrically on the other hemisphere. if .true., the field is processed symetrically if .false., the field is processed antisymetrically This flag is used only on 'A', 'B' and 'G'grids; it is used to extend hemispherical grids when points ont the target grid lie outside the source grid. |
real ax(ni),ay(nj) |
Vector of coordinates describing the deformation of the Z grid w/r to the target grid. In RPN standard files, "ax" is normally contained in ">>" records, and "ay" in "^^" records. |
This routine interpolates on a (li,lj) grid the winds contained in an irregular cartesian (ni,nj) grid. Lat-lon coordinates of the points (in degrees) have to be provided in the fields xlat(li,lj) and xlon(li,lj)
The interpolation method is one of bicubic lagrangian, bilinear or nearest neighbor. The default method is bicubic; it can be set to the other methods by a call to the "rgoptc" or "rgoptr" routines. A call to the same routines can also set the way the package handles extrapolation.
To convert the meteorological winds to grid winds defined on the target grid, the routine "gdwfllw" should be called for all the grid except the GEM grid. For the later model, "gfwfllw" should be called.
The following code should help when the winds are to be rotated on a GEM grid.
xlon and xlat are the lat-lons of the points, defined on the earth; xlatgf and xlongf are the points defined on the GEF rotated grid.
cgrtyp = 'E' call cxgaig(cgrtyp,ig1,ig2,ig3,ig4,xlat1,xlon1,xlat2,xlon2) call hpalloc(xlatgfp,li*lj,ier,1) call hpalloc(xlongfp,li*lj,ier,1) call gfllfxy(xlon,xlat,xlongf,xlatgfp,li*lj, $ xlat1,xlon1,xlat2,xlon2) call gfwfllw(uuout,vvout,xlat,xlon,xlatgf,xlongf,li,lj, $ xlat1,xlon1,xlat2,xlon2) call hpdeallc(xlatgfp, ier,1) call hpdeallc(xlongfp, ier, 1)
The code is part of rmnlib, in "$ARMNLIB/lib/librmn32stack.a"
Yves Chartier, RPN, (514) 421-4736
May 14th, 1997
rgscint, iguvint, rguvint, gdwfllw, rgoptc, rgopti, rgoptr, fstarg1