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

Module data_override_mod

Contact:  G.T. Nong M.J. Harrison M. Winton
Reviewers: 
Change History: WebCVS Log


OVERVIEW

Given a gridname, fieldname and model time this routine will get data in a file whose path is described in a user-provided data_table, do spatial and temporal interpolation if necessary to convert data to model's grid and time.

Before using data_override a data_table must be created with the following entries: gridname, fieldname_code, fieldname_file, file_name, ongrid, factor.

More explainations about data_table entries can be found in the source code (defining data_type)

If user wants to override fieldname_code with a const, set fieldname_file in data_table = "" and factor = const

If user wants to override fieldname_code with data from a file, set fieldname_file = name in the netCDF data file, factor then will be for unit conversion (=1 if no conversion required)

A field can be overriden globally (by default) or users can specify one or two regions in which data_override will take place, field values outside the region will not be affected.



OTHER MODULES USED

            platform_mod
constants_mod
mpp_io_mod
mpp_mod
horiz_interp_mod
time_interp_external_mod
fms_io_mod
fms_mod
axis_utils_mod
mpp_domains_mod
time_manager_mod

PUBLIC INTERFACE

data_override_init:
data_override_2d:
data_override_3d:


PUBLIC DATA

None.


PUBLIC ROUTINES

  1. data_override_init

    call data_override_init 
    
    DESCRIPTION
    Assign default values for default_table, get domain of component models, get global grids of component models. Users should call data_override_init before calling data_override


    NOTE
    This subroutine should be called in coupler_init after (ocean/atmos/land/ice)_model_init have been called.

    data_override_init can be called more than once, in one call the user can pass up to 4 domains of component models, at least one domain must be present in any call

    Data_table is initialized here with default values. Users should provide "real" values that will override the default values. Real values can be given using data_table, each line of data_table contains one data_entry. Items of data_entry are comma separated.



  2. data_override_2d

    DESCRIPTION
    This routine performs data override for 2D fields; for usage, see data_override_3d.


  3. data_override_3d

    DESCRIPTION
    This routine performs data override for 3D fields
    call  call data_override(gridname,fieldname,data,time,override)


    INPUT
    gridname    Grid name (Ocean, Ice, Atmosphere, Land)
       [character, dimension(*)]
    fieldname_code    Field name as used in the code (may be different from the name in NetCDF data file)
       [character, dimension(*)]
    time    model time
       [time_type]
    region1    Restricts override to a rectangular region in lat,lon space. This may not be a rectangular region in i,j space when the model grid is tripolar. region1=(/lat_start, lat_end, lon_start, lon_end/) Clarification regarding longitude: lon_start may be greater than lon_end. The region overriden will be from lat_start eastward to lat_end. e.g. if lat_start,lat_end = 180.,0.0 then the western hemisphere will be overriden.
       [real, dimension(4)]
    region2    A second region to override. May be present only if region1 is also present.
       [real, dimension(4)]
    data_index   
       [integer]

    OUTPUT
    data    array containing output data
       [real, dimension(:,:,:)]
    override    TRUE if the field is overriden, FALSE otherwise
       [logical]


DATA SETS

None.


ERROR MESSAGES

None.


top