Skip to content

Commit

Permalink
Fixes issues with the GME code and get_param calls for Leith options (#…
Browse files Browse the repository at this point in the history
…65)

* Eliminate GET_ALL_PARAMS in hor_visc_init

  Added do_not_log arguments to get_param calls in MOM_hor_visc.F90 that are
only used conditionally, and eliminated the unlogged GET_ALL_PARAMS runtime
parameter and get_all variable in hor_visc_init().  By design, all logging of
parameters after this commit is identical to before, even for variables that are
inactive and therefore should not be logged.  In several places, there were some
problems, mostly with the GME code, that have been noted in comments marked with
'###'.  Also cleaned up the code alignment and eliminated unneeded temporary
variables in a few places in hor_visc().  All solutions are bitwise identical,
and no output is changed.

* Move call to get get_KH outside k-loop

The call to get the 3-d GME diffusivity arrays and the subsequent
blocking halo update was moved outside of the k-loop.

* Increase loop range for calculation of GME fluxes

* Makes GME filter rotationally invariant

* Makes the GME filter rotationally invariant
* Adds a runtime param to allow the user to control how many
smoothing passes should be done.

* Rearranges the get_param calls related to Leith

The get_param calls for Leith were not in the correct location.
This commit fixes that.

* Adding halo updates

* Fixes do loops indices and adds diagnostics

* Adds option to save barotropic tension and strain;

* Fixes many i and j loops indices associated with GME to avoid halo
problems and unnecessary halo updates. With these changes, the
model is now conserving mass and tracers when USE_GME = True.

* Fixes issues related to the merging with dev/gfdl

* Fixes calculation of FrictWork_GME

The calculation now mimics the calculation of FrictWork and it
includes the energy diffusion term.

* Removes dependency of FrictWork_GME calculation on MEKE

* Adding sh_xy_sq and sh_xx_sq in the OMP directives

Co-authored-by: Robert Hallberg <Robert.Hallberg@noaa.gov>
  • Loading branch information
gustavo-marques and Hallberg-NOAA authored Feb 20, 2022
1 parent e841609 commit 32e1ecf
Showing 1 changed file with 145 additions and 109 deletions.
Loading

0 comments on commit 32e1ecf

Please sign in to comment.