21 implicit none ;
private 23 #include <MOM_memory.h> 25 public pressureforce, pressureforce_init, pressureforce_end
29 logical :: analytic_fv_pgf
40 subroutine pressureforce(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_atm, pbce, eta)
44 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)), &
47 real,
dimension(SZIB_(G),SZJ_(G),SZK_(G)), &
49 real,
dimension(SZI_(G),SZJB_(G),SZK_(G)), &
52 type(
ale_cs),
pointer :: ale_csp
53 real,
dimension(:,:), &
54 optional,
pointer :: p_atm
56 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)), &
57 optional,
intent(out) :: pbce
59 real,
dimension(SZI_(G),SZJ_(G)), &
60 optional,
intent(out) :: eta
63 if (cs%Analytic_FV_PGF)
then 64 if (gv%Boussinesq)
then 65 call pressureforce_fv_bouss(h, tv, pfu, pfv, g, gv, us, cs%PressureForce_FV_CSp, &
66 ale_csp, p_atm, pbce, eta)
68 call pressureforce_fv_nonbouss(h, tv, pfu, pfv, g, gv, us, cs%PressureForce_FV_CSp, &
69 ale_csp, p_atm, pbce, eta)
72 if (gv%Boussinesq)
then 73 call pressureforce_mont_bouss(h, tv, pfu, pfv, g, gv, us, cs%PressureForce_Mont_CSp, &
76 call pressureforce_mont_nonbouss(h, tv, pfu, pfv, g, gv, us, cs%PressureForce_Mont_CSp, &
81 end subroutine pressureforce
84 subroutine pressureforce_init(Time, G, GV, US, param_file, diag, CS, tides_CSp)
85 type(time_type),
target,
intent(in) :: time
90 type(
diag_ctrl),
target,
intent(inout) :: diag
93 #include "version_variable.h" 94 character(len=40) :: mdl =
"MOM_PressureForce" 96 if (
associated(cs))
then 97 call mom_error(warning,
"PressureForce_init called with an associated "// &
100 else ;
allocate(cs) ;
endif 104 call get_param(param_file, mdl,
"ANALYTIC_FV_PGF", cs%Analytic_FV_PGF, &
105 "If true the pressure gradient forces are calculated "//&
106 "with a finite volume form that analytically integrates "//&
107 "the equations of state in pressure to avoid any "//&
108 "possibility of numerical thermobaric instability, as "//&
109 "described in Adcroft et al., O. Mod. (2008).", default=.true.)
111 if (cs%Analytic_FV_PGF)
then 112 call pressureforce_fv_init(time, g, gv, us, param_file, diag, &
113 cs%PressureForce_FV_CSp, tides_csp)
115 call pressureforce_mont_init(time, g, gv, us, param_file, diag, &
116 cs%PressureForce_Mont_CSp, tides_csp)
119 end subroutine pressureforce_init
122 subroutine pressureforce_end(CS)
125 if (cs%Analytic_FV_PGF)
then 126 call pressureforce_fv_end(cs%PressureForce_FV_CSp)
128 call pressureforce_mont_end(cs%PressureForce_Mont_CSp)
131 if (
associated(cs))
deallocate(cs)
132 end subroutine pressureforce_end
This module contains the main regridding routines.
Finite volume pressure gradient (integrated by quadrature or analytically)
Ocean grid type. See mom_grid for details.
A structure that can be parsed to read and document run-time parameters.
Provides the ocean grid type.
A thin wrapper for Boussinesq/non-Boussinesq forms of the pressure force calculation.
Finite volume pressure gradient control structure.
The MOM6 facility to parse input files for runtime parameters.
Describes various unit conversion factors.
Provides the Montgomery potential form of pressure gradient.
Tidal contributions to geopotential.
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.
Pointers to an assortment of thermodynamic fields that may be available, including potential temperat...
The control structure for the MOM_tidal_forcing module.
Provides a transparent vertical ocean grid type and supporting routines.
Provides transparent structures with groups of MOM6 variables and supporting routines.
Pressure force control structure.
Control structure for the Montgomery potential form of pressure gradient.
An overloaded interface to read and log the values of various types of parameters.