44 implicit none ;
private 58 logical,
intent(in) :: write_geom
59 character(len=*),
intent(in) :: output_dir
62 character(len=200) :: inputdir
63 character(len=200) :: config
64 character(len=40) :: mdl =
"MOM_fixed_initialization" 67 #include "version_variable.h" 69 call calltree_enter(
"MOM_initialize_fixed(), MOM_fixed_initialization.F90")
71 call get_param(pf, mdl,
"DEBUG", debug, default=.false.)
73 call get_param(pf, mdl,
"INPUTDIR", inputdir, &
74 "The directory in which input files are found.", default=
".")
75 inputdir = slasher(inputdir)
89 call open_boundary_config(g, pf, obc)
92 call open_boundary_impose_normal_slope(obc, g, g%bathyT)
101 call hchksum(g%bathyT,
'MOM_initialize_fixed: depth ', g%HI, haloshift=1)
102 call hchksum(g%mask2dT,
'MOM_initialize_fixed: mask2dT ', g%HI)
103 call uvchksum(
'MOM_initialize_fixed: mask2dC[uv]', g%mask2dCu, &
105 call qchksum(g%mask2dBu,
'MOM_initialize_fixed: mask2dBu ', g%HI)
109 call get_param(pf, mdl,
"CHANNEL_CONFIG", config, &
110 "A parameter that determines which set of channels are \n"//&
111 "restricted to specific widths. Options are:\n"//&
112 " \t none - All channels have the grid width.\n"//&
113 " \t global_1deg - Sets 16 specific channels appropriate \n"//&
114 " \t\t for a 1-degree model, as used in CM2G.\n"//&
115 " \t list - Read the channel locations and widths from a \n"//&
116 " \t\t text file, like MOM_channel_list in the MOM_SIS \n"//&
117 " \t\t test case.\n"//&
118 " \t file - Read open face widths everywhere from a \n"//&
119 " \t\t NetCDF file on the model grid.", &
121 select case ( trim(config) )
123 case (
"list") ;
call reset_face_lengths_list(g, pf)
124 case (
"file") ;
call reset_face_lengths_file(g, pf)
125 case (
"global_1deg") ;
call reset_face_lengths_named(g, pf, trim(config))
126 case default ;
call mom_error(fatal,
"MOM_initialize_fixed: "// &
127 "Unrecognized channel configuration "//trim(config))
131 if (g%bathymetry_at_vel)
then 132 call get_param(pf, mdl,
"VELOCITY_DEPTH_CONFIG", config, &
133 "A string that determines how the topography is set at \n"//&
134 "velocity points. This may be 'min' or 'max'.", &
136 select case ( trim(config) )
137 case (
"max") ;
call set_velocity_depth_max(g)
138 case (
"min") ;
call set_velocity_depth_min(g)
139 case default ;
call mom_error(fatal,
"MOM_initialize_fixed: "// &
140 "Unrecognized velocity depth configuration "//trim(config))
146 call mom_initialize_rotation(g%CoriolisBu, g, pf)
148 call mom_calculate_grad_coriolis(g%dF_dx, g%dF_dy, g)
150 call qchksum(g%CoriolisBu,
"MOM_initialize_fixed: f ", g%HI)
151 call hchksum(g%dF_dx,
"MOM_initialize_fixed: dF_dx ", g%HI)
152 call hchksum(g%dF_dy,
"MOM_initialize_fixed: dF_dy ", g%HI)
155 call initialize_grid_rotation_angle(g, pf)
170 real,
dimension(G%isd:G%ied,G%jsd:G%jed), &
173 real,
intent(out) :: max_depth
179 character(len=40) :: mdl =
"MOM_initialize_topography" 180 character(len=200) :: config
182 call get_param(pf, mdl,
"TOPO_CONFIG", config, &
183 "This specifies how bathymetry is specified: \n"//&
184 " \t file - read bathymetric information from the file \n"//&
185 " \t\t specified by (TOPO_FILE).\n"//&
186 " \t flat - flat bottom set to MAXIMUM_DEPTH. \n"//&
187 " \t bowl - an analytically specified bowl-shaped basin \n"//&
188 " \t\t ranging between MAXIMUM_DEPTH and MINIMUM_DEPTH. \n"//&
189 " \t spoon - a similar shape to 'bowl', but with an vertical \n"//&
190 " \t\t wall at the southern face. \n"//&
191 " \t halfpipe - a zonally uniform channel with a half-sine \n"//&
192 " \t\t profile in the meridional direction. \n"//&
193 " \t benchmark - use the benchmark test case topography. \n"//&
194 " \t DOME - use a slope and channel configuration for the \n"//&
195 " \t\t DOME sill-overflow test case. \n"//&
196 " \t ISOMIP - use a slope and channel configuration for the \n"//&
197 " \t\t ISOMIP test case. \n"//&
198 " \t DOME2D - use a shelf and slope configuration for the \n"//&
199 " \t\t DOME2D gravity current/overflow test case. \n"//&
200 " \t Kelvin - flat but with rotated land mask.\n"//&
201 " \t seamount - Gaussian bump for spontaneous motion test case.\n"//&
202 " \t shelfwave - exponential slope for shelfwave test case.\n"//&
203 " \t supercritical - flat but with 8.95 degree land mask.\n"//&
204 " \t Phillips - ACC-like idealized topography used in the Phillips config.\n"//&
205 " \t dense - Denmark Strait-like dense water formation and overflow.\n"//&
206 " \t USER - call a user modified routine.", &
207 fail_if_missing=.true.)
208 max_depth = -1.e9;
call read_param(pf,
"MAXIMUM_DEPTH", max_depth)
209 select case ( trim(config) )
210 case (
"file");
call initialize_topography_from_file(d, g, pf)
211 case (
"flat");
call initialize_topography_named(d, g, pf, config, max_depth)
212 case (
"spoon");
call initialize_topography_named(d, g, pf, config, max_depth)
213 case (
"bowl");
call initialize_topography_named(d, g, pf, config, max_depth)
214 case (
"halfpipe");
call initialize_topography_named(d, g, pf, config, max_depth)
227 case default ;
call mom_error(fatal,
"MOM_initialize_topography: "// &
228 "Unrecognized topography setup '"//trim(config)//
"'")
230 if (max_depth>0.)
then 231 call log_param(pf, mdl,
"MAXIMUM_DEPTH", max_depth, &
232 "The maximum depth of the ocean.", units=
"m")
234 max_depth = diagnosemaximumdepth(d,g)
235 call log_param(pf, mdl,
"!MAXIMUM_DEPTH", max_depth, &
236 "The (diagnosed) maximum depth of the ocean.", units=
"m")
238 if (trim(config) .ne.
"DOME")
then 239 call limit_topography(d, g, pf, max_depth)
subroutine, public supercritical_initialize_topography(D, G, param_file, max_depth)
This subroutine sets up the supercritical topography and land mask. We were not able to get the shock...
subroutine, public seamount_initialize_topography(D, G, param_file, max_depth)
Initialization of topography.
subroutine, public dense_water_initialize_topography(D, G, param_file, max_depth)
Initialize the topography field for the dense water experiment.
subroutine, public initialize_masks(G, PF)
initialize_masks initializes the grid masks and any metrics that come with masks already applied...
Initializes fixed aspects of the model, such as horizontal grid metrics, topography and Coriolis...
subroutine, public initialize_grid_rotation_angle(G, PF)
initialize_grid_rotation_angle initializes the arrays with the sine and cosine of the angle between l...
subroutine, public mom_initialize_topography(D, max_depth, G, PF)
MOM_initialize_topography makes the appropriate call to set up the bathymetry.
subroutine, public reset_face_lengths_named(G, param_file, name)
subroutine, public open_boundary_config(G, param_file, OBC)
Enables OBC module and reads configuration parameters This routine is called from MOM_initialize_fixe...
subroutine, public mom_calculate_grad_coriolis(dF_dx, dF_dy, G)
Calculates the components of grad f (Coriolis parameter)
By Robert Hallberg, April 1994 - June 2002 *This subroutine initializes the fields for the simulation...
subroutine, public calltree_leave(mesg)
Writes a message about leaving a subroutine if call tree reporting is active.
The module configures the ISOMIP test case.
This module contains I/O framework code.
subroutine, public mom_initialize_rotation(f, G, PF)
MOM_initialize_rotation makes the appropriate call to set up the Coriolis parameter.
logical function, public open_boundary_query(OBC, apply_open_OBC, apply_specified_OBC, apply_Flather_OBC, apply_nudged_OBC, needs_ext_seg_data)
real function, public diagnosemaximumdepth(D, G)
Return the global maximum ocean bottom depth in m.
subroutine, public open_boundary_impose_normal_slope(OBC, G, depth)
Sets the slope of bathymetry normal to an open bounndary to zero.
Code that initializes fixed aspects of the model grid, such as horizontal grid metrics, topography and Coriolis, and can be shared between components.
By Robert Hallberg, April 1994 - June 2002 *This subroutine initializes the fields for the simulation...
subroutine, public set_rotation_beta_plane(f, G, param_file)
subroutine, public initialize_topography_named(D, G, param_file, topog_config, max_depth)
initialize the bathymetry based on one of several named idealized configurations
subroutine, public benchmark_initialize_topography(D, G, param_file, max_depth)
This subroutine sets up the benchmark test case topography.
subroutine, public calltree_waypoint(mesg, n)
Writes a message about reaching a milestone if call tree reporting is active.
subroutine, public read_face_length_list(iounit, filename, num_lines, lines)
subroutine, public write_ocean_geometry_file(G, param_file, directory, geom_file)
Write out a file describing the topography, Coriolis parameter, grid locations and various other fixe...
The module configures the model for the idealized shelfwave test case.
subroutine, public apply_topography_edits_from_file(D, G, param_file)
Applies a list of topography overrides read from a netcdf file.
subroutine, public kelvin_initialize_topography(D, G, param_file, max_depth)
This subroutine sets up the Kelvin topography and land mask.
logical function, public is_root_pe()
subroutine, public set_grid_metrics(G, param_file)
set_grid_metrics is used to set the primary values in the model's horizontal grid. The bathymetry, land-sea mask and any restricted channel widths are not known yet, so these are set later.
subroutine, public compute_global_grid_integrals(G)
Pre-compute global integrals of grid quantities (like masked ocean area) for later use in reporting d...
subroutine, public dome_initialize_topography(D, G, param_file, max_depth)
This subroutine sets up the DOME topography.
subroutine, public reset_face_lengths_file(G, param_file)
The module configures the model for the non-rotating sloshing test case.
subroutine, public mom_mesg(message, verb, all_print)
subroutine, public isomip_initialize_topography(D, G, param_file, max_depth)
Initialization of topography.
subroutine, public mom_initialize_fixed(G, OBC, PF, write_geom, output_dir)
MOM_initialize_fixed sets up time-invariant quantities related to MOM6's horizontal grid...
subroutine, public phillips_initialize_topography(D, G, param_file, max_depth)
Initialize topography.
subroutine, public shelfwave_initialize_topography(D, G, param_file, max_depth)
Initialization of topography.
subroutine, public set_rotation_planetary(f, G, param_file)
subroutine, public limit_topography(D, G, param_file, max_depth)
limit_topography ensures that min_depth < D(x,y) < max_depth
subroutine, public initialize_topography_from_file(D, G, param_file)
Read gridded depths from file.
Initialization routines for the dense water formation and overflow experiment.
Controls where open boundary conditions are applied.
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...
The module configures the model for the "DOME" experiment. DOME = Dynamics of Overflows and Mixing Ex...
subroutine, public open_boundary_impose_land_mask(OBC, G, areaCu, areaCv)
Reconcile masks and open boundaries, deallocate OBC on PEs where it is not needed. Also adjust u- and v-point cell area on specified open boundaries.
subroutine, public dome2d_initialize_topography(D, G, param_file, max_depth)
Initialize topography with a shelf and slope in a 2D domain.
subroutine, public mom_error(level, message, all_print)
subroutine, public user_initialize_topography(D, G, param_file, max_depth)
Initialize topography.
subroutine, public sloshing_initialize_topography(D, G, param_file, max_depth)
Initialization of topography.
The module configures the model for the idealized seamount test case.
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...
subroutine, public reset_face_lengths_list(G, param_file)
The module configures the model for the "supercritical" experiment. https://marine.rutgers.edu/po/index.php?model=test-problems&title=supercritical.
subroutine, public calltree_enter(mesg, n)
Writes a message about entering a subroutine if call tree reporting is active.