MOM6
|
Initialization functions for state variables, u, v, h, T and S.
Functions/Subroutines | |
subroutine, public | mom_initialize_state (u, v, h, tv, Time, G, GV, US, PF, dirs, restart_CS, ALE_CSp, tracer_Reg, sponge_CSp, ALE_sponge_CSp, OBC, Time_in) |
Initialize temporally evolving fields, either as initial conditions or by reading them from a restart (or saves) file. More... | |
subroutine | initialize_thickness_from_file (h, G, GV, US, param_file, file_has_thickness, just_read_params) |
Reads the layer thicknesses or interface heights from a file. More... | |
subroutine | adjustetatofitbathymetry (G, GV, US, eta, h) |
Adjust interface heights to fit the bathymetry and diagnose layer thickness. More... | |
subroutine | initialize_thickness_uniform (h, G, GV, param_file, just_read_params) |
Initializes thickness to be uniform. More... | |
subroutine | initialize_thickness_list (h, G, GV, US, param_file, just_read_params) |
Initialize thickness from a 1D list. More... | |
subroutine | initialize_thickness_search |
Search density space for location of layers (not implemented!) More... | |
subroutine | convert_thickness (h, G, GV, US, tv) |
Converts thickness from geometric to pressure units. More... | |
subroutine | depress_surface (h, G, GV, US, param_file, tv, just_read_params) |
Depress the sea-surface based on an initial condition file. More... | |
subroutine | trim_for_ice (PF, G, GV, US, ALE_CSp, tv, h, just_read_params) |
Adjust the layer thicknesses by cutting away the top of each model column at the depth where the hydrostatic pressure matches an imposed surface pressure read from file. More... | |
subroutine | cut_off_column_top (nk, tv, GV, US, G_earth, depth, min_thickness, T, T_t, T_b, S, S_t, S_b, p_surf, h, remap_CS, z_tol) |
Adjust the layer thicknesses by removing the top of the water column above the depth where the hydrostatic pressure matches p_surf. More... | |
subroutine | initialize_velocity_from_file (u, v, G, US, param_file, just_read_params) |
Initialize horizontal velocity components from file. More... | |
subroutine | initialize_velocity_zero (u, v, G, param_file, just_read_params) |
Initialize horizontal velocity components to zero. More... | |
subroutine | initialize_velocity_uniform (u, v, G, US, param_file, just_read_params) |
Sets the initial velocity components to uniform. More... | |
subroutine | initialize_velocity_circular (u, v, G, US, param_file, just_read_params) |
Sets the initial velocity components to be circular with no flow at edges of domain and center. More... | |
subroutine | initialize_temp_salt_from_file (T, S, G, param_file, just_read_params) |
Initializes temperature and salinity from file. More... | |
subroutine | initialize_temp_salt_from_profile (T, S, G, param_file, just_read_params) |
Initializes temperature and salinity from a 1D profile. More... | |
subroutine | initialize_temp_salt_fit (T, S, G, GV, US, param_file, eqn_of_state, P_Ref, just_read_params) |
Initializes temperature and salinity by fitting to density. More... | |
subroutine | initialize_temp_salt_linear (T, S, G, param_file, just_read_params) |
Initializes T and S with linear profiles according to reference surface layer salinity and temperature and a specified range. More... | |
subroutine | initialize_sponges_file (G, GV, US, use_temperature, tv, param_file, CSp, ALE_CSp, Time) |
This subroutine sets the inverse restoration time (Idamp), and the values towards which the interface heights and an arbitrary number of tracers should be restored within each sponge. The interface height is always subject to damping, and must always be the first registered field. More... | |
subroutine | set_velocity_depth_max (G) |
This subroutine sets the 4 bottom depths at velocity points to be the maximum of the adjacent depths. More... | |
subroutine | compute_global_grid_integrals (G, US) |
Subroutine to pre-compute global integrals of grid quantities for later use in reporting diagnostics. More... | |
subroutine | set_velocity_depth_min (G) |
This subroutine sets the 4 bottom depths at velocity points to be the minimum of the adjacent depths. More... | |
subroutine | mom_temp_salt_initialize_from_z (h, tv, G, GV, US, PF, just_read_params) |
This subroutine determines the isopycnal or other coordinate interfaces and layer potential temperatures and salinities directly from a z-space file on a latitude-longitude grid. More... | |
subroutine | mom_state_init_tests (G, GV, US, tv) |
Run simple unit tests. More... | |
Variables | |
character(len=40) | mdl = "MOM_state_initialization" |
This module's name. More... | |
|
private |
Adjust interface heights to fit the bathymetry and diagnose layer thickness.
If the bottom most interface is below the topography then the bottom-most layers are contracted to GVAngstrom_m. If the bottom most interface is above the topography then the entire column is dilated (expanded) to fill the void.
[in] | g | The ocean's grid structure |
[in] | gv | The ocean's vertical grid structure |
[in] | us | A dimensional unit scaling type |
[in,out] | eta | Interface heights [Z ~> m]. |
[in,out] | h | Layer thicknesses [H ~> m or kg m-2] |
Definition at line 719 of file MOM_state_initialization.F90.
Referenced by initialize_thickness_from_file(), and mom_temp_salt_initialize_from_z().
|
private |
Subroutine to pre-compute global integrals of grid quantities for later use in reporting diagnostics.
[in,out] | g | The ocean's grid structure |
[in] | us | A dimensional unit scaling type |
Definition at line 1893 of file MOM_state_initialization.F90.
|
private |
Converts thickness from geometric to pressure units.
[in] | g | The ocean's grid structure |
[in] | gv | The ocean's vertical grid structure |
[in] | us | A dimensional unit scaling type |
[in,out] | h | Input geometric layer thicknesses being converted |
[in] | tv | A structure pointing to various thermodynamic variables |
Definition at line 929 of file MOM_state_initialization.F90.
References mom_eos::int_specific_vol_dp().
Referenced by mom_initialize_state().
|
private |
Adjust the layer thicknesses by removing the top of the water column above the depth where the hydrostatic pressure matches p_surf.
[in] | nk | Number of layers |
[in] | tv | Thermodynamics structure |
[in] | gv | The ocean's vertical grid structure. |
[in] | us | A dimensional unit scaling type |
[in] | g_earth | Gravitational acceleration [m2 Z-1 s-2 ~> m s-2] |
[in] | depth | Depth of ocean column [Z ~> m]. |
[in] | min_thickness | Smallest thickness allowed [Z ~> m]. |
[in,out] | t | Layer mean temperature [degC] |
[in] | t_t | Temperature at top of layer [degC] |
[in] | t_b | Temperature at bottom of layer [degC] |
[in,out] | s | Layer mean salinity [ppt] |
[in] | s_t | Salinity at top of layer [ppt] |
[in] | s_b | Salinity at bottom of layer [ppt] |
[in] | p_surf | Imposed pressure on ocean at surface [Pa] |
[in,out] | h | Layer thickness [H ~> m or kg m-2] |
remap_cs | Remapping structure for remapping T and S, if associated | |
[in] | z_tol | The tolerance with which to find the depth matching the specified pressure [Z ~> m]. |
Definition at line 1168 of file MOM_state_initialization.F90.
References mom_remapping::remapping_core_h().
Referenced by mom_state_init_tests(), and trim_for_ice().
|
private |
Depress the sea-surface based on an initial condition file.
[in] | 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] | param_file | A structure to parse for run-time parameters |
[in] | tv | A structure pointing to various thermodynamic variables |
[in] | just_read_params | If present and true, this call will only read parameters without changing h. |
Definition at line 1005 of file MOM_state_initialization.F90.
Referenced by mom_initialize_state().
|
private |
This subroutine sets the inverse restoration time (Idamp), and the values towards which the interface heights and an arbitrary number of tracers should be restored within each sponge. The interface height is always subject to damping, and must always be the first registered field.
[in] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | us | A dimensional unit scaling type |
[in] | use_temperature | If true, T & S are state variables. |
[in] | tv | A structure pointing to various thermodynamic variables. |
[in] | param_file | A structure to parse for run-time parameters. |
csp | A pointer that is set to point to the control structure for this module (in layered mode). | |
ale_csp | A pointer that is set to point to the control structure for this module (in ALE mode). | |
[in] | time | Time at the start of the run segment. Time_in overrides any value set for Time. |
Definition at line 1694 of file MOM_state_initialization.F90.
References mom_error_handler::mom_error().
Referenced by mom_initialize_state().
|
private |
Initializes temperature and salinity by fitting to density.
[in] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[out] | t | The potential temperature that is being initialized [degC]. |
[out] | s | The salinity that is being initialized [ppt]. |
[in] | us | A dimensional unit scaling type |
[in] | param_file | A structure to parse for run-time parameters. |
eqn_of_state | Integer that selects the equatio of state. | |
[in] | p_ref | The coordinate-density reference pressure [Pa]. |
[in] | just_read_params | If present and true, this call will only read parameters without changing h. |
Definition at line 1533 of file MOM_state_initialization.F90.
Referenced by mom_initialize_state().
|
private |
Initializes temperature and salinity from file.
[in] | g | The ocean's grid structure |
[out] | t | The potential temperature that is being initialized [degC] |
[out] | s | The salinity that is being initialized [ppt] |
[in] | param_file | A structure to parse for run-time parameters |
[in] | just_read_params | If present and true, this call will only read parameters without changing h. |
Definition at line 1432 of file MOM_state_initialization.F90.
References mom_error_handler::mom_error().
Referenced by mom_initialize_state().
|
private |
Initializes temperature and salinity from a 1D profile.
[in] | g | The ocean's grid structure |
[out] | t | The potential temperature that is being initialized [degC] |
[out] | s | The salinity that is being initialized [ppt] |
[in] | param_file | A structure to parse for run-time parameters |
[in] | just_read_params | If present and true, this call will only read parameters without changing h. |
Definition at line 1488 of file MOM_state_initialization.F90.
References mom_error_handler::mom_error().
Referenced by mom_initialize_state().
|
private |
Initializes T and S with linear profiles according to reference surface layer salinity and temperature and a specified range.
[in] | g | The ocean's grid structure |
[out] | t | The potential temperature that is being initialized [degC] |
[out] | s | The salinity that is being initialized [ppt] |
[in] | param_file | A structure to parse for run-time parameters |
[in] | just_read_params | If present and true, this call will only read parameters without changing h. |
Definition at line 1627 of file MOM_state_initialization.F90.
Referenced by mom_initialize_state().
|
private |
Reads the layer thicknesses or interface heights from a file.
[in] | g | The ocean's grid structure |
[in] | gv | The ocean's vertical grid structure |
[in] | us | A dimensional unit scaling type |
[out] | h | The thickness that is being initialized [H ~> m or kg m-2]. |
[in] | param_file | A structure indicating the open file to parse for model parameter values. |
[in] | file_has_thickness | If true, this file contains layer thicknesses; otherwise it contains interface heights. |
[in] | just_read_params | If present and true, this call will only read parameters without changing h. |
Definition at line 627 of file MOM_state_initialization.F90.
References adjustetatofitbathymetry(), mom_error_handler::calltree_enter(), and mom_error_handler::calltree_leave().
Referenced by mom_initialize_state().
|
private |
Initialize thickness from a 1D list.
[in] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | us | A dimensional unit scaling type |
[out] | h | The thickness that is being initialized [H ~> m or kg m-2]. |
[in] | param_file | A structure indicating the open file to parse for model parameter values. |
[in] | just_read_params | If present and true, this call will only read parameters without changing h. |
Definition at line 848 of file MOM_state_initialization.F90.
References mom_error_handler::calltree_enter(), and mom_error_handler::calltree_leave().
Referenced by mom_initialize_state().
|
private |
Search density space for location of layers (not implemented!)
Definition at line 924 of file MOM_state_initialization.F90.
Referenced by mom_initialize_state().
|
private |
Initializes thickness to be uniform.
[in] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[out] | h | The thickness that is being initialized [H ~> m or kg m-2]. |
[in] | param_file | A structure indicating the open file to parse for model parameter values. |
[in] | just_read_params | If present and true, this call will only read parameters without changing h. |
Definition at line 793 of file MOM_state_initialization.F90.
References mom_error_handler::calltree_enter(), and mom_error_handler::calltree_leave().
Referenced by mom_initialize_state().
|
private |
Sets the initial velocity components to be circular with no flow at edges of domain and center.
[in] | g | The ocean's grid structure |
[out] | u | The zonal velocity that is being initialized [L T-1 ~> m s-1] |
[out] | v | The meridional velocity that is being initialized [L T-1 ~> m s-1] |
[in] | us | A dimensional unit scaling type |
[in] | param_file | A structure indicating the open file to parse for model parameter values. |
[in] | just_read_params | If present and true, this call will only read parameters without changing h. |
Definition at line 1370 of file MOM_state_initialization.F90.
References my_psi().
Referenced by mom_initialize_state().
|
private |
Initialize horizontal velocity components from file.
[in] | g | The ocean's grid structure |
[out] | u | The zonal velocity that is being initialized [L T-1 ~> m s-1] |
[out] | v | The meridional velocity that is being initialized [L T-1 ~> m s-1] |
[in] | us | A dimensional unit scaling type |
[in] | param_file | A structure indicating the open file to parse for modelparameter values. |
[in] | just_read_params | If present and true, this call will only read parameters without changing h. |
Definition at line 1254 of file MOM_state_initialization.F90.
References mom_error_handler::calltree_enter(), and mom_error_handler::calltree_leave().
Referenced by mom_initialize_state().
|
private |
Sets the initial velocity components to uniform.
[in] | g | The ocean's grid structure |
[out] | u | The zonal velocity that is being initialized [L T-1 ~> m s-1] |
[out] | v | The meridional velocity that is being initialized [L T-1 ~> m s-1] |
[in] | us | A dimensional unit scaling type |
[in] | param_file | A structure indicating the open file to parse for modelparameter values. |
[in] | just_read_params | If present and true, this call will only read parameters without changing h. |
Definition at line 1329 of file MOM_state_initialization.F90.
Referenced by mom_initialize_state().
|
private |
Initialize horizontal velocity components to zero.
[in] | g | The ocean's grid structure |
[out] | u | The zonal velocity that is being initialized [L T-1 ~> m s-1] |
[out] | v | The meridional velocity that is being initialized [L T-1 ~> m s-1] |
[in] | param_file | A structure indicating the open file to parse for modelparameter values. |
[in] | just_read_params | If present and true, this call will only read parameters without changing h. |
Definition at line 1295 of file MOM_state_initialization.F90.
References mom_error_handler::calltree_enter(), and mom_error_handler::calltree_leave().
Referenced by mom_initialize_state().
subroutine, public mom_state_initialization::mom_initialize_state | ( | real, dimension(szib_(g),szj_(g),szk_(g)), intent(out) | u, |
real, dimension(szi_(g),szjb_(g),szk_(g)), intent(out) | v, | ||
real, dimension(szi_(g),szj_(g),szk_(g)), intent(out) | h, | ||
type(thermo_var_ptrs), intent(inout) | tv, | ||
type(time_type), intent(inout) | Time, | ||
type(ocean_grid_type), intent(inout) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
type(param_file_type), intent(in) | PF, | ||
type(directories), intent(in) | dirs, | ||
type(mom_restart_cs), pointer | restart_CS, | ||
type(ale_cs), pointer | ALE_CSp, | ||
type(tracer_registry_type), pointer | tracer_Reg, | ||
type(sponge_cs), pointer | sponge_CSp, | ||
type(ale_sponge_cs), pointer | ALE_sponge_CSp, | ||
type(ocean_obc_type), pointer | OBC, | ||
type(time_type), intent(in), optional | Time_in | ||
) |
Initialize temporally evolving fields, either as initial conditions or by reading them from a restart (or saves) file.
[in,out] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | us | A dimensional unit scaling type |
[out] | u | The zonal velocity that is being |
[out] | v | The meridional velocity that is being |
[out] | h | Layer thicknesses [H ~> m or kg m-2] |
[in,out] | tv | A structure pointing to various thermodynamic variables |
[in,out] | time | Time at the start of the run segment. |
[in] | pf | A structure indicating the open file to parse for model parameter values. |
[in] | dirs | A structure containing several relevant directory paths. |
restart_cs | A pointer to the restart control structure. | |
ale_csp | The ALE control structure for remapping | |
tracer_reg | A pointer to the tracer registry | |
sponge_csp | The layerwise sponge control structure. | |
ale_sponge_csp | The ALE sponge control structure. | |
obc | The open boundary condition control structure. | |
[in] | time_in | Time at the start of the run segment. Time_in overrides any value set for Time. |
Definition at line 125 of file MOM_state_initialization.F90.
References adjustment_initialization::adjustment_initialize_temperature_salinity(), mom_ale::ale_regrid_accelerated(), baroclinic_zone_initialization::baroclinic_zone_init_temperature_salinity(), benchmark_initialization::benchmark_init_temperature_salinity(), bfb_initialization::bfb_initialize_sponges_southonly(), mom_error_handler::calltree_enter(), mom_error_handler::calltree_leave(), circle_obcs_initialization::circle_obcs_initialize_thickness(), convert_thickness(), dense_water_initialization::dense_water_initialize_sponges(), depress_surface(), mom_restart::determine_is_new_run(), dome2d_initialization::dome2d_initialize_sponges(), dome_initialization::dome_initialize_sponges(), dumbbell_initialization::dumbbell_initialize_sponges(), dyed_channel_initialization::dyed_channel_set_obc_tracer_data(), dyed_obcs_initialization::dyed_obcs_set_obc_data(), external_gwave_initialization::external_gwave_initialize_thickness(), initialize_sponges_file(), initialize_temp_salt_fit(), initialize_temp_salt_from_file(), initialize_temp_salt_from_profile(), initialize_temp_salt_linear(), initialize_thickness_from_file(), initialize_thickness_list(), initialize_thickness_search(), initialize_thickness_uniform(), initialize_velocity_circular(), initialize_velocity_from_file(), initialize_velocity_uniform(), initialize_velocity_zero(), isomip_initialization::isomip_initialize_temperature_salinity(), lock_exchange_initialization::lock_exchange_initialize_thickness(), mom_string_functions::lowercase(), mdl, mom_temp_salt_initialize_from_z(), neverland_initialization::neverland_initialize_thickness(), phillips_initialization::phillips_initialize_sponges(), mom_restart::restore_state(), rgc_initialization::rgc_initialize_sponges(), rossby_front_2d_initialization::rossby_front_initialize_velocity(), scm_cvmix_tests::scm_cvmix_tests_ts_init(), seamount_initialization::seamount_initialize_temperature_salinity(), sloshing_initialization::sloshing_initialize_temperature_salinity(), soliton_initialization::soliton_initialize_thickness(), supercritical_initialization::supercritical_set_obc_data(), trim_for_ice(), mom_open_boundary::update_obc_segment_data(), and user_initialization::user_initialize_sponges().
Referenced by mom::initialize_mom().
|
private |
Run simple unit tests.
[in,out] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | us | A dimensional unit scaling type |
[in] | tv | Thermodynamics structure. |
Definition at line 2388 of file MOM_state_initialization.F90.
References cut_off_column_top().
|
private |
This subroutine determines the isopycnal or other coordinate interfaces and layer potential temperatures and salinities directly from a z-space file on a latitude-longitude grid.
[in,out] | g | The ocean's grid structure |
[out] | h | Layer thicknesses being initialized [H ~> m or kg m-2] |
[in,out] | tv | A structure pointing to various thermodynamic variables including temperature and salinity |
[in] | gv | The ocean's vertical grid structure |
[in] | us | A dimensional unit scaling type |
[in] | pf | A structure indicating the open file to parse for model parameter values. |
[in] | just_read_params | If present and true, this call will only read parameters without changing h. |
Definition at line 1931 of file MOM_state_initialization.F90.
References adjustetatofitbathymetry(), and mom_error_handler::mom_error().
Referenced by mom_initialize_state().
|
private |
This subroutine sets the 4 bottom depths at velocity points to be the maximum of the adjacent depths.
[in,out] | g | The ocean's grid structure |
Definition at line 1876 of file MOM_state_initialization.F90.
|
private |
This subroutine sets the 4 bottom depths at velocity points to be the minimum of the adjacent depths.
[in,out] | g | The ocean's grid structure |
Definition at line 1913 of file MOM_state_initialization.F90.
|
private |
Adjust the layer thicknesses by cutting away the top of each model column at the depth where the hydrostatic pressure matches an imposed surface pressure read from file.
[in] | pf | Parameter file structure |
[in] | g | Ocean grid structure |
[in] | gv | Vertical grid structure |
[in] | us | A dimensional unit scaling type |
ale_csp | ALE control structure | |
[in,out] | tv | Thermodynamics structure |
[in,out] | h | Layer thickness [H ~> m or kg m-2] |
[in] | just_read_params | If present and true, this call will only read parameters without changing h. |
Definition at line 1089 of file MOM_state_initialization.F90.
References cut_off_column_top().
Referenced by mom_initialize_state().
|
private |
This module's name.
Definition at line 116 of file MOM_state_initialization.F90.
Referenced by mom_initialize_state().