From 28d07aa4bdc894094d1d2889b0203866cc8553fa Mon Sep 17 00:00:00 2001 From: Dan Copsey Date: Mon, 9 Feb 2026 14:03:24 +0000 Subject: [PATCH 01/21] rsync in FCM version of this branch --- .../lfric_atm/example/configuration.nml | 1 + .../lfric_atm/metadata/field_def_diags.xml | 1 + .../lfric_coupled/example/configuration.nml | 1 + dependencies.sh | 4 +- .../coupler_update_prognostics_mod.X90 | 7 ++ .../coupled_interface/source/coupler_mod.F90 | 4 + interfaces/jules_interface/build/extract.cfg | 1 + .../rose-meta/jules-lfric/versions.py | 10 ++ .../jules-hydrology/HEAD/rose-meta.conf | 7 ++ .../source/algorithm/jules_extra_alg_mod.x90 | 6 + .../source/kernel/jules_extra_kernel_mod.F90 | 16 ++- .../source/support/jules_physics_init_mod.f90 | 4 +- rose-stem/app/lfric_coupled/file/mydef.xml | 2 + rose-stem/app/lfric_coupled/file/namcouple | 113 ++++++++++-------- rose-stem/app/lfric_coupled/rose-app.conf | 2 +- .../lfric_coupled_atmosphere/rose-app.conf | 1 + .../app/lfric_coupled_rivers/rose-app.conf | 8 +- .../driver/create_physics_prognostics_mod.F90 | 2 + .../gungho/source/driver/gungho_model_mod.F90 | 4 +- 19 files changed, 129 insertions(+), 65 deletions(-) diff --git a/applications/lfric_atm/example/configuration.nml b/applications/lfric_atm/example/configuration.nml index 5301f68ed..4b57429da 100644 --- a/applications/lfric_atm/example/configuration.nml +++ b/applications/lfric_atm/example/configuration.nml @@ -334,6 +334,7 @@ write_minmax_tseries=.false., &jules_hydrology l_var_rainfrac=.true., l_hydrology=.true., +l_inland=.false., / &jules_nvegparm albsnc_nvg_io=0.4,0.8,0.8,0.8, diff --git a/applications/lfric_atm/metadata/field_def_diags.xml b/applications/lfric_atm/metadata/field_def_diags.xml index 007ee86df..addc3e144 100644 --- a/applications/lfric_atm/metadata/field_def_diags.xml +++ b/applications/lfric_atm/metadata/field_def_diags.xml @@ -583,6 +583,7 @@ + diff --git a/applications/lfric_coupled/example/configuration.nml b/applications/lfric_coupled/example/configuration.nml index 643f92211..6ee10e470 100644 --- a/applications/lfric_coupled/example/configuration.nml +++ b/applications/lfric_coupled/example/configuration.nml @@ -166,6 +166,7 @@ write_minmax_tseries=.false., / &jules_hydrology l_hydrology=.true., +l_inland=.false., l_var_rainfrac=.false. / &jules_nvegparm diff --git a/dependencies.sh b/dependencies.sh index 20df3ddc2..ceea954de 100644 --- a/dependencies.sh +++ b/dependencies.sh @@ -25,8 +25,8 @@ export lfric_core_rev=54094 export lfric_core_sources= export casim_rev=apps2.2 export casim_sources= -export jules_rev=31238 -export jules_sources= +export jules_rev=git_migration +export jules_sources=fcm:jules.xm_br/dev/dancopsey/git_migration_inland_flow@31411 export socrates_rev=1869 export socrates_sources= export ukca_rev=7497 diff --git a/interfaces/coupled_interface/source/algorithm/coupler_update_prognostics_mod.X90 b/interfaces/coupled_interface/source/algorithm/coupler_update_prognostics_mod.X90 index 8a5a0425d..3f61d4107 100644 --- a/interfaces/coupled_interface/source/algorithm/coupler_update_prognostics_mod.X90 +++ b/interfaces/coupled_interface/source/algorithm/coupler_update_prognostics_mod.X90 @@ -154,6 +154,13 @@ module coupler_update_prognostics_mod 'Ocean surface v from coupler', fld ) call depository%get_field('sea_v_current', fld_ptr1) call invoke(setval_x(fld_ptr1, fld)) + case ("lf_inland_flow") + call log_field_minmax( LOG_LEVEL_DEBUG, & + 'Inland basin flow from coupler', fld) + call depository%get_field('inland_basin_flow', fld_ptr1) + call invoke(setval_X( fld_ptr1, fld )) + fld_ptr1 => null() + case default write(log_scratch_space, '(3A)' ) & "PROBLEM coupler_update_prognostics variable ", & diff --git a/interfaces/coupled_interface/source/coupler_mod.F90 b/interfaces/coupled_interface/source/coupler_mod.F90 index 6791d3a78..b75cdc651 100644 --- a/interfaces/coupled_interface/source/coupler_mod.F90 +++ b/interfaces/coupled_interface/source/coupler_mod.F90 @@ -296,6 +296,10 @@ subroutine create_coupling_fields( mesh, & call add_cpl_field(depository, prognostic_fields, & 'lf_svnocean', vector_space, checkpoint_restart_flag) + ! From TRIP river model + call add_cpl_field(depository, prognostic_fields, & + 'lf_inland_flow', vector_space, checkpoint_restart_flag) + end subroutine create_coupling_fields diff --git a/interfaces/jules_interface/build/extract.cfg b/interfaces/jules_interface/build/extract.cfg index 40f73b6ca..7fdab77ac 100644 --- a/interfaces/jules_interface/build/extract.cfg +++ b/interfaces/jules_interface/build/extract.cfg @@ -81,6 +81,7 @@ extract.path-incl[jules] = src/control/shared/wtrac_extra_mod.F90 \ src/initialisation/shared/calc_urban_aero_fields_mod.F90 \ src/initialisation/shared/check_compatible_options_mod.F90 \ + src/initialisation/shared/check_compatible_options_rivers_mod.F90 \ src/initialisation/shared/freeze_soil.F90 \ src/initialisation/shared/wtrac_check_options_mod.F90 \ src/params/cable/cable_maths_constants_mod.F90 \ diff --git a/interfaces/jules_interface/rose-meta/jules-lfric/versions.py b/interfaces/jules_interface/rose-meta/jules-lfric/versions.py index dba019499..7f3f0d377 100644 --- a/interfaces/jules_interface/rose-meta/jules-lfric/versions.py +++ b/interfaces/jules_interface/rose-meta/jules-lfric/versions.py @@ -17,6 +17,16 @@ def __repr__(self): __str__ = __repr__ +class vn21_t148(MacroUpgrade): + # Upgrade macro for #148 by Dan Copsey + + BEFORE_TAG = "vn2.1" + AFTER_TAG = "vn2.1_t148" + + def upgrade(self, config, meta_config=None): + # Add settings + self.add_setting(config, ["namelist:jules_hydrology", "l_inland"], ".false.") + return config, self.reports """ Copy this template and complete to add your macro diff --git a/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-hydrology/HEAD/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-hydrology/HEAD/rose-meta.conf index 782d74687..adc9d7ced 100644 --- a/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-hydrology/HEAD/rose-meta.conf +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-hydrology/HEAD/rose-meta.conf @@ -17,6 +17,13 @@ trigger=namelist:jules_hydrology=l_var_rainfrac: .true.; type=logical url=http://jules-lsm.github.io/latest/namelists/jules_hydrology.nml.html#JULES_HYDROLOGY::l_hydrology +[namelist:jules_hydrology=l_inland] +compulsory=true +description=Apply inland basin water correction to soil moisture +sort-key=Panel-G06 +type=logical +url=http://jules-lsm.github.io/latest/namelists/jules_hydrology.nml.html#JULES_HYDROLOGY::l_inland + [namelist:jules_hydrology=l_var_rainfrac] compulsory=true description=Enable variable large scale and convective rain fractions diff --git a/interfaces/jules_interface/source/algorithm/jules_extra_alg_mod.x90 b/interfaces/jules_interface/source/algorithm/jules_extra_alg_mod.x90 index 3ee3d7829..ceb9c4364 100644 --- a/interfaces/jules_interface/source/algorithm/jules_extra_alg_mod.x90 +++ b/interfaces/jules_interface/source/algorithm/jules_extra_alg_mod.x90 @@ -91,6 +91,7 @@ contains type( field_type ), pointer :: snowice_melt => null() type( field_type ), pointer :: snowice_sublimation => null() type( field_type ), pointer :: urbztm => null() + type( field_type ), pointer :: inland_basin_flow => null() ! Sea ice fields type( field_type ), pointer :: sea_ice_thickness => null() @@ -170,6 +171,7 @@ contains call surface_fields%get_field('snowice_melt', snowice_melt) call surface_fields%get_field('snowice_sublimation', snowice_sublimation) call surface_fields%get_field('urbztm', urbztm) + call surface_fields%get_field('inland_basin_flow', inland_basin_flow) ! Sea ice fields call surface_fields%get_field('sea_ice_thickness', sea_ice_thickness) @@ -246,6 +248,7 @@ contains mean_topog_index, a_sat_frac, c_sat_frac, & a_wet_frac, c_wet_frac, tile_temperature, & net_prim_prod, snowice_sublimation, surf_heat_flux, & + inland_basin_flow, & canopy_evap, water_extraction, & thermal_cond_wet_soil, urbztm, & soil_temperature, soil_moisture, & @@ -297,6 +300,9 @@ contains sea_ice_pensolar, melt_pond_fraction, & melt_pond_depth) + ! Output extra coupling diagnostics + call inland_basin_flow%write_field('surface__inland_basin_flow') + end if end subroutine jules_extra_alg diff --git a/interfaces/jules_interface/source/kernel/jules_extra_kernel_mod.F90 b/interfaces/jules_interface/source/kernel/jules_extra_kernel_mod.F90 index 14885cc8b..171092e90 100644 --- a/interfaces/jules_interface/source/kernel/jules_extra_kernel_mod.F90 +++ b/interfaces/jules_interface/source/kernel/jules_extra_kernel_mod.F90 @@ -32,7 +32,7 @@ module jules_extra_kernel_mod !> type, public, extends(kernel_type) :: jules_extra_kernel_type private - type(arg_type) :: meta_args(58) = (/ & + type(arg_type) :: meta_args(59) = (/ & arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1), & ! ls_rain arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1), & ! conv_rain arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1), & ! ls_snow @@ -62,6 +62,7 @@ module jules_extra_kernel_mod arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1), & ! net_prim_prod arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_2), & ! snowice_sublimation arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_2), & ! surf_heat_flux + arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1), & ! inland_basin_flow arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_2), & ! canopy_evap arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_4), & ! water_extraction arg_type(GH_FIELD, GH_REAL, GH_READ, ANY_DISCONTINUOUS_SPACE_1), & ! thermal_cond_wet_soil @@ -137,6 +138,7 @@ module jules_extra_kernel_mod !> @param[in] net_prim_prod Net Primary Productivity (kg m-2 s-1) !> @param[in] snowice_sublimation Sublimation of snow and ice (kg m-2 s-1) !> @param[in] surf_heat_flux Surface heat flux (W m-2) + !> @param[in] inland_basin_flow Inland flow of water from rivers to soil (kg m-2 s-1) !> @param[in] canopy_evap Canopy evaporation from land tiles (kg m-2 s-1) !> @param[in] water_extraction Extraction of water from each soil layer (kg m-2 s-1) !> @param[in] thermal_cond_wet_soil Thermal conductivity of soil (W m-1 K-1) @@ -212,6 +214,7 @@ subroutine jules_extra_code( & net_prim_prod, & snowice_sublimation, & surf_heat_flux, & + inland_basin_flow, & canopy_evap, & water_extraction, & thermal_cond_wet_soil, & @@ -421,6 +424,7 @@ subroutine jules_extra_code( & real(kind=r_def), intent(in) :: net_prim_prod(undf_2d) real(kind=r_def), intent(in) :: thermal_cond_wet_soil(undf_2d) real(kind=r_def), intent(in) :: urbztm(undf_2d) + real(kind=r_def), intent(in) :: inland_basin_flow(undf_2d) real(kind=r_def), intent(inout) :: canopy_water(undf_tile) real(kind=r_def), intent(inout) :: tile_snow_mass(undf_tile) @@ -902,6 +906,7 @@ subroutine jules_extra_code( & allocate(fsat_soilt(land_pts, nsoilt)) allocate(zw_soilt(land_pts, nsoilt)) allocate(sthzw_soilt(land_pts, nsoilt)) + allocate(inlandout_atm_gb(land_pts)) do l = 1, land_pts ! Soil saturated fraction fsat_soilt(l,1) = real(soil_sat_frac(map_2d(1,ainfo%land_index(l))), r_um) @@ -909,6 +914,8 @@ subroutine jules_extra_code( & zw_soilt(l,1) = real(water_table(map_2d(1,ainfo%land_index(l))), r_um) ! Soil wetness below soil column sthzw_soilt(l,1) = real(wetness_under_soil(map_2d(1,ainfo%land_index(l))), r_um) + ! Inland basin flow + inlandout_atm_gb(l) = real(inland_basin_flow(map_2d(1,ainfo%land_index(l))), r_um) end do !---------------------------------------------------------------------------- @@ -929,7 +936,6 @@ subroutine jules_extra_code( & allocate(dhf_surf_minus_soil(land_pts)) allocate(tot_surf_runoff(land_pts)) allocate(tot_sub_runoff(land_pts)) - allocate(inlandout_atm_gb(land_pts)) call surf_couple_extra( & !Driving data and associated INTENT(IN) @@ -1049,8 +1055,10 @@ subroutine jules_extra_code( & ! Wetness below soil column wetness_under_soil(map_2d(1,ainfo%land_index(l))) = real(sthzw_soilt(l,1), r_def) ! River runoffs - surface_runoff(map_2d(1,ainfo%land_index(l))) = real(fluxes%surf_roff_gb(l), r_def) - sub_surface_runoff(map_2d(1,ainfo%land_index(l))) = real(fluxes%sub_surf_roff_gb(l), r_def) + surface_runoff(map_2d(1,ainfo%land_index(l))) = real(fluxes%surf_roff_gb(l), r_def) * & + flandg(ainfo%land_index(l), 1) + sub_surface_runoff(map_2d(1,ainfo%land_index(l))) = real(fluxes%sub_surf_roff_gb(l), r_def) * & + flandg(ainfo%land_index(l), 1) end do if (.not. associated(soil_moisture_content, empty_real_data) ) then diff --git a/interfaces/jules_interface/source/support/jules_physics_init_mod.f90 b/interfaces/jules_interface/source/support/jules_physics_init_mod.f90 index 7b4153e1f..1e5f7b6f7 100644 --- a/interfaces/jules_interface/source/support/jules_physics_init_mod.f90 +++ b/interfaces/jules_interface/source/support/jules_physics_init_mod.f90 @@ -13,6 +13,7 @@ module jules_physics_init_mod use jules_control_init_mod, only : n_sea_ice_tile, n_land_tile use jules_hydrology_config_mod, only : & l_hydrology_in => l_hydrology, & + l_inland_in => l_inland, & l_var_rainfrac_in => l_var_rainfrac use jules_nvegparm_config_mod, only : & albsnc_nvg_io, albsnf_nvg_io, albsnf_nvgl_io, & @@ -173,7 +174,7 @@ subroutine jules_physics_init() use c_z0h_z0m, only: z0h_z0m use jules_hydrology_mod, only: l_hydrology, check_jules_hydrology, & l_top, l_var_rainfrac, nfita, ti_max, & - ti_wetl, zw_max + ti_wetl, zw_max, l_inland use jules_irrig_mod, only: l_irrig_dmd use jules_radiation_mod, only: i_sea_alb_method, & l_embedded_snow, l_mask_snow_orog, & @@ -512,6 +513,7 @@ subroutine jules_physics_init() l_vary_z0m_soil = l_vary_z0m_soil_in orog_drag_param = 0.15_r_um lake_water_conserve_method = use_elake_surft + l_inland = l_inland_in ! The minimum sea ice fraction ! This is 0.0 for coupled models and 0.1 for atmosphere only models diff --git a/rose-stem/app/lfric_coupled/file/mydef.xml b/rose-stem/app/lfric_coupled/file/mydef.xml index 6a8237962..066b805f2 100644 --- a/rose-stem/app/lfric_coupled/file/mydef.xml +++ b/rose-stem/app/lfric_coupled/file/mydef.xml @@ -68,6 +68,7 @@ + @@ -191,6 +192,7 @@ + diff --git a/rose-stem/app/lfric_coupled/file/namcouple b/rose-stem/app/lfric_coupled/file/namcouple index 64b11615d..3e543bced 100644 --- a/rose-stem/app/lfric_coupled/file/namcouple +++ b/rose-stem/app/lfric_coupled/file/namcouple @@ -22,7 +22,7 @@ # NFIELDS : total number of fields being exchanged. # $NFIELDS - 76 + 77 $END # ############################################################################### @@ -56,7 +56,7 @@ T # wind stress (lfric) X component => ocean(NEMO) # lf_taux O_OTaux1 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric uor1 SEQ=+2 + 13824 1 1442 1207 lfric uor1 SEQ=+3 P 0 P 2 # MAPPING @@ -67,7 +67,7 @@ T # wind stress (lfric) Y component => ocean(NEMO) # # lf_tauy O_OTauy1 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric vor1 SEQ=+2 + 13824 1 1442 1207 lfric vor1 SEQ=+3 P 0 P 2 # MAPPING @@ -77,7 +77,7 @@ T # wind 10m (lfric) => ocean(NEMO) # lf_w10 O_Wind10 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -88,7 +88,7 @@ T # Solar radiation (lfric) => ocean(NEMO) # # lf_solar O_QsrOce 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -97,7 +97,7 @@ T ###################################################### # Surface heat flux (lfric) => ocean(NEMO) lf_heatflux O_QnsOce 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -106,7 +106,7 @@ T ###################################################### # Total rain (lfric) => ocean(NEMO) lf_train OTotRain 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -115,7 +115,7 @@ T ####################################################### # Total snow (lfric) => ocean(NEMO) lf_tsnow OTotSnow 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -125,7 +125,7 @@ T # ###################################################### lf_evap OTotEvap 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -134,7 +134,7 @@ T # ###################################################### lf_topmelt_cat01 OTopMlt_cat01 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -143,7 +143,7 @@ T # ###################################################### lf_topmelt_cat02 OTopMlt_cat02 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -152,7 +152,7 @@ T # ###################################################### lf_topmelt_cat03 OTopMlt_cat03 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -161,7 +161,7 @@ T # ###################################################### lf_topmelt_cat04 OTopMlt_cat04 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -170,7 +170,7 @@ T # ###################################################### lf_topmelt_cat05 OTopMlt_cat05 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -179,7 +179,7 @@ T # ###################################################### lf_iceheatflux_cat01 OBotMlt_cat01 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -188,7 +188,7 @@ T # ###################################################### lf_iceheatflux_cat02 OBotMlt_cat02 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -197,7 +197,7 @@ T # ###################################################### lf_iceheatflux_cat03 OBotMlt_cat03 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -206,7 +206,7 @@ T # ###################################################### lf_iceheatflux_cat04 OBotMlt_cat04 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -215,7 +215,7 @@ T # ###################################################### lf_iceheatflux_cat05 OBotMlt_cat05 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -224,7 +224,7 @@ T # ###################################################### lf_sublimation_cat01 OIceEvap_cat01 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -233,7 +233,7 @@ T # ###################################################### lf_sublimation_cat02 OIceEvap_cat02 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -242,7 +242,7 @@ T # ###################################################### lf_sublimation_cat03 OIceEvap_cat03 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -251,7 +251,7 @@ T # ###################################################### lf_sublimation_cat04 OIceEvap_cat04 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -260,7 +260,7 @@ T # ###################################################### lf_sublimation_cat05 OIceEvap_cat05 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -269,7 +269,7 @@ T # ###################################################### lf_iceskint_cat01 OTsfIce_cat01 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -278,7 +278,7 @@ T # ###################################################### lf_iceskint_cat02 OTsfIce_cat02 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -287,7 +287,7 @@ T # ###################################################### lf_iceskint_cat03 OTsfIce_cat03 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -296,7 +296,7 @@ T # ###################################################### lf_iceskint_cat04 OTsfIce_cat04 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -305,7 +305,7 @@ T # ###################################################### lf_iceskint_cat05 OTsfIce_cat05 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -314,7 +314,7 @@ T # ####################################################### lf_pensolar_cat01 OQtr_cat01 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -323,7 +323,7 @@ T # ####################################################### lf_pensolar_cat02 OQtr_cat02 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -332,7 +332,7 @@ T # ####################################################### lf_pensolar_cat03 OQtr_cat03 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -341,7 +341,7 @@ T # ####################################################### lf_pensolar_cat04 OQtr_cat04 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -350,7 +350,7 @@ T # ####################################################### lf_pensolar_cat05 OQtr_cat05 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+2 + 13824 1 1442 1207 lfric tor1 SEQ=+3 P 0 P 2 # MAPPING @@ -359,7 +359,7 @@ T # ############################################################################# lf_greenland OGrnmass 466 3600 1 atmos_restart.nc EXPORTED - 1 1 1 1 lfric tor1 SEQ=+2 + 1 1 1 1 lfric tor1 SEQ=+3 R 0 R 0 # BLASOLD @@ -368,7 +368,7 @@ T # ############################################################################# lf_antarctic OAntmass 466 3600 1 atmos_restart.nc EXPORTED - 1 1 1 1 lfric tor1 SEQ=+2 + 1 1 1 1 lfric tor1 SEQ=+3 R 0 R 0 # BLASOLD @@ -726,33 +726,44 @@ T ################## ATMOS TO RIVER #################### ###################################################### # Surface runoff (lfric) => rivers -lf_rsurf surf_roff 466 3600 1 atmos_restart.nc EXPORTED -13824 1 360 180 lfricT rivT SEQ=+4 -P 0 P 0 + lf_rsurf surf_roff 466 3600 1 atmos_restart.nc EXPORTED + 13824 1 360 180 lfricT rivT SEQ=+5 + P 0 P 0 # -MAPPING + MAPPING ## -rmp_lfricT_to_rivT_conservative1st_dstarea_nomask.nc + rmp_lfricT_to_rivT_conservative1st_dstarea_nomask.nc ####################################################### # Sub-surface runoff (lfric) => rivers -lf_rsub sub_surf_roff 466 3600 1 atmos_restart.nc EXPORTED -13824 1 360 180 lfricT rivT SEQ=+4 -P 0 P 0 + lf_rsub sub_surf_roff 466 3600 1 atmos_restart.nc EXPORTED + 13824 1 360 180 lfricT rivT SEQ=+5 + P 0 P 0 # -MAPPING + MAPPING ## -rmp_lfricT_to_rivT_conservative1st_dstarea_nomask.nc + rmp_lfricT_to_rivT_conservative1st_dstarea_nomask.nc ###################################################### ############### RIVER TO OCEAN ####################### ###################################################### # River runoff -outflow_per_river ORunff1D 466 3600 1 atmos_restart.nc EXPORTED -1681 1 1681 1 riv3 riv3 SEQ=+3 -R 0 R 0 + outflow_per_river ORunff1D 466 3600 1 atmos_restart.nc EXPORTED + 1681 1 1681 1 riv3 riv3 SEQ=+4 + R 0 R 0 +# + BLASOLD +## + 1.0 0 +###################################################### +############### RIVER TO ATMOS ####################### +###################################################### +# Inland basin flow + inland_outflow lf_inland_flow 466 3600 1 atmos_restart.nc EXPORTED + 360 180 13824 1 rivT lfricT SEQ=+2 + P 0 P 0 # -BLASOLD + MAPPING ## -1.0 0 + rmp_rivT_to_lfricT_conservative1st_dstarea_nomask.nc ############################################################################# ############################################################################# # diff --git a/rose-stem/app/lfric_coupled/rose-app.conf b/rose-stem/app/lfric_coupled/rose-app.conf index b6850fead..9ece7956e 100644 --- a/rose-stem/app/lfric_coupled/rose-app.conf +++ b/rose-stem/app/lfric_coupled/rose-app.conf @@ -10,5 +10,5 @@ COUPLING_COMPONENTS=lfric nemo rivers CPL_RIVER_COUNT=1681 MP_PGMMODEL=mpmd NAMCOUPLE_STUB=namcouple -RMP_DIR=$BIG_DATA_DIR/ancils/basic-gc/Ticket147/C48/n96e/orca025/remapping_weights +RMP_DIR=/data/users/dan.copsey/remapping_weights/C48_eORCA025_2drivers_v4 models=lfric rivers nemo si3 xios mct diff --git a/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf b/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf index f0275c2a9..4ce9d6b7a 100644 --- a/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf +++ b/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf @@ -605,6 +605,7 @@ write_minmax_tseries=.false. [namelist:jules_hydrology] l_hydrology=.true. +l_inland=.true. l_var_rainfrac=.true. [namelist:jules_nvegparm] diff --git a/rose-stem/app/lfric_coupled_rivers/rose-app.conf b/rose-stem/app/lfric_coupled_rivers/rose-app.conf index 35e9afab0..7967b46df 100644 --- a/rose-stem/app/lfric_coupled_rivers/rose-app.conf +++ b/rose-stem/app/lfric_coupled_rivers/rose-app.conf @@ -46,7 +46,7 @@ source=namelist:jules_time [namelist:jules_initial] const_val=0.0 dump_file=.true. -file='$BIG_DATA_DIR/ancils/basic-gc/Ticket147/C48/n96e/orca025/rivers/river_stor_zero_30424.nc' +file='/data/users/dan.copsey/ancils/lfric/rivers/river_stor_zero_v2_30424.nc' !!l_broadcast_soilt=.false. nvars=1 total_snow=.false. @@ -67,6 +67,7 @@ y_dim_name='latitude' [namelist:jules_land_frac] file='$RIV_NUMBER_ANCILLARY/river_mask_fracarea_ancil.nc' +l_use_land_fraction=.true. land_frac_name='lsmask' [namelist:jules_latlon] @@ -128,7 +129,6 @@ prnt_writers=1 !!cland=0.2 !!criver=0.62 i_river_vn=3 -!!l_inland=.false. !!l_riv_overbank=.false. l_rivers=.true. !!lake_water_conserve_method=1 @@ -212,9 +212,9 @@ timestep_len=3600 [namelist:oasis_rivers] cpl_freq=3600 np_receive=2 -np_send=1 +np_send=2 receive_fields='sub_surf_roff','surf_roff' -send_fields='outflow_per_river' +send_fields='inland_outflow','outflow_per_river' [!!namelist:urban_properties] !!read_list=.false. diff --git a/science/gungho/source/driver/create_physics_prognostics_mod.F90 b/science/gungho/source/driver/create_physics_prognostics_mod.F90 index 649d501bd..ae5ab7e57 100644 --- a/science/gungho/source/driver/create_physics_prognostics_mod.F90 +++ b/science/gungho/source/driver/create_physics_prognostics_mod.F90 @@ -923,6 +923,8 @@ subroutine process_physics_prognostics(processor) empty = (.not. l_urban2t) )) call processor%apply(make_spec('urbemisc', main%surface, W3, twod=.true., & empty = (.not. l_urban2t))) + call processor%apply(make_spec('inland_basin_flow', main%surface, W3, & + twod=.true.)) ! 2D fields, need checkpointing for urban-2-tile schemes call processor%apply(make_spec('urbwrr', main%surface, twod=.true., & ckp=l_urban2t, empty = (.not. l_urban2t) )) diff --git a/science/gungho/source/driver/gungho_model_mod.F90 b/science/gungho/source/driver/gungho_model_mod.F90 index e91f0fbd6..949af737d 100644 --- a/science/gungho/source/driver/gungho_model_mod.F90 +++ b/science/gungho/source/driver/gungho_model_mod.F90 @@ -759,9 +759,9 @@ subroutine initialise_infrastructure( io_context_name, modeldb ) ! Set up collections to hold 2d coupling fields call modeldb%fields%add_empty_field_collection("cpl_snd_2d" , & - table_len = 30) + table_len = 1) call modeldb%fields%add_empty_field_collection("cpl_rcv_2d" , & - table_len = 30) + table_len = 1) cpl_snd_2d => modeldb%fields%get_field_collection("cpl_snd_2d") cpl_rcv_2d => modeldb%fields%get_field_collection("cpl_rcv_2d") From 726ed5ab73be82da1a538a56a5ca4af36c11a83d Mon Sep 17 00:00:00 2001 From: Dan Copsey Date: Thu, 26 Mar 2026 15:30:09 +0000 Subject: [PATCH 02/21] Fix initialisation and remove zero ancil --- .../algorithm/init_surface_fields_alg_mod.x90 | 4 ++++ rose-stem/app/lfric_coupled_rivers/rose-app.conf | 16 ++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/interfaces/jules_interface/source/algorithm/init_surface_fields_alg_mod.x90 b/interfaces/jules_interface/source/algorithm/init_surface_fields_alg_mod.x90 index aa8b0e98c..bc1fd701a 100644 --- a/interfaces/jules_interface/source/algorithm/init_surface_fields_alg_mod.x90 +++ b/interfaces/jules_interface/source/algorithm/init_surface_fields_alg_mod.x90 @@ -91,6 +91,7 @@ contains type( field_type ), pointer :: sea_u_current => null() type( field_type ), pointer :: sea_v_current => null() type( field_type ), pointer :: sea_current_w2 => null() + type( field_type ), pointer :: inland_basin_flow => null() type( field_type ), pointer :: wspd10m => null() type( integer_field_type ), pointer :: ocn_cpl_point => null() @@ -127,6 +128,7 @@ contains call surface_fields%get_field('sea_v_current',sea_v_current) call surface_fields%get_field('sea_current_w2',sea_current_w2) call surface_fields%get_field('ocn_cpl_point',ocn_cpl_point) + call surface_fields%get_field('inland_basin_flow',inland_basin_flow) call surface_fields%get_field('wspd10m', wspd10m) call invoke( & @@ -165,6 +167,8 @@ contains setval_c(sea_v_current, 0.0_r_def ), & setval_c(sea_current_w2, 0.0_r_def ), & int_setval_c(ocn_cpl_point, 0_i_def ), & + ! Initialise inland basin flow to zero + setval_c(inland_basin_flow, 0.0_r_def ), & ! Set 10m wind speed to zero setval_c(wspd10m, 0.0_r_def) ) diff --git a/rose-stem/app/lfric_coupled_rivers/rose-app.conf b/rose-stem/app/lfric_coupled_rivers/rose-app.conf index 7967b46df..3fc98b474 100644 --- a/rose-stem/app/lfric_coupled_rivers/rose-app.conf +++ b/rose-stem/app/lfric_coupled_rivers/rose-app.conf @@ -44,16 +44,16 @@ source=namelist:jules_time !!read_list=.false. [namelist:jules_initial] -const_val=0.0 -dump_file=.true. -file='/data/users/dan.copsey/ancils/lfric/rivers/river_stor_zero_v2_30424.nc' +const_val=0.0,0.0 +dump_file=.false. +file='' !!l_broadcast_soilt=.false. -nvars=1 +nvars=2 total_snow=.false. -tpl_name='' -use_file=.true. -var='rivers_outflow_rp' -var_name='' +!!tpl_name='','' +use_file=.false.,.false. +var='rivers_outflow_rp','rivers_sto_rp' +!!var_name='','' [namelist:jules_input_grid] !!grid_dim_name='land' From e7de8523b8cfb87cce8ccda935b59b7173bc073d Mon Sep 17 00:00:00 2001 From: Dan Copsey Date: Fri, 27 Mar 2026 09:53:24 +0000 Subject: [PATCH 03/21] Add my name to CONTRIBUTORS.md --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 6ab2ad284..4c5b62bd8 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -38,3 +38,4 @@ | mo-lucy-gordon | Lucy Gordon | Met Office | 2026-03-11 | | iboutle | Ian Boutle | Met Office | 2026-03-04 | | Pierre-siddall | Pierre Siddall | Met Office | 2026-03-02 | +| DanCopsey | Dan Copsey | Met Office | 2026-03-27 | From 96e2dd58dc7dd7d1bfee3b68e4f1315d281d4e2c Mon Sep 17 00:00:00 2001 From: Dan Copsey Date: Fri, 27 Mar 2026 12:37:08 +0000 Subject: [PATCH 04/21] Addressed suggestions by Ian Boutle --- applications/lfric_atm/metadata/field_def_diags.xml | 2 +- .../jules_interface/rose-meta/jules-lfric/versions.py | 8 ++++---- .../source/driver/create_physics_prognostics_mod.F90 | 5 +++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/applications/lfric_atm/metadata/field_def_diags.xml b/applications/lfric_atm/metadata/field_def_diags.xml index e57f834be..15d0f4996 100644 --- a/applications/lfric_atm/metadata/field_def_diags.xml +++ b/applications/lfric_atm/metadata/field_def_diags.xml @@ -585,7 +585,6 @@ - @@ -638,6 +637,7 @@ + diff --git a/interfaces/jules_interface/rose-meta/jules-lfric/versions.py b/interfaces/jules_interface/rose-meta/jules-lfric/versions.py index 22aea01db..318682d9b 100644 --- a/interfaces/jules_interface/rose-meta/jules-lfric/versions.py +++ b/interfaces/jules_interface/rose-meta/jules-lfric/versions.py @@ -17,11 +17,11 @@ def __repr__(self): __str__ = __repr__ -class vn21_t148(MacroUpgrade): - # Upgrade macro for #148 by Dan Copsey +class vn31_t401(MacroUpgrade): + # Upgrade macro for #401 by Dan Copsey - BEFORE_TAG = "vn2.1" - AFTER_TAG = "vn2.1_t148" + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t401" def upgrade(self, config, meta_config=None): # Add settings diff --git a/science/gungho/source/driver/create_physics_prognostics_mod.F90 b/science/gungho/source/driver/create_physics_prognostics_mod.F90 index 09788b8d5..f763e3a0c 100644 --- a/science/gungho/source/driver/create_physics_prognostics_mod.F90 +++ b/science/gungho/source/driver/create_physics_prognostics_mod.F90 @@ -956,8 +956,7 @@ subroutine process_physics_prognostics(processor) empty = (.not. l_urban2t) )) call processor%apply(make_spec('urbemisc', main%surface, W3, twod=.true., & empty = (.not. l_urban2t))) - call processor%apply(make_spec('inland_basin_flow', main%surface, W3, & - twod=.true.)) + ! 2D fields, need checkpointing for urban-2-tile schemes call processor%apply(make_spec('urbwrr', main%surface, twod=.true., & ckp=l_urban2t, empty = (.not. l_urban2t) )) @@ -1056,6 +1055,8 @@ subroutine process_physics_prognostics(processor) call processor%apply(make_spec('soil_moist_avail', main%soil, W3, twod=.true.)) call processor%apply(make_spec('thermal_cond_wet_soil', main%soil, W3, & twod=.true.)) + call processor%apply(make_spec('inland_basin_flow', main%soil, W3, & + twod=.true.)) !======================================================================== ! Fields owned by the snow scheme From 021e4786e0fb190c5ace2e5d14d7c0270d25455f Mon Sep 17 00:00:00 2001 From: Dan Copsey Date: Fri, 27 Mar 2026 15:41:26 +0000 Subject: [PATCH 05/21] Initialised inland outflow to zero --- rose-stem/app/lfric_coupled_rivers/rose-app.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rose-stem/app/lfric_coupled_rivers/rose-app.conf b/rose-stem/app/lfric_coupled_rivers/rose-app.conf index 3fc98b474..7f3607616 100644 --- a/rose-stem/app/lfric_coupled_rivers/rose-app.conf +++ b/rose-stem/app/lfric_coupled_rivers/rose-app.conf @@ -52,7 +52,7 @@ nvars=2 total_snow=.false. !!tpl_name='','' use_file=.false.,.false. -var='rivers_outflow_rp','rivers_sto_rp' +var='rivers_outflow_rp','inland_outflow_rp' !!var_name='','' [namelist:jules_input_grid] From c98ab10d7ce3a9c234ad1554038396122ab56ef2 Mon Sep 17 00:00:00 2001 From: Dan Copsey Date: Thu, 2 Apr 2026 10:49:50 +0100 Subject: [PATCH 06/21] Corrected checksums for coupled model --- ...pled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt index f443e8a0f..7e5d57eb2 100644 --- a/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 411B540D9DA63C6C -Inner product checksum theta = 42735B1B24537EDD -Inner product checksum u = 456F42BA8FBFE59A -Inner product checksum mr1 = 40368429CA80B478 -Inner product checksum mr2 = 3F3FC9B57D725706 -Inner product checksum mr3 = 3F0247C38AA5E417 -Inner product checksum mr4 = 3F3672C68E0DEAB3 +Inner product checksum rho = 411B540CDAF74D92 +Inner product checksum theta = 42735B1F45CDC584 +Inner product checksum u = 456F43221546AA29 +Inner product checksum mr1 = 4036840ABDAF5E88 +Inner product checksum mr2 = 3F3F9C813D8BFD76 +Inner product checksum mr3 = 3F0105533FB184C4 +Inner product checksum mr4 = 3F3690F8FD830355 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 From c3cdc1d57fcb5ddccb1affced5bf158f51324ee2 Mon Sep 17 00:00:00 2001 From: Dan Copsey Date: Thu, 2 Apr 2026 12:06:08 +0100 Subject: [PATCH 07/21] Removed docstring as it was interfering with upgrade --- .../rose-meta/jules-lfric/versions.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/interfaces/jules_interface/rose-meta/jules-lfric/versions.py b/interfaces/jules_interface/rose-meta/jules-lfric/versions.py index 318682d9b..3beb2dec1 100644 --- a/interfaces/jules_interface/rose-meta/jules-lfric/versions.py +++ b/interfaces/jules_interface/rose-meta/jules-lfric/versions.py @@ -28,16 +28,3 @@ def upgrade(self, config, meta_config=None): self.add_setting(config, ["namelist:jules_hydrology", "l_inland"], ".false.") return config, self.reports -""" -Copy this template and complete to add your macro - -class vnXX_txxx(MacroUpgrade): - # Upgrade macro for by - - BEFORE_TAG = "vnX.X" - AFTER_TAG = "vnX.X_txxx" - - def upgrade(self, config, meta_config=None): - # Add settings - return config, self.reports -""" From df7112667aa66874927c00c71bba6e75c6e1b716 Mon Sep 17 00:00:00 2001 From: Dan Copsey Date: Thu, 2 Apr 2026 13:14:06 +0100 Subject: [PATCH 08/21] Finished the move of inland_basin_flow from surface_fields to soil_fields --- .../source/algorithm/init_soil_fields_alg_mod.x90 | 3 +++ .../source/algorithm/init_surface_fields_alg_mod.x90 | 4 ---- .../jules_interface/source/algorithm/jules_extra_alg_mod.x90 | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/interfaces/jules_interface/source/algorithm/init_soil_fields_alg_mod.x90 b/interfaces/jules_interface/source/algorithm/init_soil_fields_alg_mod.x90 index c370e62b0..71bcb9201 100644 --- a/interfaces/jules_interface/source/algorithm/init_soil_fields_alg_mod.x90 +++ b/interfaces/jules_interface/source/algorithm/init_soil_fields_alg_mod.x90 @@ -69,6 +69,7 @@ contains type( field_type ), pointer :: wetness_under_soil => null() type( field_type ), pointer :: surface_runoff => null() type( field_type ), pointer :: sub_surface_runoff => null() + type( field_type ), pointer :: inland_basin_flow => null() call soil_fields%get_field('soil_albedo', soil_albedo) call soil_fields%get_field('soil_moist_wilt', soil_moist_wilt) @@ -95,6 +96,7 @@ contains call soil_fields%get_field('wetness_under_soil', wetness_under_soil) call soil_fields%get_field('surface_runoff', surface_runoff) call soil_fields%get_field('sub_surface_runoff', sub_surface_runoff) + call soil_fields%get_field('inland_basin_flow',inland_basin_flow) ! Set soil ancillaries to fixed values for if no ancil is read call invoke( setval_c(soil_albedo, 0.11_r_def), & @@ -114,6 +116,7 @@ contains setval_c(c_wet_frac, 1.0_r_def), & setval_c(surface_runoff, 0.0_r_def), & setval_c(sub_surface_runoff, 0.0_r_def), & + setval_c(inland_basin_flow, 0.0_r_def ), & ! Set soil prognostics when no values are provided by um2lfric setval_c(soil_sat_frac, 1.0_r_def), & setval_c(water_table, 1.0_r_def), & diff --git a/interfaces/jules_interface/source/algorithm/init_surface_fields_alg_mod.x90 b/interfaces/jules_interface/source/algorithm/init_surface_fields_alg_mod.x90 index bc1fd701a..aa8b0e98c 100644 --- a/interfaces/jules_interface/source/algorithm/init_surface_fields_alg_mod.x90 +++ b/interfaces/jules_interface/source/algorithm/init_surface_fields_alg_mod.x90 @@ -91,7 +91,6 @@ contains type( field_type ), pointer :: sea_u_current => null() type( field_type ), pointer :: sea_v_current => null() type( field_type ), pointer :: sea_current_w2 => null() - type( field_type ), pointer :: inland_basin_flow => null() type( field_type ), pointer :: wspd10m => null() type( integer_field_type ), pointer :: ocn_cpl_point => null() @@ -128,7 +127,6 @@ contains call surface_fields%get_field('sea_v_current',sea_v_current) call surface_fields%get_field('sea_current_w2',sea_current_w2) call surface_fields%get_field('ocn_cpl_point',ocn_cpl_point) - call surface_fields%get_field('inland_basin_flow',inland_basin_flow) call surface_fields%get_field('wspd10m', wspd10m) call invoke( & @@ -167,8 +165,6 @@ contains setval_c(sea_v_current, 0.0_r_def ), & setval_c(sea_current_w2, 0.0_r_def ), & int_setval_c(ocn_cpl_point, 0_i_def ), & - ! Initialise inland basin flow to zero - setval_c(inland_basin_flow, 0.0_r_def ), & ! Set 10m wind speed to zero setval_c(wspd10m, 0.0_r_def) ) diff --git a/interfaces/jules_interface/source/algorithm/jules_extra_alg_mod.x90 b/interfaces/jules_interface/source/algorithm/jules_extra_alg_mod.x90 index 25ed2aac0..5ec804cb1 100644 --- a/interfaces/jules_interface/source/algorithm/jules_extra_alg_mod.x90 +++ b/interfaces/jules_interface/source/algorithm/jules_extra_alg_mod.x90 @@ -172,7 +172,6 @@ contains call surface_fields%get_field('snowice_melt', snowice_melt) call surface_fields%get_field('snowice_sublimation', snowice_sublimation) call surface_fields%get_field('urbztm', urbztm) - call surface_fields%get_field('inland_basin_flow', inland_basin_flow) ! Sea ice fields call surface_fields%get_field('sea_ice_thickness', sea_ice_thickness) @@ -207,6 +206,7 @@ contains call soil_fields%get_field('wetness_under_soil', wetness_under_soil) call soil_fields%get_field('surface_runoff', surface_runoff) call soil_fields%get_field('sub_surface_runoff', sub_surface_runoff) + call soil_fields%get_field('inland_basin_flow', inland_basin_flow) ! Snow fields call snow_fields%get_field('tile_snow_mass', tile_snow_mass) From a5a79c3bef7d94ceb89928e0ea1f813119164bbf Mon Sep 17 00:00:00 2001 From: Dan Copsey Date: Thu, 2 Apr 2026 16:59:00 +0100 Subject: [PATCH 09/21] Change surface__inland_basin_flow to soil__inland_basin_flow --- .../jules_interface/source/algorithm/jules_extra_alg_mod.x90 | 2 +- rose-stem/app/lfric_coupled/file/mydef.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interfaces/jules_interface/source/algorithm/jules_extra_alg_mod.x90 b/interfaces/jules_interface/source/algorithm/jules_extra_alg_mod.x90 index 5ec804cb1..c85bf2d92 100644 --- a/interfaces/jules_interface/source/algorithm/jules_extra_alg_mod.x90 +++ b/interfaces/jules_interface/source/algorithm/jules_extra_alg_mod.x90 @@ -302,7 +302,7 @@ contains melt_pond_depth) ! Output extra coupling diagnostics - call inland_basin_flow%write_field('surface__inland_basin_flow') + call inland_basin_flow%write_field('soil__inland_basin_flow') end if diff --git a/rose-stem/app/lfric_coupled/file/mydef.xml b/rose-stem/app/lfric_coupled/file/mydef.xml index 58c812e85..b0df0702c 100644 --- a/rose-stem/app/lfric_coupled/file/mydef.xml +++ b/rose-stem/app/lfric_coupled/file/mydef.xml @@ -204,7 +204,7 @@ - + From cdd0fb56c29246ba51f256963d66fc8db89ae7cb Mon Sep 17 00:00:00 2001 From: Dan Copsey Date: Mon, 27 Apr 2026 15:53:52 +0100 Subject: [PATCH 10/21] Apply reviewer comment --- .../lfric-jules-shared/jules-hydrology/HEAD/rose-meta.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-hydrology/HEAD/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-hydrology/HEAD/rose-meta.conf index adc9d7ced..2c05f9df4 100644 --- a/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-hydrology/HEAD/rose-meta.conf +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-hydrology/HEAD/rose-meta.conf @@ -22,7 +22,7 @@ compulsory=true description=Apply inland basin water correction to soil moisture sort-key=Panel-G06 type=logical -url=http://jules-lsm.github.io/latest/namelists/jules_hydrology.nml.html#JULES_HYDROLOGY::l_inland +url=https://metoffice.github.io/jules/latest/namelists/jules_hydrology.nml.html#JULES_HYDROLOGY::l_inland [namelist:jules_hydrology=l_var_rainfrac] compulsory=true From 9bbe2f098b7773e09e615cda8b00ff9ea2ce28a3 Mon Sep 17 00:00:00 2001 From: Dan Copsey Date: Tue, 28 Apr 2026 12:58:40 +0100 Subject: [PATCH 11/21] Update tag to the associated JULES PR macro, as requested by reviewer --- rose-stem/app/lfric_coupled_rivers/rose-app.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rose-stem/app/lfric_coupled_rivers/rose-app.conf b/rose-stem/app/lfric_coupled_rivers/rose-app.conf index 7f3607616..3676288d2 100644 --- a/rose-stem/app/lfric_coupled_rivers/rose-app.conf +++ b/rose-stem/app/lfric_coupled_rivers/rose-app.conf @@ -1,4 +1,4 @@ -meta=jules-standalone/vn7.9_t1392 +meta=jules-standalone/vn8.1_t34 [command] default=rose-run jules.exe From 820c6d7d4f11f87bfeb107112c749e210d83fb80 Mon Sep 17 00:00:00 2001 From: Dan Copsey Date: Thu, 14 May 2026 18:04:33 +0100 Subject: [PATCH 12/21] Add new KGOs --- ...pled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt index 975bdd5f9..e4de40e78 100644 --- a/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 411B540AFC3D92A4 -Inner product checksum theta = 42735B2019E207B8 -Inner product checksum u = 456F436726BEF558 -Inner product checksum mr1 = 40368556264483BA -Inner product checksum mr2 = 3F3FBA123E60797A -Inner product checksum mr3 = 3F00E9AB1907D0A8 -Inner product checksum mr4 = 3F368BCAF7E5661C +Inner product checksum rho = 411B5409849E1036 +Inner product checksum theta = 42735B1FB19CC06B +Inner product checksum u = 456F436F8DD46E8F +Inner product checksum mr1 = 4036853947C194E4 +Inner product checksum mr2 = 3F3FAA22E706FA56 +Inner product checksum mr3 = 3F013051DDEA272A +Inner product checksum mr4 = 3F36CF822E7812D7 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 From 0851f3c6295468b4050a1203c4df57fac5a8662f Mon Sep 17 00:00:00 2001 From: Dan Copsey Date: Tue, 19 May 2026 11:00:59 +0100 Subject: [PATCH 13/21] Turn off inland basin flow coupling from the rose-stem app. This will enable this branch to go on trunk and we can add it back into rose-stem later. --- rose-stem/app/lfric_coupled/file/mydef.xml | 2 - rose-stem/app/lfric_coupled/file/namcouple | 113 ++++++++---------- rose-stem/app/lfric_coupled/rose-app.conf | 2 +- .../lfric_coupled_atmosphere/rose-app.conf | 1 - .../app/lfric_coupled_rivers/rose-app.conf | 22 ++-- ...nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt | 14 +-- 6 files changed, 70 insertions(+), 84 deletions(-) diff --git a/rose-stem/app/lfric_coupled/file/mydef.xml b/rose-stem/app/lfric_coupled/file/mydef.xml index 1cf9676b1..271e8721d 100644 --- a/rose-stem/app/lfric_coupled/file/mydef.xml +++ b/rose-stem/app/lfric_coupled/file/mydef.xml @@ -68,7 +68,6 @@ - @@ -204,7 +203,6 @@ - diff --git a/rose-stem/app/lfric_coupled/file/namcouple b/rose-stem/app/lfric_coupled/file/namcouple index 3e543bced..64b11615d 100644 --- a/rose-stem/app/lfric_coupled/file/namcouple +++ b/rose-stem/app/lfric_coupled/file/namcouple @@ -22,7 +22,7 @@ # NFIELDS : total number of fields being exchanged. # $NFIELDS - 77 + 76 $END # ############################################################################### @@ -56,7 +56,7 @@ T # wind stress (lfric) X component => ocean(NEMO) # lf_taux O_OTaux1 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric uor1 SEQ=+3 + 13824 1 1442 1207 lfric uor1 SEQ=+2 P 0 P 2 # MAPPING @@ -67,7 +67,7 @@ T # wind stress (lfric) Y component => ocean(NEMO) # # lf_tauy O_OTauy1 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric vor1 SEQ=+3 + 13824 1 1442 1207 lfric vor1 SEQ=+2 P 0 P 2 # MAPPING @@ -77,7 +77,7 @@ T # wind 10m (lfric) => ocean(NEMO) # lf_w10 O_Wind10 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -88,7 +88,7 @@ T # Solar radiation (lfric) => ocean(NEMO) # # lf_solar O_QsrOce 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -97,7 +97,7 @@ T ###################################################### # Surface heat flux (lfric) => ocean(NEMO) lf_heatflux O_QnsOce 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -106,7 +106,7 @@ T ###################################################### # Total rain (lfric) => ocean(NEMO) lf_train OTotRain 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -115,7 +115,7 @@ T ####################################################### # Total snow (lfric) => ocean(NEMO) lf_tsnow OTotSnow 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -125,7 +125,7 @@ T # ###################################################### lf_evap OTotEvap 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -134,7 +134,7 @@ T # ###################################################### lf_topmelt_cat01 OTopMlt_cat01 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -143,7 +143,7 @@ T # ###################################################### lf_topmelt_cat02 OTopMlt_cat02 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -152,7 +152,7 @@ T # ###################################################### lf_topmelt_cat03 OTopMlt_cat03 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -161,7 +161,7 @@ T # ###################################################### lf_topmelt_cat04 OTopMlt_cat04 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -170,7 +170,7 @@ T # ###################################################### lf_topmelt_cat05 OTopMlt_cat05 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -179,7 +179,7 @@ T # ###################################################### lf_iceheatflux_cat01 OBotMlt_cat01 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -188,7 +188,7 @@ T # ###################################################### lf_iceheatflux_cat02 OBotMlt_cat02 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -197,7 +197,7 @@ T # ###################################################### lf_iceheatflux_cat03 OBotMlt_cat03 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -206,7 +206,7 @@ T # ###################################################### lf_iceheatflux_cat04 OBotMlt_cat04 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -215,7 +215,7 @@ T # ###################################################### lf_iceheatflux_cat05 OBotMlt_cat05 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -224,7 +224,7 @@ T # ###################################################### lf_sublimation_cat01 OIceEvap_cat01 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -233,7 +233,7 @@ T # ###################################################### lf_sublimation_cat02 OIceEvap_cat02 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -242,7 +242,7 @@ T # ###################################################### lf_sublimation_cat03 OIceEvap_cat03 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -251,7 +251,7 @@ T # ###################################################### lf_sublimation_cat04 OIceEvap_cat04 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -260,7 +260,7 @@ T # ###################################################### lf_sublimation_cat05 OIceEvap_cat05 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -269,7 +269,7 @@ T # ###################################################### lf_iceskint_cat01 OTsfIce_cat01 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -278,7 +278,7 @@ T # ###################################################### lf_iceskint_cat02 OTsfIce_cat02 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -287,7 +287,7 @@ T # ###################################################### lf_iceskint_cat03 OTsfIce_cat03 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -296,7 +296,7 @@ T # ###################################################### lf_iceskint_cat04 OTsfIce_cat04 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -305,7 +305,7 @@ T # ###################################################### lf_iceskint_cat05 OTsfIce_cat05 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -314,7 +314,7 @@ T # ####################################################### lf_pensolar_cat01 OQtr_cat01 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -323,7 +323,7 @@ T # ####################################################### lf_pensolar_cat02 OQtr_cat02 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -332,7 +332,7 @@ T # ####################################################### lf_pensolar_cat03 OQtr_cat03 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -341,7 +341,7 @@ T # ####################################################### lf_pensolar_cat04 OQtr_cat04 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -350,7 +350,7 @@ T # ####################################################### lf_pensolar_cat05 OQtr_cat05 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 1442 1207 lfric tor1 SEQ=+3 + 13824 1 1442 1207 lfric tor1 SEQ=+2 P 0 P 2 # MAPPING @@ -359,7 +359,7 @@ T # ############################################################################# lf_greenland OGrnmass 466 3600 1 atmos_restart.nc EXPORTED - 1 1 1 1 lfric tor1 SEQ=+3 + 1 1 1 1 lfric tor1 SEQ=+2 R 0 R 0 # BLASOLD @@ -368,7 +368,7 @@ T # ############################################################################# lf_antarctic OAntmass 466 3600 1 atmos_restart.nc EXPORTED - 1 1 1 1 lfric tor1 SEQ=+3 + 1 1 1 1 lfric tor1 SEQ=+2 R 0 R 0 # BLASOLD @@ -726,44 +726,33 @@ T ################## ATMOS TO RIVER #################### ###################################################### # Surface runoff (lfric) => rivers - lf_rsurf surf_roff 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 360 180 lfricT rivT SEQ=+5 - P 0 P 0 +lf_rsurf surf_roff 466 3600 1 atmos_restart.nc EXPORTED +13824 1 360 180 lfricT rivT SEQ=+4 +P 0 P 0 # - MAPPING +MAPPING ## - rmp_lfricT_to_rivT_conservative1st_dstarea_nomask.nc +rmp_lfricT_to_rivT_conservative1st_dstarea_nomask.nc ####################################################### # Sub-surface runoff (lfric) => rivers - lf_rsub sub_surf_roff 466 3600 1 atmos_restart.nc EXPORTED - 13824 1 360 180 lfricT rivT SEQ=+5 - P 0 P 0 +lf_rsub sub_surf_roff 466 3600 1 atmos_restart.nc EXPORTED +13824 1 360 180 lfricT rivT SEQ=+4 +P 0 P 0 # - MAPPING +MAPPING ## - rmp_lfricT_to_rivT_conservative1st_dstarea_nomask.nc +rmp_lfricT_to_rivT_conservative1st_dstarea_nomask.nc ###################################################### ############### RIVER TO OCEAN ####################### ###################################################### # River runoff - outflow_per_river ORunff1D 466 3600 1 atmos_restart.nc EXPORTED - 1681 1 1681 1 riv3 riv3 SEQ=+4 - R 0 R 0 -# - BLASOLD -## - 1.0 0 -###################################################### -############### RIVER TO ATMOS ####################### -###################################################### -# Inland basin flow - inland_outflow lf_inland_flow 466 3600 1 atmos_restart.nc EXPORTED - 360 180 13824 1 rivT lfricT SEQ=+2 - P 0 P 0 +outflow_per_river ORunff1D 466 3600 1 atmos_restart.nc EXPORTED +1681 1 1681 1 riv3 riv3 SEQ=+3 +R 0 R 0 # - MAPPING +BLASOLD ## - rmp_rivT_to_lfricT_conservative1st_dstarea_nomask.nc +1.0 0 ############################################################################# ############################################################################# # diff --git a/rose-stem/app/lfric_coupled/rose-app.conf b/rose-stem/app/lfric_coupled/rose-app.conf index 9ece7956e..b6850fead 100644 --- a/rose-stem/app/lfric_coupled/rose-app.conf +++ b/rose-stem/app/lfric_coupled/rose-app.conf @@ -10,5 +10,5 @@ COUPLING_COMPONENTS=lfric nemo rivers CPL_RIVER_COUNT=1681 MP_PGMMODEL=mpmd NAMCOUPLE_STUB=namcouple -RMP_DIR=/data/users/dan.copsey/remapping_weights/C48_eORCA025_2drivers_v4 +RMP_DIR=$BIG_DATA_DIR/ancils/basic-gc/Ticket147/C48/n96e/orca025/remapping_weights models=lfric rivers nemo si3 xios mct diff --git a/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf b/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf index 03be4a16f..d791aa913 100644 --- a/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf +++ b/rose-stem/app/lfric_coupled_atmosphere/rose-app.conf @@ -617,7 +617,6 @@ write_minmax_tseries=.false. [namelist:jules_hydrology] l_hydrology=.true. -l_inland=.true. l_var_rainfrac=.true. [namelist:jules_model_environment_lfric] diff --git a/rose-stem/app/lfric_coupled_rivers/rose-app.conf b/rose-stem/app/lfric_coupled_rivers/rose-app.conf index 3676288d2..1f49936e0 100644 --- a/rose-stem/app/lfric_coupled_rivers/rose-app.conf +++ b/rose-stem/app/lfric_coupled_rivers/rose-app.conf @@ -44,16 +44,16 @@ source=namelist:jules_time !!read_list=.false. [namelist:jules_initial] -const_val=0.0,0.0 -dump_file=.false. -file='' +const_val=0.0 +dump_file=.true. +file='$BIG_DATA_DIR/ancils/basic-gc/Ticket147/C48/n96e/orca025/rivers/river_stor_zero_30424.nc' !!l_broadcast_soilt=.false. -nvars=2 +nvars=1 total_snow=.false. -!!tpl_name='','' -use_file=.false.,.false. -var='rivers_outflow_rp','inland_outflow_rp' -!!var_name='','' +tpl_name='' +use_file=.true. +var='rivers_outflow_rp' +var_name='' [namelist:jules_input_grid] !!grid_dim_name='land' @@ -67,7 +67,7 @@ y_dim_name='latitude' [namelist:jules_land_frac] file='$RIV_NUMBER_ANCILLARY/river_mask_fracarea_ancil.nc' -l_use_land_fraction=.true. +l_use_land_fraction=.false. land_frac_name='lsmask' [namelist:jules_latlon] @@ -212,9 +212,9 @@ timestep_len=3600 [namelist:oasis_rivers] cpl_freq=3600 np_receive=2 -np_send=2 +np_send=1 receive_fields='sub_surf_roff','surf_roff' -send_fields='inland_outflow','outflow_per_river' +send_fields='outflow_per_river' [!!namelist:urban_properties] !!read_list=.false. diff --git a/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt index e4de40e78..975bdd5f9 100644 --- a/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 411B5409849E1036 -Inner product checksum theta = 42735B1FB19CC06B -Inner product checksum u = 456F436F8DD46E8F -Inner product checksum mr1 = 4036853947C194E4 -Inner product checksum mr2 = 3F3FAA22E706FA56 -Inner product checksum mr3 = 3F013051DDEA272A -Inner product checksum mr4 = 3F36CF822E7812D7 +Inner product checksum rho = 411B540AFC3D92A4 +Inner product checksum theta = 42735B2019E207B8 +Inner product checksum u = 456F436726BEF558 +Inner product checksum mr1 = 40368556264483BA +Inner product checksum mr2 = 3F3FBA123E60797A +Inner product checksum mr3 = 3F00E9AB1907D0A8 +Inner product checksum mr4 = 3F368BCAF7E5661C Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 From fd97d924c99888b5a5972c42bc04dbfd2f898d82 Mon Sep 17 00:00:00 2001 From: Dan Copsey Date: Wed, 20 May 2026 11:13:34 +0100 Subject: [PATCH 14/21] Updated KGOs for coupled model as this change is expected to change results even when turned off as it also includes a bug fix which is the multiplying of runoff by flandg in jules_extra_kernel_mod.F90 --- ...pled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt index 975bdd5f9..3c7e34266 100644 --- a/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 411B540AFC3D92A4 -Inner product checksum theta = 42735B2019E207B8 -Inner product checksum u = 456F436726BEF558 -Inner product checksum mr1 = 40368556264483BA -Inner product checksum mr2 = 3F3FBA123E60797A -Inner product checksum mr3 = 3F00E9AB1907D0A8 -Inner product checksum mr4 = 3F368BCAF7E5661C +Inner product checksum rho = 411B54091A1CCB38 +Inner product checksum theta = 42735B1EF5533E5B +Inner product checksum u = 456F432E426C7F82 +Inner product checksum mr1 = 4036851669A6D9B7 +Inner product checksum mr2 = 3F3F8C53A08B9212 +Inner product checksum mr3 = 3F0176E8C7628BD1 +Inner product checksum mr4 = 3F36A2EEAED985B1 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0 From c8f7509f497d82147c7ac32acbb4625f132806f5 Mon Sep 17 00:00:00 2001 From: Dan Copsey Date: Wed, 20 May 2026 14:45:56 +0100 Subject: [PATCH 15/21] Add lf_inland_flow to lfric_dictionary as this will be needed once pull request #505 goes on trunk. #505 adds all the other coupling variables but inland basin flow will be missing from #505. --- applications/lfric_atm/metadata/lfric_dictionary.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/applications/lfric_atm/metadata/lfric_dictionary.xml b/applications/lfric_atm/metadata/lfric_dictionary.xml index 3ab44ca0b..9a5724b9b 100644 --- a/applications/lfric_atm/metadata/lfric_dictionary.xml +++ b/applications/lfric_atm/metadata/lfric_dictionary.xml @@ -399,5 +399,6 @@ + From 1b344a1cc285fe7f1291bb9214bd9d80bfda477d Mon Sep 17 00:00:00 2001 From: Dan Copsey Date: Wed, 3 Jun 2026 10:01:41 +0100 Subject: [PATCH 16/21] Moved upgrade macro from jules-lfric to jules-lsm after suggestion from code reviewer --- .../jules_interface/rose-meta/jules-lfric/versions.py | 10 ---------- .../jules_interface/rose-meta/jules-lsm/versions.py | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/interfaces/jules_interface/rose-meta/jules-lfric/versions.py b/interfaces/jules_interface/rose-meta/jules-lfric/versions.py index 3beb2dec1..4baf2ec68 100644 --- a/interfaces/jules_interface/rose-meta/jules-lfric/versions.py +++ b/interfaces/jules_interface/rose-meta/jules-lfric/versions.py @@ -17,14 +17,4 @@ def __repr__(self): __str__ = __repr__ -class vn31_t401(MacroUpgrade): - # Upgrade macro for #401 by Dan Copsey - - BEFORE_TAG = "vn3.1" - AFTER_TAG = "vn3.1_t401" - - def upgrade(self, config, meta_config=None): - # Add settings - self.add_setting(config, ["namelist:jules_hydrology", "l_inland"], ".false.") - return config, self.reports diff --git a/interfaces/jules_interface/rose-meta/jules-lsm/versions.py b/interfaces/jules_interface/rose-meta/jules-lsm/versions.py index 01798ad2b..318682d9b 100644 --- a/interfaces/jules_interface/rose-meta/jules-lsm/versions.py +++ b/interfaces/jules_interface/rose-meta/jules-lsm/versions.py @@ -17,6 +17,16 @@ def __repr__(self): __str__ = __repr__ +class vn31_t401(MacroUpgrade): + # Upgrade macro for #401 by Dan Copsey + + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t401" + + def upgrade(self, config, meta_config=None): + # Add settings + self.add_setting(config, ["namelist:jules_hydrology", "l_inland"], ".false.") + return config, self.reports """ Copy this template and complete to add your macro From b8e46ff3514737804ff80606c907e00d6fd322a5 Mon Sep 17 00:00:00 2001 From: Dan Copsey Date: Wed, 3 Jun 2026 10:37:10 +0100 Subject: [PATCH 17/21] Moved upgrade macro to the end - after everything else --- .../rose-meta/jules-lsm/versions.py | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/interfaces/jules_interface/rose-meta/jules-lsm/versions.py b/interfaces/jules_interface/rose-meta/jules-lsm/versions.py index c11f996ba..e4ecc0081 100644 --- a/interfaces/jules_interface/rose-meta/jules-lsm/versions.py +++ b/interfaces/jules_interface/rose-meta/jules-lsm/versions.py @@ -18,17 +18,6 @@ def __repr__(self): __str__ = __repr__ -class vn31_t401(MacroUpgrade): - # Upgrade macro for #401 by Dan Copsey - - BEFORE_TAG = "vn3.1" - AFTER_TAG = "vn3.1_t401" - - def upgrade(self, config, meta_config=None): - # Add settings - self.add_setting(config, ["namelist:jules_hydrology", "l_inland"], ".false.") - return config, self.reports - """ Copy this template and complete to add your macro class vnXX_txxx(MacroUpgrade): @@ -401,3 +390,14 @@ def upgrade(self, config, meta_config=None): ) return config, self.reports + + class vn31_t401(MacroUpgrade): + # Upgrade macro for #401 by Dan Copsey + + BEFORE_TAG = "vn3.1_t205" + AFTER_TAG = "vn3.1_t401" + + def upgrade(self, config, meta_config=None): + # Add settings + self.add_setting(config, ["namelist:jules_hydrology", "l_inland"], ".false.") + return config, self.reports From e6e39601430dd7bda56dfcc02f49d0915ceba162 Mon Sep 17 00:00:00 2001 From: Dan Copsey Date: Wed, 3 Jun 2026 10:40:38 +0100 Subject: [PATCH 18/21] Corrected indent --- interfaces/jules_interface/rose-meta/jules-lsm/versions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interfaces/jules_interface/rose-meta/jules-lsm/versions.py b/interfaces/jules_interface/rose-meta/jules-lsm/versions.py index e4ecc0081..7d7d2592f 100644 --- a/interfaces/jules_interface/rose-meta/jules-lsm/versions.py +++ b/interfaces/jules_interface/rose-meta/jules-lsm/versions.py @@ -391,8 +391,8 @@ def upgrade(self, config, meta_config=None): return config, self.reports - class vn31_t401(MacroUpgrade): - # Upgrade macro for #401 by Dan Copsey +class vn31_t401(MacroUpgrade): + """Upgrade macro for ticket #401 by Dan Copsey.""" BEFORE_TAG = "vn3.1_t205" AFTER_TAG = "vn3.1_t401" From 07b34158a630950926cc7f97a5938beb3922da03 Mon Sep 17 00:00:00 2001 From: Dan Copsey Date: Wed, 3 Jun 2026 13:29:55 +0100 Subject: [PATCH 19/21] Remove l_inland_in --- .../jules_interface/source/support/jules_physics_init_mod.f90 | 1 - 1 file changed, 1 deletion(-) diff --git a/interfaces/jules_interface/source/support/jules_physics_init_mod.f90 b/interfaces/jules_interface/source/support/jules_physics_init_mod.f90 index a6ed5bbc9..fbb90ca54 100644 --- a/interfaces/jules_interface/source/support/jules_physics_init_mod.f90 +++ b/interfaces/jules_interface/source/support/jules_physics_init_mod.f90 @@ -490,7 +490,6 @@ subroutine jules_physics_init(config) l_point_data = config%jules_surface%l_point_data() orog_drag_param = real(config%jules_surface%orog_drag_param(), r_um) lake_water_conserve_method = use_elake_surft - l_inland = l_inland_in ! The minimum sea ice fraction ! This is 0.0 for coupled models and 0.1 for atmosphere only models From b26d85c9a2c01c8ef35f42bae1ba772d494772cf Mon Sep 17 00:00:00 2001 From: Dan Copsey Date: Wed, 3 Jun 2026 14:26:08 +0100 Subject: [PATCH 20/21] Rename units to unit --- applications/lfric_atm/metadata/lfric_dictionary.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/lfric_atm/metadata/lfric_dictionary.xml b/applications/lfric_atm/metadata/lfric_dictionary.xml index 9a5724b9b..739df77f9 100644 --- a/applications/lfric_atm/metadata/lfric_dictionary.xml +++ b/applications/lfric_atm/metadata/lfric_dictionary.xml @@ -399,6 +399,6 @@ - + From b16e78b34302ede95dd81b7947bf0c6048d019f7 Mon Sep 17 00:00:00 2001 From: Dan Copsey Date: Wed, 3 Jun 2026 15:06:24 +0100 Subject: [PATCH 21/21] Update KGOs --- ...pled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt b/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt index 879448cab..fd63bdf5f 100644 --- a/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt +++ b/rose-stem/site/meto/kgos/lfric_coupled/ex1a/checksum_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit.txt @@ -1,9 +1,9 @@ -Inner product checksum rho = 411B5409D804A878 -Inner product checksum theta = 42735B1D0D01AE5C -Inner product checksum u = 456F4385CD1ACE02 -Inner product checksum mr1 = 4036846D52D0A856 -Inner product checksum mr2 = 3F3FA19DE10519BC -Inner product checksum mr3 = 3F00ED1994A93DC6 -Inner product checksum mr4 = 3F36893E43F07BCC +Inner product checksum rho = 411B540A96B37E4F +Inner product checksum theta = 42735B1DC4620029 +Inner product checksum u = 456F4479A8EB9CF2 +Inner product checksum mr1 = 4036851FACCD4D6A +Inner product checksum mr2 = 3F3FA5B17FDDA974 +Inner product checksum mr3 = 3F00D65E266F8C62 +Inner product checksum mr4 = 3F368FE5FDCA5515 Inner product checksum mr5 = 0 Inner product checksum mr6 = 0