Does anyone other than me find it surprising that the quantity written to stdout at each time step under the heading KINETIC_ENRG is

**half**the volume-average kinetic energy (for a 2D simulation)?

The relevant code is in diag.F. First a column-integrated kinetic energy is calculated for each (i,j). With SOLVE3D undefined the expression is

Code: Select all

```
ke2d(i,j)=(zeta(i,j,krhs)+h(i,j))* &
& 0.25_r8*(ubar(i ,j,krhs)*ubar(i ,j,krhs)+ &
& ubar(i+1,j,krhs)*ubar(i+1,j,krhs)+ &
& vbar(i,j ,krhs)*vbar(i,j ,krhs)+ &
& vbar(i,j+1,krhs)*vbar(i,j+1,krhs))
```

This array is summed over the domain in the variable avgke, then this variable is further modified by the expression

Code: Select all

```
avgke=0.5_r8*avgke/volume
```

The other oddity is the fact that for a 3D simulation KINETIC_ENRG is multiplied by density, ie it has units kg m^-1 s^-2. If we compare a 2D simulation with a 3D simulation in which the velocities are vertically uniform, KINETIC_ENRG is about 1025 times as large in the 3D case as in the 2D case.