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

User/bgr/pe mld diag #1215

Merged
merged 13 commits into from
Oct 6, 2020
Merged

Conversation

breichl
Copy link
Collaborator

@breichl breichl commented Sep 24, 2020

Adding new mixed layer depth diagnostics.

  • MLD_EN1, MLD_EN2, MLD_EN3 are output containers for MLD diagnostics.
  • The values are computed based on energy based mixed layer depth calculations.
  • The energy values used can be set at runtime or be left as default. The actual value used is written within the description of the variable in the NetCDF output, though I debated whether this feature was desirable or not (can be a bit messy with spacing from converting real to string, perhaps this can be done better). The variable names are fixed.

@codecov-commenter
Copy link

codecov-commenter commented Sep 25, 2020

Codecov Report

Merging #1215 into dev/gfdl will increase coverage by 0.08%.
The diff coverage is 35.19%.

Impacted file tree graph

@@             Coverage Diff              @@
##           dev/gfdl    #1215      +/-   ##
============================================
+ Coverage     46.08%   46.17%   +0.08%     
============================================
  Files           214      224      +10     
  Lines         69399    70690    +1291     
============================================
+ Hits          31984    32642     +658     
- Misses        37415    38048     +633     
Impacted Files Coverage Δ
...g_src/external/GFDL_ocean_BGC/FMS_coupler_util.F90 0.00% <0.00%> (ø)
...fig_src/external/GFDL_ocean_BGC/generic_tracer.F90 0.00% <0.00%> (ø)
...c/external/GFDL_ocean_BGC/generic_tracer_utils.F90 0.00% <0.00%> (ø)
config_src/external/ODA_hooks/kdtree.f90 0.00% <0.00%> (ø)
config_src/external/ODA_hooks/ocean_da_core.F90 0.00% <0.00%> (ø)
config_src/external/ODA_hooks/ocean_da_types.F90 0.00% <0.00%> (ø)
config_src/external/ODA_hooks/write_ocean_obs.F90 0.00% <0.00%> (ø)
config_src/solo_driver/MESO_surface_forcing.F90 0.00% <0.00%> (ø)
config_src/solo_driver/user_surface_forcing.F90 0.00% <0.00%> (ø)
src/ALE/MOM_regridding.F90 31.47% <0.00%> (-0.17%) ⬇️
... and 214 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7cb606e...8bf3541. Read the comment docs.

@breichl
Copy link
Collaborator Author

breichl commented Sep 30, 2020

I'm working on the iteration, potentially will offer an improvement soon, and I also notice that Travis is failing so will need to figure out why (might be just signaling the new diagnostics). But I am wondering, is the empty line at the beginning of MOM_diabatic_aux.F90 intentional? My whitespace macro keeps removing it so I have to manually reinsert it. It is missing again in my last commit so wanted to check before I reinsert it again.

@adcroft
Copy link
Collaborator

adcroft commented Sep 30, 2020

Yes delete the blank line.

@marshallward
Copy link
Collaborator

The new diagnostics should no longer signal an error. In fact, this is passing the regression tests.

Most of the reported fails are dimensional. My guess is many of those hard-coded constants need dimensions applied to them. Could also be that the diagnostics were improperly scaled?

@breichl
Copy link
Collaborator Author

breichl commented Sep 30, 2020

Thanks, good to know. Will double check if that -1.e8 is triggering this or if it is in the scaling of the diagnostics (my hunch).

@breichl
Copy link
Collaborator Author

breichl commented Oct 2, 2020

The latest commit is a complete rewrite of the original commit, where the iterator used to calculate the fraction of a layer that could be mixed with a given energy has been replaced. This should be faster and more accurate.

Copy link
Collaborator

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am very happy with this PR, especially now that it is using Newton's method and is finding the diagnostic mixed layer depth very quickly. It is a valuable diagnostic addition.

There are couple of places with implied array copies from non-stride-1 array syntax arguments that might be addressed for efficiency (e.g., line 792 of MOM_diabatic_aux.F90), and there is a curious empty logical test at lines 3451-3452 of MOM_diabatic_driver.F90 that probably should be deleted, but these are minor things that could be cleaned up later.

@breichl
Copy link
Collaborator Author

breichl commented Oct 6, 2020

Thanks for the review. I can delete the lines at 3451, it is leftover code that should have been removed.

@marshallward
Copy link
Collaborator

marshallward commented Oct 6, 2020

@marshallward marshallward merged commit a451c87 into mom-ocean:dev/gfdl Oct 6, 2020
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

Successfully merging this pull request may close these issues.

5 participants