Go to the documentation of this file.
24 implicit none ;
private
26 #include <MOM_memory.h>
32 logical :: analytic_fv_pgf
34 logical :: blocked_afv
47 subroutine pressureforce(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_atm, pbce, eta)
51 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)), &
54 real,
dimension(SZIB_(G),SZJ_(G),SZK_(G)), &
56 real,
dimension(SZI_(G),SZJB_(G),SZK_(G)), &
59 type(
ale_cs),
pointer :: ale_csp
60 real,
dimension(:,:), &
61 optional,
pointer :: p_atm
63 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)), &
64 optional,
intent(out) :: pbce
66 real,
dimension(SZI_(G),SZJ_(G)), &
67 optional,
intent(out) :: eta
70 if (cs%Analytic_FV_PGF .and. cs%blocked_AFV)
then
71 if (gv%Boussinesq)
then
72 call pressureforce_blk_afv_bouss(h, tv, pfu, pfv, g, gv, us, &
73 cs%PressureForce_blk_AFV_CSp, ale_csp, p_atm, pbce, eta)
75 call pressureforce_blk_afv_nonbouss(h, tv, pfu, pfv, g, gv, us, &
76 cs%PressureForce_blk_AFV_CSp, p_atm, pbce, eta)
78 elseif (cs%Analytic_FV_PGF)
then
79 if (gv%Boussinesq)
then
80 call pressureforce_afv_bouss(h, tv, pfu, pfv, g, gv, us, cs%PressureForce_AFV_CSp, &
81 ale_csp, p_atm, pbce, eta)
83 call pressureforce_afv_nonbouss(h, tv, pfu, pfv, g, gv, us, cs%PressureForce_AFV_CSp, &
84 ale_csp, p_atm, pbce, eta)
87 if (gv%Boussinesq)
then
88 call pressureforce_mont_bouss(h, tv, pfu, pfv, g, gv, us, cs%PressureForce_Mont_CSp, &
91 call pressureforce_mont_nonbouss(h, tv, pfu, pfv, g, gv, us, cs%PressureForce_Mont_CSp, &
100 type(time_type),
target,
intent(in) :: time
105 type(
diag_ctrl),
target,
intent(inout) :: diag
108 #include "version_variable.h"
109 character(len=40) :: mdl =
"MOM_PressureForce"
111 if (
associated(cs))
then
112 call mom_error(warning,
"PressureForce_init called with an associated "// &
113 "control structure.")
115 else ;
allocate(cs) ;
endif
119 call get_param(param_file, mdl,
"ANALYTIC_FV_PGF", cs%Analytic_FV_PGF, &
120 "If true the pressure gradient forces are calculated "//&
121 "with a finite volume form that analytically integrates "//&
122 "the equations of state in pressure to avoid any "//&
123 "possibility of numerical thermobaric instability, as "//&
124 "described in Adcroft et al., O. Mod. (2008).", default=.true.)
125 call get_param(param_file, mdl,
"BLOCKED_ANALYTIC_FV_PGF", cs%blocked_AFV, &
126 "If true, used the blocked version of the ANALYTIC_FV_PGF "//&
127 "code. The value of this parameter should not change answers.", &
128 default=.false., do_not_log=.true., debuggingparam=.true.)
130 if (cs%Analytic_FV_PGF .and. cs%blocked_AFV)
then
131 call pressureforce_blk_afv_init(time, g, gv, us, param_file, diag, &
132 cs%PressureForce_blk_AFV_CSp, tides_csp)
133 elseif (cs%Analytic_FV_PGF)
then
134 call pressureforce_afv_init(time, g, gv, us, param_file, diag, &
135 cs%PressureForce_AFV_CSp, tides_csp)
137 call pressureforce_mont_init(time, g, gv, us, param_file, diag, &
138 cs%PressureForce_Mont_CSp, tides_csp)
147 if (cs%Analytic_FV_PGF .and. cs%blocked_AFV)
then
148 call pressureforce_blk_afv_end(cs%PressureForce_blk_AFV_CSp)
149 elseif (cs%Analytic_FV_PGF)
then
150 call pressureforce_afv_end(cs%PressureForce_AFV_CSp)
152 call pressureforce_mont_end(cs%PressureForce_Mont_CSp)
155 if (
associated(cs))
deallocate(cs)
Analytically integrated finite volume pressure gradient.
subroutine, public pressureforce_blk_afv_end(CS)
Deallocates the finite volume pressure gradient control structure.
subroutine, public pressureforce_afv_nonbouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_atm, pbce, eta)
Non-Boussinesq analytically-integrated finite volume form of pressure gradient.
Provides a transparent vertical ocean grid type and supporting routines.
Finite volume pressure gradient control structure.
An overloaded interface to log version information about modules.
subroutine, public pressureforce_init(Time, G, GV, US, param_file, diag, CS, tides_CSp)
Initialize the pressure force control structure.
subroutine, public pressureforce_end(CS)
Deallocate the pressure force control structure.
Pointers to an assortment of thermodynamic fields that may be available, including potential temperat...
subroutine, public pressureforce_blk_afv_bouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_atm, pbce, eta)
Boussinesq analytically-integrated finite volume form of pressure gradient.
subroutine, public mom_mesg(message, verb, all_print)
This provides a convenient interface for writing an informative comment.
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.
subroutine, public pressureforce_blk_afv_nonbouss(h, tv, PFu, PFv, G, GV, US, CS, p_atm, pbce, eta)
Non-Boussinesq analytically-integrated finite volume form of pressure gradient.
subroutine, public pressureforce_mont_nonbouss(h, tv, PFu, PFv, G, GV, US, CS, p_atm, pbce, eta)
Non-Boussinesq Montgomery-potential form of pressure gradient.
Describes various unit conversion factors.
Tidal contributions to geopotential.
The control structure for the MOM_tidal_forcing module.
Describes the vertical ocean grid, including unit conversion factors.
Finite volume pressure gradient control structure.
This module contains the main regridding routines.
Provides transparent structures with groups of MOM6 variables and supporting routines.
subroutine, public pressureforce_afv_end(CS)
Deallocates the finite volume pressure gradient control structure.
subroutine, public pressureforce_mont_bouss(h, tv, PFu, PFv, G, GV, US, CS, p_atm, pbce, eta)
Boussinesq Montgomery-potential form of pressure gradient.
The MOM6 facility to parse input files for runtime parameters.
Analytically integrated finite volume pressure gradient.
subroutine, public pressureforce_mont_init(Time, G, GV, US, param_file, diag, CS, tides_CSp)
Initialize the Montgomery-potential form of PGF control structure.
Provides the Montgomery potential form of pressure gradient.
Provides the ocean grid type.
Provides a transparent unit rescaling type to facilitate dimensional consistency testing.
logical function, public is_root_pe()
This returns .true. if the current PE is the root PE.
Control structure for the Montgomery potential form of pressure gradient.
subroutine, public pressureforce_mont_end(CS)
Deallocates the Montgomery-potential form of PGF control structure.
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...
subroutine, public pressureforce(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_atm, pbce, eta)
A thin layer between the model and the Boussinesq and non-Boussinesq pressure force routines.
subroutine, public pressureforce_afv_init(Time, G, GV, US, param_file, diag, CS, tides_CSp)
Initializes the finite volume pressure gradient control structure.
Pressure force control structure.
subroutine, public pressureforce_blk_afv_init(Time, G, GV, US, param_file, diag, CS, tides_CSp)
Initializes the finite volume pressure gradient control structure.
A thin wrapper for Boussinesq/non-Boussinesq forms of the pressure force calculation.
subroutine, public pressureforce_afv_bouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_atm, pbce, eta)
Boussinesq analytically-integrated finite volume form of pressure gradient.
Routines for error handling and I/O management.
Ocean grid type. See mom_grid for details.