MOM6
mom_pressureforce Module Reference

Detailed Description

A thin wrapper for Boussinesq/non-Boussinesq forms of the pressure force calculation.

This thin module provides a branch to two forms of the horizontal accelerations due to pressure gradients. The two options currently available are a Montgomery potential form (used in traditional isopycnal layer models), and the analytic finite volume form.

Data Types

type  pressureforce_cs
 Pressure force control structure. More...
 

Functions/Subroutines

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. More...
 
subroutine, public pressureforce_init (Time, G, GV, US, param_file, diag, CS, tides_CSp)
 Initialize the pressure force control structure. More...
 
subroutine, public pressureforce_end (CS)
 Deallocate the pressure force control structure. More...
 

Function/Subroutine Documentation

◆ pressureforce()

subroutine, public mom_pressureforce::pressureforce ( real, dimension( g %isd: g %ied, g %jsd: g %jed, g %ke), intent(in)  h,
type(thermo_var_ptrs), intent(in)  tv,
real, dimension( g %isdb: g %iedb, g %jsd: g %jed, g %ke), intent(out)  PFu,
real, dimension( g %isd: g %ied, g %jsdb: g %jedb, g %ke), intent(out)  PFv,
type(ocean_grid_type), intent(in)  G,
type(verticalgrid_type), intent(in)  GV,
type(unit_scale_type), intent(in)  US,
type(pressureforce_cs), pointer  CS,
type(ale_cs), pointer  ALE_CSp,
real, dimension(:,:), optional, pointer  p_atm,
real, dimension( g %isd: g %ied, g %jsd: g %jed, g %ke), intent(out), optional  pbce,
real, dimension( g %isd: g %ied, g %jsd: g %jed), intent(out), optional  eta 
)

A thin layer between the model and the Boussinesq and non-Boussinesq pressure force routines.

Parameters
[in]gThe ocean's grid structure
[in]gvThe ocean's vertical grid structure
[in]usA dimensional unit scaling type
[in]hLayer thicknesses [H ~> m or kg m-2]
[in]tvA structure pointing to various thermodynamic variables
[out]pfuZonal pressure force acceleration [L T-2 ~> m s-2]
[out]pfvMeridional pressure force acceleration [L T-2 ~> m s-2]
csPressure force control structure
ale_cspALE control structure
p_atmThe pressure at the ice-ocean or
[out]pbceThe baroclinic pressure anomaly in each layer
[out]etaThe bottom mass used to calculate PFu and PFv,

Definition at line 40 of file MOM_PressureForce.F90.

41  type(ocean_grid_type), intent(in) :: G !< The ocean's grid structure
42  type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure
43  type(unit_scale_type), intent(in) :: US !< A dimensional unit scaling type
44  real, dimension(SZI_(G),SZJ_(G),SZK_(G)), &
45  intent(in) :: h !< Layer thicknesses [H ~> m or kg m-2]
46  type(thermo_var_ptrs), intent(in) :: tv !< A structure pointing to various thermodynamic variables
47  real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), &
48  intent(out) :: PFu !< Zonal pressure force acceleration [L T-2 ~> m s-2]
49  real, dimension(SZI_(G),SZJB_(G),SZK_(G)), &
50  intent(out) :: PFv !< Meridional pressure force acceleration [L T-2 ~> m s-2]
51  type(PressureForce_CS), pointer :: CS !< Pressure force control structure
52  type(ALE_CS), pointer :: ALE_CSp !< ALE control structure
53  real, dimension(:,:), &
54  optional, pointer :: p_atm !< The pressure at the ice-ocean or
55  !! atmosphere-ocean interface [R L2 T-2 ~> Pa].
56  real, dimension(SZI_(G),SZJ_(G),SZK_(G)), &
57  optional, intent(out) :: pbce !< The baroclinic pressure anomaly in each layer
58  !! due to eta anomalies [L2 T-2 H-1 ~> m s-2 or m4 s-2 kg-1].
59  real, dimension(SZI_(G),SZJ_(G)), &
60  optional, intent(out) :: eta !< The bottom mass used to calculate PFu and PFv,
61  !! [H ~> m or kg m-2], with any tidal contributions.
62 
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)
67  else
68  call pressureforce_fv_nonbouss(h, tv, pfu, pfv, g, gv, us, cs%PressureForce_FV_CSp, &
69  ale_csp, p_atm, pbce, eta)
70  endif
71  else
72  if (gv%Boussinesq) then
73  call pressureforce_mont_bouss(h, tv, pfu, pfv, g, gv, us, cs%PressureForce_Mont_CSp, &
74  p_atm, pbce, eta)
75  else
76  call pressureforce_mont_nonbouss(h, tv, pfu, pfv, g, gv, us, cs%PressureForce_Mont_CSp, &
77  p_atm, pbce, eta)
78  endif
79  endif
80 

◆ pressureforce_end()

subroutine, public mom_pressureforce::pressureforce_end ( type(pressureforce_cs), pointer  CS)

Deallocate the pressure force control structure.

Parameters
csPressure force control structure

Definition at line 122 of file MOM_PressureForce.F90.

123  type(PressureForce_CS), pointer :: CS !< Pressure force control structure
124 
125  if (cs%Analytic_FV_PGF) then
126  call pressureforce_fv_end(cs%PressureForce_FV_CSp)
127  else
128  call pressureforce_mont_end(cs%PressureForce_Mont_CSp)
129  endif
130 
131  if (associated(cs)) deallocate(cs)

◆ pressureforce_init()

subroutine, public mom_pressureforce::pressureforce_init ( type(time_type), intent(in), target  Time,
type(ocean_grid_type), intent(in)  G,
type(verticalgrid_type), intent(in)  GV,
type(unit_scale_type), intent(in)  US,
type(param_file_type), intent(in)  param_file,
type(diag_ctrl), intent(inout), target  diag,
type(pressureforce_cs), pointer  CS,
type(tidal_forcing_cs), optional, pointer  tides_CSp 
)

Initialize the pressure force control structure.

Parameters
[in]timeCurrent model time
[in]gOcean grid structure
[in]gvVertical grid structure
[in]usA dimensional unit scaling type
[in]param_fileParameter file handles
[in,out]diagDiagnostics control structure
csPressure force control structure
tides_cspTide control structure

Definition at line 84 of file MOM_PressureForce.F90.

85  type(time_type), target, intent(in) :: Time !< Current model time
86  type(ocean_grid_type), intent(in) :: G !< Ocean grid structure
87  type(verticalGrid_type), intent(in) :: GV !< Vertical grid structure
88  type(unit_scale_type), intent(in) :: US !< A dimensional unit scaling type
89  type(param_file_type), intent(in) :: param_file !< Parameter file handles
90  type(diag_ctrl), target, intent(inout) :: diag !< Diagnostics control structure
91  type(PressureForce_CS), pointer :: CS !< Pressure force control structure
92  type(tidal_forcing_CS), optional, pointer :: tides_CSp !< Tide control structure
93 #include "version_variable.h"
94  character(len=40) :: mdl = "MOM_PressureForce" ! This module's name.
95 
96  if (associated(cs)) then
97  call mom_error(warning, "PressureForce_init called with an associated "// &
98  "control structure.")
99  return
100  else ; allocate(cs) ; endif
101 
102  ! Read all relevant parameters and write them to the model log.
103  call log_version(param_file, mdl, version, "")
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.)
110 
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)
114  else
115  call pressureforce_mont_init(time, g, gv, us, param_file, diag, &
116  cs%PressureForce_Mont_CSp, tides_csp)
117  endif
118