diff --git a/dependencies.yaml b/dependencies.yaml index d3374f058..f39ef2aae 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -22,8 +22,8 @@ casim: ref: 2026.03.2 jules: - source: git@github.com:MetOffice/jules.git - ref: 2026.03.2 + source: git@github.com:DanCopsey/jules.git + ref: zenith_angle_seaice lfric_apps: source: diff --git a/interfaces/jules_interface/build/extract.yaml b/interfaces/jules_interface/build/extract.yaml index 41128cc14..b5d013f3d 100644 --- a/interfaces/jules_interface/build/extract.yaml +++ b/interfaces/jules_interface/build/extract.yaml @@ -106,6 +106,7 @@ jules: - src/science/params/veg_param_mod.F90 - src/science/radiation/Jin11_osa_mod.F90 - src/science/radiation/albpft_jls_mod.F90 + - src/science/radiation/albpond_mod.F90 - src/science/radiation/albsnow_jls_mod.F90 - src/science/radiation/albsnow_ts_jls_mod.F90 - src/science/radiation/calc_direct_albsoil_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 01798ad2b..6825f9282 100644 --- a/interfaces/jules_interface/rose-meta/jules-lfric/versions.py +++ b/interfaces/jules_interface/rose-meta/jules-lfric/versions.py @@ -31,3 +31,28 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ + + +class vn31_t400(MacroUpgrade): + """Upgrade macro for ticket #400 by Dan Copsey.""" + + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t400" + + def upgrade(self, config, meta_config=None): + + # Is this a coupled model? The easiest way to get this is from the number of sea ice categories. + nice = int(self.get_setting_value(config, ["namelist:jules_sea_seaice", "nice"])) + is_coupled = nice > 1 + + # Add the new namelist settings + self.add_setting(config, ["namelist:jules_sea_seaice", "l_zenith_albedo"], ".true.") + if is_coupled: + self.add_setting(config, ["namelist:jules_sea_seaice", "meltpond_alb_vn"], "'malinka'") + else: + self.add_setting(config, ["namelist:jules_sea_seaice", "meltpond_alb_vn"], "'none'") + self.add_setting(config, ["namelist:jules_sea_seaice", "snow_grain_size_max"], "100.0") + self.add_setting(config, ["namelist:jules_sea_seaice", "snow_grain_size_min"], "70.0") + self.add_setting(config, ["namelist:jules_sea_seaice", "snowpatch"], "0.02") + + return config, self.reports diff --git a/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-sea-seaice/HEAD/rose-meta.conf b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-sea-seaice/HEAD/rose-meta.conf index 8f6938c9e..5537f8427 100644 --- a/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-sea-seaice/HEAD/rose-meta.conf +++ b/interfaces/jules_interface/rose-meta/lfric-jules-shared/jules-sea-seaice/HEAD/rose-meta.conf @@ -195,6 +195,43 @@ sort-key=Panel-C14 trigger=namelist:jules_sea_seaice=hcap_sea: .true.; type=logical +[namelist:jules_sea_seaice=l_zenith_albedo] +compulsory=true +description=Use zenith angles in the calculation of sea ice + = (and snow on sea ice) albedos +help=With this set to true then the sea ice albedo is adjusted in the same + =way as bare soil in order to adjust the albedo to take into account + =zenith angle. + =The snow on sea ice will also use the same code as snow on land in + =order to calculate the snow albedo which also takes into account + =the zenith angle. +!kind=default +ns=namelist/Science/JULES Surface/Sea and sea-ice +sort-key=Panel-C12 +type=logical + +[namelist:jules_sea_seaice=meltpond_alb_vn] +compulsory=true +description=Melt pond albedo scheme +!enumeration=true +help=The scheme used to calculate the albedo of melt ponds + =none: Use this if no melt ponds are used in the model which + = instead adds a temperature dependence on albedo to + = represent how melt ponds would have made the surface + = darker if they existed. + =cice: Use the CICE melt pond albedo scheme which uses a fixed value + = (from albpondv_cice and albpondi_cice) which is linearly + = ramped to with melt pond depth. No zenith angle dependence is + = included. + =malinka: Use the Malinka et al melt pond albedo scheme which uses + = Fresnel equations for reflection off the surface and multiple + = scattering within the pond. This has inbuilt zenith angle + = dependence and more realistic depth dependence. +ns=namelist/Science/JULES Surface/Sea and sea-ice +sort-key=Panel-C11 +value-titles="none","cice","malinka" +values='none','cice','malinka' + [namelist:jules_sea_seaice=nice] compulsory=true description=Number of sea ice categories @@ -209,6 +246,46 @@ range=1:99 sort-key=Panel-C00a type=integer +[namelist:jules_sea_seaice=snow_grain_size_min] +compulsory=true +description=Minimum snow grain size +help=The snow albedo scheme includes a snow grain size temperature + =dependence. For snow on sea ice this goes from a minimum snow + =grain size at -30oC to a maximum snow grain size at melting point. + =The minimum snow grain size is set here. The larger the snow grain + =size the lower the albedo in the NIR part of the spectrum. The + =recommended value is 50 um. +!kind=double +ns=namelist/Science/JULES Surface/Sea and sea-ice +sort-key=Panel-C12a +type=real + +[namelist:jules_sea_seaice=snow_grain_size_max] +compulsory=true +description=Maximum snow grain size +help=The snow albedo scheme includes a snow grain size temperature + =dependence. For snow on sea ice this goes from a minimum snow + =grain size at -30oC to a maximum snow grain size at melting point. + =The maximum snow grain size is set here. The larger the snow grain + =size the lower the albedo in the NIR part of the spectrum. The + =recommended value is 200 um. +!kind=double +ns=namelist/Science/JULES Surface/Sea and sea-ice +sort-key=Panel-C12b +type=real + +[namelist:jules_sea_seaice=snowpatch] +compulsory=true +description=snowpatch length scale (m) +help=Length scale for parameterizing non uniform snow coverage (m). + =This is the depth of snow at which half of the sea ice is + =covered in snow. The smaller this number the more the sea ice + =is covered by snow. +!kind=double +ns=namelist/Science/JULES Surface/Sea and sea-ice +sort-key=Panel-C12c +type=real + [namelist:jules_sea_seaice=u_cdn_hw] compulsory=true description=Neutral wind speed where the drag attains the high wind value. @@ -243,3 +320,4 @@ help=Specified value held fixed throughout the run range=0.0:100.0 sort-key=Panel-C09a type=real + 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 af25e46c9..6dcea8920 100644 --- a/interfaces/jules_interface/source/support/jules_physics_init_mod.f90 +++ b/interfaces/jules_interface/source/support/jules_physics_init_mod.f90 @@ -56,6 +56,14 @@ module jules_physics_init_mod i_high_wind_drag_null, & i_high_wind_drag_limited, & i_high_wind_drag_reduced_v1, & + meltpond_alb_vn, & + meltpond_alb_vn_none, & + meltpond_alb_vn_cice, & + meltpond_alb_vn_malinka, & + l_zenith_albedo_in => l_zenith_albedo, & + snow_grain_size_min_in => snow_grain_size_min, & + snow_grain_size_max_in => snow_grain_size_max, & + snowpatch_in => snowpatch, & cdn_hw_sea_in => cdn_hw_sea, & cdn_max_sea_in => cdn_max_sea, & u_cdn_hw_in => u_cdn_hw, & @@ -212,7 +220,8 @@ subroutine jules_physics_init() ip_ss_coare_mq, a_chrn_coare, b_chrn_coare, u10_max_coare, & l_10m_neut, alpham, dtice, l_iceformdrag_lupkes, & l_stability_lupkes, l_use_dtstar_sea, hcap_sea, beta_evap, & - l_sice_meltponds, l_sice_meltponds_cice, & + l_sice_meltponds, i_meltpond_alb_vn, l_zenith_albedo, & + snow_grain_size_min, snow_grain_size_max, snowpatch, & l_cice_alb, l_saldep_freeze, l_sice_multilayers, & l_sice_scattering, l_sice_swpen, l_ssice_albedo, & pen_rad_frac_cice, sw_beta_cice, & @@ -371,12 +380,25 @@ subroutine jules_physics_init() z0h_z0m_miz = 0.2_r_um z0h_z0m_sice = 0.2_r_um z0sice = 5.0e-4_r_um + l_zenith_albedo = l_zenith_albedo_in + snow_grain_size_min = snow_grain_size_min_in + snow_grain_size_max = snow_grain_size_max_in + snowpatch = snowpatch_in + + ! Setup the melt pond albedo scheme + select case (meltpond_alb_vn) + case(meltpond_alb_vn_none) + i_meltpond_alb_vn = 0 + case(meltpond_alb_vn_cice) + i_meltpond_alb_vn = 1 + case(meltpond_alb_vn_malinka) + i_meltpond_alb_vn = 2 + end select ! Setup switches that vary depending if the model is ! coupled to an ocean/sea-ice model or not. if (l_couple_sea_ice) then l_sice_meltponds = .true. - l_sice_meltponds_cice = .true. l_tstar_sice_new = .false. l_cice_alb = .true. l_sice_multilayers = .true. @@ -387,7 +409,6 @@ subroutine jules_physics_init() sw_beta_cice = 0.3_r_um else l_sice_meltponds = .false. - l_sice_meltponds_cice = .false. l_tstar_sice_new = .true. l_cice_alb = .false. l_sice_multilayers = .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 f443e8a0f..f6e4f9b0d 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 = 411B5408FE49596F +Inner product checksum theta = 42735B1E7F9AFC79 +Inner product checksum u = 456F417B18A1C060 +Inner product checksum mr1 = 403684B2BF59E16C +Inner product checksum mr2 = 3F400271DBE5BDB9 +Inner product checksum mr3 = 3F024A769B874A7D +Inner product checksum mr4 = 3F36663312EA3A6D Inner product checksum mr5 = 0 Inner product checksum mr6 = 0