61 extracting inferno hardwired flammability params - #145
61 extracting inferno hardwired flammability params#145Eleanor Burke (eleanorgb) wants to merge 14 commits into
Conversation
Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com> Co-authored-by: Pierre Siddall <43399998+Pierre-siddall@users.noreply.github.com>
…init_fire renamed init_fire_weather_index.
There was a problem hiding this comment.
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_modand 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_infernois hard-coded to.TRUE., which forces the legacy RH/rain behaviour and makes the newly-plumbedflam_*namelist parameters effectively unused.
src/science/fire/inferno/inferno_mod.F90:295- The new rain-suppression branch uses
EXP(-flam_rain_const * rain_l). Withflam_rain_constconstrained to be <= 0.0 incheck_jules_inferno, this makes flammability increase with rain (wrong sign).
src/control/shared/jules_inferno_mod.F90:126 - This
ereportcall reports the wrong routine name (check_jules_vegetation), which makes errors harder to trace; alsoerrorstatusdoesn't need resetting here if it's initialised once.
src/control/shared/jules_inferno_mod.F90:179 - Allowing
flam_fuel_up == flam_fuel_lowwill 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_upnamelist settings are ignored.
💡 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 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
errorstatusis not initialised before being passed toereportin most branches (it is only assigned whenignition_methodis invalid). This can cause inconsistent or silent error handling depending on the compiler/runtime state.
src/control/shared/jules_inferno_mod.F90:129flam_sm_funcis used as a selector incalc_flam, but the namelist checker does not validate it. If a user sets an unexpected value,calc_flamcan use an uninitialisedf_sm_l.
src/science/fire/inferno/inferno_mod.F90:252l_cf_old_infernois hard-coded to.TRUE., which means the newjules_infernonamelist parameters (flam_*) are effectively ignored (relative humidity bounds andflam_rain_constare 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), butcheck_jules_infernorequiresflam_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_uptunables are not actually used.
rose-meta/jules-standalone/versions.py:99 - The upgrade macro sets
flam_rhum_low/flam_rhum_upto 0.1/0.9, but the model computes relative humidity in percent (0–100) andcheck_jules_infernoexpects 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
| errorstatus = 101 | ||
| CALL ereport("check_jules_vegetation", errorstatus, & | ||
| 'ignition_method must be 1, 2 or 3') |
| ELSE IF ( flam_fuel_up < flam_fuel_low ) THEN | ||
| CALL ereport( TRIM(RoutineName), errorstatus, & | ||
| "flam_fuel_up must be >= flam_fuel_low") |
PR Summary
[#61 ]
Sci/Tech Reviewer:
Code Reviewer:
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?Testing
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