diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index db1cc110..e61b5880 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -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 | diff --git a/rose-meta/jules-shared/jules-surface-types/HEAD/rose-meta.conf b/rose-meta/jules-shared/jules-surface-types/HEAD/rose-meta.conf index 12fcace2..429d98e9 100644 --- a/rose-meta/jules-shared/jules-surface-types/HEAD/rose-meta.conf +++ b/rose-meta/jules-shared/jules-surface-types/HEAD/rose-meta.conf @@ -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 @@ -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 diff --git a/rose-meta/jules-standalone/HEAD/rose-meta.conf b/rose-meta/jules-standalone/HEAD/rose-meta.conf index e30a27c5..7173f084 100644 --- a/rose-meta/jules-standalone/HEAD/rose-meta.conf +++ b/rose-meta/jules-standalone/HEAD/rose-meta.conf @@ -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 diff --git a/rose-meta/jules-standalone/versions.py b/rose-meta/jules-standalone/versions.py index 1d4c41a9..f1f7d3d0 100644 --- a/rose-meta/jules-standalone/versions.py +++ b/rose-meta/jules-standalone/versions.py @@ -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 diff --git a/rose-stem/app/eraint_trip_2ddata/rose-app.conf b/rose-stem/app/eraint_trip_2ddata/rose-app.conf index d537d871..18f07fd1 100644 --- a/rose-stem/app/eraint_trip_2ddata/rose-app.conf +++ b/rose-stem/app/eraint_trip_2ddata/rose-app.conf @@ -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 diff --git a/rose-stem/app/loobos_crm1_traitF/rose-app.conf b/rose-stem/app/loobos_crm1_traitF/rose-app.conf index e0c28f7e..c76ddbad 100644 --- a/rose-stem/app/loobos_crm1_traitF/rose-app.conf +++ b/rose-stem/app/loobos_crm1_traitF/rose-app.conf @@ -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 diff --git a/rose-stem/app/loobos_crm4_traitF/rose-app.conf b/rose-stem/app/loobos_crm4_traitF/rose-app.conf index e6b05a7d..12f28a8e 100644 --- a/rose-stem/app/loobos_crm4_traitF/rose-app.conf +++ b/rose-stem/app/loobos_crm4_traitF/rose-app.conf @@ -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 diff --git a/rose-stem/app/loobos_crm5_traitF/rose-app.conf b/rose-stem/app/loobos_crm5_traitF/rose-app.conf index 23273644..224d773e 100644 --- a/rose-stem/app/loobos_crm5_traitF/rose-app.conf +++ b/rose-stem/app/loobos_crm5_traitF/rose-app.conf @@ -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 diff --git a/rose-stem/app/loobos_crm6_traitF/rose-app.conf b/rose-stem/app/loobos_crm6_traitF/rose-app.conf index 4fcb54c2..041be1be 100644 --- a/rose-stem/app/loobos_crm6_traitF/rose-app.conf +++ b/rose-stem/app/loobos_crm6_traitF/rose-app.conf @@ -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 diff --git a/rose-stem/app/loobos_crm6_traitF_srfT/rose-app.conf b/rose-stem/app/loobos_crm6_traitF_srfT/rose-app.conf index 48323ad8..051ae7d1 100644 --- a/rose-stem/app/loobos_crm6_traitF_srfT/rose-app.conf +++ b/rose-stem/app/loobos_crm6_traitF_srfT/rose-app.conf @@ -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 diff --git a/rose-stem/app/loobos_crm6_traitT/rose-app.conf b/rose-stem/app/loobos_crm6_traitT/rose-app.conf index beb71ec4..c5e4d5ca 100644 --- a/rose-stem/app/loobos_crm6_traitT/rose-app.conf +++ b/rose-stem/app/loobos_crm6_traitT/rose-app.conf @@ -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 diff --git a/rose-stem/app/loobos_crops/rose-app.conf b/rose-stem/app/loobos_crops/rose-app.conf index a2f18178..6e1f21fd 100644 --- a/rose-stem/app/loobos_crops/rose-app.conf +++ b/rose-stem/app/loobos_crops/rose-app.conf @@ -1,4 +1,4 @@ -meta=jules-standalone/vn8.2 +meta=jules-standalone/vn8.2_t136 [command] default=rose-run jules.exe @@ -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 diff --git a/rose-stem/app/loobos_irrig/rose-app.conf b/rose-stem/app/loobos_irrig/rose-app.conf index e75eb7ce..9cb33c5e 100644 --- a/rose-stem/app/loobos_irrig/rose-app.conf +++ b/rose-stem/app/loobos_irrig/rose-app.conf @@ -1021,24 +1021,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 diff --git a/rose-stem/app/loobos_irrig_nirrtile/rose-app.conf b/rose-stem/app/loobos_irrig_nirrtile/rose-app.conf index 261f3ba8..bce44ede 100644 --- a/rose-stem/app/loobos_irrig_nirrtile/rose-app.conf +++ b/rose-stem/app/loobos_irrig_nirrtile/rose-app.conf @@ -1021,24 +1021,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 diff --git a/rose-stem/app/loobos_prescribe_sthuf/rose-app.conf b/rose-stem/app/loobos_prescribe_sthuf/rose-app.conf index e7be79d5..c8a71fe9 100644 --- a/rose-stem/app/loobos_prescribe_sthuf/rose-app.conf +++ b/rose-stem/app/loobos_prescribe_sthuf/rose-app.conf @@ -1046,24 +1046,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 diff --git a/src/control/shared/jules_surface_types_mod.F90 b/src/control/shared/jules_surface_types_mod.F90 index 19192d29..ff495918 100644 --- a/src/control/shared/jules_surface_types_mod.F90 +++ b/src/control/shared/jules_surface_types_mod.F90 @@ -81,6 +81,12 @@ MODULE jules_surface_types_mod ! Index of surface type 'C3 grass' c3_crop = imdi, & ! Index of surface type 'C3 crop' + c3_crop_wheat = imdi, & + ! Index of surface type 'C3 wheat crop' + c3_crop_soybean = imdi, & + ! Index of surface type 'C3 soybean crop' + c3_crop_rice = imdi, & + ! Index of surface type 'C3 rice crop' c3_pasture = imdi, & ! Index of surface type 'C3 pasture' c3_irrig = imdi, & @@ -93,6 +99,8 @@ MODULE jules_surface_types_mod ! Index of surface type 'C4 pasture' c4_irrig = imdi, & ! Index of surface type 'C4 irrig' + c4_crop_maize = imdi, & + ! Index of surface type 'C4 maize crop' shrub = imdi, & ! Index of surface type 'shrub' shrub_dec = imdi, & @@ -114,6 +122,7 @@ MODULE jules_surface_types_mod npft, ncpft, nnvg, brd_leaf, brd_leaf_dec, brd_leaf_eg_trop, & brd_leaf_eg_temp, ndl_leaf, ndl_leaf_dec, ndl_leaf_eg, c3_grass, & c3_crop, c3_pasture, c3_irrig, c4_grass, c4_crop, c4_pasture, c4_irrig, & + c3_crop_wheat, c3_crop_soybean, c4_crop_maize, c3_crop_rice, & shrub, shrub_dec, shrub_eg, urban, urban_canyon, urban_roof, lake, soil, & ice, elev_ice, elev_rock, usr_type, tile_map_ids @@ -126,7 +135,7 @@ SUBROUTINE check_jules_surface_types() USE max_dimensions, ONLY: npft_max, ncpft_max, nnvg_max USE ereport_mod, ONLY: ereport -USE jules_print_mgr, ONLY: jules_print, jules_message +USE jules_print_mgr, ONLY: jules_print, jules_message, newline !----------------------------------------------------------------------------- ! Description: @@ -213,6 +222,14 @@ SUBROUTINE check_jules_surface_types() RoutineName, errorstatus, nchecks ) CALL check_surface_type_value ( c4_irrig, "c4_irrig", 1, npft, & RoutineName, errorstatus, nchecks ) +CALL check_surface_type_value ( c3_crop_wheat, "c3_crop_wheat", nnpft + 1, & + npft, RoutineName, errorstatus, nchecks ) +CALL check_surface_type_value ( c3_crop_soybean, "c3_crop_soybean", nnpft + 1, & + npft, RoutineName, errorstatus, nchecks ) +CALL check_surface_type_value ( c4_crop_maize, "c4_crop_maize", nnpft + 1, & + npft, RoutineName, errorstatus, nchecks ) +CALL check_surface_type_value ( c3_crop_rice, "c3_crop_rice", nnpft + 1, & + npft, RoutineName, errorstatus, nchecks ) CALL check_surface_type_value ( shrub, "shrub", 1, npft, & RoutineName, errorstatus, nchecks ) CALL check_surface_type_value ( shrub_dec, "shrub_dec", 1, npft, & @@ -253,10 +270,15 @@ SUBROUTINE check_jules_surface_types() ! This check should also ensure that a check is added for each new surface type IF ( nchecks /= ntype ) THEN errorstatus = 101 - CALL jules_print(RoutineName, & - "At least one surface type in namelist does not have a range check.") WRITE(jules_message,'(A,I0,A,I0)') & - "These should be the same; ntype = ", ntype, ", nchecks = ", nchecks + "The number of surface types present in namelist is either not " // & + "consistent with the number expected (ntype) or" // newline // & + " the number of checks completed (nchecks); ntype = ", ntype, & + ", nchecks = ", nchecks + CALL jules_print(RoutineName, jules_message) + WRITE(jules_message,'(A)') & + "This could indicate that the surface configuration is incorrect or a " //& + "new surface type does not have a range check." CALL jules_print(RoutineName, jules_message) END IF @@ -278,12 +300,12 @@ SUBROUTINE check_surface_type_value ( surface_type, surface_type_name, & INTEGER :: surface_type, min_value, max_value, errorstatus, nchecks CHARACTER(LEN=*) :: surface_type_name, RoutineName -IF ( surface_type > 0 ) THEN +IF ( surface_type > -1 ) THEN nchecks = nchecks + 1 IF ( surface_type < min_value .OR. surface_type > max_value ) THEN errorstatus = 101 CALL jules_print(RoutineName, & - TRIM(surface_type_name) // " tile is given but is out of range") + TRIM(surface_type_name) // " tile is present but is out of range") END IF END IF @@ -308,130 +330,147 @@ SUBROUTINE print_nlist_jules_surface_types() WRITE(lineBuffer, *) ' npft = ', npft CALL jules_print('jules_surface_types', lineBuffer) +WRITE(lineBuffer, *) ' ncpft = ', ncpft +CALL jules_print('jules_surface_types', lineBuffer) + WRITE(lineBuffer, *) ' nnvg = ', nnvg CALL jules_print('jules_surface_types', lineBuffer) -IF ( brd_leaf > 0 ) THEN +IF ( brd_leaf > -1 ) THEN WRITE(lineBuffer, *) ' brd_leaf = ', brd_leaf CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( brd_leaf_dec > 0 ) THEN +IF ( brd_leaf_dec > -1 ) THEN WRITE(lineBuffer, *) ' brd_leaf_dec = ', brd_leaf_dec CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( brd_leaf_eg_trop > 0 ) THEN +IF ( brd_leaf_eg_trop > -1 ) THEN WRITE(lineBuffer, *) ' brd_leaf_eg_trop = ', brd_leaf_eg_trop CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( brd_leaf_eg_temp > 0 ) THEN +IF ( brd_leaf_eg_temp > -1 ) THEN WRITE(lineBuffer, *) ' brd_leaf_eg_temp = ', brd_leaf_eg_temp CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( ndl_leaf > 0 ) THEN +IF ( ndl_leaf > -1 ) THEN WRITE(lineBuffer, *) ' ndl_leaf = ', ndl_leaf CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( ndl_leaf_dec > 0 ) THEN +IF ( ndl_leaf_dec > -1 ) THEN WRITE(lineBuffer, *) ' ndl_leaf_dec = ', ndl_leaf_dec CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( ndl_leaf_eg > 0 ) THEN +IF ( ndl_leaf_eg > -1 ) THEN WRITE(lineBuffer, *) ' ndl_leaf_eg = ', ndl_leaf_eg CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( c3_grass > 0 ) THEN +IF ( c3_grass > -1 ) THEN WRITE(lineBuffer, *) ' c3_grass = ', c3_grass CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( c3_crop > 0 ) THEN +IF ( c3_crop > -1 ) THEN WRITE(lineBuffer, *) ' c3_crop = ', c3_crop CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( c3_pasture > 0 ) THEN +IF ( c3_pasture > -1 ) THEN WRITE(lineBuffer, *) ' c3_pasture = ', c3_pasture CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( c3_irrig > 0 ) THEN +IF ( c3_irrig > -1 ) THEN WRITE(lineBuffer, *) ' c3_irrig = ', c3_irrig CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( c4_grass > 0 ) THEN +IF ( c4_grass > -1 ) THEN WRITE(lineBuffer, *) ' c4_grass = ', c4_grass CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( c4_crop > 0 ) THEN +IF ( c4_crop > -1 ) THEN WRITE(lineBuffer, *) ' c4_crop = ', c4_crop CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( c4_pasture > 0 ) THEN +IF ( c4_pasture > -1 ) THEN WRITE(lineBuffer, *) ' c4_pasture = ', c4_pasture CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( c4_irrig > 0 ) THEN +IF ( c4_irrig > -1 ) THEN WRITE(lineBuffer, *) ' c4_irrig = ', c4_irrig CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( shrub > 0 ) THEN +IF ( ncpft > 0 ) THEN + WRITE(lineBuffer, *) ' c3_crop_wheat = ', c3_crop_wheat + CALL jules_print('jules_surface_types', lineBuffer) + + WRITE(lineBuffer, *) ' c3_crop_soybean = ', c3_crop_soybean + CALL jules_print('jules_surface_types', lineBuffer) + + WRITE(lineBuffer, *) ' c4_crop_maize = ', c4_crop_maize + CALL jules_print('jules_surface_types', lineBuffer) + + WRITE(lineBuffer, *) ' c3_crop_rice = ', c3_crop_rice + CALL jules_print('jules_surface_types', lineBuffer) +END IF + +IF ( shrub > -1 ) THEN WRITE(lineBuffer, *) ' shrub = ', shrub CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( shrub_dec > 0 ) THEN +IF ( shrub_dec > -1 ) THEN WRITE(lineBuffer, *) ' shrub_dec = ', shrub_dec CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( shrub_eg > 0 ) THEN +IF ( shrub_eg > -1 ) THEN WRITE(lineBuffer, *) ' shrub_eg = ', shrub_eg CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( urban > 0 ) THEN +IF ( urban > -1 ) THEN WRITE(lineBuffer, *) ' urban = ', urban CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( lake > 0 ) THEN +IF ( lake > -1 ) THEN WRITE(lineBuffer, *) ' lake = ', lake CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( soil > 0 ) THEN +IF ( soil > -1 ) THEN WRITE(lineBuffer, *) ' soil = ', soil CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( ice > 0 ) THEN +IF ( ice > -1 ) THEN WRITE(lineBuffer, *) ' ice = ', ice CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( urban_canyon > 0 ) THEN +IF ( urban_canyon > -1 ) THEN WRITE(lineBuffer, *) ' urban_canyon = ', urban_canyon CALL jules_print('jules_surface_types', lineBuffer) END IF -IF ( urban_roof > 0 ) THEN +IF ( urban_roof > -1 ) THEN WRITE(lineBuffer, *) ' urban_roof = ', urban_roof CALL jules_print('jules_surface_types', lineBuffer) END IF -n = COUNT( elev_ice(1:nnvg) > 0 ) +n = COUNT( elev_ice(1:nnvg) > -1 ) IF ( n > 0 ) THEN DO i = 1, n WRITE(lineBuffer, *) ' elev_ice(', i, ') = ', elev_ice(i) @@ -439,7 +478,7 @@ SUBROUTINE print_nlist_jules_surface_types() END DO END IF -n = COUNT( elev_rock(1:nnvg) > 0 ) +n = COUNT( elev_rock(1:nnvg) > -1 ) IF ( n > 0 ) THEN DO i = 1, n WRITE(lineBuffer, *) ' elev_rock(', i, ') = ', elev_rock(i) @@ -447,7 +486,7 @@ SUBROUTINE print_nlist_jules_surface_types() END DO END IF -n = COUNT( usr_type(1:ntype) > 0 ) +n = COUNT( usr_type(1:ntype) > -1 ) IF ( n > 0 ) THEN WRITE(lineBuffer, *) ' usr_type = ', usr_type(1:n) CALL jules_print('jules_surface_types', lineBuffer) @@ -492,7 +531,7 @@ SUBROUTINE read_nml_jules_surface_types (unitnumber) ! set number of each type of variable in my_namelist type INTEGER, PARAMETER :: no_of_types = 1 -INTEGER, PARAMETER :: n_int = 27 + (2 * ntype_max) + (2 * elev_tile_max) +INTEGER, PARAMETER :: n_int = 31 + (2 * ntype_max) + (2 * elev_tile_max) TYPE :: my_namelist SEQUENCE @@ -514,6 +553,10 @@ SUBROUTINE read_nml_jules_surface_types (unitnumber) INTEGER :: c4_crop INTEGER :: c4_pasture INTEGER :: c4_irrig + INTEGER :: c3_crop_wheat + INTEGER :: c3_crop_soybean + INTEGER :: c4_crop_maize + INTEGER :: c3_crop_rice INTEGER :: shrub INTEGER :: shrub_dec INTEGER :: shrub_eg @@ -561,6 +604,10 @@ SUBROUTINE read_nml_jules_surface_types (unitnumber) my_nml % c4_crop = c4_crop my_nml % c4_pasture = c4_pasture my_nml % c4_irrig = c4_irrig + my_nml % c3_crop_wheat = c3_crop_wheat + my_nml % c3_crop_soybean = c3_crop_soybean + my_nml % c4_crop_maize = c4_crop_maize + my_nml % c3_crop_rice = c3_crop_rice my_nml % shrub = shrub my_nml % shrub_dec = shrub_dec my_nml % shrub_eg = shrub_eg @@ -598,6 +645,10 @@ SUBROUTINE read_nml_jules_surface_types (unitnumber) c4_crop = my_nml % c4_crop c4_pasture = my_nml % c4_pasture c4_irrig = my_nml % c4_irrig + c3_crop_wheat = my_nml % c3_crop_wheat + c3_crop_soybean = my_nml % c3_crop_soybean + c4_crop_maize = my_nml % c4_crop_maize + c3_crop_rice = my_nml % c3_crop_rice shrub = my_nml % shrub shrub_dec = my_nml % shrub_dec shrub_eg = my_nml % shrub_eg diff --git a/src/control/shared/land_tile_ids_mod.F90 b/src/control/shared/land_tile_ids_mod.F90 index 0c83574c..3c4070e0 100644 --- a/src/control/shared/land_tile_ids_mod.F90 +++ b/src/control/shared/land_tile_ids_mod.F90 @@ -40,10 +40,14 @@ MODULE land_tile_ids_mod ! 301 - C3 Crop ! 302 - C3 Pasture ! 303 - C3 Irrig +! 304 - C3 Crop wheat +! 305 - C3 Crop soybean +! 306 - C3 Crop rice ! 4 - C4 Grass ! 401 - C4 Crop ! 402 - C4 Pasture ! 403 - C4 Irrig +! 404 - C4 Crop maize ! 5 - Shrub ! 501 - Shrub deciduous ! 502 - Shrub evergreen @@ -85,6 +89,12 @@ MODULE land_tile_ids_mod ! ID number of surface type 'C3 Pasture' ,id_C3irrig = 303 & ! ID number of surface type 'C3 Irrig' + ,id_C3crop_wheat = 304 & + ! ID number of surface type 'C3 Crop wheat' + ,id_C3crop_soybean = 305 & + ! ID number of surface type 'C3 Crop soybean' + ,id_C3crop_rice = 306 & + ! ID number of surface type 'C3 Crop rice' ,id_C4grass = 4 & ! ID number of surface type 'C4 Grass' ,id_C4crop = 401 & @@ -93,6 +103,8 @@ MODULE land_tile_ids_mod ! ID number of surface type 'C4 Pasture' ,id_C4irrig = 403 & ! ID number of surface type 'C4 Irrig' + ,id_C4crop_maize = 404 & + ! ID number of surface type 'C4 Crop maize' ,id_shrub = 5 & ! ID number of surface type 'Shrub' ,id_shrub_dec = 501 & @@ -166,10 +178,14 @@ SUBROUTINE set_surface_type_ids ( ) ndl_leaf_eg, & c3_grass, & c3_crop, & + c3_crop_wheat, & + c3_crop_soybean, & + c3_crop_rice, & c3_pasture, & c3_irrig, & c4_grass, & c4_crop, & + c4_crop_maize, & c4_pasture, & c4_irrig, & shrub, & @@ -221,6 +237,12 @@ SUBROUTINE set_surface_type_ids ( ) surface_type_ids(c3_grass ) = id_c3grass IF (c3_crop > 0) & surface_type_ids(c3_crop ) = id_c3crop +IF (c3_crop_wheat > 0) & + surface_type_ids(c3_crop_wheat ) = id_c3crop_wheat +IF (c3_crop_soybean > 0) & + surface_type_ids(c3_crop_soybean ) = id_c3crop_soybean +IF (c3_crop_rice > 0) & + surface_type_ids(c3_crop_rice ) = id_c3crop_rice IF (c3_pasture > 0) & surface_type_ids(c3_pasture ) = id_c3pasture IF (c3_irrig > 0) & @@ -229,6 +251,8 @@ SUBROUTINE set_surface_type_ids ( ) surface_type_ids(c4_grass ) = id_c4grass IF (c4_crop > 0) & surface_type_ids(c4_crop ) = id_c4crop +IF (c4_crop_maize > 0) & + surface_type_ids(c4_crop_maize ) = id_c4crop_maize IF (c4_pasture > 0) & surface_type_ids(c4_pasture ) = id_c4pasture IF (c4_irrig > 0) &