Difference between revisions of "Model Diagnostics"

From WikiROMS
Jump to navigationJump to search
 
(3 intermediate revisions by the same user not shown)
Line 4: Line 4:


==Output Variables==
==Output Variables==
<wikitex>The tables below show the variables that are written to the [[Variables#DIAname|diagnostics output file]].
The tables below show the variables that are written to the [[Variables#DIAname|diagnostics output file]].


:{| border="1" cellpadding="5" cellspacing="0"
:{| border="1" cellpadding="5" cellspacing="0" width="600"
|-
|-
! colspan="3" | 2D Diagnostic momentum terms (m/s<sup>2</sup>)
! colspan="3" | 2D Diagnostic momentum terms (m/s<sup>2</sup>)
|-
|-
| <span class="blue">ubar_accel</span>
| width="110" | <span class="blue">ubar_accel</span>
| <span class="blue">vbar_accel</span>
| width="110" | <span class="blue">vbar_accel</span>
| Net acceleration
| Net acceleration
|-
|-
Line 24: Line 24:
| <span class="blue">ubar_xadv</span>
| <span class="blue">ubar_xadv</span>
| <span class="blue">vbar_xadv</span>
| <span class="blue">vbar_xadv</span>
| Horizontal advection $\xi$-direction component
| Horizontal advection <math>\xi</math>-direction component
|-
|-
| <span class="blue">ubar_yadv</span>
| <span class="blue">ubar_yadv</span>
| <span class="blue">vbar_yadv</span>
| <span class="blue">vbar_yadv</span>
| Horizontal advection $\eta$-direction component
| Horizontal advection <math>\eta</math>-direction component
|-
|-
| <span class="blue">ubar_hvisc</span>
| <span class="blue">ubar_hvisc</span>
Line 36: Line 36:
| <span class="blue">ubar_xvisc</span>
| <span class="blue">ubar_xvisc</span>
| <span class="blue">vbar_xvisc</span>
| <span class="blue">vbar_xvisc</span>
| Horizontal viscosity $\xi$-direction component
| Horizontal viscosity <math>\xi</math>-direction component
|-
|-
| <span class="blue">ubar_yvisc</span>
| <span class="blue">ubar_yvisc</span>
| <span class="blue">vbar_yvisc</span>
| <span class="blue">vbar_yvisc</span>
| Horizontal viscosity $\eta$-direction component
| Horizontal viscosity <math>\eta</math>-direction component
|-
|-
| <span class="blue">ubar_prsgrd</span>
| <span class="blue">ubar_prsgrd</span>
Line 49: Line 49:
| <span class="blue">vbar_strs</span>
| <span class="blue">vbar_strs</span>
| Stress divergence contribution
| Stress divergence contribution
|-
| <span class="blue">pvorticity_bar</span>
| <span class="blue">-</span>
| Depth integrated 2D potential vorticity
|-
| <span class="blue">rvorticity_bar</span>
| <span class="blue">-</span>
| Depth integrated 2D relative vorticity
|}
|}




:{| border="1" cellpadding="5" cellspacing="0"
:{| border="1" cellpadding="5" cellspacing="0" width="600"
|-
|-
! colspan="3" | 3D Diagnostic momentum terms (m/s<sup>2</sup>)
! colspan="3" | 3D Diagnostic momentum terms (m/s<sup>2</sup>)
|-
|-
| <span class="blue">u_accel</span>
| width="110" | <span class="blue">u_accel</span>
| <span class="blue">v_accel</span>
| width="110" | <span class="blue">v_accel</span>
| Net acceleration
| Net acceleration
|-
|-
Line 78: Line 70:
| <span class="blue">u_xadv</span>
| <span class="blue">u_xadv</span>
| <span class="blue">v_xadv</span>
| <span class="blue">v_xadv</span>
| Horizontal advection $\xi$-direction component
| Horizontal advection <math>\xi</math>-direction component
|-
|-
| <span class="blue">u_yadv</span>
| <span class="blue">u_yadv</span>
| <span class="blue">v_yadv</span>
| <span class="blue">v_yadv</span>
| Horizontal advection $\eta$-direction component
| Horizontal advection <math>\eta</math>-direction component
|-
|-
| <span class="blue">u_vadv</span>
| <span class="blue">u_vadv</span>
Line 94: Line 86:
| <span class="blue">u_xvisc</span>
| <span class="blue">u_xvisc</span>
| <span class="blue">v_xvisc</span>
| <span class="blue">v_xvisc</span>
| Horizontal viscosity $\xi$-direction component
| Horizontal viscosity <math>\xi</math>-direction component
|-
|-
| <span class="blue">u_yvisc</span>
| <span class="blue">u_yvisc</span>
| <span class="blue">v_yvisc</span>
| <span class="blue">v_yvisc</span>
| Horizontal viscosity $\eta$-direction component
| Horizontal viscosity <math>\eta</math>-direction component
|-
|-
| <span class="blue">u_prsgrd</span>
| <span class="blue">u_prsgrd</span>
Line 107: Line 99:
| <span class="blue">v_vvisc</span>
| <span class="blue">v_vvisc</span>
| Vertical viscosity contribution*
| Vertical viscosity contribution*
|-
| <span class="blue">pvorticity</span>
| <span class="blue">-</span>
| 3D potential vorticity
|-
| <span class="blue">rvorticity</span>
| <span class="blue">-</span>
| 3D relative vorticity
|}
|}




:{| border="1" cellpadding="5" cellspacing="0"
:{| border="1" cellpadding="5" cellspacing="0" width="600"
|-
|-
! colspan="2" | Tracer Diagnostic terms (Tunits/s)
! colspan="2" | Tracer Diagnostic terms (Tunits/s)
|-
|-
| <span class="blue">Tname_hadv</span>
| width="110" | <span class="blue">Tname_hadv</span>
| Horizontal advection contribution
| Horizontal advection contribution
|-
|-
| <span class="blue">Tname_xadv</span>
| <span class="blue">Tname_xadv</span>
| Horizontal advection $\xi$-direction component
| Horizontal advection <math>\xi</math>-direction component
|-
|-
| <span class="blue">Tname_yadv</span>
| <span class="blue">Tname_yadv</span>
| Horizontal advection $\eta$-direction component
| Horizontal advection <math>\eta</math>-direction component
|-
|-
| <span class="blue">Tname_hdiff</span>
| <span class="blue">Tname_hdiff</span>
Line 135: Line 119:
|-
|-
| <span class="blue">Tname_xdiff</span>
| <span class="blue">Tname_xdiff</span>
| Horizontal diffusivity $\xi$-direction component
| Horizontal diffusivity <math>\xi</math>-direction component
|-
|-
| <span class="blue">Tname_ydiff</span>
| <span class="blue">Tname_ydiff</span>
| Horizontal diffusivity $\xi$-direction component
| Horizontal diffusivity <math>\xi</math>-direction component
|-
|-
| <span class="blue">Tname_sdiff</span>
| <span class="blue">Tname_sdiff</span>
| Horizontal diffusivity $s$-direction component due to rotated tensor<br>(used only when [[Options#MIX_GEO_TS|MIX_GEO_TS]] or [[Options#MIX_ISO_TS|MIX_ISO_TS]] is set).
| Horizontal diffusivity <math>s</math>-direction component due to rotated tensor<br>(used only when [[Options#MIX_GEO_TS|MIX_GEO_TS]] or [[Options#MIX_ISO_TS|MIX_ISO_TS]] is set).
|-
|-
| <span class="blue">Tname_vadv</span>
| <span class="blue">Tname_vadv</span>
Line 152: Line 136:
| Net time rate-of-change
| Net time rate-of-change
|}
|}
:{| border="1" cellpadding="5" cellspacing="0" width="600"
|-
! colspan="2" |  Vorticity Diagnostics
|-
| width="110" | <span class="blue">pvorticity_bar</span>
| Depth integrated 2D potential vorticity (m<sup>-1</sup> s<sup>-1</sup>)
|-
| <span class="blue">rvorticity_bar</span>
| Depth integrated 2D relative vorticity (s<sup>-1</sup>)
|-
| <span class="blue">pvorticity</span>
| 3D potential vorticity (m<sup>-1</sup> s<sup>-1</sup>)
|-
| <span class="blue">rvorticity</span>
| 3D relative vorticity (s<sup>-1</sup>)
|}


where <span class="blue">Tname</span> represents the name of the tracer (''i.e.'' temp, salt, etc.).
where <span class="blue">Tname</span> represents the name of the tracer (''i.e.'' temp, salt, etc.).
Line 160: Line 163:


Because the diagnostic terms are accelerations (changes in current velocity over time), the terms from the depth-average momentum calculations must be integrated over all short timesteps when the model is configured in 3D.
Because the diagnostic terms are accelerations (changes in current velocity over time), the terms from the depth-average momentum calculations must be integrated over all short timesteps when the model is configured in 3D.
</wikitex>
 
==Derivation of the 2D momentum diagnostic terms integrated over short timesteps.==
==Derivation of the 2D momentum diagnostic terms integrated over short timesteps.==
<wikitex>
 
$$\bar u_{n+1} = \frac{(\bar u_{n} D_{n} + R_{n+1})}{D_{n+1}}\;\;\;\;and\;\;\;\;\bar u_{n} = \frac{(\bar u_{n-1} D_{n-1} + R_{n})}{D_{n}}$$
<math display="block">
  \bar u_{n+1} = \frac{(\bar u_{n} D_{n} + R_{n+1})}{D_{n+1}}\;\;\;\;and\;\;\;\;\;
  \bar u_{n} = \frac{(\bar u_{n-1} D_{n-1} + R_{n})}{D_{n}}
</math>




where $D_n$ is water column depth at barotropic (short) timestep
where <math>D_n</math> is water column depth at barotropic (short) timestep
$n$ and $R_n$ is the right-hand-side term.
<math>n</math> and <math>R_n</math> is the right-hand-side term.
Combining:
Combining:




$$\bar u_{n+1} = \frac{\left(\frac{(\bar u_{n-1}D_{n-1} + R_{n})}{D_{n}}D_{n} + R_{n+1}\right)}{D_{n+1}}=\frac{(\bar u_{n-1}D_{n-1} + R_{n} + R_{n+1})}{D_{n+1}}$$
<math display="block">
  \bar u_{n+1} = \frac{\left(\frac{(\bar u_{n-1}D_{n-1} + R_{n})}{D_{n}}D_{n} +  
  R_{n+1}\right)}{D_{n+1}}=\frac{(\bar u_{n-1}D_{n-1} + R_{n} + R_{n+1})}{D_{n+1}}
</math>




Line 177: Line 186:




$$ \eqalign{\bar u_{n+1} &= \frac{(\bar u_o D_o + R_1 + R_2 + R_3 + \ldots + R_{n-1} + R_n + R_{n+1})}
<math display="block">\begin{align}
{D_{n+1}} \cr
  \bar u_{n+1} &= \frac{(\bar u_o D_o + R_1 + R_2 + R_3 + \ldots + R_{n-1} +  
  \noalign{\medskip}
      R_n + R_{n+1})} {D_{n+1}} \\ \\
      \bar u_{N+1} &= \frac{\left(\bar u_oD_o + \sum_{iif = 1}^{n+1} R_{iif}\right)}{D_{n+1}} \cr
  \bar u_{N+1} &= \frac{\left(\bar u_oD_o + \sum_{iif = 1}^{n+1} R_{iif}\right)}{D_{n+1}} \\ \\
  \noalign{\medskip}
  DU\_avg1 &= \sum_{iif=1}^{ndtfast} \frac{1}{n_u} \left\{ weight(1,iif)\;  
      DU\_avg1 &= \sum_{iif=1}^{ndtfast} \frac{1}{n_u} \left\{ weight(1,iif)\; \bar u_{iif}^* \zeta_{iif}^*\right\} \cr
      \bar u_{iif}^* \zeta_{iif}^*\right\} \\ \\
  \noalign{\medskip}
  DiaU2int &= \sum_{iif=1}^{ndtfast} \frac{1}{n_u} \left\{ weight(1,iif)\; \zeta_{iif}^* \;  
      DiaU2int &= \sum_{iif=1}^{ndtfast} \frac{1}{n_u} \left\{ weight(1,iif)\; \zeta_{iif}^* \; \sum_{n=1}^{iif} R_n^* \right\} }$$
      \sum_{n=1}^{iif} R_n^* \right\} \end{align}
</math>




where the asterisks ( * ) superscript denotes the value calculated during corrector timestep.
where the asterisks ( <math>*</math> ) superscript denotes the value calculated during corrector timestep.
</wikitex>

Latest revision as of 13:07, 5 August 2015

Model Diagnostics

Time-averaged values for each of the terms in the momentum and tracer equations can be written out by defining the variables DIAGNOSTICS_UV and DIAGNOSTICS_TS, respectively, in cppdefs.h.


Output Variables

The tables below show the variables that are written to the diagnostics output file.

2D Diagnostic momentum terms (m/s2)
ubar_accel vbar_accel Net acceleration
ubar_cor vbar_cor Coriolis contribution*
ubar_hadv vbar_hadv Horizontal advection contribution*
ubar_xadv vbar_xadv Horizontal advection -direction component
ubar_yadv vbar_yadv Horizontal advection -direction component
ubar_hvisc vbar_hvisc Horizontal viscosity contribution*
ubar_xvisc vbar_xvisc Horizontal viscosity -direction component
ubar_yvisc vbar_yvisc Horizontal viscosity -direction component
ubar_prsgrd vbar_prsgrd Pressure gradient contribution
ubar_strs vbar_strs Stress divergence contribution


3D Diagnostic momentum terms (m/s2)
u_accel v_accel Net acceleration
u_cor v_cor Coriolis contribution*
u_hadv v_hadv Horizontal advection contribution*
u_xadv v_xadv Horizontal advection -direction component
u_yadv v_yadv Horizontal advection -direction component
u_vadv v_vadv Vertical advection contribution*
u_hvisc v_hvisc Horizontal viscosity contribution*
u_xvisc v_xvisc Horizontal viscosity -direction component
u_yvisc v_yvisc Horizontal viscosity -direction component
u_prsgrd v_prsgrd Pressure gradient contribution
u_vvisc v_vvisc Vertical viscosity contribution*


Tracer Diagnostic terms (Tunits/s)
Tname_hadv Horizontal advection contribution
Tname_xadv Horizontal advection -direction component
Tname_yadv Horizontal advection -direction component
Tname_hdiff Horizontal diffusivity contribution*
Tname_xdiff Horizontal diffusivity -direction component
Tname_ydiff Horizontal diffusivity -direction component
Tname_sdiff Horizontal diffusivity -direction component due to rotated tensor
(used only when MIX_GEO_TS or MIX_ISO_TS is set).
Tname_vadv Vertical advection contribution
Tname_vdiff Vertical diffusivity contribution
Tname_rate Net time rate-of-change


Vorticity Diagnostics
pvorticity_bar Depth integrated 2D potential vorticity (m-1 s-1)
rvorticity_bar Depth integrated 2D relative vorticity (s-1)
pvorticity 3D potential vorticity (m-1 s-1)
rvorticity 3D relative vorticity (s-1)


where Tname represents the name of the tracer (i.e. temp, salt, etc.).


NoteThe diagnostics code adapts to the model configuration, the terms marked with * are written to the diagnostics output file when appropriate. Diagnostic terms are reported for all tracers.


Because the diagnostic terms are accelerations (changes in current velocity over time), the terms from the depth-average momentum calculations must be integrated over all short timesteps when the model is configured in 3D.

Derivation of the 2D momentum diagnostic terms integrated over short timesteps.


where is water column depth at barotropic (short) timestep and is the right-hand-side term. Combining:



Expanding:



where the asterisks ( ) superscript denotes the value calculated during corrector timestep.