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

Module horiz_interp_bilinear_mod

Contact:  Zhi Liang
Reviewers: 
Change History: WebCVS Log


OVERVIEW

Performs spatial interpolation between grids using bilinear interpolation

This module can interpolate data from regular rectangular grid to rectangular/tripolar grid. The interpolation scheme is bilinear interpolation. 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_bilinear_init:
Initialization routine.
horiz_interp_bilinear:
Subroutine for performing the horizontal interpolation between two grids.
horiz_interp_bilinear_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_bilinear_init

    call horiz_interp_bilinear_init ( Interp, lon_in, lat_in, lon_out, lat_out, verbose, src_modulo )
    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(:,:)]
    src_modulo    logical variable to indicate if the boundary condition along zonal boundary is cyclic or not. When true, the zonal boundary condition is cyclic.
       [logical, optional]
    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_bilinear

    call horiz_interp_bilinear ( Interp, data_in, data_out, verbose, mask_in,mask_out, missing_value, missing_permit)
    DESCRIPTION
    Subroutine for performing the horizontal interpolation between two grids. horiz_interp_bilinear_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]
    missing_value    Use the missing_value to indicate missing data.
       [real, optional]
    missing_permit    numbers of points allowed to miss for the bilinear interpolation. The value should be between 0 and 3.

    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_bilinear_end

    call horiz_interp_bilinear_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