Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates MOM_kappa_shear averaging and diagnostics. (#846)
* Updates MOM_kappa_shear averaging and diagnostics. - Update to horizontal averaging procedure in MOM_kappa_shear for VERTEX_SHEAR = True. - Adds geometric and thickness weighted averages for moving diffusivity from vertices to tracer points. - Adds new diagnostics of N2, S2, Kd, and TKE both with and without VERTEX_SHEAR, useful for debugging. * Shorten two lines in MOM_kappa_shear to comply w/ MOM6 standard * More updates for Kappa_Shear horizontal averaging - Fix OMP directives for new diagnostics - Remove quasi-2d fields that broke OMP threading - Reworking horizontal averaging algorithm. * Initialize new variables to zero in kappa_shear * Only initialize some arrays in kappa shear if they are used * Add VERTEX_SHEAR_GEOMETRIC_MEAN_KDMIN runtime option to Kappa Shear * *+Revise horizontal avg in Calc_kappa_shear_vertex Revised the Calc_kappa_shear_vertex code where it averages the diffusivities at the vertices back to the tracer points when there is either a geometric mean being used or thickness weighting. With these changes, the code should now pass dimensional consistency testing, work properly with openMP threading enabled, and give sensible values of the diffusivity for massless layers. Also corrected the indenting of several recently added lines to follow the MOM6 2-space indenting convention. This commit can change answers slightly in some cases where VERTEX_SHEAR = True, especially if VERTEX_SHEAR_GEOMETRIC_MEAN = True or VERTEX_SHEAR_THICKNESS_MEAN = True. The recently added runtime parameter VERTEX_SHEAR_KD_MEAN_ANSWER_DATE (which has not yet been added to the dev/gfdl branch of the code) was no longer needed and has been eliminated. * Shorten variable name VS_GeometricMean_Kd_min to VS_GeoMean_Kdmin to help with line length issues. --------- Co-authored-by: brandon.reichl <Brandon.Reichl@noaa.gov> Co-authored-by: Robert Hallberg <Robert.Hallberg@noaa.gov>
- Loading branch information