Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-factor of MOM_lateral_mixing_coeffs.F90 (VarMix)
- 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