Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
| yaswant | Yaswant Pradhan | Met Office | 2026-06-30 |
| doucla | Douglas Clark | UKCEH | 2026-07-03 |
| james-bruten-mo | James Bruten | Met Office | 2026-07-09 |
| maggiehendry | Maggie Hendry | Met Office | 2026-08-19 |
40 changes: 40 additions & 0 deletions rose-meta/jules-shared/jules-surface-types/HEAD/rose-meta.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,36 @@ sort-key=Panel-A1a
type=integer
url=https://metoffice.github.io/jules/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::brd_leaf

[namelist:jules_surface_types=c3_crop_rice]
compulsory=true
description=Pseudo level of C3 rice crop PFT
fail-if=this > namelist:jules_surface_types=npft; # Pseudo level must be less than or equal to npft
=this <= (namelist:jules_surface_types=npft - namelist:jules_surface_types=ncpft); # Crop PFTs must be grouped together after natural PFTs
range=1:
sort-key=Panel-A4a
type=integer
url=https://metoffice.github.io/jules/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::c3_crop_rice

[namelist:jules_surface_types=c3_crop_soybean]
compulsory=true
description=Pseudo level of C3 soybean crop PFT
fail-if=this > namelist:jules_surface_types=npft; # Pseudo level must be less than or equal to npft
=this <= (namelist:jules_surface_types=npft - namelist:jules_surface_types=ncpft); # Crop PFTs must be grouped together after natural PFTs
range=1:
sort-key=Panel-A4a
type=integer
url=https://metoffice.github.io/jules/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::c3_crop_soybean

[namelist:jules_surface_types=c3_crop_wheat]
compulsory=true
description=Pseudo level of C3 wheat crop PFT
fail-if=this > namelist:jules_surface_types=npft; # Pseudo level must be less than or equal to npft
=this <= (namelist:jules_surface_types=npft - namelist:jules_surface_types=ncpft); # Crop PFTs must be grouped together after natural PFTs
range=1:
sort-key=Panel-A4a
type=integer
url=https://metoffice.github.io/jules/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::c3_crop_wheat

[namelist:jules_surface_types=c3_grass]
description=Pseudo level of C3 grass PFT
fail-if=this > namelist:jules_surface_types=npft; # Pseudo level must be less than or equal to npft
Expand All @@ -21,6 +51,16 @@ sort-key=Panel-A3a
type=integer
url=https://metoffice.github.io/jules/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::c3_grass

[namelist:jules_surface_types=c4_crop_maize]
compulsory=true
description=Pseudo level of C4 maize crop PFT
fail-if=this > namelist:jules_surface_types=npft; # Pseudo level must be less than or equal to npft
=this <= (namelist:jules_surface_types=npft - namelist:jules_surface_types=ncpft); # Crop PFTs must be grouped together after natural PFTs
range=1:
sort-key=Panel-A4a
type=integer
url=https://metoffice.github.io/jules/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::c4_crop_maize

[namelist:jules_surface_types=c4_grass]
description=Pseudo level of C4 grass PFT
fail-if=this > namelist:jules_surface_types=npft; # Pseudo level must be less than or equal to npft
Expand Down
8 changes: 6 additions & 2 deletions rose-meta/jules-standalone/HEAD/rose-meta.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5857,8 +5857,12 @@ fail-if=this > namelist:jules_surface_types=npft; # Number of crop PFTs must be
range=0:
sort-key=Panel-A0c
trigger=namelist:jules_vegetation=l_prescsow: this > 0;
= namelist:jules_crop_props: this > 0;
= namelist:jules_cropparm: this > 0;
=namelist:jules_crop_props: this > 0;
=namelist:jules_cropparm: this > 0;
=namelist:jules_surface_types=c3_crop_wheat: this > 0;
=namelist:jules_surface_types=c3_crop_soybean: this > 0;
=namelist:jules_surface_types=c4_crop_maize: this > 0;
=namelist:jules_surface_types=c3_crop_rice: this > 0;
type=integer
url=https://metoffice.github.io/jules/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::ncpft

Expand Down
42 changes: 36 additions & 6 deletions rose-meta/jules-standalone/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,45 @@
from .version81_82 import *


class vnYY_txxxx(MacroUpgrade):
class vn82_t136(MacroUpgrade):
"""Upgrade macro from JULES by Maggie Hendry"""

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

BEFORE_TAG = "vnY.Y"
AFTER_TAG = "vnY.Y_txxxx"
BEFORE_TAG = "vn8.2"
AFTER_TAG = "vn8.2_t136"

def upgrade(self, config, meta_config=None):
"""Upgrade a JULES runtime app configuration."""

# Add settings
ncpft = self.get_setting_value(
config, ["namelist:jules_surface_types", "ncpft"]
)
if ncpft is not None:
ncpft = int(ncpft)
if ncpft > 0:
msg = (
f"This configuration contains crop varieties (ncpft > 0). "
f"Previous upgrade macros were incomplete for "
f"configurations with crops. Please see "
f"https://github.com/MetOffice/jules/issues/136 for "
f"guidance."
f"\n * jules_surface_types: This macro adds the "
f"WSMR crop varieties with an index of 0, rather than "
f"assume the surface types present. This namelist will "
f"need correcting."
f"\n * jules_pftparm: Please ensure parameters are "
f"correct as upgrade macros may have assumed the wrong "
f"surface types."
)
self.add_report(info=msg, is_warning=True)

jules_surface_types = {}
jules_surface_types["c3_crop_wheat"] = "0"
jules_surface_types["c3_crop_soybean"] = "0"
jules_surface_types["c4_crop_maize"] = "0"
jules_surface_types["c3_crop_rice"] = "0"
for item, value in jules_surface_types.items():
self.add_setting(
config, ["namelist:jules_surface_types", item], value
)

return config, self.reports
18 changes: 9 additions & 9 deletions rose-stem/app/eraint_trip_2ddata/rose-app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1022,24 +1022,24 @@ l_urban2t=.false.
!!srf_ex_cnv_gust=0

[namelist:jules_surface_types]
brd_leaf_dec=1
brd_leaf_eg_temp=3
brd_leaf_eg_trop=2
c3_grass=6
brd_leaf=1
c3_crop_rice=9
c3_crop_soybean=7
c3_crop_wheat=6
c3_grass=3
!!c3_irrig=0
c4_grass=7
c4_crop_maize=8
c4_grass=4
!!c4_irrig=0
!!elev_ice=0
!!elev_rock=0
ice=13
lake=11
ncpft=4
ndl_leaf_dec=4
ndl_leaf_eg=5
ndl_leaf=2
nnvg=4
npft=9
shrub_dec=8
shrub_eg=9
shrub=5
soil=12
urban=10
!!urban_canyon=0
Expand Down
18 changes: 9 additions & 9 deletions rose-stem/app/loobos_crm1_traitF/rose-app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1020,24 +1020,24 @@ l_urban2t=.false.
!!srf_ex_cnv_gust=0

[namelist:jules_surface_types]
brd_leaf_dec=1
brd_leaf_eg_temp=3
brd_leaf_eg_trop=2
c3_grass=6
brd_leaf=1
c3_crop_rice=9
c3_crop_soybean=7
c3_crop_wheat=6
c3_grass=3
!!c3_irrig=0
c4_grass=7
c4_crop_maize=8
c4_grass=4
!!c4_irrig=0
!!elev_ice=0
!!elev_rock=0
ice=13
lake=11
ncpft=4
ndl_leaf_dec=4
ndl_leaf_eg=5
ndl_leaf=2
nnvg=4
npft=9
shrub_dec=8
shrub_eg=9
shrub=5
soil=12
urban=10
!!urban_canyon=0
Expand Down
18 changes: 9 additions & 9 deletions rose-stem/app/loobos_crm4_traitF/rose-app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1020,24 +1020,24 @@ l_urban2t=.false.
!!srf_ex_cnv_gust=0

[namelist:jules_surface_types]
brd_leaf_dec=1
brd_leaf_eg_temp=3
brd_leaf_eg_trop=2
c3_grass=6
brd_leaf=1
c3_crop_rice=9
c3_crop_soybean=7
c3_crop_wheat=6
c3_grass=3
!!c3_irrig=0
c4_grass=7
c4_crop_maize=8
c4_grass=4
!!c4_irrig=0
!!elev_ice=0
!!elev_rock=0
ice=13
lake=11
ncpft=4
ndl_leaf_dec=4
ndl_leaf_eg=5
ndl_leaf=2
nnvg=4
npft=9
shrub_dec=8
shrub_eg=9
shrub=5
soil=12
urban=10
!!urban_canyon=0
Expand Down
18 changes: 9 additions & 9 deletions rose-stem/app/loobos_crm5_traitF/rose-app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1020,24 +1020,24 @@ l_urban2t=.false.
!!srf_ex_cnv_gust=0

[namelist:jules_surface_types]
brd_leaf_dec=1
brd_leaf_eg_temp=3
brd_leaf_eg_trop=2
c3_grass=6
brd_leaf=1
c3_crop_rice=9
c3_crop_soybean=7
c3_crop_wheat=6
c3_grass=3
!!c3_irrig=0
c4_grass=7
c4_crop_maize=8
c4_grass=4
!!c4_irrig=0
!!elev_ice=0
!!elev_rock=0
ice=13
lake=11
ncpft=4
ndl_leaf_dec=4
ndl_leaf_eg=5
ndl_leaf=2
nnvg=4
npft=9
shrub_dec=8
shrub_eg=9
shrub=5
soil=12
urban=10
!!urban_canyon=0
Expand Down
18 changes: 9 additions & 9 deletions rose-stem/app/loobos_crm6_traitF/rose-app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1020,24 +1020,24 @@ l_urban2t=.false.
!!srf_ex_cnv_gust=0

[namelist:jules_surface_types]
brd_leaf_dec=1
brd_leaf_eg_temp=3
brd_leaf_eg_trop=2
c3_grass=6
brd_leaf=1
c3_crop_rice=9
c3_crop_soybean=7
c3_crop_wheat=6
c3_grass=3
!!c3_irrig=0
c4_grass=7
c4_crop_maize=8
c4_grass=4
!!c4_irrig=0
!!elev_ice=0
!!elev_rock=0
ice=13
lake=11
ncpft=4
ndl_leaf_dec=4
ndl_leaf_eg=5
ndl_leaf=2
nnvg=4
npft=9
shrub_dec=8
shrub_eg=9
shrub=5
soil=12
urban=10
!!urban_canyon=0
Expand Down
18 changes: 9 additions & 9 deletions rose-stem/app/loobos_crm6_traitF_srfT/rose-app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1020,24 +1020,24 @@ l_urban2t=.false.
!!srf_ex_cnv_gust=0

[namelist:jules_surface_types]
brd_leaf_dec=1
brd_leaf_eg_temp=3
brd_leaf_eg_trop=2
c3_grass=6
brd_leaf=1
c3_crop_rice=9
c3_crop_soybean=7
c3_crop_wheat=6
c3_grass=3
!!c3_irrig=0
c4_grass=7
c4_crop_maize=8
c4_grass=4
!!c4_irrig=0
!!elev_ice=0
!!elev_rock=0
ice=13
lake=11
ncpft=4
ndl_leaf_dec=4
ndl_leaf_eg=5
ndl_leaf=2
nnvg=4
npft=9
shrub_dec=8
shrub_eg=9
shrub=5
soil=12
urban=10
!!urban_canyon=0
Expand Down
18 changes: 9 additions & 9 deletions rose-stem/app/loobos_crm6_traitT/rose-app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1022,24 +1022,24 @@ l_urban2t=.false.
!!srf_ex_cnv_gust=0

[namelist:jules_surface_types]
brd_leaf_dec=1
brd_leaf_eg_temp=3
brd_leaf_eg_trop=2
c3_grass=6
brd_leaf=1
c3_crop_rice=9
c3_crop_soybean=7
c3_crop_wheat=6
c3_grass=3
!!c3_irrig=0
c4_grass=7
c4_crop_maize=8
c4_grass=4
!!c4_irrig=0
!!elev_ice=0
!!elev_rock=0
ice=13
lake=11
ncpft=4
ndl_leaf_dec=4
ndl_leaf_eg=5
ndl_leaf=2
nnvg=4
npft=9
shrub_dec=8
shrub_eg=9
shrub=5
soil=12
urban=10
!!urban_canyon=0
Expand Down
Loading