Skip to content
Merged
32 changes: 32 additions & 0 deletions doc/source/namelists/jules_surface_types.nml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,30 @@ and removed in the GUI window as described in the table below. To:

Index of C3 irrigated PFT surface type (#303). Can only be used if :nml:mem:`JULES_IRRIG::irrig_option` = 2.

.. nml:member:: c3_crop_wheat

:type: integer
:permitted: :nml:mem:`npft` - :nml:mem:`ncpft` + 1 : :nml:mem:`npft`
:default: -32768

Index of C3 wheat crop PFT surface type (#304). Can only be used if :nml:mem:`ncpft` > 0.

.. nml:member:: c3_crop_soybean

:type: integer
:permitted: :nml:mem:`npft` - :nml:mem:`ncpft` + 1 : :nml:mem:`npft`
:default: -32768

Index of C3 soybean crop PFT surface type (#305). Can only be used if :nml:mem:`ncpft` > 0.

.. nml:member:: c3_crop_rice

:type: integer
:permitted: :nml:mem:`npft` - :nml:mem:`ncpft` + 1 : :nml:mem:`npft`
:default: -32768

Index of C3 rice crop PFT surface type (#306). Can only be used if :nml:mem:`ncpft` > 0.

.. nml:member:: c4_grass

:type: integer
Expand Down Expand Up @@ -322,6 +346,14 @@ and removed in the GUI window as described in the table below. To:

Index of C4 irrigated PFT surface type (#403). Can only be used if :nml:mem:`JULES_IRRIG::irrig_option` = 2.

.. nml:member:: c4_crop_maize

:type: integer
:permitted: :nml:mem:`npft` - :nml:mem:`ncpft` + 1 : :nml:mem:`npft`
:default: -32768

Index of C4 maize crop PFT surface type (#404). Can only be used if :nml:mem:`ncpft` > 0.

.. nml:member:: shrub

:type: integer
Expand Down
48 changes: 46 additions & 2 deletions rose-meta/jules-standalone/HEAD/rose-meta.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4330,6 +4330,36 @@ sort-key=Panel-A3b
type=integer
url=https://metoffice.github.io/jules/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::c3_crop

[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_irrig]
compulsory=true
description=Pseudo level of C3 irrig PFT
Expand All @@ -4355,6 +4385,16 @@ sort-key=Panel-A4b
type=integer
url=https://metoffice.github.io/jules/latest/namelists/jules_surface_types.nml.html#JULES_SURFACE_TYPES::c4_crop

[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_irrig]
compulsory=true
description=Pseudo level of C4 irrig PFT
Expand Down Expand Up @@ -4402,8 +4442,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
44 changes: 44 additions & 0 deletions rose-meta/jules-standalone/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,47 @@ def upgrade(self, config, meta_config=None):

# Bump tag to pick up metadata changes
return config, self.reports


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

BEFORE_TAG = "vn8.2_t155"
AFTER_TAG = "vn8.2_t140"

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

ncpft = self.get_setting_value(
config, ["namelist:jules_surface_types", "ncpft"]
)
if ncpft is not None:
ncpft = int(ncpft)
if ncpft > 0:
msg = (
"This configuration contains crop varieties (ncpft > 0). "
"Previous upgrade macros were incomplete for "
"configurations with crops. Please see "
"https://github.com/MetOffice/jules/issues/136 for "
"guidance."
"\n * jules_surface_types: This macro adds the "
"WSMR crop varieties with an index of 0, rather than "
"assume the surface types present. This namelist will "
"need correcting."
"\n * jules_pftparm: Please ensure parameters are "
"correct as upgrade macros may have assumed the wrong "
"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
6 changes: 5 additions & 1 deletion rose-stem/app/eraint_rfm_2ddata/rose-app.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
meta=jules-standalone/vn8.2_t155
meta=jules-standalone/vn8.2_t140

[command]
default=rose-run jules.exe
Expand Down Expand Up @@ -1026,8 +1026,12 @@ l_urban2t=.false.
brd_leaf_dec=1
brd_leaf_eg_temp=3
brd_leaf_eg_trop=2
!!c3_crop_rice=0
!!c3_crop_soybean=0
!!c3_crop_wheat=0
c3_grass=6
!!c3_irrig=0
!!c4_crop_maize=0
c4_grass=7
!!c4_irrig=0
!!elev_ice=0
Expand Down
20 changes: 10 additions & 10 deletions rose-stem/app/eraint_trip_2ddata/rose-app.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
meta=jules-standalone/vn8.2_t155
meta=jules-standalone/vn8.2_t140

[command]
default=rose-run jules.exe
Expand Down 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
6 changes: 5 additions & 1 deletion rose-stem/app/gswp2_closures/rose-app.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
meta=jules-standalone/vn8.2_t155
meta=jules-standalone/vn8.2_t140

[command]
default=rose-run jules.exe
Expand Down Expand Up @@ -1024,8 +1024,12 @@ l_urban2t=.false.

[namelist:jules_surface_types]
brd_leaf=1
!!c3_crop_rice=0
!!c3_crop_soybean=0
!!c3_crop_wheat=0
c3_grass=3
!!c3_irrig=0
!!c4_crop_maize=0
c4_grass=4
!!c4_irrig=0
!!elev_ice=0
Expand Down
6 changes: 5 additions & 1 deletion rose-stem/app/gswp2_es_1p1/rose-app.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
meta=jules-standalone/vn8.2_t155
meta=jules-standalone/vn8.2_t140

[command]
default=rose-run jules.exe
Expand Down Expand Up @@ -1110,10 +1110,14 @@ brd_leaf_dec=1
brd_leaf_eg_temp=3
brd_leaf_eg_trop=2
c3_crop=7
!!c3_crop_rice=0
!!c3_crop_soybean=0
!!c3_crop_wheat=0
c3_grass=6
!!c3_irrig=0
c3_pasture=8
c4_crop=10
!!c4_crop_maize=0
c4_grass=9
!!c4_irrig=0
c4_pasture=11
Expand Down
6 changes: 5 additions & 1 deletion rose-stem/app/gswp2_euro4/rose-app.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
meta=jules-standalone/vn8.2_t155
meta=jules-standalone/vn8.2_t140

[command]
default=rose-run jules.exe
Expand Down Expand Up @@ -1011,8 +1011,12 @@ l_urban2t=.false.

[namelist:jules_surface_types]
brd_leaf=1
!!c3_crop_rice=0
!!c3_crop_soybean=0
!!c3_crop_wheat=0
c3_grass=3
!!c3_irrig=0
!!c4_crop_maize=0
c4_grass=4
!!c4_irrig=0
!!elev_ice=0
Expand Down
6 changes: 5 additions & 1 deletion rose-stem/app/gswp2_gl4/rose-app.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
meta=jules-standalone/vn8.2_t155
meta=jules-standalone/vn8.2_t140

[command]
default=rose-run jules.exe
Expand Down Expand Up @@ -1011,8 +1011,12 @@ l_urban2t=.false.

[namelist:jules_surface_types]
brd_leaf=1
!!c3_crop_rice=0
!!c3_crop_soybean=0
!!c3_crop_wheat=0
c3_grass=3
!!c3_irrig=0
!!c4_crop_maize=0
c4_grass=4
!!c4_irrig=0
!!elev_ice=0
Expand Down
6 changes: 5 additions & 1 deletion rose-stem/app/gswp2_gl7/rose-app.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
meta=jules-standalone/vn8.2_t155
meta=jules-standalone/vn8.2_t140

[command]
default=rose-run jules.exe
Expand Down Expand Up @@ -1013,8 +1013,12 @@ l_urban2t=.false.

[namelist:jules_surface_types]
brd_leaf=1
!!c3_crop_rice=0
!!c3_crop_soybean=0
!!c3_crop_wheat=0
c3_grass=3
!!c3_irrig=0
!!c4_crop_maize=0
c4_grass=4
!!c4_irrig=0
!!elev_ice=0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
meta=jules-standalone/vn8.2_t155
meta=jules-standalone/vn8.2_t140

[command]
default=rose-run jules.exe
Expand Down Expand Up @@ -1026,8 +1026,12 @@ l_urban2t=.false.

[namelist:jules_surface_types]
brd_leaf=1
!!c3_crop_rice=0
!!c3_crop_soybean=0
!!c3_crop_wheat=0
c3_grass=3
!!c3_irrig=0
!!c4_crop_maize=0
c4_grass=4
!!c4_irrig=0
!!elev_ice=0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
meta=jules-standalone/vn8.2_t155
meta=jules-standalone/vn8.2_t140

[command]
default=rose-run jules.exe
Expand Down Expand Up @@ -1026,8 +1026,12 @@ l_urban2t=.false.

[namelist:jules_surface_types]
brd_leaf=1
!!c3_crop_rice=0
!!c3_crop_soybean=0
!!c3_crop_wheat=0
c3_grass=3
!!c3_irrig=0
!!c4_crop_maize=0
c4_grass=4
!!c4_irrig=0
!!elev_ice=0
Expand Down
6 changes: 5 additions & 1 deletion rose-stem/app/gswp2_rivers/rose-app.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
meta=jules-standalone/vn8.2_t155
meta=jules-standalone/vn8.2_t140

[command]
default=rose-run jules.exe
Expand Down Expand Up @@ -1038,8 +1038,12 @@ l_urban2t=.false.

[namelist:jules_surface_types]
brd_leaf=1
!!c3_crop_rice=0
!!c3_crop_soybean=0
!!c3_crop_wheat=0
c3_grass=3
!!c3_irrig=0
!!c4_crop_maize=0
c4_grass=4
!!c4_irrig=0
!!elev_ice=0
Expand Down
6 changes: 5 additions & 1 deletion rose-stem/app/gswp2_rivers_restart/rose-app.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
meta=jules-standalone/vn8.2_t155
meta=jules-standalone/vn8.2_t140

[command]
default=rose-run jules.exe
Expand Down Expand Up @@ -1040,8 +1040,12 @@ l_urban2t=.false.

[namelist:jules_surface_types]
brd_leaf=1
!!c3_crop_rice=0
!!c3_crop_soybean=0
!!c3_crop_wheat=0
c3_grass=3
!!c3_irrig=0
!!c4_crop_maize=0
c4_grass=4
!!c4_irrig=0
!!elev_ice=0
Expand Down
Loading