MOM6
|
A template of a user to code up customized initial conditions.
This subroutine initializes the fields for the simulations. The one argument passed to initialize, Time, is set to the current time of the simulation. The fields which are initialized here are:
Any user provided tracer code is also first linked through this subroutine.
These variables are all set in the set of subroutines (in this file) USER_initialize_bottom_depth, USER_initialize_thickness, USER_initialize_velocity, USER_initialize_temperature_salinity, USER_initialize_mixed_layer_density, USER_initialize_sponges, USER_set_coord, and USER_set_ref_profile.
The names of these subroutines should be self-explanatory. They start with "USER_" to indicate that they will likely have to be modified for each simulation to set the initial conditions and boundary conditions. Most of these take two arguments: an integer argument specifying whether the fields are to be calculated internally or read from a NetCDF file; and a string giving the path to that file. If the field is initialized internally, the path is ignored.
Functions/Subroutines | |
subroutine, public | user_set_coord (Rlay, g_prime, GV, US, param_file, eqn_of_state) |
Set vertical coordinates. More... | |
subroutine, public | user_initialize_topography (D, G, param_file, max_depth, US) |
Initialize topography. More... | |
subroutine, public | user_initialize_thickness (h, G, GV, param_file, just_read_params) |
initialize thicknesses. More... | |
subroutine, public | user_initialize_velocity (u, v, G, US, param_file, just_read_params) |
initialize velocities. More... | |
subroutine, public | user_init_temperature_salinity (T, S, G, param_file, eqn_of_state, just_read_params) |
This function puts the initial layer temperatures and salinities into T(:,:,:) and S(:,:,:). More... | |
subroutine, public | user_initialize_sponges (G, GV, use_temp, tv, param_file, CSp, h) |
Set up the sponges. More... | |
subroutine, public | user_set_obc_data (OBC, tv, G, param_file, tr_Reg) |
This subroutine sets the properties of flow at open boundary conditions. More... | |
subroutine, public | user_set_rotation (G, param_file) |
subroutine | write_user_log (param_file) |
Write output about the parameter values being used. More... | |
Variables | |
logical | first_call = .true. |
A module variable that should not be used. More... | |
subroutine, public user_initialization::user_init_temperature_salinity | ( | real, dimension(szi_(g),szj_(g), szk_(g)), intent(out) | T, |
real, dimension(szi_(g),szj_(g), szk_(g)), intent(out) | S, | ||
type(ocean_grid_type), intent(in) | G, | ||
type(param_file_type), intent(in) | param_file, | ||
type(eos_type), pointer | eqn_of_state, | ||
logical, intent(in), optional | just_read_params | ||
) |
This function puts the initial layer temperatures and salinities into T(:,:,:) and S(:,:,:).
[in] | g | Ocean grid structure. |
[out] | t | Potential temperature [degC]. |
[out] | s | Salinity [ppt]. |
[in] | param_file | A structure indicating the open file to parse for model parameter values. |
eqn_of_state | Integer that selects the equation of state. | |
[in] | just_read_params | If present and true, this call will only read parameters without changing T & S. |
Definition at line 141 of file user_initialization.F90.
References first_call, mom_error_handler::mom_error(), and write_user_log().
subroutine, public user_initialization::user_initialize_sponges | ( | type(ocean_grid_type), intent(in) | G, |
type(verticalgrid_type), intent(in) | GV, | ||
logical, intent(in) | use_temp, | ||
type(thermo_var_ptrs), intent(in) | tv, | ||
type(param_file_type), intent(in) | param_file, | ||
type(sponge_cs), pointer | CSp, | ||
real, dimension( g %isd: g %ied, g %jsd: g %jed, gv %ke), intent(in) | h | ||
) |
Set up the sponges.
[in] | g | Ocean grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | use_temp | If true, temperature and salinity are state variables. |
[in] | tv | A structure containing pointers to any available thermodynamic fields, potential temperature and salinity or mixed layer density. Absent fields have NULL ptrs. |
[in] | param_file | A structure indicating the open file to parse for model parameter values. |
csp | A pointer to the sponge control structure. | |
[in] | h | Layer thicknesses [H ~> m or kg m-2]. |
Definition at line 171 of file user_initialization.F90.
References first_call, mom_error_handler::mom_error(), and write_user_log().
Referenced by mom_state_initialization::mom_initialize_state().
subroutine, public user_initialization::user_initialize_thickness | ( | real, dimension(szi_(g),szj_(g),szk_(gv)), intent(out) | h, |
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(param_file_type), intent(in) | param_file, | ||
logical, intent(in), optional | just_read_params | ||
) |
initialize thicknesses.
[in] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[out] | h | The thicknesses 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 84 of file user_initialization.F90.
References first_call, mom_error_handler::mom_error(), and write_user_log().
subroutine, public user_initialization::user_initialize_topography | ( | real, dimension(g%isd:g%ied,g%jsd:g%jed), intent(out) | D, |
type(dyn_horgrid_type), intent(in) | G, | ||
type(param_file_type), intent(in) | param_file, | ||
real, intent(in) | max_depth, | ||
type(unit_scale_type), intent(in), optional | US | ||
) |
Initialize topography.
[in] | g | The dynamic horizontal grid type |
[out] | d | Ocean bottom depth in m or Z if US is present |
[in] | param_file | Parameter file structure |
[in] | max_depth | Maximum model depth in the units of D |
[in] | us | A dimensional unit scaling type |
Definition at line 65 of file user_initialization.F90.
References first_call, mom_error_handler::mom_error(), and write_user_log().
Referenced by mom_fixed_initialization::mom_initialize_topography().
subroutine, public user_initialization::user_initialize_velocity | ( | real, dimension(szib_(g), szj_(g), szk_(g)), intent(out) | u, |
real, dimension(szi_(g), szjb_(g), szk_(g)), intent(out) | v, | ||
type(ocean_grid_type), intent(in) | G, | ||
type(unit_scale_type), intent(in) | US, | ||
type(param_file_type), intent(in) | param_file, | ||
logical, intent(in), optional | just_read_params | ||
) |
initialize velocities.
[in] | g | Ocean grid structure. |
[out] | u | i-component of velocity [L T-1 ~> m s-1] |
[out] | v | j-component of velocity [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 111 of file user_initialization.F90.
References first_call, mom_error_handler::mom_error(), and write_user_log().
subroutine, public user_initialization::user_set_coord | ( | real, dimension(:), intent(out) | Rlay, |
real, dimension(:), intent(out) | g_prime, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
type(param_file_type), intent(in) | param_file, | ||
type(eos_type), pointer | eqn_of_state | ||
) |
Set vertical coordinates.
[in] | gv | The ocean's vertical grid structure. |
[out] | rlay | Layer potential density [R ~> kg m-3]. |
[out] | g_prime | The reduced gravity at each interface [L2 Z-1 T-2 ~> m s-2]. |
[in] | us | A dimensional unit scaling type |
[in] | param_file | A structure indicating the open file to parse for model parameter values. |
eqn_of_state | Integer that selects the equation of state. |
Definition at line 41 of file user_initialization.F90.
References first_call, mom_error_handler::mom_error(), and write_user_log().
Referenced by mom_coord_initialization::mom_initialize_coord().
subroutine, public user_initialization::user_set_obc_data | ( | type(ocean_obc_type), pointer | OBC, |
type(thermo_var_ptrs), intent(in) | tv, | ||
type(ocean_grid_type), intent(in) | G, | ||
type(param_file_type), intent(in) | param_file, | ||
type(tracer_registry_type), pointer | tr_Reg | ||
) |
This subroutine sets the properties of flow at open boundary conditions.
obc | This open boundary condition type specifies whether, where, and what open boundary conditions are used. | |
[in] | tv | A structure containing pointers to any available thermodynamic fields, including potential temperature and salinity or mixed layer density. Absent fields have NULL ptrs. |
[in] | g | The ocean's grid structure. |
[in] | param_file | A structure indicating the open file to parse for model parameter values. |
tr_reg | Tracer registry. |
Definition at line 195 of file user_initialization.F90.
References first_call, and write_user_log().
subroutine, public user_initialization::user_set_rotation | ( | type(ocean_grid_type), intent(inout) | G, |
type(param_file_type), intent(in) | param_file | ||
) |
[in,out] | g | The ocean's grid structure |
[in] | param_file | A structure to parse for run-time parameters |
Definition at line 216 of file user_initialization.F90.
References first_call, mom_error_handler::mom_error(), and write_user_log().
|
private |
Write output about the parameter values being used.
[in] | param_file | A structure indicating the open file to parse for model parameter values. |
Definition at line 228 of file user_initialization.F90.
References first_call.
Referenced by user_init_temperature_salinity(), user_initialize_sponges(), user_initialize_thickness(), user_initialize_topography(), user_initialize_velocity(), user_set_coord(), user_set_obc_data(), and user_set_rotation().
|
private |
A module variable that should not be used.
Definition at line 35 of file user_initialization.F90.
Referenced by user_init_temperature_salinity(), user_initialize_sponges(), user_initialize_thickness(), user_initialize_topography(), user_initialize_velocity(), user_set_coord(), user_set_obc_data(), user_set_rotation(), and write_user_log().