MOM6
supercritical_initialization Module Reference

Detailed Description

The "super critical" configuration.

The module configures the model for the "supercritical" experiment. https://marine.rutgers.edu/po/index.php?model=test-problems&title=supercritical

Functions/Subroutines

subroutine, public supercritical_set_obc_data (OBC, G, param_file)
 This subroutine sets the properties of flow at open boundary conditions. More...
 

Function/Subroutine Documentation

◆ supercritical_set_obc_data()

subroutine, public supercritical_initialization::supercritical_set_obc_data ( type(ocean_obc_type), pointer  OBC,
type(ocean_grid_type), intent(in)  G,
type(param_file_type), intent(in)  param_file 
)

This subroutine sets the properties of flow at open boundary conditions.

Parameters
obcThis open boundary condition type specifies whether, where, and what open boundary conditions are used.
[in]gThe ocean's grid structure.
[in]param_fileParameter file structure

Definition at line 27 of file supercritical_initialization.F90.

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 

References mom_error_handler::mom_error().

Referenced by mom_state_initialization::mom_initialize_state().

Here is the call graph for this function:
Here is the caller graph for this function: