MOM_interp_infra module reference
This module wraps the FMS temporal and spatial interpolation routines
Data Types
Handle of an external field for interpolation |
Generic Interfaces
Read a field based on model time, and rotate to the model domain. |
|
perform horizontal interpolation of field |
|
build weights for horizontal interpolation of field |
Functions/Subroutines
Do any initialization for the horizontal interpolation |
|
Do any initialization for the time and space interpolation infrastructure |
|
perform horizontal interpolation of a 2d field using pre-computed weights source and destination coordinates are 2d |
|
perform horizontal interpolation of a 3d field using pre-computed weights source and destination coordinates are 2d |
|
build horizontal interpolation weights from source grid defined by 2d lon/lat to destination grid defined by 2d lon/lat |
|
get size of an external field from field index |
|
get axes of an external field from field index |
|
get missing value of an external field from field index |
|
Get information about the external fields. |
|
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 |
|
initialize an external field |
Type Documentation
- type :: external_field
Handle of an external field for interpolation
- Parameters
id
FMS ID for the interpolated field
filename
Filename containing the field values
label
Field name in the file
Generic Interface Documentation
- interface time_interp_extern
Read a field based on model time, and rotate to the model domain.
Callers call graph
- interface run_horiz_interp
perform horizontal interpolation of field
- interface build_horiz_interp_weights
build weights for horizontal interpolation of field
Functions/Subroutine Documentation
- subroutine horizontal_interp_init()
Do any initialization for the horizontal interpolation
Callers call graph
External calls
- horiz_interp_mod
horiz_interp_init (horiz_interp_mod::horiz_interp_init)
- subroutine time_interp_extern_init()
Do any initialization for the time and space interpolation infrastructure
Callers call graph
Text view
mom_ale_sponge::set_up_ale_sponge_field_varying → mom_interp_infra::time_interp_extern_init
mom_diabatic_aux::diabatic_aux_init → mom_interp_infra::time_interp_extern_init
mom_ice_shelf::initialize_shelf_mass → mom_interp_infra::time_interp_extern_init
mom_mixed_layer_restrat::mixedlayer_restrat_init → mom_interp_infra::time_interp_extern_init
mom_open_boundary::open_boundary_config → mom_interp_infra::time_interp_extern_init
External calls
- time_interp_external2_mod
time_interp_external_init (time_interp_external2_mod::time_interp_external_init)
- subroutine horiz_interp_from_weights_field2d(Interp, data_in, data_out, verbose, mask_in, mask_out, missing_value, missing_permit, err_msg)
perform horizontal interpolation of a 2d field using pre-computed weights source and destination coordinates are 2d
- Parameters
Interp [in]
type containing interpolation options and weights
data_in [in]
input data
data_out [out]
output data
verbose [in]
verbosity level
mask_in [in]
mask for input data
mask_out [out]
mask for output data
missing_value [in]
A value indicating missing data
missing_permit [in]
number of allowed points with missing value for interpolation (0-3)
err_msg [out]
error message
External calls
- horiz_interp_mod
horiz_interp (horiz_interp_mod::horiz_interp)
- subroutine horiz_interp_from_weights_field3d(Interp, data_in, data_out, verbose, mask_in, mask_out, missing_value, missing_permit, err_msg)
perform horizontal interpolation of a 3d field using pre-computed weights source and destination coordinates are 2d
- Parameters
Interp [in]
type containing interpolation options and weights
data_in [in]
input data
data_out [out]
output data
verbose [in]
verbosity level
mask_in [in]
mask for input data
mask_out [out]
mask for output data
missing_value [in]
A value indicating missing data
missing_permit [in]
number of allowed points with missing value for interpolation (0-3)
err_msg [out]
error message
External calls
- horiz_interp_mod
horiz_interp (horiz_interp_mod::horiz_interp)
- subroutine build_horiz_interp_weights_2d_to_2d(Interp, lon_in, lat_in, lon_out, lat_out, verbose, interp_method, num_nbrs, max_dist, src_modulo, mask_in, mask_out, is_latlon_in, is_latlon_out)
build horizontal interpolation weights from source grid defined by 2d lon/lat to destination grid defined by 2d lon/lat
- Parameters
Interp [inout]
type containing interpolation options and weights
lon_in [in]
input longitude 2d
lat_in [in]
input latitude 2d
lon_out [in]
output longitude 2d
lat_out [in]
output latitude 2d
verbose [in]
verbosity level
interp_method [in]
interpolation method
num_nbrs [in]
number of nearest neighbors
max_dist [in]
maximum region of influence
src_modulo [in]
periodicity of E-W boundary
mask_in [in]
mask for input data
mask_out [inout]
mask for output data
is_latlon_in [in]
input grid is regular lat/lon grid
is_latlon_out [in]
output grid is regular lat/lon grid
External calls
- horiz_interp_mod
horiz_interp_new (horiz_interp_mod::horiz_interp_new)
- function get_extern_field_size(index)
get size of an external field from field index
- Parameters
index [in]
field index
get_extern_field_size
field size
Callers call graph
External calls
- time_interp_external2_mod
get_external_field_size (time_interp_external2_mod::get_external_field_size)
- function get_extern_field_axes(field) result(axes)
get axes of an external field from field index
- Parameters
field [in]
Field handle
axes
Field axes
Callees call graph
Callers call graph
External calls
- netcdf
nf90_close (netcdf::nf90_close)
nf90_get_var (netcdf::nf90_get_var)
nf90_inq_varid (netcdf::nf90_inq_varid)
nf90_inquire_dimension (netcdf::nf90_inquire_dimension)
nf90_inquire_variable (netcdf::nf90_inquire_variable)
nf90_open (netcdf::nf90_open)
- function get_extern_field_missing(index)
get missing value of an external field from field index
- Parameters
index [in]
field index
get_extern_field_missing
field missing value
Callers call graph
External calls
- time_interp_external2_mod
get_external_field_missing (time_interp_external2_mod::get_external_field_missing)
- subroutine get_external_field_info(field, size, axes, missing)
Get information about the external fields.
- Parameters
field [in]
handle for time interpolated external field returned from a previous call to init_external_field()
size [inout]
Dimension sizes for the input data
axes [inout]
Axis types for the input data
missing [inout]
Missing value for the input data
Callees call graph
Callers call graph
- subroutine time_interp_extern_0d(field, time, data_in, verbose)
Read a scalar field based on model time.
- Parameters
field [in]
Handle for time interpolated field
time [in]
The target time for the data
data_in [inout]
The interpolated value
verbose [in]
If true, write verbose output for debugging
External calls
- time_interp_external2_mod
time_interp_external (time_interp_external2_mod::time_interp_external)
- subroutine time_interp_extern_2d(field, time, data_in, interp, verbose, horz_interp, mask_out)
Read a 2d field from an external based on model time, potentially including horizontal interpolation and rotation of the data
- Parameters
field [in]
Handle for time interpolated field
time [in]
The target time for the data
data_in [inout]
The array in which to store the interpolated values
interp [in]
A flag indicating the temporal interpolation method
verbose [in]
If true, write verbose output for debugging
horz_interp [in]
A structure to control horizontal interpolation
mask_out [out]
An array that is true where there is valid data
External calls
- time_interp_external2_mod
time_interp_external (time_interp_external2_mod::time_interp_external)
- subroutine time_interp_extern_3d(field, time, data_in, interp, verbose, horz_interp, mask_out)
Read a 3d field based on model time, and rotate to the model grid
- Parameters
field [in]
Handle for time interpolated field
time [in]
The target time for the data
data_in [inout]
The array in which to store the interpolated values
interp [in]
A flag indicating the temporal interpolation method
verbose [in]
If true, write verbose output for debugging
horz_interp [in]
A structure to control horizontal interpolation
mask_out [out]
An array that is true where there is valid data
External calls
- time_interp_external2_mod
time_interp_external (time_interp_external2_mod::time_interp_external)
- function init_extern_field(file, fieldname, MOM_domain, domain, verbose, threading, ierr, ignore_axis_atts, correct_leap_year_inconsistency) result(field)
initialize an external field
- Parameters
file [in]
The name of the file to read
fieldname [in]
The name of the field in the file
threading [in]
A flag specifying whether the root PE reads the data and broadcasts it (SINGLE_FILE) or all processors read (MULTIPLE, the default).
verbose [in]
If true, write verbose output for debugging
domain [in]
A domain2d type that describes the decomposition
MOM_Domain [in]
A MOM_Domain that describes the decomposition
ierr [out]
Returns a non-zero error code in case of failure
ignore_axis_atts [in]
If present and true, do not issue a fatal error if the axis Cartesian attribute is not set to a recognized value.
correct_leap_year_inconsistency [in]
If present and true, then if, (1) a calendar containing leap years is in use, and (2) the modulo time period of the data is an integer number of years, then map a model date of Feb 29. onto a common year on Feb. 28.
field
Handle to external field
Callees call graph
Callers call graph
Text view
marbl_tracers::initialize_marbl_tracers → mom_interp_infra::init_extern_field
mom_ale_sponge::set_up_ale_sponge_field_varying → mom_interp_infra::init_extern_field
mom_ale_sponge::set_up_ale_sponge_vel_field_varying → mom_interp_infra::init_extern_field
mom_cfc_cap::register_cfc_cap → mom_interp_infra::init_extern_field
mom_diabatic_aux::diabatic_aux_init → mom_interp_infra::init_extern_field
mom_ice_shelf::initialize_ice_smb → mom_interp_infra::init_extern_field
mom_ice_shelf::initialize_shelf_mass → mom_interp_infra::init_extern_field
mom_mixed_layer_restrat::mixedlayer_restrat_init → mom_interp_infra::init_extern_field
mom_oda_driver_mod::init_oda → mom_interp_infra::init_extern_field
mom_open_boundary::allocate_segment_field_data → mom_interp_infra::init_extern_field
External calls
- netcdf_io_mod
get_num_variables (netcdf_io_mod::get_num_variables)
get_variable_names (netcdf_io_mod::get_variable_names)
netcdf_file_close (netcdf_io_mod::netcdf_file_close)
netcdf_file_open (netcdf_io_mod::netcdf_file_open)
- time_interp_external2_mod
init_external_field (time_interp_external2_mod::init_external_field)