Skip to content

61 extracting inferno hardwired flammability params - #145

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

61 extracting inferno hardwired flammability params#145
Eleanor Burke (eleanorgb) wants to merge 14 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

[#61 ]

Sci/Tech Reviewer:
Code Reviewer:

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.)

trac.log

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 the cla-required The CLA has not yet been signed by the author of this PR - added by GA label Aug 24, 2026
@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 Aug 26, 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.
  • Refactored fire weather index and multiple standalone/imogen routines into module form; updated metadata/docs and hardened GitHub Actions workflows.

Reviewed changes

Copilot reviewed 81 out of 89 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/util/logging_mod.F90 Uses intrinsic ISO_FORTRAN_ENV import form for output/error units.
src/science/vegetation/veg-veg2a_jls_mod.F90 Switches l_inferno/l_trif_fire imports to jules_inferno_mod.
src/science/vegetation/triffid_jls.F90 Replaces hard-coded fire emission fraction with per-PFT fireveg_c_to_atmos.
src/science/vegetation/sow_mod.F90 Wraps sow subroutine in a Fortran module.
src/science/vegetation/soilcarb_layers_jls_mod.F90 Moves fire burn/completeness params to jules_inferno_mod.
src/science/vegetation/soilcarb_jls.F90 Moves fire burn/completeness params to jules_inferno_mod.
src/science/vegetation/partition_mod.F90 Wraps partition subroutine in a Fortran module.
src/science/vegetation/emerge_mod.F90 Wraps emerge subroutine in a Fortran module.
src/science/vegetation/develop_mod.F90 Wraps develop subroutine in a Fortran module.
src/science/vegetation/crop_mod.F90 Updates crop code to USE newly modularised sow/emerge/develop/partition routines.
src/science/params/pftparm_mod.F90 Adds fireveg_c_to_atmos parameter allocation/IO/validation/printing.
src/science/params/pftparm_io_mod.F90 Adds fireveg_c_to_atmos_io namelist plumbing into PFT parameter IO.
src/science/fire/inferno/inferno_mod.F90 Adds new flammability arguments (RH/SM/rain function) and uses jules_inferno_mod ignition inputs.
src/science/fire/inferno/inferno_io_mod.F90 Plumbs jules_inferno_mod flammability params into INFERNO IO call path.
src/science/fire/fire_weather_index/nesterov_mod.F90 Adds new Nesterov index module implementation.
src/science/fire/fire_weather_index/mcarthur_mod.F90 Adds new McArthur FFDI module implementation.
src/science/fire/fire_weather_index/fire_timestep_mod.F90 Adds timestep manager module for daily fire weather index updates.
src/science/fire/fire_weather_index/fire_mod.F90 Renames switch to l_fire_weather_index.
src/science/fire/fire_weather_index/fire_init.F90 Updates init logic to use l_fire_weather_index.
src/science/fire/fire_weather_index/fire_calc_daily.F90 Adds daily calculation module orchestrating McArthur/Canadian/Nesterov models.
src/science/fire/fire_weather_index/fire_allocate.F90 Adds allocation/init module for fire weather index structures.
src/science/fire/fire_weather_index/canadian_mod.F90 Adds Canadian FWI model module implementation.
src/io/dump/required_vars_for_configuration_mod.F90 Updates required-vars logic to l_fire_weather_index.
src/initialisation/um/read_jules_namelists_mod.F90 Adds UM-side reader for jules_inferno namelist.
src/initialisation/standalone/init_vegetation.F90 Removes INFERNO option logging from vegetation init (moved to inferno init).
src/initialisation/standalone/init_vars_tmp_mod.F90 Wraps temporary init routine in a module (standalone build).
src/initialisation/standalone/init_urban_mod.F90 Wraps init_urban in a module (standalone build).
src/initialisation/standalone/init_prescribed_data_mod.F90 Wraps prescribed data init in a module (standalone build).
src/initialisation/standalone/init_mod.F90 Calls new init_inferno and renames fire init call to fire weather index init.
src/initialisation/standalone/init_jules_sf_diags_mod.F90 Imports l_inferno from jules_inferno_mod.
src/initialisation/standalone/init_irrigation_mod.F90 Wraps irrigation init in a module (standalone build).
src/initialisation/standalone/init_inferno_mod.F90 Adds standalone inferno initialisation and logging.
src/initialisation/standalone/init_imogen_mod.F90 Wraps imogen init in a module and adds imogen_check import.
src/initialisation/standalone/init_fire_weather_index_mod.F90 Renames/rewrites standalone fire init into init_fire_weather_index_mod.
src/initialisation/shared/check_compatible_options_mod.F90 Moves z_burn_max/inferno switches to jules_inferno_mod.
src/control/um/diagnostics_hyd.F90 Imports l_inferno from jules_inferno_mod.
src/control/standalone/standalone_control_mod.F90 Wraps standalone control routine in a module and renames entrypoint.
src/control/standalone/jules.F90 Uses standalone_control module procedure; adds imogen update module imports.
src/control/shared/surf_couple_extra_mod.F90 Switches l_inferno and fire weather index flag imports to new modules/flags.
src/control/shared/jules_vegetation_mod.F90 Removes INFERNO-related switches/namelist entries from vegetation module.
src/control/shared/jules_soil_biogeochem_mod.F90 Removes z_burn_max from soil biogeochem namelist; validates via inferno module.
src/control/shared/jules_inferno_mod.F90 New module defining inferno switches/params + namelist read/print/check routines.
src/control/rivers-standalone/rivers_control_mod.F90 Renames rivers standalone control module/subroutine to avoid generic control.
src/control/rivers-standalone/river.F90 Updates driver to call rivers_control.
src/control/imogen/rndm_mod.F90 Wraps rndm in a module for explicit USE.
src/control/imogen/response_mod.F90 Wraps response in a module for explicit USE.
src/control/imogen/radf_non_co2_mod.F90 Wraps non-CO2 radiative forcing routine in a module.
src/control/imogen/radf_co2_mod.F90 Wraps CO2 radiative forcing routine in a module.
src/control/imogen/radf_ch4_mod.F90 Wraps CH4 forcing routines in a module and cleans some locals.
src/control/imogen/pattern_scaling_mod.F90 Wraps pattern scaling in a module.
src/control/imogen/ocean_co2_mod.F90 Wraps ocean CO2 in a module and updates dependency import.
src/control/imogen/invert_mod.F90 Wraps invert in a module for explicit USE.
src/control/imogen/imogen_update_clim_mod.F90 Wraps update clim in a module and adds explicit module dependencies.
src/control/imogen/imogen_update_carb_mod.F90 Wraps update carb in a module and adds explicit module dependencies.
src/control/imogen/imogen_check_mod.F90 Wraps imogen_check in a module for explicit USE.
src/control/imogen/drdat_mod.F90 Wraps drdat in a module for explicit USE.
src/control/imogen/diffcarb_land_co2_mod.F90 Wraps diffcarb land CO2 in a module for explicit USE.
src/control/imogen/diffcarb_land_ch4_mod.F90 Wraps diffcarb land CH4 in a module for explicit USE.
src/control/imogen/diff_atmos_ch4_mod.F90 Wraps diff atmos CH4 in a module and fixes END/subroutine closure.
src/control/imogen/delta_temp_mod.F90 Wraps delta temp in a module and adds explicit dependency import.
src/control/imogen/day_calc_mod.F90 Wraps day calc in a module and adds explicit rndm import.
src/control/imogen/clim_calc_mod.F90 Wraps clim calc in a module and tightens ainfo intent.
rose-stem/app/fab_jules/bin/intel_rivers.json Updates rivers build list to new fire weather index fire_mod path.
rose-stem/app/fab_jules/bin/gfortran_10_plus_rivers.json Updates rivers build list to new fire weather index fire_mod path.
rose-meta/jules-um/HEAD/rose-meta.conf Imports shared inferno metadata; adds trigger for new PFT param.
rose-meta/jules-standalone/versions.py Adds upgrade macro vn8.2→vn8.2_t61 to migrate settings to new namelists/params.
rose-meta/jules-standalone/HEAD/rose-meta.conf Imports shared inferno metadata; replaces old fire_switches metadata with jules_fire_weather_index.
rose-meta/jules-shared/jules-vegetation/HEAD/rose-meta.conf Removes vegetation-level inferno/trif_fire entries (now in inferno metadata).
rose-meta/jules-shared/jules-pftparm/HEAD/rose-meta.conf Adds metadata for fireveg_c_to_atmos_io.
rose-meta/jules-shared/jules-model-environment/HEAD/rose-meta.conf Adds trigger for fireveg_c_to_atmos_io.
rose-meta/jules-shared/jules-inferno/HEAD/rose-meta.conf New shared metadata section defining jules_inferno namelist.
rose-meta/jules-lfric/HEAD/rose-meta.conf Adds placeholder for fireveg_c_to_atmos_io in LFRic metadata.
etc/fcm-make/make.cfg Simplifies explicit dependency configuration for standalone jules.F90.
etc/fcm-make/make-river.cfg Updates prescribed init filename and fire fire_mod path for rivers build.
etc/fcm-make/compiler/cray_12_plus.cfg Updates compiler override path for renamed prescribed init module file.
doc/source/namelists/pft_params.nml.rst Documents new fireveg_c_to_atmos namelist member.
doc/source/namelists/jules_vegetation.nml.rst Removes inferno-related members from vegetation namelist docs.
doc/source/namelists/jules_soil_biogeochem.nml.rst Removes z_burn_max docs from soil biogeochem namelist docs.
doc/source/namelists/fire.nml.rst Updates docs to include JULES_FIRE_WEATHER_INDEX and JULES_INFERNO namelists.
doc/pyproject.toml Adds project URLs metadata for documentation build project.
CONTRIBUTORS.md Adds contributor entry for eleanorgb.
.github/zizmor.yml Adds zizmor linter config with targeted rule ignores.
.github/workflows/user-guide.yaml Hardens workflow (pinned actions, safer env usage, reduced caching/credentials).
.github/workflows/umdp3_fixer.yaml Pins reusable workflow revision and sets minimal permissions.
.github/workflows/trigger-project-workflow.yaml Pins reusable workflow revision, tightens permissions, adds repo guard.
.github/workflows/track-review-project.yaml Pins reusable workflow revision, tightens permissions, adds explicit secret mapping.
.github/workflows/cla-check.yaml Adds concurrency controls, minimal permissions, pins reusable workflow revision.
.github/workflows/check-cr-approved.yaml Pins reusable workflow revision and tightens permissions.
.github/pull_request_template.md Improves template formatting and fixes typos (e.g., “understanding”, “Biogeochemistry”).
Suppressed comments (5)

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

  • l_cf_old_inferno is hard-coded to .TRUE., which forces the legacy RH/rain behaviour and makes the newly-plumbed flam_* namelist parameters effectively unused.
    src/science/fire/inferno/inferno_mod.F90:295
  • The new rain-suppression branch uses EXP(-flam_rain_const * rain_l). With flam_rain_const constrained to be <= 0.0 in check_jules_inferno, this makes flammability increase with rain (wrong sign).
    src/control/shared/jules_inferno_mod.F90:126
  • This ereport call reports the wrong routine name (check_jules_vegetation), which makes errors harder to trace; also errorstatus doesn't need resetting here if it's initialised once.
    src/control/shared/jules_inferno_mod.F90:179
  • Allowing flam_fuel_up == flam_fuel_low will later cause a division-by-zero when normalising fuel availability. This check should require a strictly greater upper bound.
    src/science/fire/inferno/inferno_io_mod.F90:320
  • Fuel normalisation still uses hard-coded thresholds (0.02/0.2), so the new flam_fuel_low/flam_fuel_up namelist settings are ignored.

💡 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_inferno_mod.F90
Comment thread src/control/shared/jules_inferno_mod.F90
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 on lines +124 to +126
errorstatus = 101
CALL ereport("check_jules_vegetation", errorstatus, &
'ignition_method must be 1, 2 or 3')
Comment on lines +177 to +179
ELSE IF ( flam_fuel_up < flam_fuel_low ) THEN
CALL ereport( TRIM(RoutineName), errorstatus, &
"flam_fuel_up must be >= flam_fuel_low")
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants