19 implicit none ;
private 21 #include <MOM_memory.h> 23 public continuity, continuity_init, continuity_end, continuity_stencil
27 integer :: continuity_scheme
35 integer,
parameter :: ppm_scheme = 1
36 character(len=20),
parameter :: ppm_string =
"PPM" 42 subroutine continuity(u, v, hin, h, uh, vh, dt, G, GV, US, CS, uhbt, vhbt, OBC, &
43 visc_rem_u, visc_rem_v, u_cor, v_cor, BT_cont)
46 real,
dimension(SZIB_(G),SZJ_(G),SZK_(G)), &
48 real,
dimension(SZI_(G),SZJB_(G),SZK_(G)), &
50 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)), &
52 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)), &
54 real,
dimension(SZIB_(G),SZJ_(G),SZK_(G)), &
57 real,
dimension(SZI_(G),SZJB_(G),SZK_(G)), &
60 real,
intent(in) :: dt
63 real,
dimension(SZIB_(G),SZJ_(G)), &
64 optional,
intent(in) :: uhbt
66 real,
dimension(SZI_(G),SZJB_(G)), &
67 optional,
intent(in) :: vhbt
70 optional,
pointer :: OBC
71 real,
dimension(SZIB_(G),SZJ_(G),SZK_(G)), &
72 optional,
intent(in) :: visc_rem_u
76 real,
dimension(SZI_(G),SZJB_(G),SZK_(G)), &
77 optional,
intent(in) :: visc_rem_v
81 real,
dimension(SZIB_(G),SZJ_(G),SZK_(G)), &
82 optional,
intent(out) :: u_cor
84 real,
dimension(SZI_(G),SZJB_(G),SZK_(G)), &
85 optional,
intent(out) :: v_cor
88 optional,
pointer :: BT_cont
91 if (
present(visc_rem_u) .neqv.
present(visc_rem_v))
call mom_error(fatal, &
92 "MOM_continuity: Either both visc_rem_u and visc_rem_v or neither"// &
93 " one must be present in call to continuity.")
94 if (
present(u_cor) .neqv.
present(v_cor))
call mom_error(fatal, &
95 "MOM_continuity: Either both u_cor and v_cor or neither"// &
96 " one must be present in call to continuity.")
98 if (cs%continuity_scheme == ppm_scheme)
then 99 call continuity_ppm(u, v, hin, h, uh, vh, dt, g, gv, us, cs%PPM_CSp, uhbt, vhbt, obc, &
100 visc_rem_u, visc_rem_v, u_cor, v_cor, bt_cont=bt_cont)
102 call mom_error(fatal,
"continuity: Unrecognized value of continuity_scheme")
105 end subroutine continuity
108 subroutine continuity_init(Time, G, GV, US, param_file, diag, CS)
109 type(time_type),
target,
intent(in) :: Time
114 type(
diag_ctrl),
target,
intent(inout) :: diag
118 # include "version_variable.h" 119 character(len=40) :: mdl =
"MOM_continuity" 120 character(len=20) :: tmpstr
122 if (
associated(cs))
then 123 call mom_error(warning,
"continuity_init called with associated control structure.")
130 call get_param(param_file, mdl,
"CONTINUITY_SCHEME", tmpstr, &
131 "CONTINUITY_SCHEME selects the discretization for the "//&
132 "continuity solver. The only valid value currently is: \n"//&
133 "\t PPM - use a positive-definite (or monotonic) \n"//&
134 "\t piecewise parabolic reconstruction solver.", &
137 tmpstr = uppercase(tmpstr) ; cs%continuity_scheme = 0
138 select case (trim(tmpstr))
139 case (ppm_string) ; cs%continuity_scheme = ppm_scheme
141 call mom_mesg(
'continuity_init: CONTINUITY_SCHEME ="'//trim(tmpstr)//
'"', 0)
142 call mom_mesg(
"continuity_init: The only valid value is currently "// &
144 call mom_error(fatal,
"continuity_init: Unrecognized setting "// &
145 "#define CONTINUITY_SCHEME "//trim(tmpstr)//
" found in input file.")
148 if (cs%continuity_scheme == ppm_scheme)
then 149 call continuity_ppm_init(time, g, gv, us, param_file, diag, cs%PPM_CSp)
152 end subroutine continuity_init
156 function continuity_stencil(CS)
result(stencil)
162 if (cs%continuity_scheme == ppm_scheme)
then 163 stencil = continuity_ppm_stencil(cs%PPM_CSp)
166 end function continuity_stencil
169 subroutine continuity_end(CS)
172 if (cs%continuity_scheme == ppm_scheme)
then 173 call continuity_ppm_end(cs%PPM_CSp)
178 end subroutine continuity_end
Ocean grid type. See mom_grid for details.
Solve the layer continuity equation.
A structure that can be parsed to read and document run-time parameters.
Provides the ocean grid type.
The MOM6 facility to parse input files for runtime parameters.
Container for information about the summed layer transports and how they will vary as the barotropic ...
Control structure for mom_continuity_ppm.
Describes various unit conversion factors.
Control structure for mom_continuity.
Provides a transparent unit rescaling type to facilitate dimensional consistency testing.
Routines for error handling and I/O management.
An overloaded interface to log version information about modules.
Describes the vertical ocean grid, including unit conversion factors.
Solve the layer continuity equation using the PPM method for layer fluxes.
Controls where open boundary conditions are applied.
Handy functions for manipulating strings.
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.