Skip to content

61 extracting inferno hardwired flammability params - #145

Open
Eleanor Burke (eleanorgb) wants to merge 34 commits into
MetOffice:mainfrom
eleanorgb:61-extracting-inferno-hardwired-flammability-params
Open

Eleanor Burke (eleanorgb) wants to merge 34 commits into
MetOffice:mainfrom
eleanorgb:61-extracting-inferno-hardwired-flammability-params

Conversation

@eleanorgb

@eleanorgb Eleanor Burke (eleanorgb) commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

PR Summary

issue: [https://github.com//issues/61]

[https://github.com/MetOffice/um/pull/131]

test branch: https://github.com/eleanorgb/jules/tree/test_61-extracting-inferno-hardwired-flammability-params

Sci/Tech Reviewer: chantelleburton
Code Reviewer: Pierre Siddall (@Pierre-siddall)

Code Quality Checklist

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

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

Testing

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

Test Suite Results - jules - inferno/run1

Suite Information

Item Value
Suite Name inferno/run1
Suite User eleanor.burke
Workflow Start 2026-09-15T08:25:17
Groups Run all
Dependency Reference Main Like
jules eleanorgb/jules@test_61-extracting-inferno-hardwired-flammability-params False
SimSys_Scripts MetOffice/SimSys_Scripts@2026.07.1 True

Task Information

✅ succeeded tasks - 676

Test Suite Results - jules - jules-test-maggiehendry-61-extracting-inferno-hardwired-flammability-params/run1

Suite Information

Item Value
Suite Name jules-test-maggiehendry-61-extracting-inferno-hardwired-flammability-params/run1
Suite User margaret.hendry
Workflow Start 2026-09-25T12:18:33
Groups Run all
Dependency Reference Main Like
jules maggiehendry/jules@test-maggiehendry-61-extracting-inferno-hardwired-flammability-params False
SimSys_Scripts MetOffice/SimSys_Scripts@2026.07.1 True

Task Information

✅ succeeded tasks - 676

Security Considerations

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

Performance Impact

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

AI Assistance and Attribution

  • 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

  • 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 cla-required The CLA has not yet been signed by the author of this PR - added by GA 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 Aug 24, 2026

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 restructures JULES fire-related configuration by introducing a dedicated jules_inferno namelist (and module) for INFERNO/TRIFFID fire parameters, while also refactoring several standalone/ancillary routines into proper Fortran modules and tightening some CI/workflow configuration.

Changes:

  • Added jules_inferno_mod and migrated INFERNO/TRIFFID fire switches and parameters (e.g., l_inferno, l_trif_fire, z_burn_max, combustion completeness bounds, and new flammability tunables) out of other modules/namelists.
  • Added a new PFT parameter fireveg_c_to_atmos(_io) and updated TRIFFID to use it for fire carbon-to-atmosphere partitioning.

Comment thread src/control/shared/jules_inferno_mod.F90
Comment thread src/control/shared/jules_inferno_mod.F90 Outdated
Comment thread rose-meta/jules-standalone/versions.py Outdated
Comment thread doc/source/namelists/fire.nml.rst Outdated
Comment thread src/control/shared/jules_inferno_mod.F90

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 81 out of 89 changed files in this pull request and generated 2 comments.

Suppressed comments (7)

src/control/shared/jules_inferno_mod.F90:118

  • errorstatus is not initialised before being passed to ereport in most branches (it is only assigned when ignition_method is invalid). This can cause inconsistent or silent error handling depending on the compiler/runtime state.
    src/control/shared/jules_inferno_mod.F90:129
  • flam_sm_func is used as a selector in calc_flam, but the namelist checker does not validate it. If a user sets an unexpected value, calc_flam can use an uninitialised f_sm_l.
    src/science/fire/inferno/inferno_mod.F90:252
  • l_cf_old_inferno is hard-coded to .TRUE., which means the new jules_inferno namelist parameters (flam_*) are effectively ignored (relative humidity bounds and flam_rain_const are overridden). This defeats the purpose of extracting these parameters for tuning.
    src/science/fire/inferno/inferno_mod.F90:295
  • The new rainfall scaling branch applies EXP(-flam_rain_const * rain_l), but check_jules_inferno requires flam_rain_const <= 0.0. With the leading minus this makes rainfall increase flammability and can overflow. The exponent should be consistent with the sign convention and should use a clearly defined rain unit.
    src/science/fire/inferno/inferno_io_mod.F90:320
  • Fuel normalisation is still hard-coded to 0.02/0.2, so the extracted flam_fuel_low/flam_fuel_up tunables are not actually used.
    rose-meta/jules-standalone/versions.py:99
  • The upgrade macro sets flam_rhum_low/flam_rhum_up to 0.1/0.9, but the model computes relative humidity in percent (0–100) and check_jules_inferno expects 0–100. This would drastically change behaviour for upgraded apps.
        self.add_setting(config, ["namelist:jules_inferno", "flam_rhum_low"], "0.1")
        self.add_setting(config, ["namelist:jules_inferno", "flam_rhum_up"], "0.9")

doc/source/namelists/fire.nml.rst:169

  • The literal word "buggy" in the namelist documentation looks like a placeholder and will ship to users.
buggy

Comment thread src/control/shared/jules_inferno_mod.F90 Outdated
Comment thread src/control/shared/jules_inferno_mod.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 32 out of 34 changed files in this pull request and generated 8 comments.

Suppressed comments (2)

src/control/shared/jules_inferno_mod.F90:479

  • The standalone namelist-open failure message duplicates the same phrase twice, which makes the error noisy and harder to read.
IF ( ERROR /= 0 )                                                              &
  CALL log_fatal("init_inferno", "Error opening namelist file fire.nml " //    &
                 "Error opening namelist file fire.nml " //                    &
                 "(IOSTAT=" // TRIM(to_string(ERROR)) // " IOMSG=" //          &
                 TRIM(iomessage) // ")")

rose-meta/jules-shared/jules-inferno/HEAD/rose-meta.conf:63

  • flam_sm_low is described as a fraction of saturation (0–1) in code/docs, but rose metadata allows up to 10.0 here. This inconsistency can lead to invalid configurations being accepted by rose but rejected at runtime.
url=https://metoffice.github.io/jules/latest/namelists/jules_inferno.nml.html#JULES_INFERNO::flam_rain_const

Comment thread src/control/shared/jules_vegetation_mod.F90
Comment thread src/initialisation/um/read_jules_namelists_mod.F90
Comment thread src/science/fire/inferno_mod.F90 Outdated
Comment thread src/control/shared/jules_soil_biogeochem_mod.F90 Outdated
Comment thread doc/source/namelists/fire.nml.rst Outdated
Comment thread rose-meta/jules-shared/jules-inferno/HEAD/rose-meta.conf
Comment thread src/control/shared/jules_inferno_mod.F90 Outdated
Comment thread src/initialisation/standalone/init.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.

🟡 Changes recommended

There are confirmed functional issues (inverted z_burn_max missing-value check, calc_flam not correctly applying the new rainfall scaling parameter, and rose-stem JSON pointing at a non-existent source path) that would break configurations/builds.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (5)

Previously missed (1) — in code that hasn't changed since the last review.

src/initialisation/standalone/init_inferno_mod.F90:39

  • init_inferno_mod redefines ignition_method option constants locally even though they already exist in jules_inferno_mod. Duplicating these values risks drift if they ever change; import the parameters from jules_inferno_mod instead.

src/science/fire/inferno/inferno_mod.F90:239

  • calc_flam still hardcodes the rainfall scaling via cr=-2.0*s_in_day, which makes the new flam_rain_const argument effectively unused and keeps the historical double conversion behaviour. Removing cr here avoids having an unused/duplicated constant and ensures rainfall scaling is controlled via the namelist parameter.
    doc/source/namelists/fire.nml.rst:201
  • Typo in documentation: "completness" should be "completeness".
   Maximum DPM soil carbon pool combustion completness fraction.

doc/source/namelists/fire.nml.rst:208

  • Typo in documentation: "completness" should be "completeness".
   Minimum RPM soil carbon pool combustion completness fraction.

src/science/fire/inferno/inferno_mod.F90:284

  • flam_rain_const is passed into calc_flam but is not applied in the flammability rainfall term; instead a hardwired constant is used after converting rain to mm/day. This prevents tuning/removing the rainfall dependence via the new namelist and is inconsistent with the new interface.
  • Files reviewed: 33/35 changed files
  • Comments generated: 4
  • Review effort level: Lite

Comment thread src/control/shared/jules_soil_biogeochem_mod.F90 Outdated
Comment thread doc/source/namelists/fire.nml.rst Outdated
Comment thread doc/source/namelists/fire.nml.rst Outdated
Comment thread doc/source/namelists/fire.nml.rst Outdated
@github-actions github-actions Bot removed the cla-modified The CLA has been modified as part of this PR - added by GA label Sep 23, 2026

@maggiehendry Maggie (maggiehendry) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There's a build warning in the release notes as a result of the namelist change. The link no longer exists.

doc/source/release_notes/JULES7-6.rst:26: WARNING: nml:mem reference target not found: JULES_SOIL_BIOGEOCHEM::z_burn_max [ref.mem]

It's usual just to remove the link to keep the backwards compatability rather than repair the link.

- *  Add a burn depth parameter :nml:mem:`JULES_SOIL_BIOGEOCHEM::z_burn_max` for when layered soil carbon is used so that fire only consumes soil carbon from above the burn depth. (#1514)
+ *  Add a burn depth parameter ``JULES_SOIL_BIOGEOCHEM::z_burn_max`` for when layered soil carbon is used so that fire only consumes soil carbon from above the burn depth. (#1514)

Comment thread doc/source/namelists/fire.nml.rst Outdated
Comment thread doc/source/namelists/fire.nml.rst
Comment thread src/control/shared/jules_inferno_mod.F90
Comment thread src/control/shared/jules_inferno_mod.F90
Comment thread src/control/shared/jules_inferno_mod.F90
Comment thread rose-meta/jules-standalone/HEAD/rose-meta.conf Outdated
Comment thread rose-meta/jules-shared/jules-inferno/HEAD/rose-meta.conf Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

vn82_t141, vn82_t155 and vn82_t140 upgrade macros have been deleted.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Still not quite right and after discussion with Eleanor Burke (@eleanorgb) and time constraints I'll either create a bob and retest or commit the fixes back to this branch.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

See last commit of maggiehendry-61-extracting-inferno-hardwired-flammability-params for a change to the upgrade macro. It is also the source file that doesn't exist in the Rivers-standalone. I've used lsm_id instead to indicate Rivers standalone instead of the presence of npft and reordered it so they are both together. jules_inferno still needs to be added as otherwise it gets user ignored in the Rivers-standalone Rose stem tests. This really needs sorting properly by extending the jules-shared framework to the JULES IO namelists to create a rivers-standalone metadata file. Until then though it's a case of ensuring the Rose stem tests aren't broken and the upgrade macro can be run on the coupled_rivers app in the LFric apps repository.

Comment thread rose-meta/jules-standalone/versions.py Outdated
CALL ereport(RoutineName, errorstatus, &
"z_burn_max must be positive & less than 10 meters")
END IF
IF ( ( l_layeredc .AND. l_trif_fire ) .OR. &

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

See comment.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi Eleanor Burke (@eleanorgb), thanks for this change. I only have one small suggestion on this review to improve the control flow of the program by reducing verbosity. If I've missed any context please feel free to let me know other wise, then I'll be happy to approve this and put it through testing.

Comment thread src/control/shared/jules_inferno_mod.F90 Outdated
This is fine. Ive committed.

Co-authored-by: Pierre Siddall <43399998+Pierre-siddall@users.noreply.github.com>
@eleanorgb

Copy link
Copy Markdown
Contributor Author

Hi Eleanor Burke (Eleanor Burke (@eleanorgb)), thanks for this change. I only have one small suggestion on this review to improve the control flow of the program by reducing verbosity. If I've missed any context please feel free to let me know other wise, then I'll be happy to approve this and put it through testing.

ive made this change Pierre Siddall (@Pierre-siddall)

@maggiehendry

Maggie (maggiehendry) commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

NB This PR will need an LFRic apps PR to add the new jules_inferno_mod. I'm currently testing the upgrade macro on the coupled_rivers component. I'm happy to do the LFRic apps PR as I should have picked up on the Rivers-standalone & LFRic apps interaction earlier. The upgrade macro also needs some fixing to make compatible and I'm also providing a fix for this too.

@maggiehendry

Copy link
Copy Markdown
Collaborator

Pierre Siddall (@Pierre-siddall) can I add you as code reviewer please for the linked MetOffice/lfric_apps#819 that adds the new jules_inferno_mod added with this PR. I'm just running the LFRic apps Rose stem test so it is still a draft at the moment.

@maggiehendry Maggie (maggiehendry) left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Will be approved once the changed in the referenced bob are included. Please be aware of the linked MetOffice/lfric_apps#819 required.

There's also an amendment to jules-lfric required in the bob bd6785f:

> rose metadata-check -C rose-meta/jules-lfric/HEAD/
[V] rose.metadata_check.MetadataChecker: issues: 1
    namelist:jules_triffid=fireveg_c_to_atmos_io=None=None
        No metadata entry found

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

See last commit of maggiehendry-61-extracting-inferno-hardwired-flammability-params for a change to the upgrade macro. It is also the source file that doesn't exist in the Rivers-standalone. I've used lsm_id instead to indicate Rivers standalone instead of the presence of npft and reordered it so they are both together. jules_inferno still needs to be added as otherwise it gets user ignored in the Rivers-standalone Rose stem tests. This really needs sorting properly by extending the jules-shared framework to the JULES IO namelists to create a rivers-standalone metadata file. Until then though it's a case of ensuring the Rose stem tests aren't broken and the upgrade macro can be run on the coupled_rivers app in the LFric apps repository.

Comment on lines +114 to +118
! Check a suitable flam_sm_func was given
IF (flam_sm_func /= flam_sm_func_linear .OR. &
flam_sm_func /= flam_sm_func_exponential) THEN
CALL ereport( TRIM(RoutineName), errorstatus, 'flam_sm_func must be 1 or 2')
END IF

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
! Check a suitable flam_sm_func was given
IF (flam_sm_func /= flam_sm_func_linear .OR. &
flam_sm_func /= flam_sm_func_exponential) THEN
CALL ereport( TRIM(RoutineName), errorstatus, 'flam_sm_func must be 1 or 2')
END IF
! Check a suitable flam_sm_func was given
IF ( flam_sm_func /= flam_sm_func_linear .AND. &
flam_sm_func /= flam_sm_func_exponential ) THEN
CALL ereport( TRIM(RoutineName), errorstatus, &
'flam_sm_func must be 1 or 2')
END IF

The logic here is now broken and fails the Rose stem tests. maggiehendry-61-extracting-inferno-hardwired-flammability-params contains the above suggested change and trac.log will be included on the PR summary.

@maggiehendry

Copy link
Copy Markdown
Collaborator

Pierre Siddall (@Pierre-siddall) linked MetOffice/lfric_apps#819 is now ready for review.

@eleanorgb

Eleanor Burke (eleanorgb) commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Oops - I re requested a review from Chantelle when she has already approved. I hope this isnt a problem - Im just waiting for Maggie to approve which she will hopefully do shortly, then I think all is OK?

Pierre Siddall (@Pierre-siddall)

@maggiehendry Maggie (maggiehendry) added Linked Apps This PR is linked to a MetOffice/lfric_apps PR Linked UM This PR is linked to a MetOffice/um PR macro This PR contains a metadata upgrade macro labels Sep 25, 2026
@Pierre-siddall

Copy link
Copy Markdown
Contributor

Pierre Siddall (Pierre Siddall (@Pierre-siddall)) can I add you as code reviewer please for the linked MetOffice/lfric_apps#819 that adds the new jules_inferno_mod added with this PR. I'm just running the LFRic apps Rose stem test so it is still a draft at the moment.

Hi Maggie (@maggiehendry), I'm happy to take a look sorry for not seeing this earlier.

@Pierre-siddall

Pierre Siddall (Pierre-siddall) commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Oops - I re requested a review from Chantelle when she has already approved. I hope this isnt a problem - Im just waiting for Maggie to approve which she will hopefully do shortly, then I think all is OK?

Pierre Siddall (Pierre Siddall (@Pierre-siddall))

Thanks Eleanor Burke (@eleanorgb) for taking a look at the feedback, I'm now happy to approve this :) .

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This now looks good to head into testing to me. Approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Linked Apps This PR is linked to a MetOffice/lfric_apps PR Linked UM This PR is linked to a MetOffice/um PR macro This PR contains a metadata upgrade macro

Projects

None yet

Development

Successfully merging this pull request may close these issues.

extracting inferno hardwired flammability params

6 participants