adding new geothermal bedrock - #152
Conversation
adding some information to the documentation
…o 76_geothermal_heat_flux
There was a problem hiding this comment.
Pull request overview
Adds support for a geothermal heat flux lower boundary condition for the bedrock thermal diffusion column, including a numerical correction accumulator to reduce rounding drift in deep-soil temperatures.
Changes:
- Add
hflux_geo(geothermal heat flux) tojules_soilnamelist, Rose metadata, documentation, and an upgrade macro. - Extend bedrock temperature integration to apply a basal flux and track an accumulated numerical correction term (
dtsd_acc_gb) through the call chain. - Adjust standalone dimension sizing/prognostics to carry the new bedrock correction state.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/science/soil/soil_htc_jls_mod.F90 | Passes new accumulated-correction array through soil_htc into bedrock. |
| src/science/soil/hydrol_jls_mod.F90 | Threads dtsd_acc_gb through the hydrology → soil heat coupling call path. |
| src/science/soil/bedrock_jls_mod.F90 | Implements geothermal basal flux term and accumulated numerical correction in bedrock temperature update. |
| src/initialisation/standalone/grid/init_dim_sizes_mod.F90 | Updates standalone IO dimension sizing logic for the bedrock dimension. |
| src/control/shared/surf_couple_extra_mod.F90 | Adds dtsd_acc_gb to the coupled surf/hydrol argument list. |
| src/control/shared/prognostics.F90 | Allocates/associates the new prognostic dtsd_acc_gb array. |
| src/control/shared/jules_soil_mod.F90 | Introduces hflux_geo namelist parameter and related validation/printing. |
| rose-meta/jules-standalone/versions.py | Adds an upgrade macro intended to introduce hflux_geo into existing apps. |
| rose-meta/jules-standalone/HEAD/rose-meta.conf | Adds Rose metadata entry and trigger for hflux_geo. |
| doc/source/namelists/jules_soil.nml.rst | Documents hflux_geo and updates bedrock parameter defaults. |
Suppressed comments (1)
src/control/shared/jules_soil_mod.F90:320
- hflux_geo is initialised to rmdi, but the current validation treats it as having a 0.0 default and will report a confusing out-of-range error if it is unset. Add an explicit 'not found' check (like the other bedrock parameters) before the range check, and update the comment accordingly.
IF (hflux_geo < -0.052 .OR. hflux_geo > 15.6 ) THEN
CALL ereport(RoutineName, errorstatus, &
'hflux_geo must lie in the range -0.052 to 15.6 W/m2')
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Suppressed comments (3)
Previously missed (3) — in code that hasn't changed since the last review.
src/control/shared/jules_soil_mod.F90:293
- The soil-tiling compatibility check uses
nsoilt, butcheck_jules_soil()is called during namelist read (e.g., standaloneinit_soil) beforensoiltis set by dimension initialisation, so this will usually still be1and won’t catch an incompatiblel_tile_soilconfiguration.
ELSE IF ( nsoilt > 1 ) THEN
CALL ereport(RoutineName, errorstatus, &
'Bedrock not yet compatible with soil tiling')
END IF
rose-meta/jules-standalone/HEAD/rose-meta.conf:4711
- Unit formatting for
hflux_geois inconsistent with nearby entries (e.g.,hcondeepusesW m-1 K-1). Prefer the same style here (e.g.,W m-2) for consistency across the rose metadata.
description=Geothermal heat flux (W/m2)
rose-meta/jules-standalone/versions.py:50
- The macro docstring still contains placeholder text ("by Author"), which makes the upgrade history harder to audit. Consider updating it to describe the actual purpose (ticket/feature) instead.
"""Upgrade macro from JULES by Author"""
| # Add settings | ||
| self.add_setting(config, ["namelist:jules_soil", "hflux_geo"], "0.067") | ||
| self.change_setting_value(config, ["namelist:jules_soil", "hcondeep"], "3.0") | ||
| return config, self.reports |
| ALLOCATE(progs_data%tsoil_deep_gb(land_pts,ns_deep)) | ||
| progs_data%tsoil_deep_gb(:,:) = 0.0 | ||
| ALLOCATE(progs_data%dtsd_acc_gb(land_pts,ns_deep)) | ||
| ELSE | ||
| ALLOCATE(progs_data%tsoil_deep_gb(1,1)) | ||
| ALLOCATE(progs_data%dtsd_acc_gb(1,1)) | ||
| END IF | ||
| progs_data%dtsd_acc_gb(:,:) = 0.0 | ||
| progs_data%tsoil_deep_gb(:,:) = 0.0 |
PR Summary
#76
Fixing bug in bedrock and adding a geothermal heat flux at bottom
Sci/Tech Reviewer:
Code Reviewer:
(https://github.com/MetOffice/um/issues/127)
Code Quality Checklist
(Some checks are automatically carried out via the CI pipeline)
rose-meta/jules-sharedthen have you supplied a linked UM and LFRic Apps PR?Ive added a UM PR.
Testing
I will add tests when Ive added a few more upates to cover all of them.
trac.log
Security Considerations
Performance Impact
AI Assistance and Attribution
Documentation
Approvals
Please request all relevant approvals. See the CodeOwners.txt file for section owners.
Technical
Scientific
Sci/Tech Review
Please alert the code reviewer via a tag when you have approved the SR
Code Review