MOM6
supercritical_initialization.F90
Go to the documentation of this file.
1 !> The "super critical" configuration
3 
4 ! This file is part of MOM6. See LICENSE.md for the license.
5 
9 use mom_grid, only : ocean_grid_type
12 use mom_time_manager, only : time_type, time_type_to_real
13 
14 implicit none ; private
15 
16 #include <MOM_memory.h>
17 
19 
20 ! This include declares and sets the variable "version".
21 #include "version_variable.h"
22 
23 contains
24 
25 !> This subroutine sets the properties of flow at open boundary conditions.
26 subroutine supercritical_set_obc_data(OBC, G, param_file)
27  type(ocean_obc_type), pointer :: obc !< This open boundary condition type specifies
28  !! whether, where, and what open boundary
29  !! conditions are used.
30  type(ocean_grid_type), intent(in) :: g !< The ocean's grid structure.
31  type(param_file_type), intent(in) :: param_file !< Parameter file structure
32  ! Local variables
33  character(len=40) :: mdl = "supercritical_set_OBC_data" ! This subroutine's name.
34  real :: zonal_flow ! Inflow speed [L T-1 ~> m s-1]
35  integer :: i, j, k, l
36  integer :: isd, ied, jsd, jed, isdb, iedb, jsdb, jedb
37  type(obc_segment_type), pointer :: segment => null() ! pointer to segment type list
38 
39  if (.not.associated(obc)) call mom_error(fatal, 'supercritical_initialization.F90: '// &
40  'supercritical_set_OBC_data() was called but OBC type was not initialized!')
41 
42  call get_param(param_file, mdl, "SUPERCRITICAL_ZONAL_FLOW", zonal_flow, &
43  "Constant zonal flow imposed at upstream open boundary.", &
44  units="m/s", default=8.57, scale=g%US%m_s_to_L_T)
45 
46  do l=1, obc%number_of_segments
47  segment => obc%segment(l)
48  if (.not. segment%on_pe) cycle
49  if (segment%gradient) cycle
50  if (segment%oblique .and. .not. segment%nudged .and. .not. segment%Flather) cycle
51 
52  if (segment%is_E_or_W) then
53  jsd = segment%HI%jsd ; jed = segment%HI%jed
54  isdb = segment%HI%IsdB ; iedb = segment%HI%IedB
55  do k=1,g%ke
56  do j=jsd,jed ; do i=isdb,iedb
57  if (segment%specified .or. segment%nudged) then
58  segment%normal_vel(i,j,k) = zonal_flow
59  endif
60  if (segment%specified) then
61  segment%normal_trans(i,j,k) = zonal_flow * g%dyCu(i,j)
62  endif
63  enddo ; enddo
64  enddo
65  do j=jsd,jed ; do i=isdb,iedb
66  segment%normal_vel_bt(i,j) = zonal_flow
67  enddo ; enddo
68  else
69  isd = segment%HI%isd ; ied = segment%HI%ied
70  jsdb = segment%HI%JsdB ; jedb = segment%HI%JedB
71  do j=jsdb,jedb ; do i=isd,ied
72  segment%normal_vel_bt(i,j) = 0.0
73  enddo ; enddo
74  endif
75  enddo
76 
77 end subroutine supercritical_set_obc_data
78 
79 !> \namespace supercritical_initialization
80 !!
81 !! The module configures the model for the "supercritical" experiment.
82 !! https://marine.rutgers.edu/po/index.php?model=test-problems&title=supercritical
mom_time_manager
Wraps the FMS time manager functions.
Definition: MOM_time_manager.F90:2
mom_verticalgrid
Provides a transparent vertical ocean grid type and supporting routines.
Definition: MOM_verticalGrid.F90:2
mom_file_parser::log_version
An overloaded interface to log version information about modules.
Definition: MOM_file_parser.F90:109
mom_open_boundary::obc_simple
integer, parameter, public obc_simple
Indicates the use of a simple inflow open boundary.
Definition: MOM_open_boundary.F90:59
mom_dyn_horgrid
Contains a shareable dynamic type for describing horizontal grids and metric data and utilty routines...
Definition: MOM_dyn_horgrid.F90:3
mom_error_handler::mom_mesg
subroutine, public mom_mesg(message, verb, all_print)
This provides a convenient interface for writing an informative comment.
Definition: MOM_error_handler.F90:53
mom_file_parser::param_file_type
A structure that can be parsed to read and document run-time parameters.
Definition: MOM_file_parser.F90:54
mom_file_parser::get_param
An overloaded interface to read and log the values of various types of parameters.
Definition: MOM_file_parser.F90:102
supercritical_initialization::supercritical_set_obc_data
subroutine, public supercritical_set_obc_data(OBC, G, param_file)
This subroutine sets the properties of flow at open boundary conditions.
Definition: supercritical_initialization.F90:27
mom_verticalgrid::verticalgrid_type
Describes the vertical ocean grid, including unit conversion factors.
Definition: MOM_verticalGrid.F90:24
mom_open_boundary
Controls where open boundary conditions are applied.
Definition: MOM_open_boundary.F90:2
mom_file_parser
The MOM6 facility to parse input files for runtime parameters.
Definition: MOM_file_parser.F90:2
mom_grid
Provides the ocean grid type.
Definition: MOM_grid.F90:2
mom_open_boundary::ocean_obc_type
Open-boundary data.
Definition: MOM_open_boundary.F90:195
mom_error_handler::is_root_pe
logical function, public is_root_pe()
This returns .true. if the current PE is the root PE.
Definition: MOM_error_handler.F90:44
mom_error_handler::mom_error
subroutine, public mom_error(level, message, all_print)
This provides a convenient interface for writing an mpp_error message with run-time filter based on a...
Definition: MOM_error_handler.F90:72
mom_open_boundary::obc_none
integer, parameter, public obc_none
Indicates the use of no open boundary.
Definition: MOM_open_boundary.F90:58
supercritical_initialization
The "super critical" configuration.
Definition: supercritical_initialization.F90:2
mom_open_boundary::obc_segment_type
Open boundary segment data structure.
Definition: MOM_open_boundary.F90:103
mom_error_handler
Routines for error handling and I/O management.
Definition: MOM_error_handler.F90:2
mom_dyn_horgrid::dyn_horgrid_type
Describes the horizontal ocean grid with only dynamic memory arrays.
Definition: MOM_dyn_horgrid.F90:23
mom_grid::ocean_grid_type
Ocean grid type. See mom_grid for details.
Definition: MOM_grid.F90:26