ECMWF INTERPOLATION PACKAGE at DSS


This page describes the ECMWF Interpolation Package installed on the various NCAR computers by DSS. The subroutines listed are only the ones used by the FORTRAN program provided. A complete list of subroutines availabe in the interpolation package is available from ECMWF.

Description
 
FORTAN program
 
Subroutine
List
 
I/O Routines
pbopen
pbclose
pbgrib
pbwrite
 
Interpolation/
Tranfsformation
Routines
intf
intin
intout
INTIN

This Fortran function is used to describe the input field.

If the field is in GRIB format, its internal definition contains all the information about the field necessary for interpolation and there is no need to use INTIN.

If the input field is an array of Fortran real number values, the function may have to be called several times to build up its description. There are default values for parts of the description which may save some calls.

Declare the function as INTEGER and EXTERNAL, and invoke it as follows:

      IRET = INTIN( HPARN, INTV, REALV, CHARV)
Character strings and single integer values may be used directly in calls:
      IRET = INTIN( 'form', INTV, REALV, 'unpacked')
      IRET = INTIN( 'gaussian', 80, REALV, CHARV)
with simple dummy variables (IDUM, RDUM and CDUM say) in place of the unused array arguments:
      IRET = INTIN( 'form', IDUM, RDUM, 'unpacked')
      IRET = INTIN( 'gaussian', 80, RDUM, CDUM)
If a series of unpacked fields are interpolated, it is necessary to call INTIN between fields to ensure correct handling. For example, if U, V, T, U, V, T, ... fields are processed, `usewind' must be `yes' for U and V; then `no' for T; then `yes' for U and V; then `no' for T; and so on.

It is important to check the return value in IRET is 0 to ensure the call has been successful.

Parameters

Parameter types
Name Type Usage
HPARN CHARACTER*(*) Keyword
INTV INTEGER Integer value(s)
REALV REAL Real value(s)
CHARV CHARACTER*(*) Character value(s)

INTV, REALV and CHARV must be given in every call, although only one of them at a time may contain information about the keyword.

Depending on the keyword in HPARN, the arrays INTV or REALV may contain none, one or several values.

If a series of unpacked fields are interpolated, it may be necessary to call INTIN between fields to ensure correct handling. For example, if a series of U, V, T, U, V, T, ... fields are processed, 'usewind' must be 'yes' for U and V; then 'no' for T; then 'yes' for U and V; then 'no' for T; and so on.

If the 'user_reduced_gaussian' option is taken, both 'g_pnts' and 'g_lats' must be used subsequently, and in that order, to provide values defining the quasi-regular grid.

If the 'user_regular_gaussian' is employed, 'g_lats' must be used sequently to provide values defining the quasi-regular grid.

Interpolation of bitmapped grid-point fields is done by using a default value (-55555.0) for missing points. The 'missingvalue' feature can be used to change the value used for missing points.

'islscp' processing uses a new land-sea mask field provided by the caller in the interpolation of a gaussian grid-point field. The ECMWF land-sea mask field is provided by giving a pathname in the environment variable ISLSCP_OLD_LSM or, by default, picking up the field in /home/ma/emos/data/islscp_old_lsm. Both new and old land-sea mask fields must be in GRIB format and have the same gaussian grid definition.

ISLSCP processing does bi-linear interpolation using four neighbouring points. Neighbours are used if they have the same land/sea characteristic in the old land-sea mask as the new point in the new land-sea mask. If the four neighbours do not all have the same type, the nearest neighbour of matching type is used. If all four neighbours have different type from the new point, they are all used.

Parameter values
HPARN Parameter Comments Default
'area'
REALV(1) = N
REALV(2) = W
REALV(3) = S
REALV(4) = E
N is the north latitude.
W is the west longitude.
S is the south latitude.
E is the east longitude.

0/0/0/0 signifies the whole globe.
Negative values: west of Greenwich, south of Equator.
0/0/0/0
'form'
CHARV(1) = 'grib'
CHARV(2) = 'unpacked'
Input fields are in GRIB.
Input fields are in a REAL array.
'grib'
'g_lats'
REALV(1) = 1_lat
REALV(2) = 2_lat
:               
REALV(n) = n_lat
n_lat is the row latitude.

n is the number of latitude rows between a Pole
  and the Equator (the gaussian grid number).
*
'g_pnts'
INTV(1) = 1_lat
INTV(2) = 2_lat
 :
INTV(n) = n_lat
n_lat is the number of grid points along the latitude.

n is the number of latitude rows between a Pole and
  the Equator (the gaussian grid number).
*
'grid'
REALV(1) = WE
REALV(2) = NS
WE is the grid spacing west to east.
NS is the grid spacing north to south.
None
None
'islscp' CHARV(1) = 'xxx'
xxx = name of file containing the global land-sea mask
      in GRIB format to be used for interpolation.
xxx = 'off' to turn off ISLSCP processing.
None
'level' INTV(1) = n n is the field level (code table 3). None
'levtype' INTV(1) = n n is the type of level (code table 3). None
'lsm_param' CHARV = 'xxx'
xxx is 'yes' if a land-sea mask is being interpolated.
xxx is 'no', otherwise.
Parameter dependent
'missingvalue'
REALV(1) = n
CHARV(1) = xxx
n is the number to be used as a missing data value.
CHARV(1) = 'yes' to change the value used.
            'no' to reset the default value.
Can be used to change the value used for missing
points to allow interpolation of bitmapped fields.
None
'parameter' INTV(1) = n n is the parameter number. None
'reduced' INTV(1) = n
n is the number of latitude rows between a Pole
and the Equator (the gaussian grid number).
Currently, only n=80 or n=160 are supported.
None
'regular' INTV(1) = n
n is the number of latitude rows between a Pole
and the Equator (the gaussian grid number).
None
'scan' INTV(1) = n
scanning mode (code table 8).
0 = data values scanned west to east within lines,
    lines scanned from north to south.
0
'table' INTV(1) = n
n is the version number of the parameter code table.
1   = WMO
128 = ECMWF local table
128
'truncation' INTV(1) = n n is the spectral truncation. None
'uselsm' CHARV = 'xxx'
xxx = 'yes', to force a land-sea mask to be used.
xxx = 'no', otherwise.
Parameter dependent
'useprecip' CHARV = 'xxx'
xxx = 'yes', to treat field as precipitation
xxx = 'no', otherwise.
Parameter dependent
'user_reduced_gaussian' INTV(1) = n
n is the number of latitude rows between a Pole and the
  Equator (the gaussian grid number).
None
'user_regular_gaussian' INTV(1) = n
n is the number of latitude rows between a Pole and the
  Equator (the gaussian grid number).
None
'usewind' CHARV = 'xxx'
xxx = 'yes', to treat field as wind
xxx = 'no', otherwise.
Parameter dependent