Back to home page

darwin3

 
 

    


Warning, /doc/phys_pkgs/kpp.rst is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit 00c7090d on 2025-07-07 16:10:22 UTC
8679f9097b Jeff*0001 .. _sub_phys_pkg_kpp:
                0002 
                0003 KPP: Nonlocal K-Profile Parameterization for Vertical Mixing
                0004 ------------------------------------------------------------
                0005 
                0006 
                0007 Authors: Dimitris Menemenlis and Patrick Heimbach
                0008 
                0009 
                0010 .. _ssub_phys_pkg_kpp_intro:
                0011 
                0012 Introduction
                0013 ++++++++++++
                0014 
d5e41ea118 Jeff*0015 The nonlocal K-Profile Parameterization (KPP) scheme of Large et al. (1994)
                0016 :cite:`lar-eta:94` unifies the
8679f9097b Jeff*0017 treatment of a variety of unresolved processes involved in vertical
                0018 mixing. To consider it as one mixing scheme is, in the view of the
                0019 authors, somewhat misleading since it consists of several entities to
                

** Warning **

Wide character in print at /usr/local/share/lxr/source line 1030, <$git> line 21.

0020 deal with distinct mixing processes in the ocean’s surface boundary 0021 layer, and the interior: 0022 0023 #. mixing in the interior is goverened by shear instability (modeled as 0024 function of the local gradient Richardson number), internal wave 0025 activity (assumed constant), and double-diffusion (not implemented 0026 here). 0027 0028 #. a boundary layer depth :math:`h` or ``hbl`` is determined at each 0029 grid point, based on a critical value of turbulent processes 0030 parameterized by a bulk Richardson number; 0031 0032 #. mixing is strongly enhanced in the boundary layer under the 0033 stabilizing or destabilizing influence of surface forcing (buoyancy 0034 and momentum) enabling boundary layer properties to penetrate well 0035 into the thermocline; mixing is represented through a polynomial 0036 profile whose coefficients are determined subject to several 0037 contraints; 0038 0039 #. the boundary-layer profile is made to agree with similarity theory of 0040 turbulence and is matched, in the asymptotic sense (function and 0041 derivative agree at the boundary), to the interior thus fixing the 0042 polynomial coefficients; matching allows for some fraction of the 0043 boundary layer mixing to affect the interior, and vice versa; 0044

** Warning **

Wide character in print at /usr/local/share/lxr/source line 1030, <$git> line 46.

0045 #. a “non-local” term :math:`\hat{\gamma}` or ``ghat`` which is 0046 independent of the vertical property gradient further enhances mixing 0047 where the water column is unstable 0048 d5e41ea118 Jeff*0049 The scheme has been extensively compared to observations 0050 (see e.g. Large et al. 1997 :cite:`lar-eta:97`) and 8679f9097b Jeff*0051 is now common in many ocean models. 0052 0053 The current code originates in the NCAR NCOM 1-D code and was kindly 0054 provided by Bill Large and Jan Morzel. It has been adapted first to the 0055 MITgcm vector code and subsequently to the current parallel code. 0056 Adjustment were mainly in conjunction with WRAPPER requirements (domain 0057 decomposition and threading capability), to enable automatic 0058 differentiation of tangent linear and adjoint code via TAMC. 0059 0060 The following sections will describe the KPP package configuration and d5e41ea118 Jeff*0061 compiling (:numref:`ssub_phys_pkg_kpp_comp`), the settings and choices of runtime 0062 parameters (:numref:`ssub_phys_pkg_kpp_runtime`), more detailed description of 0063 equations to which these parameters relate (:numref:`ssub_phys_pkg_kpp_eqns_key_routines`), 0064 and key subroutines where they are used (:numref:`ssub_phys_pkg_kpp_flowchart`), and 8679f9097b Jeff*0065 diagnostics output of KPP-derived diffusivities, viscosities and d5e41ea118 Jeff*0066 boundary-layer/mixed-layer depths (:numref:`ssub_phys_pkg_kpp_diagnostics`). 8679f9097b Jeff*0067 0068 .. _ssub_phys_pkg_kpp_comp: 0069 0070 KPP configuration and compiling 0071 +++++++++++++++++++++++++++++++ 0072 0073 As with all MITgcm packages, KPP can be turned on or off at compile time 0074 0075 - using the ``packages.conf`` file by adding ``kpp`` to it, 0076 0077 - or using ``genmake2`` adding ``-enable=kpp`` or ``-disable=kpp`` 0078 switches 0079 0080 - *Required packages and CPP options:* 0081 No additional packages are required, but the MITgcm kernel flag 0082 enabling the penetration of shortwave radiation below the surface 0083 layer needs to be set in ``CPP_OPTIONS.h`` as follows: 0084 ``#define SHORTWAVE_HEATING`` 0085 d5e41ea118 Jeff*0086 (see :numref:`using_packages`) 8679f9097b Jeff*0087 0088 Parts of the KPP code can be enabled or disabled at compile time via CPP 0089 preprocessor flags. These options are set in ``KPP_OPTIONS.h``. Table 0090 :numref:`tab_phys_pkg_kpp_cpp_options` summarizes them. 0091 0092 0093 0094 .. table:: CPP flags for KPP 0095 :name: tab_phys_pkg_kpp_cpp_options 0096 0097 +------------------------------------------+-------------------+ 0098 | **CPP option** | **Description** | 0099 +==========================================+===================+ 0100 | ``_KPP_RL`` | | 0101 +------------------------------------------+-------------------+ 0102 | ``FRUGAL_KPP`` | | 0103 +------------------------------------------+-------------------+ 0104 | ``KPP_SMOOTH_SHSQ`` | | 0105 +------------------------------------------+-------------------+ 0106 | ``KPP_SMOOTH_DVSQ`` | | 0107 +------------------------------------------+-------------------+ 0108 | ``KPP_SMOOTH_DENS`` | | 0109 +------------------------------------------+-------------------+ 0110 | ``KPP_SMOOTH_VISC`` | | 0111 +------------------------------------------+-------------------+ 0112 | ``KPP_SMOOTH_DIFF`` | | 0113 +------------------------------------------+-------------------+ 0114 | ``KPP_ESTIMATE_UREF`` | | 0115 +------------------------------------------+-------------------+ 0116 | ``INCLUDE_DIAGNOSTICS_INTERFACE_CODE`` | | 0117 +------------------------------------------+-------------------+ 0118 | ``KPP_GHAT`` | | 0119 +------------------------------------------+-------------------+ 0120 | ``EXCLUDE_KPP_SHEAR_MIX`` | | 0121 +------------------------------------------+-------------------+ 0122 0123 0124 .. _ssub_phys_pkg_kpp_runtime: 0125 0126 Run-time parameters 0127 +++++++++++++++++++ 0128 0129 Run-time parameters are set in files ``data.pkg`` and ``data.kpp`` which 0130 are read in ``kpp_readparms.F``. Run-time parameters may be broken into 0131 3 categories: (i) switching on/off the package at runtime, (ii) required 0132 MITgcm flags, (iii) package flags and parameters. 0133 0134 Enabling the package 0135 #################### 0136 0137 The KPP package is switched on at runtime by setting ``useKPP = .TRUE.`` in ``data.pkg``. 0138 0139 0140 Required MITgcm flags 0141 ##################### 0142 0143 The following flags/parameters of the MITgcm dynamical kernel need to 0144 be set in conjunction with KPP: 0145 0146 +----------------------------------+--------------------------------------+ 0147 | ``implicitViscosity = .TRUE.`` | enable implicit vertical viscosity | 0148 +----------------------------------+--------------------------------------+ 0149 | ``implicitDiffusion = .TRUE.`` | enable implicit vertical diffusion | 0150 +----------------------------------+--------------------------------------+ 0151 0152 Package flags and parameters 0153 ############################ 0154 0155 :numref:`tab_phys_pkg_kpp_runtime_flags` summarizes the runtime flags 0156 that are set in ``data.pkg``, and their default values. 0157 0158 0159 .. table:: Runtime flags for KPP 0160 :name: tab_phys_pkg_kpp_runtime_flags 0161 0162 +------------------------+--------------------------------+--------------------------------------------------+ 0163 | **Flag/parameter** | **default** | **Description** | 0164 +========================+================================+==================================================+ 0165 | *I/O related parameters* | 0166 +------------------------+--------------------------------+--------------------------------------------------+ 0167 | kpp\_freq | ``deltaTClock`` | Recomputation frequency for KPP fields | 0168 +------------------------+--------------------------------+--------------------------------------------------+ 0169 | kpp\_dumpFreq | ``dumpFreq`` | Dump frequency of KPP field snapshots | 0170 +------------------------+--------------------------------+--------------------------------------------------+ 0171 | kpp\_taveFreq | ``taveFreq`` | Averaging and dump frequency of KPP fields | 0172 +------------------------+--------------------------------+--------------------------------------------------+ 0173 | KPPmixingMaps | ``.FALSE.`` | include KPP diagnostic maps in STDOUT | 0174 +------------------------+--------------------------------+--------------------------------------------------+ 0175 | KPPwriteState | ``.FALSE.`` | write KPP state to file | 0176 +------------------------+--------------------------------+--------------------------------------------------+ 0177 | KPP_ghatUseTotalDiffus | ``.FALSE.`` | if ``.T.`` compute non-local term using | 0178 +------------------------+--------------------------------+--------------------------------------------------+ 0179 | | | total vertical diffusivity | 0180 +------------------------+--------------------------------+--------------------------------------------------+ 0181 | | | if ``.F.`` use KPP vertical diffusivity | 0182 +------------------------+--------------------------------+--------------------------------------------------+ 0183 | *General KPP parameters* | 0184 +------------------------+--------------------------------+--------------------------------------------------+ 0185 | minKPPhbl | ``delRc(1)`` | Minimum boundary layer depth | 0186 +------------------------+--------------------------------+--------------------------------------------------+ 0187 | epsilon | 0.1 | nondimensional extent of the surface layer | 0188 +------------------------+--------------------------------+--------------------------------------------------+ 0189 | vonk | 0.4 | von Karman constant | 0190 +------------------------+--------------------------------+--------------------------------------------------+ 0191 | dB_dz | 5.2E-5 s\ :sup:`--2` | maximum dB/dz in mixed layer hMix | 0192 +------------------------+--------------------------------+--------------------------------------------------+ 0193 | concs | 98.96 | | 0194 +------------------------+--------------------------------+--------------------------------------------------+ 0195 | concv | 1.8 | | 0196 +------------------------+--------------------------------+--------------------------------------------------+ 0197 | *Boundary layer parameters (S/R bldepth)* | 0198 +------------------------+--------------------------------+--------------------------------------------------+ 0199 | Ricr | 0.3 | critical bulk Richardson number | 0200 +------------------------+--------------------------------+--------------------------------------------------+ 0201 | cekman | 0.7 | coefficient for Ekman depth | 0202 +------------------------+--------------------------------+--------------------------------------------------+ 0203 | cmonob | 1.0 | coefficient for Monin-Obukhov depth | 0204 +------------------------+--------------------------------+--------------------------------------------------+ 0205 | concv | 1.8 | ratio of interior to entrainment depth | 0206 | | | buoyancy frequency | 0207 +------------------------+--------------------------------+--------------------------------------------------+ 0208 | hbf | 1.0 | fraction of depth to which absorbed solar | 0209 | | | radiation contributes | 0210 | | | to surface buoyancy forcing | 0211 +------------------------+--------------------------------+--------------------------------------------------+ 0212 | Vtc | | non-dim. coeff. for velocity scale of | 0213 | | | turbulant velocity shear ( = function | 0214 | | | of concv,concs,epsilon,vonk,Ricr) | 0215 +------------------------+--------------------------------+--------------------------------------------------+ 0216 | *Boundary layer mixing parameters (S/R blmix)* | 0217 +------------------------+--------------------------------+--------------------------------------------------+ 0218 | cstar | 10. | proportionality coefficient for nonlocal | 0219 | | | transport | 0220 +------------------------+--------------------------------+--------------------------------------------------+ 0221 | cg | | non-dimensional coefficient for counter-gradient | 0222 | | | term | 0223 | | | ( = function of cstar,vonk,concs,epsilon) | 0224 +------------------------+--------------------------------+--------------------------------------------------+ 0225 | *Interior mixing parameters (S/R Ri_iwmix)* | 0226 +------------------------+--------------------------------+--------------------------------------------------+ 0227 | Riinfty | 0.7 | gradient Richardson number limit for shear | 0228 | | | instability | 0229 +------------------------+--------------------------------+--------------------------------------------------+ 0230 | BVDQcon | -0.2E-4 s\ :sup:`--2` | Brunt-Visal squared | 0231 +------------------------+--------------------------------+--------------------------------------------------+ 0232 | difm0 |0.005 m\ :sup:`2` s\ :sup:`--1` | viscosity max. due to shear instability | 0233 +------------------------+--------------------------------+--------------------------------------------------+ 0234 | difs0 | 0.005 m\ :math:`^2`/s | tracer diffusivity max. due to shear instability | 0235 +------------------------+--------------------------------+--------------------------------------------------+ 0236 | dift0 | 0.005 m\ :math:`^2`/s | heat diffusivity max. due to shear instability | 0237 +------------------------+--------------------------------+--------------------------------------------------+ 0238 | difmcon | 0.1 | viscosity due to convective instability | 0239 +------------------------+--------------------------------+--------------------------------------------------+ 0240 | difscon | 0.1 | tracer diffusivity due to convective instability | 0241 +------------------------+--------------------------------+--------------------------------------------------+ 0242 | diftcon | 0.1 | heat diffusivity due to convective instability | 0243 +------------------------+--------------------------------+--------------------------------------------------+ 0244 | Rrho0 | not used | limit for double diffusive density ratio | 0245 +------------------------+--------------------------------+--------------------------------------------------+ 0246 | dsfmax | not used | maximum diffusivity in case of salt fingering | 0247 +------------------------+--------------------------------+--------------------------------------------------+ 0248 0249 0250 .. _ssub_phys_pkg_kpp_eqns_key_routines: 0251 0252 Equations and key routines 0253 ++++++++++++++++++++++++++++++++++++++++++++++++++ 0254 0255 We restrict ourselves to writing out only the essential equations that 0256 relate to main processes and parameters mentioned above. We closely d5e41ea118 Jeff*0257 follow the notation of Large et al. (1994) :cite:`lar-eta:94`. 8679f9097b Jeff*0258 0259 KPP_CALC: 0260 ######### 0261 0262 Top-level routine. 0263 0264 0265 KPP_MIX: 0266 ######## 0267 0268 Intermediate-level routine 0269 0270 0271 BLMIX: Mixing in the boundary layer 0272 ################################### 0273 0274 The vertical fluxes :math:`\overline{wx}` of momentum and tracer 0275 properties :math:`X` is composed of a gradient-flux term (proportional 0276 to the vertical property divergence :math:`\partial_z X`), and a

** Warning **

Wide character in print at /usr/local/share/lxr/source line 1030, <$git> line 278.

0277 “nonlocal” term :math:`\gamma_x` that enhances the gradient-flux mixing 0278 coefficient :math:`K_x` 0279 0280 .. math:: 0281 0282 \overline{wx}(d) \, = \, -K_x \left( 0283 \frac{\partial X}{\partial z} \, - \, \gamma_x \right) 0284 0285 - *Boundary layer mixing profile* 0286 It is expressed as the product of the boundary layer depth 0287 :math:`h`, a depth-dependent turbulent velocity scale 0288 :math:`w_x(\sigma)` and a non-dimensional shape function 0289 :math:`G(\sigma)` 0290 0291 .. math:: K_x(\sigma) \, = \, h \, w_x(\sigma) \, G(\sigma) 0292 0293 with dimensionless vertical coordinate :math:`\sigma = d/h`. For d5e41ea118 Jeff*0294 details of :math:`w_x(\sigma)` and :math:`G(\sigma)` we refer 0295 to Large et al. (1994) :cite:`lar-eta:94`. 8679f9097b Jeff*0296 0297 - *Nonlocal mixing term* 0298 The nonlocal transport term :math:`\gamma` is nonzero only for 0299 tracers in unstable (convective) forcing conditions. Thus, depending 0300 on the stability parameter :math:`\zeta = d/L` (with depth :math:`d`, 0301 Monin-Obukhov length scale :math:`L`) it has the following form: 0302 0303 .. math:: 0304 0305 \begin{aligned} 0306 \begin{array}{cl} 0307 \gamma_x \, = \, 0 & \zeta \, \ge \, 0 \\ 0308 ~ & ~ \\ 0309 \left. 0310 \begin{array}{c} 0311 \gamma_m \, = \, 0 \\ 0312 ~ \\ 0313 \gamma_s \, = \, C_s 0bad585a21 Navi*0314 \dfrac{\overline{w s_0}}{w_s(\sigma) h} \\ 8679f9097b Jeff*0315 ~ \\ 0316 \gamma_{\theta} \, = \, C_s 0bad585a21 Navi*0317 \dfrac{\overline{w \theta_0}+\overline{w \theta_R}}{w_s(\sigma) h} \\ 8679f9097b Jeff*0318 \end{array} 0319 \right\} 0320 & 0321 \zeta \, < \, 0 \\ 0322 \end{array}\end{aligned} 0323 0bad585a21 Navi*0324 In practice, the routine performs the following tasks: 8679f9097b Jeff*0325 0326 #. compute velocity scales at hbl 0327 0328 #. find the interior viscosities and derivatives at hbl 0329 0330 #. compute turbulent velocity scales on the interfaces 0331 0332 #. compute the dimensionless shape functions at the interfaces 0333 0334 #. compute boundary layer diffusivities at the interfaces 0335 0336 #. compute nonlocal transport term 0337 0338 #. find diffusivities at kbl-1 grid level 0339 0340 RI\_IWMIX: Mixing in the interior 0341 ################################# 0342 0343 Compute interior viscosity and diffusivity coefficients due to 0344 0345 - shear instability (dependent on a local gradient Richardson number), 0346 0347 - to background internal wave activity, and 0348 0349 - to static instability (local Richardson number :math:`<` 0). 0350 0351 TO BE CONTINUED. 0352 0353 BLDEPTH: Boundary layer depth calculation: 0354 ########################################## 0355 0356 The oceanic planetary boundary layer depth, ``hbl``, is determined as 0357 the shallowest depth where the bulk Richardson number is equal to the 0358 critical value, ``Ricr``. 0359 0360 Bulk Richardson numbers are evaluated by computing velocity and buoyancy 0361 differences between values at zgrid(kl) < 0 and surface reference 0362 values. In this configuration, the reference values are equal to the 0363 values in the surface layer. When using a very fine vertical grid, these 0364 values should be computed as the vertical average of velocity and 0365 buoyancy from the surface down to epsilon\*zgrid(kl). 0366 0367 When the bulk Richardson number at k exceeds Ricr, hbl is linearly 0368 interpolated between grid levels zgrid(k) and zgrid(k-1). 0369 0370 The water column and the surface forcing are diagnosed for 0371 stable/ustable forcing conditions, and where hbl is relative to grid 0372 points (caseA), so that conditional branches can be avoided in later 0373 subroutines. 0374 0375 TO BE CONTINUED. 0376 0377 KPP\_CALC\_DIFF\_T/\_S, KPP\_CALC\_VISC: 0378 ######################################## 0379 0380 Add contribution to net diffusivity/viscosity from KPP 0381 diffusivity/viscosity. 0382 0383 TO BE CONTINUED. 0384 0385 KPP\_TRANSPORT\_T/\_S/\_PTR: 0386 ############################ 0387 0388 Add non local KPP transport term (ghat) to diffusive 0389 temperature/salinity/passive tracer flux. The nonlocal transport term is 0390 nonzero only for scalars in unstable (convective) forcing conditions. 0391 0392 TO BE CONTINUED. 0393 0394 Implicit time integration 0395 ######################### 0396 0397 TO BE CONTINUED. 0398 0399 Penetration of shortwave radiation 0400 ################################## 0401 0402 TO BE CONTINUED. 0403 0404 .. _ssub_phys_pkg_kpp_flowchart: 0405 0406 Flow chart 0407 ++++++++++ 0408 0409 :: 0410 0411 0412 C !CALLING SEQUENCE: 0413 c ... 0414 c kpp_calc (TOP LEVEL ROUTINE) 0415 c | 0416 c |-- statekpp: o compute all EOS/density-related arrays 0417 c | o uses S/R FIND_ALPHA, FIND_BETA, FIND_RHO 0418 c | 0419 c |-- kppmix 0420 c | |--- ri_iwmix (compute interior mixing coefficients due to constant 0421 c | | internal wave activity, static instability, 0422 c | | and local shear instability). 0423 c | | 0424 c | |--- bldepth (diagnose boundary layer depth) 0425 c | | 0426 c | |--- blmix (compute boundary layer diffusivities) 0427 c | | 0428 c | |--- enhance (enhance diffusivity at interface kbl - 1) 0429 c | o 0430 c | 0431 c |-- swfrac 0432 c o 0433 0434 .. _ssub_phys_pkg_kpp_diagnostics: 0435 0436 KPP diagnostics 0437 +++++++++++++++ 0438 0439 Diagnostics output is available via the diagnostics package (see Section 0440 [sec:pkg:diagnostics]). Available output fields are summarized here: 0441 0442 :: 0443 0444 ------------------------------------------------------ 0445 <-Name->|Levs|grid|<-- Units -->|<- Tile (max=80c) 0446 ------------------------------------------------------ 0447 KPPviscA| 23 |SM |m^2/s |KPP vertical eddy viscosity coefficient 0448 KPPdiffS| 23 |SM |m^2/s |Vertical diffusion coefficient for salt & tracers 0449 KPPdiffT| 23 |SM |m^2/s |Vertical diffusion coefficient for heat 0450 KPPghat | 23 |SM |s/m^2 |Nonlocal transport coefficient 0451 KPPhbl | 1 |SM |m |KPP boundary layer depth, bulk Ri criterion 0452 KPPmld | 1 |SM |m |Mixed layer depth, dT=.8degC density criterion 00c7090dc0 Mart*0453 KPPfrac | 1 |SM | |Short-wave flux fraction heating the mixing layer 8679f9097b Jeff*0454 0455 0456 Reference experiments 0457 +++++++++++++++++++++ 0458 0459 lab\_sea: 0460 0461 natl\_box: 0462 0463 References 0464 ++++++++++ 0465 0466 Experiments and tutorials that use kpp 0467 ++++++++++++++++++++++++++++++++++++++ 0468 0469 - Labrador Sea experiment, in lab\_sea verification directory 0470 0471