mom_interpolate module reference
This module provides added functionality to the FMS temporal and spatial interpolation routines.
Data Types
Data type used to store information about forcing datasets that are time series E.g. |
Functions/Subroutines
Read a scalar field based on model time. |
|
Read a 2d field from an external based on model time, potentially including horizontal interpolation and rotation of the data. |
|
Read a 3d field based on model time, and rotate to the model grid. |
|
Set time_type variables in |
|
If necessary, apply an offset to convert from model time to forcing time and then ensure result is within acceptable bounds. |
|
Detailed Description
This module provides added functionality to the FMS temporal and spatial interpolation routines.
Type Documentation
- type mom_interpolate/forcing_timeseries_dataset
Data type used to store information about forcing datasets that are time series E.g. how do we align the data in the model with the time axis in the file?
- Type fields:
% file_name ::
character(len=200)name of file containing river flux forcing% l_time_varying ::
logical.true. => forcing is dependent on model time, .false. => static forcing% data_forcing ::
type(time_type)convert data_forcing_year to time type% data_start ::
type(time_type)convert data_start_year to time type% data_end ::
type(time_type)convert data_end_year to time type% m2d_offset ::
type(time_type)add to model time to get data time
Function/Subroutine Documentation
- subroutine mom_interpolate/time_interp_external_0d(field, time, data_in, verbose, scale)
Read a scalar field based on model time.
- Parameters:
field ::
field[in] Handle for time interpolated fieldtime ::
time[in] The target time for the datadata_in ::
data_in[inout] The interpolated value in arbitrary units [A ~> a]verbose ::
verbose[in] If true, write verbose output for debuggingscale ::
scale[in] A scaling factor that new values of data_in are multiplied by before it is returned [A a-1 ~> 1]
- subroutine mom_interpolate/time_interp_external_2d(field, time, data_in, interp, verbose, horz_interp, mask_out, turns, scale)
Read a 2d field from an external based on model time, potentially including horizontal interpolation and rotation of the data.
- Parameters:
field ::
field[in] Handle for time interpolated fieldtime ::
time[in] The target time for the datadata_in ::
data_in[inout] The array in which to store the interpolated values in arbitrary units [A ~> a]interp ::
interp[in] A flag indicating the temporal interpolation methodverbose ::
verbose[in] If true, write verbose output for debugginghorz_interp ::
horz_interp[in] A structure to control horizontal interpolationmask_out ::
mask_out[out] An array that is true where there is valid dataturns ::
turns[in] Number of quarter turns to rotate the datascale ::
scale[in] A scaling factor that new values of data_in are multiplied by before it is returned [A a-1 ~> 1]
- subroutine mom_interpolate/time_interp_external_3d(field, time, data_in, interp, verbose, horz_interp, mask_out, turns, scale)
Read a 3d field based on model time, and rotate to the model grid.
- Parameters:
field ::
field[in] Handle for time interpolated fieldtime ::
time[in] The target time for the datadata_in ::
data_in[inout] The array in which to store the interpolated values in arbitrary units [A ~> a]interp ::
interp[in] A flag indicating the temporal interpolation methodverbose ::
verbose[in] If true, write verbose output for debugginghorz_interp ::
horz_interp[in] A structure to control horizontal interpolationmask_out ::
mask_out[out] An array that is true where there is valid dataturns ::
turns[in] Number of quarter turns to rotate the datascale ::
scale[in] A scaling factor that new values of data_in are multiplied by before it is returned [A a-1 ~> 1]
- subroutine mom_interpolate/forcing_timeseries_set_time_type_vars(data_start_year, data_end_year, data_ref_year, model_ref_year, data_forcing_year, forcing_dataset)
Set time_type variables in
forcing_timeseries_dataset()type based on integer input TODO: make this part of type based on integer input TODO: make this part offorcing_timeseries_dataset()class if OO is okay in MOM6? class if OO is okay in MOM6?- Parameters:
data_start_year ::
data_start_year[in] first year of data to read (this is ignored for static forcing)data_end_year ::
data_end_year[in] last year of data to read (this is ignored for static forcing)data_ref_year ::
data_ref_year[in] for time-varying forcing, align data_ref_year in file with model_ref_year in modelmodel_ref_year ::
model_ref_year[in] for time-varying forcing, align data_ref_year in file with model_ref_year in modeldata_forcing_year ::
data_forcing_year[in] for static forcing, read file at this date (this is ignored for time-varying forcing)forcing_dataset ::
forcing_dataset[inout] information about forcing file
- function mom_interpolate/map_model_time_to_forcing_time(Time, forcing_dataset)
If necessary, apply an offset to convert from model time to forcing time and then ensure result is within acceptable bounds.
- Parameters:
time :: [in] Model time
forcing_dataset ::
forcing_dataset[in] information about forcing file
- Return:
undefined :: time to read forcing file
- Called from:
- subroutine mom_interpolate/get_external_field_info(field, size, axes, missing)
- Parameters:
field ::
field[in] Handle for time interpolated external field returned from a previous call to init_external_field()size ::
size[inout] Dimension sizes for the input dataaxes ::
axes[inout] Axis types for the input datamissing ::
missing[inout] Missing value for the input data
- Call to:
- Called from:
mom_horizontal_regridding::horiz_interp_and_extrap_tracer::horiz_interp_and_extrap_tracer_fms_idmom_oda_driver_mod::init_oda