MOM6
supercritical_initialization Module Reference

Detailed Description

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...
 
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 wave to behave this way and are now using an external file. More...
 

Function/Subroutine Documentation

◆ supercritical_initialize_topography()

subroutine, public supercritical_initialization::supercritical_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 
)

This subroutine sets up the supercritical topography and land mask. We were not able to get the shock wave to behave this way and are now using an external file.

Parameters
[in]gThe dynamic horizontal grid type
[out]dOcean bottom depth in m
[in]param_fileParameter file structure
[in]max_depthMaximum depth of model in m

Definition at line 88 of file supercritical_initialization.F90.

References mom_error_handler::mom_mesg().

Referenced by mom_fixed_initialization::mom_initialize_topography().

88  type(dyn_horgrid_type), intent(in) :: g !< The dynamic horizontal grid type
89  real, dimension(SZI_(G),SZJ_(G)), intent(out) :: d !< Ocean bottom depth in m
90  type(param_file_type), intent(in) :: param_file !< Parameter file structure
91  real, intent(in) :: max_depth !< Maximum depth of model in m
92  ! Local variables
93  character(len=40) :: mdl = "supercritical_initialize_topography" ! This subroutine's name.
94  real :: min_depth ! The minimum and maximum depths in m.
95  real :: pi ! 3.1415...
96  real :: coast_offset, coast_angle
97  integer :: i, j
98 
99  call mom_mesg(" supercritical_initialization.F90, supercritical_initialize_topography: setting topography", 5)
100 
101  call log_version(param_file, mdl, version, "")
102  call get_param(param_file, mdl, "MINIMUM_DEPTH", min_depth, &
103  "The minimum depth of the ocean.", units="m", default=0.0)
104  call get_param(param_file, mdl, "SUPERCRITICAL_COAST_OFFSET", coast_offset, &
105  "The distance along the southern boundary at which the coasts angles in.", &
106  units="km", default=10.0)
107  call get_param(param_file, mdl, "SUPERCRITICAL_COAST_ANGLE", coast_angle, &
108  "The angle of the southern bondary beyond X=SUPERCRITICAL_COAST_OFFSET.", &
109  units="degrees", default=8.95)
110 
111  coast_angle = coast_angle * (atan(1.0)/45.) ! Convert to radians
112 
113  do j=g%jsc,g%jec ; do i=g%isc,g%iec
114  d(i,j)=max_depth
115  if ((g%geoLonT(i,j) > coast_offset).AND. &
116  (atan2(g%geoLatT(i,j),g%geoLonT(i,j) - coast_offset) < coast_angle)) then
117  d(i,j)=0.5*min_depth
118  endif
119 
120  if (d(i,j) > max_depth) d(i,j) = max_depth
121  if (d(i,j) < min_depth) d(i,j) = 0.5*min_depth
122  enddo ; enddo
123 
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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.

References mom_error_handler::mom_error().

Referenced by mom_state_initialization::mom_initialize_state().

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
35  integer :: i, j, k, l
36  integer :: isd, ied, jsd, jed, isdb, iedb, jsdb, jedb
37  type(obc_segment_type), pointer :: segment ! 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)
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 k=1,G%ke
72 ! do J=JsdB,JedB ; do i=isd,ied
73 ! segment%normal_vel(i,J,k) = 0.0
74 ! enddo ; enddo
75 ! enddo
76  do j=jsdb,jedb ; do i=isd,ied
77  segment%normal_vel_bt(i,j) = 0.0
78  enddo ; enddo
79  endif
80  enddo
81 
Ocean grid type. See mom_grid for details.
Definition: MOM_grid.F90:19
Here is the call graph for this function:
Here is the caller graph for this function: