MOM6
|
Implements sponge regions in isopycnal mode.
By Robert Hallberg, March 1999-June 2000
This program contains the subroutines that implement sponge regions, in which the stratification and water mass properties are damped toward some profiles. There are three externally callable subroutines in this file.
initialize_sponge determines the mapping from the model variables into the arrays of damped columns. This remapping is done for efficiency and to conserve memory. Only columns which have positive inverse damping times and which are deeper than a supplied depth are placed in sponges. The inverse damping time is also stored in this subroutine, and memory is allocated for all of the reference profiles which will subsequently be provided through calls to set_up_sponge_field. The first two arguments are a two-dimensional array containing the damping rates, and the interface heights to damp towards.
set_up_sponge_field is called to provide a reference profile and the location of the field that will be damped back toward that reference profile. A third argument, the number of layers in the field is also provided, but this should always be nz.
Apply_sponge damps all of the fields that have been registered with set_up_sponge_field toward their reference profiles. The four arguments are the thickness to be damped, the amount of time over which the damping occurs, and arrays to which the movement of fluid into a layer from above and below will be added. The effect on momentum of the sponge may be accounted for later using the movement of water recorded in these later arrays.
Data Types | |
type | p2d |
A structure for creating arrays of pointers to 2D arrays. More... | |
type | p3d |
A structure for creating arrays of pointers to 3D arrays. More... | |
type | sponge_cs |
This control structure holds memory and parameters for the MOM_sponge module. More... | |
Functions/Subroutines | |
subroutine, public | initialize_sponge (Iresttime, int_height, G, param_file, CS, GV, Iresttime_i_mean, int_height_i_mean) |
This subroutine determines the number of points which are within sponges in this computational domain. Only points that have positive values of Iresttime and which mask2dT indicates are ocean points are included in the sponges. It also stores the target interface heights. More... | |
subroutine, public | init_sponge_diags (Time, G, GV, US, diag, CS) |
This subroutine sets up diagnostics for the sponges. It is separate from initialize_sponge because it requires fields that are not readily available where initialize_sponge is called. More... | |
subroutine, public | set_up_sponge_field (sp_val, f_ptr, G, nlay, CS, sp_val_i_mean) |
This subroutine stores the reference profile for the variable whose address is given by f_ptr. nlay is the number of layers in this variable. More... | |
subroutine, public | set_up_sponge_ml_density (sp_val, G, CS, sp_val_i_mean) |
This subroutine stores the reference value for mixed layer density. It is handled differently from other values because it is only used in determining which layers can be inflated. More... | |
subroutine, public | apply_sponge (h, dt, G, GV, US, ea, eb, CS, Rcv_ml) |
This subroutine applies damping to the layers thicknesses, mixed layer buoyancy, and a variety of tracers for every column where there is damping. More... | |
subroutine, public | sponge_end (CS) |
This call deallocates any memory in the sponge control structure. More... | |
subroutine, public mom_sponge::apply_sponge | ( | real, dimension(szi_(g),szj_(g),szk_(g)), intent(inout) | h, |
real, intent(in) | dt, | ||
type(ocean_grid_type), intent(inout) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
real, dimension(szi_(g),szj_(g),szk_(g)), intent(inout) | ea, | ||
real, dimension(szi_(g),szj_(g),szk_(g)), intent(inout) | eb, | ||
type(sponge_cs), pointer | CS, | ||
real, dimension(szi_(g),szj_(g)), intent(inout), optional | Rcv_ml | ||
) |
This subroutine applies damping to the layers thicknesses, mixed layer buoyancy, and a variety of tracers for every column where there is damping.
[in,out] | g | The ocean's grid structure |
[in] | gv | The ocean's vertical grid structure |
[in] | us | A dimensional unit scaling type |
[in,out] | h | Layer thicknesses [H ~> m or kg m-2] |
[in] | dt | The amount of time covered by this call [T ~> s]. |
[in,out] | ea | An array to which the amount of fluid entrained |
[in,out] | eb | An array to which the amount of fluid entrained |
cs | A pointer to the control structure for this module that is set by a previous call to initialize_sponge. | |
[in,out] | rcv_ml | The coordinate density of the mixed layer [R ~> kg m-3]. |
Definition at line 324 of file MOM_sponge.F90.
References mom_spatial_means::global_i_mean(), and mom_error_handler::mom_error().
Referenced by mom_diabatic_driver::layered_diabatic().
subroutine, public mom_sponge::init_sponge_diags | ( | type(time_type), intent(in), target | Time, |
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
type(diag_ctrl), intent(inout), target | diag, | ||
type(sponge_cs), pointer | CS | ||
) |
This subroutine sets up diagnostics for the sponges. It is separate from initialize_sponge because it requires fields that are not readily available where initialize_sponge is called.
[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,out] | diag | A structure that is used to regulate diagnostic output |
cs | A pointer to the control structure for this module that is set by a previous call to initialize_sponge. |
Definition at line 194 of file MOM_sponge.F90.
Referenced by mom::initialize_mom().
subroutine, public mom_sponge::initialize_sponge | ( | real, dimension(szi_(g),szj_(g)), intent(in) | Iresttime, |
real, dimension(szi_(g),szj_(g),szk_(g)+1), intent(in) | int_height, | ||
type(ocean_grid_type), intent(in) | G, | ||
type(param_file_type), intent(in) | param_file, | ||
type(sponge_cs), pointer | CS, | ||
type(verticalgrid_type), intent(in) | GV, | ||
real, dimension( g %jsd: g %jed), intent(in), optional | Iresttime_i_mean, | ||
real, dimension( g %jsd: g %jed, g %ke+1), intent(in), optional | int_height_i_mean | ||
) |
This subroutine determines the number of points which are within sponges in this computational domain. Only points that have positive values of Iresttime and which mask2dT indicates are ocean points are included in the sponges. It also stores the target interface heights.
[in] | g | The ocean's grid structure |
[in] | iresttime | The inverse of the restoring time [s-1]. |
[in] | int_height | The interface heights to damp back toward [Z ~> m]. |
[in] | param_file | A structure to parse for run-time parameters |
cs | A pointer that is set to point to the control structure for this module | |
[in] | gv | The ocean's vertical grid structure |
[in] | iresttime_i_mean | The inverse of the restoring time for |
[in] | int_height_i_mean | The interface heights toward which to |
Definition at line 90 of file MOM_sponge.F90.
References mom_error_handler::mom_error().
Referenced by bfb_initialization::bfb_initialize_sponges_southonly(), dome2d_initialization::dome2d_initialize_sponges(), dome_initialization::dome_initialize_sponges(), isomip_initialization::isomip_initialize_sponges(), and phillips_initialization::phillips_initialize_sponges().
subroutine, public mom_sponge::set_up_sponge_field | ( | real, dimension( g %isd: g %ied, g %jsd: g %jed, g %ke), intent(in) | sp_val, |
real, dimension( g %isd: g %ied, g %jsd: g %jed, g %ke), intent(in), target | f_ptr, | ||
type(ocean_grid_type), intent(in) | G, | ||
integer, intent(in) | nlay, | ||
type(sponge_cs), pointer | CS, | ||
real, dimension( g %jsd: g %jed, g %ke), intent(in), optional | sp_val_i_mean | ||
) |
This subroutine stores the reference profile for the variable whose address is given by f_ptr. nlay is the number of layers in this variable.
[in] | g | The ocean's grid structure |
[in] | sp_val | The reference profiles of the quantity being registered. |
[in] | f_ptr | a pointer to the field which will be damped |
[in] | nlay | the number of layers in this quantity |
cs | A pointer to the control structure for this module that is set by a previous call to initialize_sponge. | |
[in] | sp_val_i_mean | The i-mean reference value for |
Definition at line 214 of file MOM_sponge.F90.
References mom_error_handler::is_root_pe(), and mom_error_handler::mom_error().
Referenced by dome_initialization::dome_initialize_sponges(), dome_tracer::initialize_dome_tracer(), rgc_tracer::initialize_rgc_tracer(), isomip_initialization::isomip_initialize_sponges(), and user_tracer_example::user_initialize_tracer().
subroutine, public mom_sponge::set_up_sponge_ml_density | ( | real, dimension(szi_(g),szj_(g)), intent(in) | sp_val, |
type(ocean_grid_type), intent(in) | G, | ||
type(sponge_cs), pointer | CS, | ||
real, dimension(szj_(g)), intent(in), optional | sp_val_i_mean | ||
) |
This subroutine stores the reference value for mixed layer density. It is handled differently from other values because it is only used in determining which layers can be inflated.
[in] | g | The ocean's grid structure |
[in] | sp_val | The reference values of the mixed layer density [R ~> kg m-3] |
cs | A pointer to the control structure for this module that is set by a previous call to initialize_sponge. | |
[in] | sp_val_i_mean | the reference values of the zonal mean mixed |
Definition at line 277 of file MOM_sponge.F90.
References mom_error_handler::mom_error().
Referenced by rgc_initialization::rgc_initialize_sponges().
subroutine, public mom_sponge::sponge_end | ( | type(sponge_cs), pointer | CS | ) |
This call deallocates any memory in the sponge control structure.
cs | A pointer to the control structure for this module that is set by a previous call to initialize_sponge. |
Definition at line 593 of file MOM_sponge.F90.