Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add_MARBL (future): support for NDEP coming from atm component #65

Closed
mnlevy1981 opened this issue Apr 28, 2022 · 3 comments
Closed

add_MARBL (future): support for NDEP coming from atm component #65

mnlevy1981 opened this issue Apr 28, 2022 · 3 comments

Comments

@mnlevy1981
Copy link
Owner

Mariana is working on a CESM feature where NDEP would be passed to the ocean model via the coupler rather than being read from a file (I think CAM would compute it in most cases, but datm and some CAM simple models would read it from disk) -- this would ensure consistency between the land and ocean models, and perhaps save me the effort of reading ndep via share stream.

Currently, my branch supports reading an NDEP climatology but not the forcing needed for a transient run.

mnlevy1981 pushed a commit that referenced this issue Sep 15, 2022
…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>
mnlevy1981 pushed a commit that referenced this issue Sep 15, 2022
  Fixed the bug noted in issue #72 and excessive loop sizes noted in the
unresolved comments in a recent commit, and cleaned up other aspects of
MOM_hor_visc, mostly related to the code that is exercised when USE_GME=True.

 - Fixed the bug with the wrong arrays being used when ADD_LES_VISCOSITY=True
   that was noted in MOM6 issue #72.

 - Corrected some of the overly large loop extents that were noted in unresolved
   comments about MOM6 PR #65.

 - Only log USE_KH_BG_2D if a Laplacian viscosity is used.

 - Use extra calculations in the halos and marching in to avoid unnecessary halo
   updates in smooth_GME if there multiple smoothing passes.

 - Corrected the capitalization of some horizontal indices to follow the MOM6
   convention for indicating the horizontal staggering position.

 - Collected the post_data calls for diagnostics with use_GME with the other
   post data calls to collocate some of the potential inter-PE synchronization
   points.

 - Fixed the indentation of some expressions that were using less than 4 points
   for some continuation lines.

 - Eliminated several unused variables, and fused some loops to allow 2-d
   variables to be replaced with scalars.

  With this PR, answers can change when ADD_LES_VISCOSITY=True and there is a
Smagorinsky or Leith Laplacian viscosity and there is a nonzero background.
One run-time parameter is no longer logged if LAPLACIAN=false, so there are
changes to the MOM_parameter_doc files.  All answers in the MOM6-examples test
suite are bitwise identical.
@klindsay28
Copy link

@mvertens has added support for datm to pass ndep in ESCOMP/CDEPS#158
However, it's not clear if this has been vetted in any G-type compset.

@mvertens
Copy link

@klindsay28 - the component caps have not been modified yet to accept the ndep passed from datm. This was just the first step. The next step is to have CAM updated so that it can read in ndep the same way datm does. At that point we can start removing the code from the components themselves that read in ndep from within their code base.

@mnlevy1981
Copy link
Owner Author

mnlevy1981 commented Apr 6, 2023

It took some work in CDEPS (69e55021) and CMEPS (b31366f) as well, but as of 3d8e164, this is complete. (It got moved to from the "future" task list to the "do now" task list when we realized addressing it was part of #69)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants