user_change_diffusivity module reference
Increments the diapycnal diffusivity in a specified band of latitudes and densities.
Data Types
Control structure for user_change_diffusivity |
Functions/Subroutines
This subroutine provides an interface for a user to use to modify the main code to alter the diffusivities as needed. The specific example implemented here augments the diffusivity for a specified range of latitude and coordinate potential density. |
|
This subroutine checks whether the 4 values of range are in ascending order. |
|
This subroutine returns a value that goes smoothly from 0 to 1, stays at 1, and then goes smoothly back to 0 at the four values of range. The transitions are cubic, and have zero first derivatives where the curves hit 0 and 1. The values in range must be in ascending order, as can be checked by calling range_OK. |
|
Set up the module control structure. |
|
Clean up the module control structure. |
Type Documentation
- type, public :: user_change_diff_CS
Control structure for user_change_diffusivity
- Parameters
initialized
True if this control structure has been initialized.
Kd_add
The scale of a diffusivity that is added everywhere without any filtering or scaling [H Z T-1 ~> m2 s-1 or kg m-1 s-1]
lat_range
4 values that define the latitude range over which a diffusivity scaled by Kd_add is added [degrees_N].
rho_range
4 values that define the coordinate potential density range over which a diffusivity scaled by Kd_add is added [R ~> kg m-3].
use_abs_lat
If true, use the absolute value of latitude when setting lat_range.
diag
A structure that is used to regulate the timing of diagnostic output.
Functions/Subroutine Documentation
- subroutine user_change_diff(h, tv, G, GV, US, CS, Kd_lay, Kd_int, T_f, S_f, Kd_int_add)
This subroutine provides an interface for a user to use to modify the main code to alter the diffusivities as needed. The specific example implemented here augments the diffusivity for a specified range of latitude and coordinate potential density.
- Parameters
G [in]
The ocean's grid structure.
GV [in]
The ocean's vertical grid structure
h [in]
Layer thickness [H ~> m or kg m-2].
tv [in]
A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs.
US [in]
A dimensional unit scaling type
CS
This module's control structure.
Kd_lay [inout]
The diapycnal diffusivity of each layer [H Z T-1 ~> m2 s-1 or kg m-1 s-1]
Kd_int [inout]
The diapycnal diffusivity at each interface [H Z T-1 ~> m2 s-1 or kg m-1 s-1]
T_f [in]
Temperature with massless layers filled in vertically [C ~> degC].
S_f [in]
Salinity with massless layers filled in vertically [S ~> ppt].
Kd_int_add
The diapycnal diffusivity that is being added at each interface [H Z T-1 ~> m2 s-1 or kg m-1 s-1]
Callees call graph
Text view
user_change_diffusivity::user_change_diff → mom_eos::eos_domain
user_change_diffusivity::user_change_diff → mom_eos::interface::calculate_density
user_change_diffusivity::user_change_diff → mom_error_handler::mom_error
user_change_diffusivity::user_change_diff → user_change_diffusivity::range_ok
user_change_diffusivity::user_change_diff → user_change_diffusivity::val_weights
Callers call graph
- function range_OK(range) result(OK)
This subroutine checks whether the 4 values of range are in ascending order.
- Parameters
range [in]
Four values to check [arbitrary]
OK
Return value.
- function val_weights(val, range) result(ans)
This subroutine returns a value that goes smoothly from 0 to 1, stays at 1, and then goes smoothly back to 0 at the four values of range. The transitions are cubic, and have zero first derivatives where the curves hit 0 and 1. The values in range must be in ascending order, as can be checked by calling range_OK.
- Parameters
val [in]
Value for which we need an answer [arbitrary units].
range [in]
Range over which the answer is non-zero [arbitrary units].
ans
Return value [nondim].
Callers call graph
- subroutine user_change_diff_init(Time, G, GV, US, param_file, diag, CS)
Set up the module control structure.
- Parameters
Time [in]
The current model time.
G [in]
The ocean's grid structure.
GV [in]
The ocean's vertical grid structure
US [in]
A dimensional unit scaling type
param_file [in]
A structure indicating the open file to parse for model parameter values.
diag [inout]
A structure that is used to regulate diagnostic output.
CS
A pointer that is set to point to the control structure for this module.
Callees call graph
Text view
user_change_diffusivity::user_change_diff_init → mom_error_handler::mom_error
user_change_diffusivity::user_change_diff_init → mom_file_parser::interface::get_param
user_change_diffusivity::user_change_diff_init → mom_file_parser::interface::log_version
user_change_diffusivity::user_change_diff_init → user_change_diffusivity::range_ok
Callers call graph
- subroutine user_change_diff_end(CS)
Clean up the module control structure.
- Parameters
CS
A pointer that is set to point to the control structure for this module.