Skip to content

Commit

Permalink
Re-factor of MOM_lateral_mixing_coeffs.F90 (VarMix)
Browse files Browse the repository at this point in the history
- VarMix was originally for a crude implementation of a Visbeck et al.
  diffusivity formula. It has become a catchall for resolution functions,
  stored slopes and length-scales. It infact has never contained an actual
  diffusivity. The meaning of the parameter USE_VARIABLE_MIXING was original
  "use Visbeck" but has really meant "allocate and calculate everything in
  this module even if not being used". This has now been cleaned up...
- USE_VARIABLE_MIXING still exists but does nothing.
  - It will be made obsolete shortly.
- Visbeck related fields (VarMix@L2v, ...) are allocated only if
  KhTh_Slope_Cff>0 or KhTr_Slope_Cff>0.
- The Eady growth rates are now allocated and calculated if
  either of Visbeck or MEKE schemes are in use.
- The field VarMix%Rd_dx_h is allocated and calculated if either the
  diagnostic is requested or the field needed "Passivity" or the
  resolution functions.
- The wave speed VarMix%cg1 is calculated only if needed but which
  includes resolution fns, Rd_dx, and FGNV stream fn.
  - Closes #522.
- Added logic in tracer_hordiff() to avoid referencing VarMix%L2v or
  VarMix%SN_v when VarMix%KhTh_Slope_Cff==0.
- Added logic in tracer_hordiff() to avoid referencing VarMix%L2v or
  VarMix%SN_v when VarMix%KhTr_Slope_Cff==0.

- This commit affects available_diags and MOM_parameter_doc for some
  experiments but does not changes answers.
  • Loading branch information
adcroft committed Jul 1, 2017
1 parent a1ac57f commit 3e50273
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 146 deletions.
Loading

0 comments on commit 3e50273

Please sign in to comment.