7 use mom_cpu_clock, only : cpu_clock_id, cpu_clock_begin, cpu_clock_end, clock_routine
26 implicit none ;
private 28 #include <MOM_memory.h> 34 logical :: use_files = .false.
35 logical :: use_kelvin = .false.
36 logical :: use_tidal_bay = .false.
37 logical :: use_shelfwave = .false.
46 character(len=40) ::
mdl =
"MOM_boundary_update" 48 #include "version_variable.h" 59 character(len=40) :: mdl =
"MOM_boundary_update" 61 if (
associated(cs))
then 62 call mom_error(warning,
"call_OBC_register called with an associated "// &
65 else ;
allocate(cs) ;
endif 69 call get_param(param_file, mdl,
"USE_FILE_OBC", cs%use_files, &
70 "If true, use external files for the open boundary.", &
72 call get_param(param_file, mdl,
"USE_TIDAL_BAY_OBC", cs%use_tidal_bay, &
73 "If true, use the tidal_bay open boundary.", &
75 call get_param(param_file, mdl,
"USE_KELVIN_WAVE_OBC", cs%use_Kelvin, &
76 "If true, use the Kelvin wave open boundary.", &
78 call get_param(param_file, mdl,
"USE_SHELFWAVE_OBC", cs%use_shelfwave, &
79 "If true, use the shelfwave open boundary.", &
82 if (cs%use_files) cs%use_files = &
85 if (cs%use_tidal_bay) cs%use_tidal_bay = &
86 register_tidal_bay_obc(param_file, cs%tidal_bay_OBC_CSp, &
88 if (cs%use_Kelvin) cs%use_Kelvin = &
89 register_kelvin_obc(param_file, cs%Kelvin_OBC_CSp, &
91 if (cs%use_shelfwave) cs%use_shelfwave = &
92 register_shelfwave_obc(param_file, cs%shelfwave_OBC_CSp, &
102 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)),
intent(inout) :: h
105 type(time_type),
intent(in) :: Time
107 logical :: read_OBC_eta = .false.
108 logical :: read_OBC_uv = .false.
109 logical :: read_OBC_TS = .false.
110 integer :: i, j, k, itt, is, ie, js, je, isd, ied, jsd, jed, nz
111 integer :: isd_off, jsd_off
112 integer :: IsdB, IedB, JsdB, JedB
113 character(len=40) :: mdl =
"update_OBC_data" 114 character(len=200) :: filename, OBC_file, inputdir
116 is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec ; nz = g%ke
117 isd = g%isd ; ied = g%ied ; jsd = g%jsd ; jed = g%jed
118 isdb = g%IsdB ; iedb = g%IedB ; jsdb = g%JsdB ; jedb = g%JedB
123 if (cs%use_tidal_bay) &
124 call tidal_bay_set_obc_data(obc, cs%tidal_bay_OBC_CSp, g, h, time)
126 call kelvin_set_obc_data(obc, cs%Kelvin_OBC_CSp, g, h, time)
127 if (cs%use_shelfwave) &
128 call shelfwave_set_obc_data(obc, cs%shelfwave_OBC_CSp, g, h, time)
129 if (obc%needs_IO_for_data) &
130 call update_obc_segment_data(g, gv, obc, tv, h, time)
142 if (
associated(cs))
deallocate(cs)
subroutine, public kelvin_set_obc_data(OBC, CS, G, h, Time)
This subroutine sets the properties of flow at open boundary conditions.
subroutine, public tidal_bay_set_obc_data(OBC, CS, G, h, Time)
This subroutine sets the properties of flow at open boundary conditions.
subroutine, public shelfwave_obc_end(CS)
Clean up the shelfwave OBC from registry.
subroutine, public file_obc_end(CS)
Clean up the file OBC from registry.
Ocean grid type. See mom_grid for details.
Controls where open boundary conditions are applied.
Provides the ocean grid type.
subroutine, public kelvin_obc_end(CS)
Clean up the Kelvin wave OBC from registry.
subroutine, public shelfwave_set_obc_data(OBC, CS, G, h, Time)
This subroutine sets the properties of flow at open boundary conditions.
The module configures the model for the "tidal_bay" experiment. tidal_bay = Tidally resonant bay from...
logical function, public register_file_obc(param_file, CS, OBC_Reg)
Add file to OBC registry.
subroutine, public update_obc_segment_data(G, GV, OBC, tv, h, Time)
Update the OBC values on the segments.
This module contains the tracer_registry_type and the subroutines that handle registration of tracers...
The module configures the model for the idealized shelfwave test case.
Type to carry basic OBC information needed for updating values.
Type to carry basic tracer information.
subroutine, public add_tracer_obc_values(name, Reg, OBC_inflow, OBC_in_u, OBC_in_v)
This subroutine adds open boundary condition concentrations for a tracer that has previously been reg...
logical function, public register_shelfwave_obc(param_file, CS, OBC_Reg)
Add shelfwave to OBC registry.
subroutine, public update_obc_data(OBC, G, GV, tv, h, CS, Time)
Calls appropriate routine to update the open boundary conditions.
subroutine, public mom_mesg(message, verb, all_print)
Control structure for tidal bay open boundaries.
logical function, public register_kelvin_obc(param_file, CS, OBC_Reg)
Add Kelvin wave to OBC registry.
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.
The thermo_var_ptrs structure contains pointers to an assortment of thermodynamic fields that may be ...
subroutine, public tidal_bay_obc_end(CS)
Clean up the tidal bay OBC from registry.
subroutine, public obc_register_end(CS)
Clean up the OBC registry.
Controls where open boundary conditions are applied.
subroutine, public call_obc_register(param_file, CS, OBC)
The following subroutines and associated definitions provide the machinery to register and call the s...
subroutine, public mom_error(level, message, all_print)
logical function, public register_tidal_bay_obc(param_file, CS, OBC_Reg)
Add tidal bay to OBC registry.