mom_coupler_types module reference
This module provides coupler type interfaces for use by MOM6.
Functions/Subroutines
Generate a 2-D coupler type using a 1-D coupler type as a template. |
|
Generate a 3-D coupler type using a 1-D coupler type as a template. |
|
Generate one 2-D coupler type using another 2-D coupler type as a template. |
|
Generate a 3-D coupler type using a 2-D coupler type as a template. |
|
Generate a 2-D coupler type using a 3-D coupler type as a template. |
|
Generate a 3-D coupler type using another 3-D coupler type as a template. |
|
Copy all elements of the data in a coupler_2d_bc_type into another. |
|
Copy all elements of the data in a coupler_3d_bc_type into another. |
|
Copy all elements of the data in a coupler_2d_bc_type into a coupler_3d_bc_type. |
|
Increment data in all elements of one coupler_2d_bc_type with the data from another. |
|
Increment data in all elements of one coupler_3d_bc_type with the data from another. |
|
Increment data in the elements of a coupler_2d_bc_type with weighted averages of elements of a coupler_3d_bc_type. |
|
Rescales the fields in the elements of a coupler_2d_bc_type by multiplying by a factor scale. |
|
Rescales the fields in the elements of a coupler_3d_bc_type by multiplying by a factor scale. |
|
Redistribute the data in all elements of one coupler_2d_bc_type into another, which may be on different processors with a different decomposition. |
|
Redistribute the data in all elements of one coupler_3d_bc_type into another, which may be on different processors with a different decomposition. |
|
Potentially override the values in a coupler_2d_bc_type. |
|
Extract a 2d field from a coupler_2d_bc_type into a two-dimensional array, using a MOM-specific interface. |
|
Set single 2d field in coupler_2d_bc_type from a two-dimensional array, using a MOM-specific interface. |
|
Register the diagnostics of a coupler_2d_bc_type. |
|
Write out all diagnostics of elements of a coupler_2d_bc_type. |
|
Write out checksums for the elements of a coupler_2d_bc_type. |
|
Write out checksums for the elements of a coupler_3d_bc_type. |
|
Indicate whether a coupler_1d_bc_type has been initialized. |
|
Indicate whether a coupler_2d_bc_type has been initialized. |
|
Indicate whether a coupler_3d_bc_type has been initialized. |
|
Deallocate all data associated with a coupler_1d_bc_type. |
|
Deallocate all data associated with a coupler_2d_bc_type. |
Detailed Description
This module provides coupler type interfaces for use by MOM6.
Function/Subroutine Documentation
- subroutine mom_coupler_types/ct_spawn_1d_2d(var_in, var, idim, jdim, suffix, as_needed)
Generate a 2-D coupler type using a 1-D coupler type as a template.
- Parameters:
var_in ::
var_in[in] structure from which to copy informationvar ::
var[inout] structure into which to copy informationidim ::
idim[in] The data and computational domain extents of the first dimension in a non-decreasing listjdim ::
jdim[in] The data and computational domain extents of the second dimension in a non-decreasing listsuffix ::
suffix[in] optional suffix to make the name identifier uniqueas_needed ::
as_needed[in] Only do the spawn if the target type (var) is not set and the parent type (var_in) is set.
- subroutine mom_coupler_types/ct_spawn_1d_3d(var_in, var, idim, jdim, kdim, suffix, as_needed)
Generate a 3-D coupler type using a 1-D coupler type as a template.
- Parameters:
var_in ::
var_in[in] structure from which to copy informationvar ::
var[inout] structure into which to copy informationidim ::
idim[in] The data and computational domain extents of the first dimension in a non-decreasing listjdim ::
jdim[in] The data and computational domain extents of the second dimension in a non-decreasing listkdim ::
kdim[in] The array extents of the third dimension in a non-decreasing listsuffix ::
suffix[in] optional suffix to make the name identifier uniqueas_needed ::
as_needed[in] Only do the spawn if the target type (var) is not set and the parent type (var_in) is set.
- subroutine mom_coupler_types/ct_spawn_2d_2d(var_in, var, idim, jdim, suffix, as_needed)
Generate one 2-D coupler type using another 2-D coupler type as a template.
- Parameters:
var_in ::
var_in[in] structure from which to copy informationvar ::
var[inout] structure into which to copy informationidim ::
idim[in] The data and computational domain extents of the first dimension in a non-decreasing listjdim ::
jdim[in] The data and computational domain extents of the second dimension in a non-decreasing listsuffix ::
suffix[in] optional suffix to make the name identifier uniqueas_needed ::
as_needed[in] Only do the spawn if the target type (var) is not set and the parent type (var_in) is set.
- subroutine mom_coupler_types/ct_spawn_2d_3d(var_in, var, idim, jdim, kdim, suffix, as_needed)
Generate a 3-D coupler type using a 2-D coupler type as a template.
- Parameters:
var_in ::
var_in[in] structure from which to copy informationvar ::
var[inout] structure into which to copy informationidim ::
idim[in] The data and computational domain extents of the first dimension in a non-decreasing listjdim ::
jdim[in] The data and computational domain extents of the second dimension in a non-decreasing listkdim ::
kdim[in] The array extents of the third dimension in a non-decreasing listsuffix ::
suffix[in] optional suffix to make the name identifier uniqueas_needed ::
as_needed[in] Only do the spawn if the target type (var) is not set and the parent type (var_in) is set.
- subroutine mom_coupler_types/ct_spawn_3d_2d(var_in, var, idim, jdim, suffix, as_needed)
Generate a 2-D coupler type using a 3-D coupler type as a template.
- Parameters:
var_in ::
var_in[in] structure from which to copy informationvar ::
var[inout] structure into which to copy informationidim ::
idim[in] The data and computational domain extents of the first dimension in a non-decreasing listjdim ::
jdim[in] The data and computational domain extents of the second dimension in a non-decreasing listsuffix ::
suffix[in] optional suffix to make the name identifier uniqueas_needed ::
as_needed[in] Only do the spawn if the target type (var) is not set and the parent type (var_in) is set.
- subroutine mom_coupler_types/ct_spawn_3d_3d(var_in, var, idim, jdim, kdim, suffix, as_needed)
Generate a 3-D coupler type using another 3-D coupler type as a template.
- Parameters:
var_in ::
var_in[in] structure from which to copy informationvar ::
var[inout] structure into which to copy informationidim ::
idim[in] The data and computational domain extents of the first dimension in a non-decreasing listjdim ::
jdim[in] The data and computational domain extents of the second dimension in a non-decreasing listkdim ::
kdim[in] The array extents of the third dimension in a non-decreasing listsuffix ::
suffix[in] optional suffix to make the name identifier uniqueas_needed ::
as_needed[in] Only do the spawn if the target type (var) is not set and the parent type (var_in) is set.
- subroutine mom_coupler_types/ct_copy_data_2d(var_in, var, halo_size, bc_index, field_index, exclude_flux_type, only_flux_type, pass_through_ice)
Copy all elements of the data in a coupler_2d_bc_type into another. Both must have the same array sizes.
- Parameters:
var_in ::
var_in[in] BC_type structure with the data to copyvar ::
var[inout] The recipient BC_type structurehalo_size ::
halo_size[in] The extent of the halo to copy; 0 by defaultbc_index ::
bc_index[in] The index of the boundary condition that is being copiedfield_index ::
field_index[in] The index of the field in the boundary condition that is being copiedexclude_flux_type ::
exclude_flux_type[in] A string describing which types of fluxes to exclude from this copy.only_flux_type ::
only_flux_type[in] A string describing which types of fluxes to include from this copy.pass_through_ice ::
pass_through_ice[in] If true, only copy BCs whose value of pass_through ice matches this
- subroutine mom_coupler_types/ct_copy_data_3d(var_in, var, halo_size, bc_index, field_index, exclude_flux_type, only_flux_type, pass_through_ice)
Copy all elements of the data in a coupler_3d_bc_type into another. Both must have the same array sizes.
- Parameters:
var_in ::
var_in[in] BC_type structure with the data to copyvar ::
var[inout] The recipient BC_type structurehalo_size ::
halo_size[in] The extent of the halo to copy; 0 by defaultbc_index ::
bc_index[in] The index of the boundary condition that is being copiedfield_index ::
field_index[in] The index of the field in the boundary condition that is being copiedexclude_flux_type ::
exclude_flux_type[in] A string describing which types of fluxes to exclude from this copy.only_flux_type ::
only_flux_type[in] A string describing which types of fluxes to include from this copy.pass_through_ice ::
pass_through_ice[in] If true, only copy BCs whose value of pass_through ice matches this
- subroutine mom_coupler_types/ct_copy_data_2d_3d(var_in, var, halo_size, bc_index, field_index, exclude_flux_type, only_flux_type, pass_through_ice, ind3_start, ind3_end)
Copy all elements of the data in a coupler_2d_bc_type into a coupler_3d_bc_type. Both must have the same array sizes for the first two dimensions, while the extent of the 3rd dimension that is being filled may be specified via optional arguments.
- Parameters:
var_in ::
var_in[in] BC_type structure with the data to copyvar ::
var[inout] The recipient BC_type structurehalo_size ::
halo_size[in] The extent of the halo to copy; 0 by defaultbc_index ::
bc_index[in] The index of the boundary condition that is being copiedfield_index ::
field_index[in] The index of the field in the boundary condition that is being copiedexclude_flux_type ::
exclude_flux_type[in] A string describing which types of fluxes to exclude from this copy.only_flux_type ::
only_flux_type[in] A string describing which types of fluxes to include from this copy.pass_through_ice ::
pass_through_ice[in] If true, only copy BCs whose value of pass_through ice matches thisind3_start ::
ind3_start[in] The starting value of the 3rd index of the 3d type to fill in.ind3_end ::
ind3_end[in] The ending value of the 3rd index of the 3d type to fill in.
- subroutine mom_coupler_types/ct_increment_data_2d(var_in, var, halo_size, scale_factor, scale_prev)
Increment data in all elements of one coupler_2d_bc_type with the data from another. Both must have the same array sizes.
- Parameters:
var_in ::
var_in[in] A coupler_type structure with data in arbitrary arbitrary units [A] to add to the other typevar ::
var[inout] A coupler_type structure with data in arbitrary units [B] whose fields are being incrementedhalo_size ::
halo_size[in] The extent of the halo to increment; 0 by defaultscale_factor ::
scale_factor[in] A scaling factor for the data that is being added in arbitrary units [C A-1]scale_prev ::
scale_prev[in] A scaling factor for the data that is already here in arbitrary units [C B-1]
- subroutine mom_coupler_types/ct_increment_data_3d(var_in, var, halo_size, scale_factor, scale_prev, exclude_flux_type, only_flux_type)
Increment data in all elements of one coupler_3d_bc_type with the data from another. Both must have the same array sizes.
- Parameters:
var_in ::
var_in[in] A coupler_type structure with data in arbitrary arbitrary units [A] to add to the other typevar ::
var[inout] A coupler_type structure with data in arbitrary units [B] whose fields are being incrementedhalo_size ::
halo_size[in] The extent of the halo to increment; 0 by defaultscale_factor ::
scale_factor[in] A scaling factor for the data that is being added in arbitrary units [C A-1]scale_prev ::
scale_prev[in] A scaling factor for the data that is already here in arbitrary units [C B-1]exclude_flux_type ::
exclude_flux_type[in] A string describing which types of fluxes to exclude from this increment.only_flux_type ::
only_flux_type[in] A string describing which types of fluxes to include from this increment.
- subroutine mom_coupler_types/ct_increment_data_2d_3d(var_in, weights, var, halo_size)
Increment data in the elements of a coupler_2d_bc_type with weighted averages of elements of a coupler_3d_bc_type.
- Parameters:
var_in ::
var_in[in] coupler_type structure with the data to add to the other typeweights ::
weights[in] An array of normalized weights for the 3d-data to increment the 2d-data [nondim]. There is no renormalization, so if the weights do not sum to 1 in the 3rd dimension there may be adverse consequences!var ::
var[inout] The coupler_type structure whose fields are being incrementedhalo_size ::
halo_size[in] The extent of the halo to increment; 0 by default
- subroutine mom_coupler_types/ct_rescale_data_2d(var, scale)
Rescales the fields in the elements of a coupler_2d_bc_type by multiplying by a factor scale. If scale is 0, this is a direct assignment to 0, so that NaNs will not persist.
- Parameters:
var ::
var[inout] The BC_type structure whose fields are being rescaled, with the internal data units perhaps changing from arbitrary units [A] to other arbitrary units [B]scale ::
scale[in] A scaling factor to multiply fields by in arbitrary units [B A-1]
- subroutine mom_coupler_types/ct_rescale_data_3d(var, scale)
Rescales the fields in the elements of a coupler_3d_bc_type by multiplying by a factor scale. If scale is 0, this is a direct assignment to 0, so that NaNs will not persist.
- Parameters:
var ::
var[inout] The BC_type structure whose fields are being rescaled, with the internal data units perhaps changing from arbitrary units [A] to other arbitrary units [B]scale ::
scale[in] A scaling factor to multiply fields by in arbitrary units [B A-1]
- subroutine mom_coupler_types/ct_redistribute_data_2d(var_in, domain_in, var_out, domain_out, complete)
Redistribute the data in all elements of one coupler_2d_bc_type into another, which may be on different processors with a different decomposition.
- Parameters:
var_in ::
var_in[in] BC_type structure with the data to copydomain_in ::
domain_in[in] The FMS domain for the input structurevar_out ::
var_out[inout] The recipient BC_type structure (data intent out)domain_out ::
domain_out[in] The FMS domain for the output structurecomplete ::
complete[in] If true, complete the updates
- subroutine mom_coupler_types/ct_redistribute_data_3d(var_in, domain_in, var_out, domain_out, complete)
Redistribute the data in all elements of one coupler_3d_bc_type into another, which may be on different processors with a different decomposition.
- Parameters:
var_in ::
var_in[in] BC_type structure with the data to copydomain_in ::
domain_in[in] The FMS domain for the input structurevar_out ::
var_out[inout] The recipient BC_type structure (data intent out)domain_out ::
domain_out[in] The FMS domain for the output structurecomplete ::
complete[in] If true, complete the updates
- subroutine mom_coupler_types/coupler_type_data_override(gridname, var, time)
Potentially override the values in a coupler_2d_bc_type.
- Parameters:
gridname ::
gridname[in] 3-character long model grid IDvar ::
var[inout] BC_type structure to overridetime ::
time[in] The current model time
- subroutine mom_coupler_types/extract_coupler_type_data(var_in, bc_index, array_out, scale_factor, halo_size, idim, jdim, field_index, turns)
Extract a 2d field from a coupler_2d_bc_type into a two-dimensional array, using a MOM-specific interface.
- Parameters:
var_in ::
var_in[in] BC_type structure with the data to extract The internal data has arbitrary units [B].bc_index ::
bc_index[in] The index of the boundary condition that is being copiedarray_out ::
array_out[out] The recipient array for the field in arbitrary units [A]; the size of this array must match the size of the data being copied unless idim and jdim are supplied.scale_factor ::
scale_factor[in] A scaling factor for the data that is being extracted, in arbitrary units [A B-1]halo_size ::
halo_size[in] The extent of the halo to copy; 0 by defaultidim ::
idim[in] The data and computational domain extents of the first dimension of the output array in a non-decreasing listjdim ::
jdim[in] The data and computational domain extents of the second dimension of the output array in a non-decreasing listfield_index ::
field_index[in] The index of the field in the boundary condition that is being copied, or the surface flux by default.turns ::
turns[in] The number of quarter-turns from the unrotated coupler_2d_bt_type to model grid
- subroutine mom_coupler_types/set_coupler_type_data(array_in, bc_index, var, solubility, scale_factor, halo_size, idim, jdim, field_index, turns)
Set single 2d field in coupler_2d_bc_type from a two-dimensional array, using a MOM-specific interface.
- Parameters:
array_in ::
array_in[in] The source array for the field in arbitrary units [A]; the size of this array must match the size of the data being copied unless idim and jdim are supplied.bc_index ::
bc_index[in] The index of the boundary condition that is being copiedvar ::
var[inout] BC_type structure with the data to set The internal data has arbitrary units [B].solubility ::
solubility[in] If true and field index is missing, set the solubility field. Otherwise set the surface concentration (the default).scale_factor ::
scale_factor[in] A scaling factor for the data that is being set, in arbitrary units [B A-1]halo_size ::
halo_size[in] The extent of the halo to copy; 0 by defaultidim ::
idim[in] The data and computational domain extents of the first dimension of the output array in a non-decreasing listjdim ::
jdim[in] The data and computational domain extents of the second dimension of the output array in a non-decreasing listfield_index ::
field_index[in] The index of the field in the boundary condition that is being set. The surface concentration is set by default.turns ::
turns[in] The number of quarter-turns from the unrotated coupler_2d_bt_type to model grid
- Called from:
advection_test_tracer::advection_test_tracer_surface_stateboundary_impulse_tracer::boundary_impulse_tracer_surface_statedome_tracer::dome_tracer_surface_stateregional_dyes::dye_tracer_surface_stateideal_age_example::ideal_age_tracer_surface_stateisomip_tracer::isomip_tracer_surface_stateoil_tracer::oil_tracer_surface_stateuser_tracer_example::user_tracer_surface_state
- subroutine mom_coupler_types/coupler_type_set_diags(var, diag_name, axes, time)
Register the diagnostics of a coupler_2d_bc_type.
- Parameters:
var ::
var[inout] BC_type structure for which to register diagnosticsdiag_name ::
diag_name[in] name for diagnostic file, or blank not to register the fieldsaxes ::
axes[in] array of axes identifiers for diagnostic variable registrationtime ::
time[in] model time variable for registering diagnostic field
- Called from:
- subroutine mom_coupler_types/coupler_type_send_data(var, Time)
Write out all diagnostics of elements of a coupler_2d_bc_type.
- Parameters:
var ::
var[in] BC_type structure with the diagnostics to writetime :: [in] The current model time
- Called from:
mom_diagnostics::post_surface_thermo_diagsocean_model_mod::update_ocean_model
- subroutine mom_coupler_types/ct_write_chksums_2d(var, outunit, name_lead)
Write out checksums for the elements of a coupler_2d_bc_type.
- Parameters:
var ::
var[in] BC_type structure for which to register diagnosticsoutunit ::
outunit[in] The index of a open output filename_lead ::
name_lead[in] An optional prefix for the variable names
- subroutine mom_coupler_types/ct_write_chksums_3d(var, outunit, name_lead)
Write out checksums for the elements of a coupler_3d_bc_type.
- Parameters:
var ::
var[in] BC_type structure for which to register diagnosticsoutunit ::
outunit[in] The index of a open output filename_lead ::
name_lead[in] An optional prefix for the variable names
- function mom_coupler_types/ct_initialized_1d(var)
Indicate whether a coupler_1d_bc_type has been initialized.
- Parameters:
var ::
var[in] BC_type structure to be deconstructed- Called from:
mom_coupler_types::coupler_type_initialized::ct_initialized_1d
- function mom_coupler_types/ct_initialized_2d(var)
Indicate whether a coupler_2d_bc_type has been initialized.
- Parameters:
var ::
var[in] BC_type structure to be deconstructed- Called from:
mom_coupler_types::coupler_type_initialized::ct_initialized_2d
- function mom_coupler_types/ct_initialized_3d(var)
Indicate whether a coupler_3d_bc_type has been initialized.
- Parameters:
var ::
var[in] BC_type structure to be deconstructed- Called from:
mom_coupler_types::coupler_type_initialized::ct_initialized_3d
- subroutine mom_coupler_types/ct_destructor_1d(var)
Deallocate all data associated with a coupler_1d_bc_type.
- Parameters:
var ::
var[inout] BC_type structure to be deconstructed
- subroutine mom_coupler_types/ct_destructor_2d(var)
Deallocate all data associated with a coupler_2d_bc_type.
- Parameters:
var ::
var[inout] BC_type structure to be deconstructed