PUBLIC INTERFACE ~ PUBLIC DATA ~ PUBLIC ROUTINES ~ NAMELIST ~ DIAGNOSTIC FIELDS ~ ERROR MESSAGES ~ REFERENCES ~ NOTES

## Module horiz_interp_conserve_mod

Contact: Bruce Wyman , Zhi Liang
Reviewers:
Change History: WebCVS Log

#### OVERVIEW

Performs spatial interpolation between grids using conservative interpolation

This module can interpolate data from regular rectangular grid to rectangular/tripolar grid. The interpolation scheme is area-averaging conservative scheme. There is an optional mask field for missing input data. An optional output mask field may be used in conjunction with the input mask to show where output data exists.

#### OTHER MODULES USED

                  mpp_mod
                  fms_mod
            constants_mod
    horiz_interp_type_mod

#### PUBLIC INTERFACE

horiz_interp_conserve_init:
  Initialization routine.
horiz_interp_conserve:
  Subroutine for performing the horizontal interpolation between two grids.
horiz_interp_conserve_end:
  Deallocates memory used by "horiz_interp_type" variables. Must be called before reinitializing with horiz_interp_init.

#### PUBLIC DATA

None.

#### PUBLIC ROUTINES

1. #### horiz_interp_conserve_init

       call horiz_interp_conserve_init ( Interp, lon_in, lat_in, lon_out, lat_out, verbose)

   DESCRIPTION
     Allocates space and initializes a derived-type variable that contains pre-computed interpolation indices and weights.
   INPUT

     `lon_in` | Longitude (in radians) for source data grid. [real, dimension(:,:)]
     `lat_in` | Latitude (in radians) for source data grid. [real, dimension(:,:)]
     `lon_out` | Longitude (in radians) for source data grid. [real, dimension(:,:)]
     `lat_out` | Latitude (in radians) for source data grid. [real, dimension(:,:)]
     `verbose` | flag for the amount of print output. [integer, optional]

   INPUT/OUTPUT

     `Interp` | A derived-type variable containing indices and weights used for subsequent interpolations. To reinitialize this variable for a different grid-to-grid interpolation you must first use the "horiz_interp_end" interface. [type(horiz_interp_type)]

2. #### horiz_interp_conserve

       call horiz_interp_conserve ( Interp, data_in, data_out, verbose, mask_in, mask_out)

   DESCRIPTION
     Subroutine for performing the horizontal interpolation between two grids. horiz_interp_conserve_init must be called before calling this routine.
   INPUT

     `Interp` | Derived-type variable containing interpolation indices and weights. Returned by a previous call to horiz_interp_init. [type(horiz_interp_type)]
     `data_in` | Input data on source grid. [real, dimension(:,:)]
     `verbose` | flag for the amount of print output. verbose = 0, no output; = 1, min,max,means; = 2, still more [integer, optional]
     `mask_in` | Input mask, must be the same size as the input data. The real value of mask_in must be in the range (0.,1.). Set mask_in=0.0 for data points that should not be used or have missing data. [real, dimension(:,:),optional]

   OUTPUT

     `data_out` | Output data on destination grid. [real, dimension(:,:)]
     `mask_out` | Output mask that specifies whether data was computed. [real, dimension(:,:),optional]

3. #### horiz_interp_conserve_end

       call horiz_interp_conserve_end ( Interp )

   DESCRIPTION
     Deallocates memory used by "horiz_interp_type" variables. Must be called before reinitializing with horiz_interp_init.
   INPUT/OUTPUT

     `Interp` | A derived-type variable returned by previous call to horiz_interp_init. The input variable must have allocated arrays. The returned variable will contain deallocated arrays. [horiz_interp_type]

#### DATA SETS

None.

#### ERROR MESSAGES

None.

top