gotm-model / code

Source code for the General Ocean Turbulence Model
https://gotm.net
GNU General Public License v2.0
53 stars 44 forks source link

Add bottom layer in the CVMix module and clean up the Stokes drift module #48

Closed qingli411 closed 1 month ago

qingli411 commented 1 month ago

This PR brings two changes in the CVMix module and Stokes drift module.

  1. Support of bottom layer mixing through CVMix. The CVMix parameters for the bottom layer are separate from those in the surface layer. So an additional section of cvmix/bottom_layer is added in the YAML file. The original cvmix/surface_layer section is also adjusted to make it simple. So the cvmix/surface_layer section of old YAML configuration files need to be updated.
  2. Require input of surface Stokes drift us0 and vs0 if Stokes drift is read from a file. This allows better representation of the Stokes drift shear near the surface. The Stokes drift profile usprof and vsprof are treated as the layer-averaged Stokes drift over the grid cell. Previously, if Stokes drift profile is read from a file, surface Stokes drift was simply taken as the value at the top cell, i.e., us0 = usprof(nlev). This underestimates the surface Stokes drift and may cause errors if surface Stokes drift is used in the model. This change does not affect the results of the KPP-based Langmuir turbulence parameterization currently implemented in CVMix since in those parameterizations the surface layer averaged Stokes drift is used rather than the surface value. But the waves/stokes_drift section of the YAML configuration file needs to be updated.

Also included in this PR is the fix to some bugs in the CVMix and Stokes drift modules, which didn't seem to cause any issues in my previous tests but may be problematic under certain conditions.