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

Geothermal fails if enabled with GEOTHERMAL_SCALE = 0 #1449

Closed
marshallward opened this issue Jul 20, 2021 · 0 comments · Fixed by #1450
Closed

Geothermal fails if enabled with GEOTHERMAL_SCALE = 0 #1449

marshallward opened this issue Jul 20, 2021 · 0 comments · Fixed by #1450

Comments

@marshallward
Copy link
Collaborator

In some tests, turning on DO_GEOTHERMAL but setting GEOTHERMAL_SCALE to zero will cause segmentation faults:

At line 604 of file /lustre/f2/dev/gfdl/Marshall.Ward/CI/Gaea-stats-MOM6-examples/MOM6-examples/src/MOM6/src/parameterizations/vertical/MOM_geothermal.F90
Fortran runtime error: Attempt to DEALLOCATE unallocated 'cs'

I suspect this should be an easy fix. At worst, we can just do an if(associated(..)) check.

Thanks to @sanAkel for reporting.

Hallberg-NOAA added a commit to Hallberg-NOAA/MOM6 that referenced this issue Jul 21, 2021
  Added a test to avoid attempting to deallocate the geothermal heating field if
it is not allocated, and changed the geo_heat element of geothermal_CS from a
pointer into an allocatable array.  Also clarified the comments describing
several of the elements of geothermal_CS, and added a test to avoid logging the
value of GEOTHERMAL_DRHO_DT_INPLACE when the model is not in layered-mode and
this parameter is unused.  This PR addresses MOM6 issue mom-ocean#1449.  All answers are
bitwise identical in all cases that worked before, but there are fewer entries
in some ALE-mode MOM_parameter_doc files.
@Hallberg-NOAA Hallberg-NOAA linked a pull request Jul 21, 2021 that will close this issue
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 a pull request may close this issue.

1 participant