MOM6
|
Increments the diapycnal diffusivity in a specified band of latitudes and densities.
Data Types | |
type | user_change_diff_cs |
Control structure for user_change_diffusivity. More... | |
Functions/Subroutines | |
subroutine, public | user_change_diff (h, tv, G, GV, 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. More... | |
logical function | range_ok (range) |
This subroutine checks whether the 4 values of range are in ascending order. More... | |
real function | val_weights (val, range) |
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. More... | |
subroutine, public | user_change_diff_init (Time, G, GV, US, param_file, diag, CS) |
Set up the module control structure. More... | |
subroutine, public | user_change_diff_end (CS) |
Clean up the module control structure. More... | |
|
private |
This subroutine checks whether the 4 values of range are in ascending order.
[in] | range | Four values to check. |
Definition at line 152 of file user_change_diffusivity.F90.
Referenced by user_change_diff(), and user_change_diff_init().
subroutine, public user_change_diffusivity::user_change_diff | ( | real, dimension( g %isd: g %ied, g %jsd: g %jed, g %ke), intent(in) | h, |
type(thermo_var_ptrs), intent(in) | tv, | ||
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(user_change_diff_cs), pointer | CS, | ||
real, dimension(szi_(g),szj_(g),szk_(g)), intent(inout), optional | Kd_lay, | ||
real, dimension(szi_(g),szj_(g),szk_(g)+1), intent(inout), optional | Kd_int, | ||
real, dimension(szi_(g),szj_(g),szk_(g)), intent(in), optional | T_f, | ||
real, dimension(szi_(g),szj_(g),szk_(g)), intent(in), optional | S_f, | ||
real, dimension(:,:,:), optional, pointer | 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.
[in] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure |
[in] | h | Layer thickness [H ~> m or kg m-2]. |
[in] | tv | A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs. |
cs | This module's control structure. | |
[in,out] | kd_lay | The diapycnal diffusivity of each layer [Z2 T-1 ~> m2 s-1]. |
[in,out] | kd_int | The diapycnal diffusivity at each interface [Z2 T-1 ~> m2 s-1]. |
[in] | t_f | Temperature with massless layers filled in vertically [degC]. |
[in] | s_f | Salinity with massless layers filled in vertically [ppt]. |
kd_int_add | The diapycnal diffusivity that is being added at each interface [Z2 T-1 ~> m2 s-1]. |
Definition at line 48 of file user_change_diffusivity.F90.
References mom_error_handler::mom_error(), range_ok(), and val_weights().
subroutine, public user_change_diffusivity::user_change_diff_end | ( | type(user_change_diff_cs), pointer | CS | ) |
Clean up the module control structure.
cs | A pointer that is set to point to the control structure for this module. |
Definition at line 263 of file user_change_diffusivity.F90.
Referenced by mom_set_diffusivity::set_diffusivity_end().
subroutine, public user_change_diffusivity::user_change_diff_init | ( | type(time_type), intent(in) | Time, |
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
type(param_file_type), intent(in) | param_file, | ||
type(diag_ctrl), intent(inout), target | diag, | ||
type(user_change_diff_cs), pointer | CS | ||
) |
Set up the module control structure.
[in] | time | The current model time. |
[in] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure |
[in] | us | A dimensional unit scaling type |
[in] | param_file | A structure indicating the open file to parse for model parameter values. |
[in,out] | diag | A structure that is used to regulate diagnostic output. |
cs | A pointer that is set to point to the control structure for this module. |
Definition at line 191 of file user_change_diffusivity.F90.
References mom_error_handler::mom_error(), and range_ok().
|
private |
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.
[in] | val | Value for which we need an answer. |
[in] | range | Range over which the answer is non-zero. |
Definition at line 166 of file user_change_diffusivity.F90.
Referenced by user_change_diff().