FMS  2024.03
Flexible Modeling System
data_override_mod

Routines to get data in a file whose path is described in a user-provided data_table and do spatial and temporal interpolation if necessary to convert data to model's grid and time. More...

Data Types

interface  data_override
 Interface for inserting and interpolating data into a file for a model's grid and time. Data path must be described in a user-provided data_table, see module description for more information. More...
 
interface  data_override_ug
 Version of Data Override for unstructured grids. More...
 

Functions/Subroutines

subroutine, public data_override_init (Atm_domain_in, Ocean_domain_in, Ice_domain_in, Land_domain_in, Land_domainUG_in, mode)
 Initialize either data_override_r4 or data_override_r8 Users should call data_override_init before calling data_override. More...
 
subroutine, public data_override_unset_domains (unset_Atm, unset_Ocean, unset_Ice, unset_Land, must_be_set)
 Unset domains that had previously been set for use by data_override. More...
 

Detailed Description

Routines to get data in a file whose path is described in a user-provided data_table and do spatial and temporal interpolation if necessary to convert data to model's grid and time.

Author
Z. Liang, M.J. Harrison, M. Winton

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.


Data Type Documentation

◆ data_override_mod::data_override

interface data_override_mod::data_override

Interface for inserting and interpolating data into a file for a model's grid and time. Data path must be described in a user-provided data_table, see module description for more information.

Definition at line 68 of file data_override.F90.

Private Member Functions

 data_override_0d_r4
 
 data_override_0d_r8
 
 data_override_2d_r4
 
 data_override_2d_r8
 
 data_override_3d_r4
 
 data_override_3d_r8
 

◆ data_override_mod::data_override_ug

interface data_override_mod::data_override_ug

Version of Data Override for unstructured grids.

Definition at line 79 of file data_override.F90.

Private Member Functions

 data_override_ug_1d_r4
 
 data_override_ug_1d_r8
 
 data_override_ug_2d_r4
 
 data_override_ug_2d_r8
 

Function/Subroutine Documentation

◆ data_override_init()

subroutine, public data_override_mod::data_override_init ( type (domain2d), intent(in), optional  Atm_domain_in,
type (domain2d), intent(in), optional  Ocean_domain_in,
type (domain2d), intent(in), optional  Ice_domain_in,
type (domain2d), intent(in), optional  Land_domain_in,
type(domainug), intent(in), optional  Land_domainUG_in,
integer, intent(in), optional  mode 
)

Initialize either data_override_r4 or data_override_r8 Users should call data_override_init before calling data_override.

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. The real precision of initialized domains can be specified via the optional mode argument. If no mode is specified, r8_kind is assumed. Mixed mode operation can be accomplished via multiple calls to data_override_init with different mode arguments.

Data_table is initialized with default values in DATA_OVERRIDE_INIT_IMPL_. Users should provide "real" values that will override the default values. Real values can be specified in either data_table or data_table.yaml. Each line of data_table contains one data_entry. Items of data_entry are comma-separated.

Parameters
[in]atm_domain_inAtmosphere domain
[in]ocean_domain_inOcean domain
[in]ice_domain_inIce domain
[in]land_domain_inLand domain
[in]land_domainug_inLand domain, unstructured grid
[in]modeReal precision of initialized domains. Possible values are r4_kind or r8_kind.

Definition at line 116 of file data_override.F90.

◆ data_override_unset_domains()

subroutine, public data_override_mod::data_override_unset_domains ( logical, intent(in), optional  unset_Atm,
logical, intent(in), optional  unset_Ocean,
logical, intent(in), optional  unset_Ice,
logical, intent(in), optional  unset_Land,
logical, intent(in), optional  must_be_set 
)

Unset domains that had previously been set for use by data_override.

This subroutine deallocates any data override domains that have been set.

Parameters
[in]unset_landSet to true to unset the respective domain
[in]must_be_setSet to false to suppress the error when attempting to unset an uninitialized domain

Definition at line 150 of file data_override.F90.