MOM6
|
Code that initializes fixed aspects of the model grid, such as horizontal grid metrics, topography and Coriolis, and can be shared between components.
Functions/Subroutines | |
subroutine, public | mom_shared_init_init (PF) |
MOM_shared_init_init just writes the code version. More... | |
subroutine, public | mom_initialize_rotation (f, G, PF, US) |
MOM_initialize_rotation makes the appropriate call to set up the Coriolis parameter. More... | |
subroutine, public | mom_calculate_grad_coriolis (dF_dx, dF_dy, G, US) |
Calculates the components of grad f (Coriolis parameter) More... | |
real function, public | diagnosemaximumdepth (D, G) |
Return the global maximum ocean bottom depth in the same units as the input depth. More... | |
subroutine, public | initialize_topography_from_file (D, G, param_file, US) |
Read gridded depths from file. More... | |
subroutine, public | apply_topography_edits_from_file (D, G, param_file, US) |
Applies a list of topography overrides read from a netcdf file. More... | |
subroutine, public | initialize_topography_named (D, G, param_file, topog_config, max_depth, US) |
initialize the bathymetry based on one of several named idealized configurations More... | |
subroutine, public | limit_topography (D, G, param_file, max_depth, US) |
limit_topography ensures that min_depth < D(x,y) < max_depth More... | |
subroutine, public | set_rotation_planetary (f, G, param_file, US) |
This subroutine sets up the Coriolis parameter for a sphere. More... | |
subroutine, public | set_rotation_beta_plane (f, G, param_file, US) |
This subroutine sets up the Coriolis parameter for a beta-plane or f-plane. More... | |
subroutine, public | initialize_grid_rotation_angle (G, PF) |
initialize_grid_rotation_angle initializes the arrays with the sine and cosine of the angle between logical north on the grid and true north. More... | |
real function | modulo_around_point (x, xc, Lx) |
Return the modulo value of x in an interval [xc-(Lx/2) xc+(Lx/2)] If Lx<=0, then it returns x without applying modulo arithmetic. More... | |
subroutine, public | reset_face_lengths_named (G, param_file, name, US) |
This subroutine sets the open face lengths at selected points to restrict passages to their observed widths based on a named set of sizes. More... | |
subroutine, public | reset_face_lengths_file (G, param_file, US) |
This subroutine sets the open face lengths at selected points to restrict passages to their observed widths from a arrays read from a file. More... | |
subroutine, public | reset_face_lengths_list (G, param_file, US) |
This subroutine sets the open face lengths at selected points to restrict passages to their observed widths from a list read from a file. More... | |
subroutine, public | read_face_length_list (iounit, filename, num_lines, lines) |
This subroutine reads and counts the non-blank lines in the face length list file, after removing comments. More... | |
subroutine, public | set_velocity_depth_max (G) |
Set the bathymetry at velocity points to be the maximum of the depths at the neighoring tracer points. More... | |
subroutine, public | set_velocity_depth_min (G) |
Set the bathymetry at velocity points to be the minimum of the depths at the neighoring tracer points. More... | |
subroutine, public | compute_global_grid_integrals (G, US) |
Pre-compute global integrals of grid quantities (like masked ocean area) for later use in reporting diagnostics. More... | |
subroutine, public | write_ocean_geometry_file (G, param_file, directory, geom_file, US) |
Write out a file describing the topography, Coriolis parameter, grid locations and various other fixed fields from the grid. More... | |
subroutine, public mom_shared_initialization::apply_topography_edits_from_file | ( | real, dimension(g%isd:g%ied,g%jsd:g%jed), intent(inout) | D, |
type(dyn_horgrid_type), intent(in) | G, | ||
type(param_file_type), intent(in) | param_file, | ||
type(unit_scale_type), intent(in), optional | US | ||
) |
Applies a list of topography overrides read from a netcdf file.
[in] | g | The dynamic horizontal grid type |
[in,out] | d | Ocean bottom depth in m or Z if US is present |
[in] | param_file | Parameter file structure |
[in] | us | A dimensional unit scaling type |
Definition at line 186 of file MOM_shared_initialization.F90.
References mom_error_handler::calltree_enter(), and mom_error_handler::calltree_leave().
Referenced by initialize_topography_from_file().
subroutine, public mom_shared_initialization::compute_global_grid_integrals | ( | type(dyn_horgrid_type), intent(inout) | G, |
type(unit_scale_type), intent(in), optional | US | ||
) |
Pre-compute global integrals of grid quantities (like masked ocean area) for later use in reporting diagnostics.
[in,out] | g | The dynamic horizontal grid |
[in] | us | A dimensional unit scaling type |
Definition at line 1149 of file MOM_shared_initialization.F90.
References mom_error_handler::mom_error().
Referenced by mom_fixed_initialization::mom_initialize_fixed().
real function, public mom_shared_initialization::diagnosemaximumdepth | ( | real, dimension(g%isd:g%ied,g%jsd:g%jed), intent(in) | D, |
type(dyn_horgrid_type), intent(in) | G | ||
) |
Return the global maximum ocean bottom depth in the same units as the input depth.
[in] | g | The dynamic horizontal grid type |
[in] | d | Ocean bottom depth in m or Z |
Definition at line 125 of file MOM_shared_initialization.F90.
subroutine, public mom_shared_initialization::initialize_grid_rotation_angle | ( | type(dyn_horgrid_type), intent(inout) | G, |
type(param_file_type), intent(in) | PF | ||
) |
initialize_grid_rotation_angle initializes the arrays with the sine and cosine of the angle between logical north on the grid and true north.
[in,out] | g | The dynamic horizontal grid |
[in] | pf | A structure indicating the open file to parse for model parameter values. |
Definition at line 548 of file MOM_shared_initialization.F90.
References modulo_around_point().
subroutine, public mom_shared_initialization::initialize_topography_from_file | ( | 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, | ||
type(unit_scale_type), intent(in), optional | US | ||
) |
Read gridded depths from file.
[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] | us | A dimensional unit scaling type |
Definition at line 141 of file MOM_shared_initialization.F90.
References apply_topography_edits_from_file(), mom_error_handler::calltree_enter(), and mom_error_handler::calltree_leave().
subroutine, public mom_shared_initialization::initialize_topography_named | ( | 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, | ||
character(len=*), intent(in) | topog_config, | ||
real, intent(in) | max_depth, | ||
type(unit_scale_type), intent(in), optional | US | ||
) |
initialize the bathymetry based on one of several named idealized configurations
[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] | topog_config | The name of an idealized topographic configuration |
[in] | max_depth | Maximum depth of model in the units of D |
[in] | us | A dimensional unit scaling type |
Definition at line 302 of file MOM_shared_initialization.F90.
References mom_error_handler::calltree_enter(), and mom_error_handler::calltree_leave().
subroutine, public mom_shared_initialization::limit_topography | ( | real, dimension(g%isd:g%ied,g%jsd:g%jed), intent(inout) | 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 | ||
) |
limit_topography ensures that min_depth < D(x,y) < max_depth
[in] | g | The dynamic horizontal grid type |
[in,out] | d | Ocean bottom depth in m or Z if US is present |
[in] | param_file | Parameter file structure |
[in] | max_depth | Maximum depth of model in the units of D |
[in] | us | A dimensional unit scaling type |
Definition at line 415 of file MOM_shared_initialization.F90.
References mom_error_handler::calltree_enter(), and mom_error_handler::calltree_leave().
|
private |
Return the modulo value of x in an interval [xc-(Lx/2) xc+(Lx/2)] If Lx<=0, then it returns x without applying modulo arithmetic.
[in] | x | Value to which to apply modulo arithmetic |
[in] | xc | Center of modulo range |
[in] | lx | Modulo range width |
Definition at line 606 of file MOM_shared_initialization.F90.
Referenced by initialize_grid_rotation_angle().
subroutine, public mom_shared_initialization::mom_calculate_grad_coriolis | ( | real, dimension(g%isd:g%ied,g%jsd:g%jed), intent(out) | dF_dx, |
real, dimension(g%isd:g%ied,g%jsd:g%jed), intent(out) | dF_dy, | ||
type(dyn_horgrid_type), intent(inout) | G, | ||
type(unit_scale_type), intent(in), optional | US | ||
) |
Calculates the components of grad f (Coriolis parameter)
[in,out] | g | The dynamic horizontal grid type |
[out] | df_dx | x-component of grad f [T-1 L-1 ~> s-1 m-1] |
[out] | df_dy | y-component of grad f [T-1 L-1 ~> s-1 m-1] |
[in] | us | A dimensional unit scaling type |
Definition at line 91 of file MOM_shared_initialization.F90.
subroutine, public mom_shared_initialization::mom_initialize_rotation | ( | real, dimension(g%isdb:g%iedb,g%jsdb:g%jedb), intent(out) | f, |
type(dyn_horgrid_type), intent(in) | G, | ||
type(param_file_type), intent(in) | PF, | ||
type(unit_scale_type), intent(in), optional | US | ||
) |
MOM_initialize_rotation makes the appropriate call to set up the Coriolis parameter.
[in] | g | The dynamic horizontal grid type |
[out] | f | The Coriolis parameter [T-1 ~> s-1] |
[in] | pf | Parameter file structure |
[in] | us | A dimensional unit scaling type |
Definition at line 58 of file MOM_shared_initialization.F90.
References mom_error_handler::calltree_enter(), mom_error_handler::calltree_leave(), set_rotation_beta_plane(), and set_rotation_planetary().
subroutine, public mom_shared_initialization::mom_shared_init_init | ( | type(param_file_type), intent(in) | PF | ) |
MOM_shared_init_init just writes the code version.
[in] | pf | A structure indicating the open file to parse for model parameter values. |
Definition at line 43 of file MOM_shared_initialization.F90.
subroutine, public mom_shared_initialization::read_face_length_list | ( | integer, intent(in) | iounit, |
character(len=*), intent(in) | filename, | ||
integer, intent(out) | num_lines, | ||
character(len=120), dimension(:), pointer | lines | ||
) |
This subroutine reads and counts the non-blank lines in the face length list file, after removing comments.
[in] | iounit | An open I/O unit number for the file |
[in] | filename | The name of the face-length file to read |
[out] | num_lines | The number of non-blank lines in the file |
lines | The non-blank lines, after removing comments |
Definition at line 1055 of file MOM_shared_initialization.F90.
References mom_string_functions::uppercase().
Referenced by reset_face_lengths_list().
subroutine, public mom_shared_initialization::reset_face_lengths_file | ( | type(dyn_horgrid_type), intent(inout) | G, |
type(param_file_type), intent(in) | param_file, | ||
type(unit_scale_type), intent(in), optional | US | ||
) |
This subroutine sets the open face lengths at selected points to restrict passages to their observed widths from a arrays read from a file.
[in,out] | g | The dynamic horizontal grid |
[in] | param_file | A structure to parse for run-time parameters |
[in] | us | A dimensional unit scaling type |
Definition at line 750 of file MOM_shared_initialization.F90.
References mom_error_handler::calltree_enter(), mom_error_handler::calltree_leave(), and mom_domains::to_all.
subroutine, public mom_shared_initialization::reset_face_lengths_list | ( | type(dyn_horgrid_type), intent(inout) | G, |
type(param_file_type), intent(in) | param_file, | ||
type(unit_scale_type), intent(in), optional | US | ||
) |
This subroutine sets the open face lengths at selected points to restrict passages to their observed widths from a list read from a file.
[in,out] | g | The dynamic horizontal grid |
[in] | param_file | A structure to parse for run-time parameters |
[in] | us | A dimensional unit scaling type |
Definition at line 820 of file MOM_shared_initialization.F90.
References mom_error_handler::calltree_enter(), mom_error_handler::calltree_leave(), read_face_length_list(), and mom_string_functions::uppercase().
subroutine, public mom_shared_initialization::reset_face_lengths_named | ( | type(dyn_horgrid_type), intent(inout) | G, |
type(param_file_type), intent(in) | param_file, | ||
character(len=*), intent(in) | name, | ||
type(unit_scale_type), intent(in), optional | US | ||
) |
This subroutine sets the open face lengths at selected points to restrict passages to their observed widths based on a named set of sizes.
[in,out] | g | The dynamic horizontal grid |
[in] | param_file | A structure to parse for run-time parameters |
[in] | name | The name for the set of face lengths. Only "global_1deg" is currently implemented. |
[in] | us | A dimensional unit scaling type |
Definition at line 622 of file MOM_shared_initialization.F90.
subroutine, public mom_shared_initialization::set_rotation_beta_plane | ( | real, dimension(g%isdb:g%iedb,g%jsdb:g%jedb), intent(out) | f, |
type(dyn_horgrid_type), intent(in) | G, | ||
type(param_file_type), intent(in) | param_file, | ||
type(unit_scale_type), intent(in), optional | US | ||
) |
This subroutine sets up the Coriolis parameter for a beta-plane or f-plane.
[in] | g | The dynamic horizontal grid |
[out] | f | Coriolis parameter (vertical component) [T-1 ~> s-1] |
[in] | param_file | A structure to parse for run-time parameters |
[in] | us | A dimensional unit scaling type |
Definition at line 497 of file MOM_shared_initialization.F90.
References mom_error_handler::calltree_enter(), and mom_error_handler::calltree_leave().
Referenced by mom_initialize_rotation().
subroutine, public mom_shared_initialization::set_rotation_planetary | ( | real, dimension(g%isdb:g%iedb,g%jsdb:g%jedb), intent(out) | f, |
type(dyn_horgrid_type), intent(in) | G, | ||
type(param_file_type), intent(in) | param_file, | ||
type(unit_scale_type), intent(in), optional | US | ||
) |
This subroutine sets up the Coriolis parameter for a sphere.
[in] | g | The dynamic horizontal grid |
[out] | f | Coriolis parameter (vertical component) [T-1 ~> s-1] |
[in] | param_file | A structure to parse for run-time parameters |
[in] | us | A dimensional unit scaling type |
Definition at line 464 of file MOM_shared_initialization.F90.
References mom_error_handler::calltree_enter(), and mom_error_handler::calltree_leave().
Referenced by mom_initialize_rotation().
subroutine, public mom_shared_initialization::set_velocity_depth_max | ( | type(dyn_horgrid_type), intent(inout) | G | ) |
Set the bathymetry at velocity points to be the maximum of the depths at the neighoring tracer points.
[in,out] | g | The dynamic horizontal grid |
Definition at line 1109 of file MOM_shared_initialization.F90.
subroutine, public mom_shared_initialization::set_velocity_depth_min | ( | type(dyn_horgrid_type), intent(inout) | G | ) |
Set the bathymetry at velocity points to be the minimum of the depths at the neighoring tracer points.
[in,out] | g | The dynamic horizontal grid |
Definition at line 1129 of file MOM_shared_initialization.F90.
subroutine, public mom_shared_initialization::write_ocean_geometry_file | ( | type(dyn_horgrid_type), intent(inout) | G, |
type(param_file_type), intent(in) | param_file, | ||
character(len=*), intent(in) | directory, | ||
character(len=*), intent(in), optional | geom_file, | ||
type(unit_scale_type), intent(in), optional | US | ||
) |
Write out a file describing the topography, Coriolis parameter, grid locations and various other fixed fields from the grid.
[in,out] | g | The dynamic horizontal grid |
[in] | param_file | Parameter file structure |
[in] | directory | The directory into which to place the geometry file. |
[in] | geom_file | If present, the name of the geometry file (otherwise the file is "ocean_geometry") |
[in] | us | A dimensional unit scaling type |
Definition at line 1178 of file MOM_shared_initialization.F90.
Referenced by mom_fixed_initialization::mom_initialize_fixed().