Skip to content

Bare soil evaporation separated over irrigated and non-irrigated soil #139 - #150

Draft
Nic Gedney (nicgedney) wants to merge 25 commits into
MetOffice:stablefrom
nicgedney:separate_irrigated_bare_soil_evap
Draft

Bare soil evaporation separated over irrigated and non-irrigated soil #139#150
Nic Gedney (nicgedney) wants to merge 25 commits into
MetOffice:stablefrom
nicgedney:separate_irrigated_bare_soil_evap

Conversation

@nicgedney

@nicgedney Nic Gedney (nicgedney) commented Aug 26, 2026

Copy link
Copy Markdown

PR Summary

<-- Bare soil evaporation separated over irrigated and non-irrigated soil #139 -->

Sci/Tech Reviewer: <-- hkatty -->
Code Reviewer:

<-- #139 -->

<-- this allows the irrigated and non-irrigated bare soil evaporation terms to be calculated from the irrigated and non-irrigated soil moisture columns (l_soil_evap_irrig_expl=True) rather than the grid-box mean soil moisture (l_soil_evap_irrig_expl=False) as previously -->

<-- List any linked PRs here
None
-->

<-- List any blocking PRs or issues to be closed here
None
-->

Code Quality Checklist

(Some checks are automatically carried out via the CI pipeline)

  • [Y] I have performed a self-review of my own code
  • [Y] My code follows the project's style guidelines
  • [Y] Comments have been included that aid understanding and enhance the readability of the code
  • [Y] My changes generate no new warnings
  • [N/A] If editing rose-meta/jules-shared then have you supplied a linked UM and LFRic Apps PR?

Testing

  • [Y] I have tested this change locally, using the JULES rose-stem suite
  • [N/A] If shared files have been modified, I have run the UM and LFRic Apps rose stem suites
  • [N/A] If any tests fail (rose-stem or CI) the reason is understood and acceptable (eg. kgo changes)
  • [N/A] I have added tests to cover new functionality as appropriate (eg. system tests, unit tests, etc.)

<-- Other testing performed:
rose-stem test also applied to the test branch test_separate_irrigated_bare_soil_evap
individual point comparison with l_soil_evap_irrig_expl=T compared with stable

  • see the issue for more details.
    -->

trac.log

<--
Development branch:

Test Suite Results -

Test Suite Results - jules - vn8.2_separate_irrigated_bare_soil_evap/run3

Suite Information

Item Value
Suite Name vn8.2_separate_irrigated_bare_soil_evap/run3
Suite User nicola.gedney
Workflow Start 2026-09-01T15:16:41
Groups Run suite_default
Dependency Reference Main Like
jules nicgedney/jules@separate_irrigated_bare_soil_evap False
SimSys_Scripts MetOffice/SimSys_Scripts@2026.07.1 True

Task Information

✅ succeeded tasks - 676

Test branch:

Test Suite Results - jules - vn8.2_test_separate_irrigated_bare_soil_evap/run3

Suite Information

Item Value
Suite Name vn8.2_test_separate_irrigated_bare_soil_evap/run3
Suite User nicola.gedney
Workflow Start 2026-09-01T16:51:46
Groups Run suite_default
Dependency Reference Main Like
jules nicgedney/jules@test_separate_irrigated_bare_soil_evap False
SimSys_Scripts MetOffice/SimSys_Scripts@2026.07.1 True

Task Information

✅ succeeded tasks - 676
-->

Security Considerations

  • [Y] I have reviewed my changes for potential security issues
  • [N/A] Sensitive data is properly handled (if applicable)
  • [N/A] Authentication and authorisation are properly implemented (if applicable)

Performance Impact

  • [Y] Performance of the code has been considered and, if applicable, suitable performance measurements have been conducted

AI Assistance and Attribution

  • [N] Some of the content of this change has been produced with the assistance of Generative AI tool name (e.g., Met Office Github Copilot Enterprise, Github Copilot Personal, ChatGPT GPT-4, etc) and I have followed the Simulation Systems AI policy (including attribution labels)

Documentation

  • [Y* the html builds correctly ] Where appropriate I have updated documentation related to this change and confirmed that it builds correctly

Approvals

Please request all relevant approvals. See the CodeOwners.txt file for section owners.

Technical

  • JULES Code Owner
  • OpenMP
  • River Routing
  • Rose Stem
  • Rose Metadata
  • Upgrade Macros

Scientific

  • [] Surface
  • Hydrology
  • Vegetation
  • Veg3 RED Demography
  • Biogeochemistry
  • Biogenic fluxes
  • Fire
  • Lakes
  • Evaluation
  • Imogen

Sci/Tech Review

  • I understand this area of code and the changes being added
  • The proposed changes correspond to the pull request description
  • Documentation is sufficient (do documentation papers need updating)
  • Sufficient testing has been completed

Please alert the code reviewer via a tag when you have approved the SR

Code Review

  • All dependencies have been resolved
  • Related Issues have been properly linked and addressed
  • CLA compliance has been confirmed
  • Code quality standards have been met
  • Tests are adequate and have passed
  • Documentation is complete and accurate
  • Security considerations have been addressed
  • Performance impact is acceptable

@github-actions github-actions Bot added the cla-required The CLA has not yet been signed by the author of this PR - added by GA label Aug 26, 2026
@nicgedney
Nic Gedney (nicgedney) marked this pull request as draft August 26, 2026 14:40
@nicgedney Nic Gedney (nicgedney) added the enhancement New feature or request label Aug 26, 2026
@nicgedney Nic Gedney (nicgedney) changed the title Separate irrigated bare soil evap Bare soil evaporation separated over irrigated and non-irrigated soil #139 Aug 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

As yet, I only partially understand the science here, but I have made such comments as I can. I would like the logic to be more apparent. I will be happy to look again once these comments have been addressed.

I'm not sure exactly what reviewing role I should be performing here. The PR says that hkatty will do the science review, but approval is also required from the owners of the relevant JULES modules, which approval I can give for the surface module.

Comment thread doc/source/namelists/jules_irrig.nml.rst
No effect.

This must be set to FALSE if :nml:mem:`JULES_IRRIG::irrig_option` = 0.
This must be set to FALSE if :nml:mem:`JULES_IRRIG::irrig_option` = 2.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'm probably going to seem foolish here, but I'm having trouble working out what is going on. My interpretation is that irrig_opt=0 means no irrigation, irrig_opt=1 will mean the current scheme that is currently represented by l_irrig_dmd=.T., and that irrig_opt=2 will be the new scheme. So this says that the option only works with the current scheme, but then I am confused by L2649 in rose-meta/jules-standalone/HEAD/rose-meta.conf where the option is triggered if l_irrig_dmd is .F.
As a cautionary query here, if it's meant to work with l_irrig_dmd=.T., can I check that no modification of src/science/soil/hydrol_jls_mod.F90 is needed because the extraction is already treated properly?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes it's been complicated as Heather has put in a new version of the irrigation code (and so has added irrig_option=2), so at some point l_irrig_dmd will be replaced with irrig_option=1. However this new option only works for l_irrig_dmd=T (soon to be irrig_option=1). As previously hydrol_jls takes the (irrig and grid-box mean) extraction terms and soil moisture and applies the extraction and flows and applies accordingly to the irrigation/non-irrig soil columns. Only the grid box mean water table depth and lateral flows are still calculated based on the grid box mean moisture terms.

Comment thread src/control/shared/jules_irrig_mod.F90
* esoil_surft(l,n)

IF ( l_soil_evap_irrig_expl ) THEN
wt_ext_nir_surft(l,m,n) = wt_ext_surft(l,m,n)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You could use an IF...ELSE...END IF construct here, but I'm not sure whether that's faster than what you have on current machines or not.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I'm leaving that to the UM systems team

Comment thread src/science/surface/sf_evap_jls.F90
Comment thread src/science/surface/sf_flux_mod.F90 Outdated
END DO
!$OMP END DO NOWAIT
END IF
IF (l_soil_evap_irrig_expl) THEN

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I haven't properly understood the relationship between this variable and l_irrig_dmd.. In sf_evap_jls we had a general block of code and another under l_irrig_dmd. Can I just check that everything is consistent here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

l_soil_evap_irrig_expl can only be try is l_irrig_dmd is true. If the former logical is false - ext_nir can be calculated from wt_ext_irr and wt_ext. If logical is true then wt_ext_nir needs to be calculated explicitly and then the grid box mean wt_ext is calculated as a weighted ave of the two columns.
In both calses wt_ext_irr has to be calculated explicitly. Does that make sense?

q1_land(l) = qw_1(i,j)
cosz_gb(l) = cos_zenith_angle(i,j)
fsoil_tot(l) = frac(l,soil)
IF ( l_soil_evap_irrig_expl ) THEN

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This may be a matter of algorithmic convenience, but why are we irrigating the bare-soil tile?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It would happen by default, the extent of which will depends on the irrigation technique/conditions. Crops dont overlap perfectly, vegetation grows etc.

(I've also just noticed that in the code gsoil_under_canopy has been referred to a bare soil conductance under canopy for as long back as I can see).

@JMEdwardsXtr

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new irrigation option to compute bare-soil evaporation explicitly over irrigated vs non‑irrigated fractions (using their separate soil-moisture columns) instead of using the grid-box mean soil moisture. It adds a new namelist switch (l_soil_evap_irrig_expl) and threads the required fraction-specific conductances/extraction terms through the surface physiology/evaporation/resistance code paths, with Rose metadata, upgrade macro, and documentation updates.

Changes:

  • Add l_soil_evap_irrig_expl switch (namelist + validation) to enable explicit irrigated/non‑irrigated bare-soil evaporation.
  • Plumb irrigated/non‑irrigated conductances and extraction fractions through physiol, soil_evap, sf_resist, and call sites.
  • Add Rose metadata + upgrade macro entry and update namelist documentation.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/science/surface/soil_evap_jls.F90 Adds explicit irrigated/non‑irrigated soil evaporation weighting using frac_irr and new nir arrays.
src/science/surface/sf_resist_jls.F90 Updates surface resistance calculation to optionally blend irrigated/non‑irrigated canopy conductances.
src/science/surface/sf_flux_mod.F90 Argument formatting update (no functional change apparent in diff hunk).
src/science/surface/sf_evap_jls.F90 Adds non‑irrigated extraction bookkeeping for explicit irrigated vs non‑irrigated evaporation.
src/science/surface/physiol_jls_mod.F90 Computes/propagates nir conductances and soil-moisture terms; updates soil evaporation call signature.
src/science/surface/jules_ssi_sf_explicit_jls.F90 Updates fcdch call sites to match new sf_resist/conductance arguments.
src/science/surface/jules_land_sf_explicit_jls.F90 Threads new conductance/fraction arguments through land explicit surface coupling.
src/science/surface/fcdch.F90 Extends sf_resist calls/signature to pass irrigated conductance and irrigation fraction.
src/control/shared/jules_irrig_mod.F90 Adds l_soil_evap_irrig_expl switch, namelist entry, and validation.
rose-meta/jules-standalone/versions.py Adds a Rose upgrade macro to populate the new namelist member.
rose-meta/jules-standalone/HEAD/rose-meta.conf Adds Rose metadata entry for the new namelist member.
doc/source/namelists/jules_irrig.nml.rst Documents the new l_soil_evap_irrig_expl namelist option.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/control/shared/jules_irrig_mod.F90 Outdated
Comment thread src/science/surface/physiol_jls_mod.F90
Comment thread src/science/surface/physiol_jls_mod.F90
Comment thread doc/source/namelists/jules_irrig.nml.rst
Comment thread rose-meta/jules-standalone/versions.py
Comment thread src/control/shared/jules_irrig_mod.F90 Outdated
Comment thread src/science/surface/jules_land_sf_explicit_jls.F90 Outdated
Comment thread src/science/surface/sf_evap_jls.F90 Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Suppressed comments (3)

src/science/surface/physiol_jls_mod.F90:843

  • This loop nests an inner IF ( l_irrig_dmd ) inside an outer IF ( l_irrig_dmd ), and repeats sthu_nir_soilt = sthu_soilt twice. This is redundant and makes the logic harder to follow; it can be simplified to a single conditional on frac_irr_soilt.
        sthu_nir_soilt(l,m,k) = sthu_soilt(l,m,k)
        IF ( l_irrig_dmd ) THEN
          sthu_nir_soilt(l,m,k) = sthu_soilt(l,m,k)
          IF ( frac_irr_soilt(l,m) < 1.0 ) THEN
            sthu_nir_soilt(l,m,k) =                                            &

rose-meta/jules-standalone/versions.py:51

  • This upgrade macro still has template placeholders in the class name and docstring (vnYY_txxxx / "by Author"). Please rename the class to match the tag (and remove placeholder text) to be consistent with the existing rose upgrade macros.
class vnYY_txxxx(MacroUpgrade):

    """Upgrade macro from JULES by Author"""

src/science/surface/jules_land_sf_explicit_jls.F90:1256

  • There is a commented-out argument ("not needed?") in the call argument list. Please remove it to avoid ambiguity about the actual calling interface.
  gs_irr_surft, smc_irr_soilt, wt_ext_irr_surft, gc_irr_surft,                 &
  gs_nir_surft,                                                                &
!!  not needed? gc_nir_surft,                                                  &

Comment on lines 2252 to +2256
!$OMP PARALLEL IF(l_do_omp) DEFAULT(NONE) PRIVATE(l,m,n) SHARED(dzsoil, &
!$OMP fsoil_tot, land_pts, smc_irr_soilt, sthu_irr_soilt,nsoilt, &
!$OMP smvcst_soilt, gs_irr_surft,gc_irr_surft, nsurft,l_do_omp)
!$OMP fsoil_tot, land_pts, smc_irr_soilt, sthu_irr_soilt, nsoilt, &
!$OMP smc_nir_soilt, smc_soilt, sthu_nir_soilt, &
!$OMP smvcst_soilt, gs_irr_surft, gc_irr_surft, nsurft, l_do_omp, &
!$OMP fsoil_irr_tot, fsoil_nir_tot, frac_irr_soilt, &
Comment on lines +143 to +146
!$OMP END DO NOWAIT
END IF
IF (l_soil_evap_irrig_expl) THEN
!$OMP DO SCHEDULE(STATIC)
Comment thread src/science/surface/jules_land_sf_explicit_jls.F90
Comment thread src/science/surface/physiol_jls_mod.F90 Outdated
@github-actions github-actions Bot added cla-signed The CLA has been signed as part of this PR - added by GA and removed cla-required The CLA has not yet been signed by the author of this PR - added by GA labels Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The CLA has been signed as part of this PR - added by GA enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bare soil evaporation separated over irrigated and non-irrigated soil

6 participants