7 use mom_cpu_clock,
only : cpu_clock_id, cpu_clock_begin, cpu_clock_end, clock_routine
29 implicit none ;
private 31 #include <MOM_memory.h> 33 public call_obc_register, obc_register_end
34 public update_obc_data
38 logical :: use_files = .false.
39 logical :: use_kelvin = .false.
40 logical :: use_tidal_bay = .false.
41 logical :: use_shelfwave = .false.
42 logical :: use_dyed_channel = .false.
52 integer :: id_clock_pass
61 subroutine call_obc_register(param_file, CS, OBC)
67 character(len=40) :: mdl =
"MOM_boundary_update" 69 # include "version_variable.h" 70 if (
associated(cs))
then 71 call mom_error(warning,
"call_OBC_register called with an associated "// &
74 else ;
allocate(cs) ;
endif 78 call get_param(param_file, mdl,
"USE_FILE_OBC", cs%use_files, &
79 "If true, use external files for the open boundary.", &
81 call get_param(param_file, mdl,
"USE_TIDAL_BAY_OBC", cs%use_tidal_bay, &
82 "If true, use the tidal_bay open boundary.", &
84 call get_param(param_file, mdl,
"USE_KELVIN_WAVE_OBC", cs%use_Kelvin, &
85 "If true, use the Kelvin wave open boundary.", &
87 call get_param(param_file, mdl,
"USE_SHELFWAVE_OBC", cs%use_shelfwave, &
88 "If true, use the shelfwave open boundary.", &
90 call get_param(param_file, mdl,
"USE_DYED_CHANNEL_OBC", cs%use_dyed_channel, &
91 "If true, use the dyed channel open boundary.", &
94 if (cs%use_files) cs%use_files = &
95 register_file_obc(param_file, cs%file_OBC_CSp, &
97 if (cs%use_tidal_bay) cs%use_tidal_bay = &
98 register_tidal_bay_obc(param_file, cs%tidal_bay_OBC_CSp, &
100 if (cs%use_Kelvin) cs%use_Kelvin = &
101 register_kelvin_obc(param_file, cs%Kelvin_OBC_CSp, &
103 if (cs%use_shelfwave) cs%use_shelfwave = &
104 register_shelfwave_obc(param_file, cs%shelfwave_OBC_CSp, &
106 if (cs%use_dyed_channel) cs%use_dyed_channel = &
107 register_dyed_channel_obc(param_file, cs%dyed_channel_OBC_CSp, &
110 end subroutine call_obc_register
113 subroutine update_obc_data(OBC, G, GV, US, tv, h, CS, Time)
118 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)),
intent(inout) :: h
121 type(time_type),
intent(in) :: time
124 logical :: read_obc_eta = .false.
125 logical :: read_obc_uv = .false.
126 logical :: read_obc_ts = .false.
127 integer :: i, j, k, itt, is, ie, js, je, isd, ied, jsd, jed, nz
128 integer :: isd_off, jsd_off
129 integer :: isdb, iedb, jsdb, jedb
130 character(len=40) :: mdl =
"update_OBC_data" 131 character(len=200) :: filename, obc_file, inputdir
133 is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec ; nz = g%ke
134 isd = g%isd ; ied = g%ied ; jsd = g%jsd ; jed = g%jed
135 isdb = g%IsdB ; iedb = g%IedB ; jsdb = g%JsdB ; jedb = g%JedB
140 if (cs%use_tidal_bay) &
141 call tidal_bay_set_obc_data(obc, cs%tidal_bay_OBC_CSp, g, h, time)
143 call kelvin_set_obc_data(obc, cs%Kelvin_OBC_CSp, g, gv, us, h, time)
144 if (cs%use_shelfwave) &
145 call shelfwave_set_obc_data(obc, cs%shelfwave_OBC_CSp, g, h, time)
146 if (cs%use_dyed_channel) &
147 call dyed_channel_update_flow(obc, cs%dyed_channel_OBC_CSp, g, time)
148 if (obc%needs_IO_for_data .or. obc%add_tide_constituents) &
149 call update_obc_segment_data(g, gv, us, obc, tv, h, time)
151 end subroutine update_obc_data
154 subroutine obc_register_end(CS)
157 if (cs%use_files)
call file_obc_end(cs%file_OBC_CSp)
158 if (cs%use_tidal_bay)
call tidal_bay_obc_end(cs%tidal_bay_OBC_CSp)
159 if (cs%use_Kelvin)
call kelvin_obc_end(cs%Kelvin_OBC_CSp)
161 if (
associated(cs))
deallocate(cs)
162 end subroutine obc_register_end
The control structure for the MOM_boundary_update module.
Control structure for dyed-channel open boundaries.
Ocean grid type. See mom_grid for details.
Controls where open boundary conditions are applied.
A structure that can be parsed to read and document run-time parameters.
Provides the ocean grid type.
Wraps the MPP cpu clock functions.
Describes the horizontal ocean grid with only dynamic memory arrays.
The MOM6 facility to parse input files for runtime parameters.
Configures the model for the "tidal_bay" experiment. tidal_bay = Tidally resonant bay from Zygmunt Ko...
An overloaded interface to log the values of various types of parameters.
Describes various unit conversion factors.
This module contains the tracer_registry_type and the subroutines that handle registration of tracers...
Configures the model for the idealized shelfwave test case.
Provides a transparent unit rescaling type to facilitate dimensional consistency testing.
Type to carry basic OBC information needed for updating values.
Type to carry basic tracer information.
Routines for error handling and I/O management.
Initialization for the dyed_channel configuration.
An overloaded interface to log version information about modules.
Describes the vertical ocean grid, including unit conversion factors.
Control structure for tidal bay open boundaries.
Control structure for open boundaries that read from files. Probably lots to update here...
Control structure for shelfwave open boundaries.
Control structure for Kelvin wave open boundaries.
Pointers to an assortment of thermodynamic fields that may be available, including potential temperat...
Configures the model for the Kelvin wave experiment.
Contains a shareable dynamic type for describing horizontal grids and metric data and utilty routines...
Controls where open boundary conditions are applied.
Provides a transparent vertical ocean grid type and supporting routines.
Provides transparent structures with groups of MOM6 variables and supporting routines.
An overloaded interface to read and log the values of various types of parameters.