59 |
(see e.g. \cite{lar-eta:97}) and is now coomon in many |
(see e.g. \cite{lar-eta:97}) and is now coomon in many |
60 |
ocean models. |
ocean models. |
61 |
|
|
62 |
|
The current code originates in the NCAR NCOM 1-D code |
63 |
|
and was kindly provided by Bill Large and Jan Morzel. |
64 |
|
It has been adapted first to the MITgcm vector code and |
65 |
|
subsequently to the current parallel code. |
66 |
|
Adjustment were mainly in conjunction with WRAPPER requirements |
67 |
|
(domain decomposition and threading capability), to enable |
68 |
|
automatic differentiation of tangent linear and adjoint code |
69 |
|
via TAMC. |
70 |
|
|
71 |
The following sections will describe the KPP package |
The following sections will describe the KPP package |
72 |
configuration and compiling (\ref{sec:pkg:kpp:comp}), |
configuration and compiling (\ref{sec:pkg:kpp:comp}), |
73 |
the settings and choices of runtime parameters |
the settings and choices of runtime parameters |
74 |
(\ref{sec:pkg:kpp:runtime}), |
(\ref{sec:pkg:kpp:runtime}), |
75 |
more detailed description of equations to which these |
more detailed description of equations to which these |
76 |
parameters relate (\ref{sec:pkg:kpp:equations}), |
parameters relate (\ref{sec:pkg:kpp:equations}), |
77 |
and key subroutines where they are used (\ref{sec:pkg:kpp:subroutines}), |
and key subroutines where they are used %(\ref{sec:pkg:kpp:subroutines}), |
78 |
|
(\ref{sec:pkg:kpp:flowchart}), |
79 |
and diagnostics output of KPP-derived diffusivities, viscosities |
and diagnostics output of KPP-derived diffusivities, viscosities |
80 |
and boundary-layer/mixed-layer depths. |
and boundary-layer/mixed-layer depths |
81 |
|
(\ref{sec:pkg:kpp:diagnostics}). |
82 |
|
|
83 |
%---------------------------------------------------------------------- |
%---------------------------------------------------------------------- |
84 |
|
|
96 |
or using \texttt{genmake2} adding |
or using \texttt{genmake2} adding |
97 |
\texttt{-enable=kpp} or \texttt{-disable=kpp} switches |
\texttt{-enable=kpp} or \texttt{-disable=kpp} switches |
98 |
% |
% |
99 |
|
\item |
100 |
|
\textit{Required packages and CPP options:} \\ |
101 |
|
No additional packages are required, but the MITgcm kernel flag |
102 |
|
enabling the penetration of shortwave radiation below |
103 |
|
the surface layer needs to be set in \texttt{CPP\_OPTIONS.h} |
104 |
|
as follows: \\ |
105 |
|
\texttt{\#define SHORTWAVE\_HEATING} |
106 |
|
% |
107 |
\end{itemize} |
\end{itemize} |
108 |
(see Section \ref{sect:buildingCode}). |
(see Section \ref{sec:buildingCode}). |
109 |
|
|
110 |
Parts of the KPP code can be enabled or disabled at compile time |
Parts of the KPP code can be enabled or disabled at compile time |
111 |
via CPP preprocessor flags. These options are set in |
via CPP preprocessor flags. These options are set in |
112 |
\texttt{KPP\_OPTIONS.h}. Table \ref{tab:pkg:kpp:cpp} summarizes them. |
\texttt{KPP\_OPTIONS.h}. Table \ref{tab:pkg:kpp:cpp} summarizes them. |
113 |
|
|
114 |
\begin{table}[h!] |
\begin{table}[!ht] |
115 |
\centering |
\centering |
116 |
\label{tab:pkg:kpp:cpp} |
\label{tab:pkg:kpp:cpp} |
117 |
{\footnotesize |
{\footnotesize |
186 |
runtime flags that are set in \texttt{data.pkg}, and |
runtime flags that are set in \texttt{data.pkg}, and |
187 |
their default values. |
their default values. |
188 |
|
|
189 |
\begin{table}[h!] |
\begin{table}[!ht] |
190 |
\centering |
\centering |
191 |
\label{tab:pkg:kpp:runtime_flags} |
\label{tab:pkg:kpp:runtime_flags} |
192 |
{\footnotesize |
{\footnotesize |
290 |
|
|
291 |
%---------------------------------------------------------------------- |
%---------------------------------------------------------------------- |
292 |
|
|
293 |
\subsubsection{Equations |
\subsubsection{Equations and key routines |
294 |
\label{sec:pkg:kpp:equations}} |
\label{sec:pkg:kpp:equations}} |
295 |
|
|
296 |
We restrict ourselves to writing out only the essential equations |
We restrict ourselves to writing out only the essential equations |
297 |
that relate to main processes and parameters mentioned above. |
that relate to main processes and parameters mentioned above. |
298 |
We closely follow the notation of \cite{lar-eta:94}. |
We closely follow the notation of \cite{lar-eta:94}. |
299 |
|
|
300 |
\paragraph{Mixing in the boundary layer} ~ \\ |
\paragraph{KPP\_CALC:} Top-level routine. \\ |
301 |
|
~ |
302 |
|
|
303 |
|
\paragraph{KPP\_MIX:} Intermediate-level routine \\ |
304 |
|
~ |
305 |
|
|
306 |
|
\paragraph{BLMIX: Mixing in the boundary layer} ~ \\ |
307 |
% |
% |
308 |
~ |
~ |
309 |
|
|
368 |
|
|
369 |
\end{itemize} |
\end{itemize} |
370 |
|
|
371 |
|
In practice, the routine peforms the following tasks: |
|
\paragraph{Mixing in the interior} ~ \\ |
|
372 |
% |
% |
373 |
~ |
\begin{enumerate} |
|
|
|
|
\paragraph{Implicit time integration} ~ \\ |
|
374 |
% |
% |
375 |
~ |
\item |
376 |
|
compute velocity scales at hbl |
377 |
%---------------------------------------------------------------------- |
% |
378 |
|
\item |
379 |
\subsubsection{Key subroutines |
find the interior viscosities and derivatives at hbl |
380 |
\label{sec:pkg:kpp:subroutines}} |
% |
381 |
|
\item |
382 |
\paragraph{kpp\_calc:} Top-level routine. \\ |
compute turbulent velocity scales on the interfaces |
383 |
~ |
% |
384 |
|
\item |
385 |
\paragraph{kpp\_mix:} Intermediate-level routine \\ |
compute the dimensionless shape functions at the interfaces |
386 |
~ |
% |
387 |
|
\item |
388 |
|
compute boundary layer diffusivities at the interfaces |
389 |
|
% |
390 |
|
\item |
391 |
|
compute nonlocal transport term |
392 |
|
% |
393 |
|
\item |
394 |
|
find diffusivities at kbl-1 grid level |
395 |
|
% |
396 |
|
\end{enumerate} |
397 |
|
|
398 |
\paragraph{ri\_iwmix:} ~ \\ |
\paragraph{RI\_IWMIX: Mixing in the interior} ~ \\ |
399 |
% |
% |
400 |
Compute interior viscosity and diffusivity coefficients due to |
Compute interior viscosity and diffusivity coefficients due to |
401 |
% |
% |
408 |
to background internal wave activity, and |
to background internal wave activity, and |
409 |
% |
% |
410 |
\item |
\item |
411 |
to static instability (local Richardson number < 0). |
to static instability (local Richardson number $<$ 0). |
412 |
% |
% |
413 |
\end{itemize} |
\end{itemize} |
414 |
|
|
415 |
|
TO BE CONTINUED. |
416 |
|
|
417 |
\paragraph{bldepth:} ~ \\ |
\paragraph{BLDEPTH: Boundary layer depth calculation:} ~ \\ |
418 |
% |
% |
419 |
The oceanic planetary boundary layer depth, \texttt{hbl}, is determined as |
The oceanic planetary boundary layer depth, \texttt{hbl}, is determined as |
420 |
the shallowest depth where the bulk Richardson number is |
the shallowest depth where the bulk Richardson number is |
437 |
to grid points (caseA), so that conditional branches can be |
to grid points (caseA), so that conditional branches can be |
438 |
avoided in later subroutines. |
avoided in later subroutines. |
439 |
|
|
440 |
\paragraph{blmix:} ~ \\ |
TO BE CONTINUED. |
|
% |
|
|
Compute boundary layer mixing coefficients. |
|
|
Mixing coefficients within boundary layer depend on surface |
|
|
forcing and the magnitude and gradient of interior mixing below |
|
|
the boundary layer ("matching"). |
|
|
% |
|
|
\begin{enumerate} |
|
|
% |
|
|
\item |
|
|
compute velocity scales at hbl |
|
|
% |
|
|
\item |
|
|
find the interior viscosities and derivatives at hbl |
|
|
% |
|
|
\item |
|
|
compute turbulent velocity scales on the interfaces |
|
|
% |
|
|
\item |
|
|
compute the dimensionless shape functions at the interfaces |
|
|
% |
|
|
\item |
|
|
compute boundary layer diffusivities at the interfaces |
|
|
% |
|
|
\item |
|
|
compute nonlocal transport term |
|
|
% |
|
|
\item |
|
|
find diffusivities at kbl-1 grid level |
|
|
% |
|
|
\end{enumerate} |
|
441 |
|
|
442 |
\paragraph{kpp\_calc\_diff\_t/\_s, kpp\_calc\_visc:} ~ \\ |
\paragraph{KPP\_CALC\_DIFF\_T/\_S, KPP\_CALC\_VISC:} ~ \\ |
443 |
% |
% |
444 |
Add contribution to net diffusivity/viscosity from |
Add contribution to net diffusivity/viscosity from |
445 |
KPP diffusivity/viscosity. |
KPP diffusivity/viscosity. |
446 |
|
|
447 |
\paragraph{kpp\_transport\_t/\_s/\_ptr:} ~ \\ |
TO BE CONTINUED. |
448 |
|
|
449 |
|
\paragraph{KPP\_TRANSPORT\_T/\_S/\_PTR:} ~ \\ |
450 |
% |
% |
451 |
Add non local KPP transport term (ghat) to diffusive |
Add non local KPP transport term (ghat) to diffusive |
452 |
temperature/salinity/passive tracer flux. |
temperature/salinity/passive tracer flux. |
453 |
The nonlocal transport term is nonzero only for scalars |
The nonlocal transport term is nonzero only for scalars |
454 |
in unstable (convective) forcing conditions. |
in unstable (convective) forcing conditions. |
455 |
|
|
456 |
\paragraph{Flow chart:} ~ \\ |
TO BE CONTINUED. |
457 |
|
|
458 |
|
\paragraph{Implicit time integration} ~ \\ |
459 |
% |
% |
460 |
|
TO BE CONTINUED. |
461 |
|
|
462 |
|
|
463 |
|
\paragraph{Penetration of shortwave radiation} ~ \\ |
464 |
|
% |
465 |
|
TO BE CONTINUED. |
466 |
|
|
467 |
|
|
468 |
|
%---------------------------------------------------------------------- |
469 |
|
|
470 |
|
\subsubsection{Flow chart |
471 |
|
\label{sec:pkg:kpp:flowchart}} |
472 |
|
|
473 |
|
|
474 |
{\footnotesize |
{\footnotesize |
475 |
\begin{verbatim} |
\begin{verbatim} |
476 |
|
|
506 |
|
|
507 |
Diagnostics output is available via the diagnostics package |
Diagnostics output is available via the diagnostics package |
508 |
(see Section \ref{sec:pkg:diagnostics}). |
(see Section \ref{sec:pkg:diagnostics}). |
509 |
Available output fields are summarized in |
Available output fields are summarized here: |
|
Table \ref{tab:pkg:kpp:diagnostics}. |
|
510 |
|
|
|
\begin{table}[h!] |
|
|
\centering |
|
|
\label{tab:pkg:kpp:diagnostics} |
|
|
{\footnotesize |
|
511 |
\begin{verbatim} |
\begin{verbatim} |
512 |
------------------------------------------------------ |
------------------------------------------------------ |
513 |
<-Name->|Levs|grid|<-- Units -->|<- Tile (max=80c) |
<-Name->|Levs|grid|<-- Units -->|<- Tile (max=80c) |
520 |
KPPmld | 1 |SM |m |Mixed layer depth, dT=.8degC density criterion |
KPPmld | 1 |SM |m |Mixed layer depth, dT=.8degC density criterion |
521 |
KPPfrac | 1 |SM | |Short-wave flux fraction penetrating mixing layer |
KPPfrac | 1 |SM | |Short-wave flux fraction penetrating mixing layer |
522 |
\end{verbatim} |
\end{verbatim} |
|
} |
|
|
\caption{~} |
|
|
\end{table} |
|
523 |
|
|
524 |
%---------------------------------------------------------------------- |
%---------------------------------------------------------------------- |
525 |
|
|
533 |
|
|
534 |
\subsubsection{References} |
\subsubsection{References} |
535 |
|
|
536 |
|
\subsubsection{Experiments and tutorials that use kpp} |
537 |
|
\label{sec:pkg:kpp:experiments} |
538 |
|
|
539 |
|
\begin{itemize} |
540 |
|
\item{Labrador Sea experiment, in lab\_sea verification directory } |
541 |
|
\end{itemize} |