Go to the documentation of this file.
20 implicit none ;
private
22 #include <MOM_memory.h>
29 real :: zonal_flow = 8.57
30 real :: tidal_amp = 0.0
31 real :: frequency = 0.0
46 character(len=32) :: casename =
"dyed channel"
47 character(len=40) :: mdl =
"register_dyed_channel_OBC"
49 if (
associated(cs))
then
50 call mom_error(warning,
"register_dyed_channel_OBC called with an "// &
51 "associated control structure.")
56 call get_param(param_file, mdl,
"CHANNEL_MEAN_FLOW", cs%zonal_flow, &
57 "Mean zonal flow imposed at upstream open boundary.", &
58 units=
"m/s", default=8.57)
59 call get_param(param_file, mdl,
"CHANNEL_TIDAL_AMP", cs%tidal_amp, &
60 "Sloshing amplitude imposed at upstream open boundary.", &
61 units=
"m/s", default=0.0)
62 call get_param(param_file, mdl,
"CHANNEL_FLOW_FREQUENCY", cs%frequency, &
63 "Frequency of oscillating zonal flow.", &
64 units=
"s-1", default=0.0)
76 if (
associated(cs))
then
92 character(len=40) :: mdl =
"dyed_channel_set_OBC_tracer_data"
93 character(len=80) :: name, longname
94 integer :: i, j, k, l, itt, isd, ied, jsd, jed, m, n
95 integer :: isdb, iedb, jsdb, jedb
100 if (.not.
associated(obc))
call mom_error(fatal,
'dyed_channel_initialization.F90: '// &
101 'dyed_channel_set_OBC_data() was called but OBC type was not initialized!')
103 call get_param(param_file, mdl,
"NUM_DYE_TRACERS",
ntr, &
104 "The number of dye tracers in this run. Each tracer "//&
105 "should have a separate boundary segment.", default=0, &
108 if (obc%number_of_segments <
ntr)
then
109 call mom_error(warning,
"Error in dyed_obc segment setup")
116 write(name,
'("dye_",I2.2)') m
117 write(longname,
'("Concentration of dyed_obc Tracer ",I2.2, " on segment ",I2.2)') m, m
118 call tracer_name_lookup(tr_reg, tr_ptr, name)
120 do n=1,obc%number_of_segments
126 call register_segment_tracer(tr_ptr, param_file, gv, &
127 obc%segment(n), obc_scalar=dye)
140 type(time_type),
intent(in) :: time
142 character(len=40) :: mdl =
"dyed_channel_update_flow"
143 character(len=80) :: name
144 real :: flow, time_sec, pi
145 integer :: i, j, k, l, itt, isd, ied, jsd, jed, m, n
146 integer :: isdb, iedb, jsdb, jedb
149 if (.not.
associated(obc))
call mom_error(fatal,
'dyed_channel_initialization.F90: '// &
150 'dyed_channel_update_flow() was called but OBC type was not initialized!')
152 time_sec = time_type_to_real(time)
155 do l=1, obc%number_of_segments
156 segment => obc%segment(l)
157 if (.not. segment%on_pe) cycle
158 if (segment%gradient) cycle
159 if (segment%oblique .and. .not. segment%nudged .and. .not. segment%Flather) cycle
161 if (segment%is_E_or_W)
then
162 jsd = segment%HI%jsd ; jed = segment%HI%jed
163 isdb = segment%HI%IsdB ; iedb = segment%HI%IedB
164 if (cs%frequency == 0.0)
then
165 flow = g%US%m_s_to_L_T*cs%zonal_flow
167 flow = g%US%m_s_to_L_T*cs%zonal_flow + cs%tidal_amp * cos(2 * pi * cs%frequency * time_sec)
170 do j=jsd,jed ;
do i=isdb,iedb
171 if (segment%specified .or. segment%nudged)
then
172 segment%normal_vel(i,j,k) = flow
174 if (segment%specified)
then
175 segment%normal_trans(i,j,k) = flow * g%dyCu(i,j)
179 do j=jsd,jed ;
do i=isdb,iedb
180 segment%normal_vel_bt(i,j) = flow
183 isd = segment%HI%isd ; ied = segment%HI%ied
184 jsdb = segment%HI%JsdB ; jedb = segment%HI%JedB
185 do j=jsdb,jedb ;
do i=isd,ied
186 segment%normal_vel_bt(i,j) = 0.0
Wraps the FMS time manager functions.
subroutine, public dyed_channel_obc_end(CS)
Clean up the dyed_channel OBC from registry.
Provides a transparent vertical ocean grid type and supporting routines.
An overloaded interface to log version information about modules.
logical function, public register_dyed_channel_obc(param_file, CS, OBC_Reg)
Add dyed channel to OBC registry.
Pointers to an assortment of thermodynamic fields that may be available, including potential temperat...
integer, parameter, public obc_simple
Indicates the use of a simple inflow open boundary.
Contains a shareable dynamic type for describing horizontal grids and metric data and utilty routines...
subroutine, public mom_mesg(message, verb, all_print)
This provides a convenient interface for writing an informative comment.
This module contains the tracer_registry_type and the subroutines that handle registration of tracers...
A structure that can be parsed to read and document run-time parameters.
An overloaded interface to read and log the values of various types of parameters.
Type to carry basic OBC information needed for updating values.
Describes the vertical ocean grid, including unit conversion factors.
Provides transparent structures with groups of MOM6 variables and supporting routines.
subroutine, public register_obc(name, param_file, Reg)
register open boundary objects for boundary updates.
Controls where open boundary conditions are applied.
The MOM6 facility to parse input files for runtime parameters.
subroutine, public tracer_name_lookup(Reg, tr_ptr, name)
Find a tracer in the tracer registry by name.
Type to carry basic tracer information.
Control structure for dyed-channel open boundaries.
subroutine, public dyed_channel_update_flow(OBC, CS, G, Time)
This subroutine updates the long-channel flow.
Provides the ocean grid type.
logical function, public is_root_pe()
This returns .true. if the current PE is the root PE.
subroutine, public register_segment_tracer(tr_ptr, param_file, GV, segment, OBC_scalar, OBC_array)
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...
integer, parameter, public obc_none
Indicates the use of no open boundary.
subroutine, public dyed_channel_set_obc_tracer_data(OBC, G, GV, param_file, tr_Reg)
This subroutine sets the dye and flow properties at open boundary conditions.
integer ntr
Number of dye tracers.
Initialization for the dyed_channel configuration.
Open boundary segment data structure.
Routines for error handling and I/O management.
Describes the horizontal ocean grid with only dynamic memory arrays.
Ocean grid type. See mom_grid for details.