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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
| DrTVockerodtMO | Terence Vockerodt | Met Office | 2026-01-08 |
| MetBenjaminWent | Benjamin Went | Met Office | 2026-01-15 |
| timgraham-Met | Tim Graham | Met Office | 2026-01-15 |
| mo-alistairp | Alistair Pirrie | Met Office | 2026-01-19 |
| mo-alistairp | Alistair Pirrie | Met Office | 2026-01-19 |
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module um_ukca_init_mod
top_bdy_opt_overwrt_only_top_lev, &
top_bdy_opt_overwrt_co_no_o3_top, &
top_bdy_opt_overwrt_co_no_o3_h2o_top, &
! Variables related to initialisation of photolysis
! Variables related to initialisation of photolysis
photol_scheme, photol_scheme_off, &
photol_scheme_fastjx, &
photol_scheme_prescribed, fastjx_mode, &
Expand Down Expand Up @@ -580,7 +580,7 @@ module um_ukca_init_mod
integer(kind=i_um), allocatable :: jind(:) ! Index of species from files
character(len=photol_jlabel_len), allocatable :: jlabel(:) ! Copy of species
! names to match those from files
real(kind=r_um), pointer :: ratj_jfacta(:) ! Quantum yield
real(kind=r_um), pointer :: ratj_jfacta(:) ! Quantum yield
real(kind=r_um), allocatable :: jfacta(:) ! copy of quantum yield in correct units

character(len=photol_jlabel_len), allocatable :: titlej(:)
Expand Down Expand Up @@ -659,7 +659,7 @@ subroutine um_ukca_init(ncells_ukca, model_clock)
c3_grass, c4_grass, &
shrub, urban, lake, soil, ice

! UM modules used
! UM modules used
use cv_run_mod, only: l_param_conv

implicit none
Expand Down Expand Up @@ -709,14 +709,14 @@ subroutine um_ukca_init(ncells_ukca, model_clock)

if ( chem_timestep < 0_i_def ) then
i_chem_timestep = default_chem_timestep
else
else
if ( chem_timestep < i_timestep .or. &
mod(chem_timestep, i_timestep) /= 0_i_def ) then
write(log_scratch_space, '(A,I0,A,A)')'Incorrect chem_timestep found ', &
chem_timestep,' This cannot be less than model timestep and has to ', &
'be fully divisible. (Check: namelist:chemistry)'
call log_event(log_scratch_space, LOG_LEVEL_ERROR)
else
else
i_chem_timestep = int(chem_timestep, i_um)
end if
end if
Expand Down Expand Up @@ -848,11 +848,11 @@ subroutine ukca_init( row_length, rows, model_levels, bl_levels, &
integer :: i_ukca_light_param=1 ! Internal Price-Rind scheme
integer :: i_ukca_quasinewton_start=2, i_ukca_quasinewton_end=3
integer :: i_ukca_scenario=ukca_strat_lbc_env
integer:: i_ukca_mode_seg_size=4 ! GLOMAP-mode segment size
real(r_um) :: linox_scale_in
integer:: i_ukca_mode_seg_size ! GLOMAP-mode segment size
real(r_um) :: linox_scale_in

character(len=ukca_photol_varname_len) :: adjusted_fname ! intermediate spc/ filename copy

! Variables for UKCA error handling
integer :: ukca_errcode
character(len=ukca_maxlen_message) :: ukca_errmsg
Expand Down Expand Up @@ -937,8 +937,9 @@ subroutine ukca_init( row_length, rows, model_levels, bl_levels, &
end if

! Set default GLOMAP segment size if no factor supplied
i_ukca_mode_seg_size = 4 ! Current working seg size for LFRic
if ( ukca_mode_seg_size /= imdi ) THEN
i_ukca_mode_seg_size = ukca_mode_seg_size
i_ukca_mode_seg_size = ukca_mode_seg_size
end if

call ukca_setup( ukca_errcode, &
Expand Down Expand Up @@ -1102,7 +1103,7 @@ subroutine ukca_init( row_length, rows, model_levels, bl_levels, &
'Mismatch in expected and registered photolysis reactions: ', &
n_phot_spc, jppj,'. Check definitions in ukca_photol_param_mod'
call log_event( log_scratch_space, LOG_LEVEL_ERROR )
end if
end if
else if ( photol_scheme == photol_scheme_fastjx ) then

! Read spectral data files, allocate arrays and set up
Expand All @@ -1122,7 +1123,7 @@ subroutine ukca_init( row_length, rows, model_levels, bl_levels, &
jlabel(i)=adjusted_fname(1:photol_jlabel_len)
write(log_scratch_space,'(A,I6,E12.3,A12)')'FJX_JFACTA ', i, &
jfacta(i),jlabel(i)
call log_event(log_scratch_space, LOG_LEVEL_INFO)
call log_event(log_scratch_space, LOG_LEVEL_INFO)
end do

! call wrapper routine that reads FastJX spectral and solar cycle data
Expand All @@ -1149,11 +1150,11 @@ subroutine ukca_init( row_length, rows, model_levels, bl_levels, &
! include future schemes
select case (photol_scheme)
case(photol_scheme_fastjx)
i_photol_scheme = photol_fastjx
case default
i_photol_scheme = photol_off
i_photol_scheme = photol_fastjx
case default
i_photol_scheme = photol_off
end select

! Call Photolysis setup routine to initialise Photolysis
! Hardwired options, CCA field defined on full_face_level_grid, so
! l_3d_cca = .true. and n_cca_lev = number_of_layers (model_levels)
Expand Down Expand Up @@ -1210,11 +1211,11 @@ subroutine ukca_init( row_length, rows, model_levels, bl_levels, &
if (ukca_errcode /= 0) then
write( log_scratch_space, '(A,I0,A,A,A,A)' ) 'Photolysis error ', &
ukca_errcode, ' in ', ukca_errproc, ': ', ukca_errmsg
call log_event( log_scratch_space, LOG_LEVEL_ERROR )
call log_event( log_scratch_space, LOG_LEVEL_ERROR )
end if
! Obtain the list of environment fields required by Photolysis
n_phot_flds_req = 0

call photol_get_environ_varlist(ukca_errcode, &
varnames_scalar_real_ptr=photol_fldnames_scalar_real, &
varnames_flat_integer_ptr=photol_fldnames_flat_integer, &
Expand Down Expand Up @@ -1242,7 +1243,7 @@ subroutine ukca_init( row_length, rows, model_levels, bl_levels, &
! Deallocate fastjx spectral data arrays as no longer needed
if ( photol_scheme == photol_scheme_fastjx ) &
call deallocate_fastjx_filevars()

end if ! Strattrop and l_ukca_photolysis

! Switch on optional UM microphysics diagnostics required by UKCA
Expand Down Expand Up @@ -1763,7 +1764,7 @@ subroutine set_ukca_field_lists()
end subroutine set_ukca_field_lists

subroutine aerosol_ukca_dust_only_init( row_length, rows, model_levels, &
bl_levels, timestep, l_param_conv )
bl_levels, timestep, l_param_conv )

implicit none

Expand Down Expand Up @@ -1795,6 +1796,10 @@ subroutine aerosol_ukca_dust_only_init( row_length, rows, model_levels, &
character(len=ukca_maxlen_message) :: ukca_errmsg
character(len=ukca_maxlen_procname) :: ukca_errproc

! Some default values - either standard values in UM, or the only ones
! currently supported in the LFRic-side implementation.
integer:: i_ukca_mode_seg_size ! GLOMAP-mode segment size

! Set up proto-GA configuration based on GA9.
! The ASAD Newton-Raphson Offline Oxidants scheme (ukca_chem_offline)
! is substituted for the Explicit backward-Euler scheme used in GA9
Expand All @@ -1806,6 +1811,12 @@ subroutine aerosol_ukca_dust_only_init( row_length, rows, model_levels, &
! temporary logicals will be on. (i.e. the defaults for these
! logicals, .true. by convention in UKCA, are not overridden.)

! Set default GLOMAP segment size if no factor supplied
i_ukca_mode_seg_size = 4 ! Current working seg size for LFRic
if ( ukca_mode_seg_size /= imdi ) THEN
i_ukca_mode_seg_size = ukca_mode_seg_size
end if

call ukca_setup( ukca_errcode, &

! Switch to skip setting up constants: these will have already
Expand Down Expand Up @@ -1842,6 +1853,7 @@ subroutine aerosol_ukca_dust_only_init( row_length, rows, model_levels, &
! General GLOMAP configuration options
!
i_mode_nzts=15, &
ukca_mode_seg_size=i_ukca_mode_seg_size, &

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change will make dust_and_clim work correctly with the changes that Jon Elsey made last year.

Including UKCA diagnostics and UKCA namelist items in LFRic is now close to the top of my todo list. This module is technical debt until I can replace the whole thing with namelist settings.

i_mode_setup=6, &
i_mode_nucscav=i_mode_nucscav, &
l_cv_rainout=.not.(l_ukca_plume_scav), &
Expand Down Expand Up @@ -2048,7 +2060,7 @@ subroutine allocate_fastjx_filevars()
! ----------------------------------------------------------------------
! Description:
!
! allocate arrays that will hold data from FastJX spectral files.
! allocate arrays that will hold data from FastJX spectral files.
! ----------------------------------------------------------------------

implicit none
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def test_run_lfric_atm_scm_ral3_urban2t_BiP2x2_50000x50000_azspice_gnu_fast_debu
capture_output=True)
assert sr.returncode == 0, sr.stderr.decode("UTF-8")

def test_run_lfric_atm_nwp_gal9_mgnoukca_C48_MG_ex1a_cce_fast_debug_64bit(self, monkeypatch):
def test_run_lfric_atm_nwp_gal9_mg_C48_MG_ex1a_cce_fast_debug_64bit(self, monkeypatch):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to get approval from the owner of the test to change the name? I will check with Paul ernshaw about this, as he is likely the owner of the test.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I spoke to Paul. its not a problem as its a technical change. He would want to see if there was a science change.

monkeypatch.setenv("TARGET_PLATFORM", "meto-ex1a")
monkeypatch.setenv("RUN_METHOD", "mpiexec")
monkeypatch.setenv("HYPERTHREADS", "1")
Expand Down
32 changes: 16 additions & 16 deletions rose-stem/site/common/lfric_atm/tasks_lfric_atm.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@
theta",
}) %}

{% elif task_ns.conf_name == "nwp_gal9_noukca_1T-C12" %}
{% elif task_ns.conf_name == "nwp_gal9_1T-C12" %}
{% do task_dict.update({
"opt_confs": ["physics_segmentation","no_dust","um_dump","no_diags"],
"opt_confs": ["physics_segmentation","um_dump","no_diags"],
"resolution": "C12",
"DT": 1800,
"tsteps": 36,
Expand All @@ -105,9 +105,9 @@
{% do task_dict.update({"kgo_checks": []}) %}
{% endif %}

{% elif task_ns.conf_name == "nwp_gal9_noukca_2T-C12" %}
{% elif task_ns.conf_name == "nwp_gal9_2T-C12" %}
{% do task_dict.update({
"opt_confs": ["physics_segmentation","no_dust","um_dump","no_diags"],
"opt_confs": ["physics_segmentation","um_dump","no_diags"],
"resolution": "C12",
"DT": 1800,
"tsteps": 36,
Expand All @@ -120,9 +120,9 @@
{% do task_dict.update({"kgo_checks": []}) %}
{% endif %}

{% elif task_ns.conf_name == "nwp_gal9_noukca_1T-C48_MG" %}
{% elif task_ns.conf_name == "nwp_gal9_1T-C48_MG" %}
{% do task_dict.update({
"opt_confs": ["physics_segmentation","no_dust","um_dump","no_diags"],
"opt_confs": ["physics_segmentation","um_dump","no_diags"],
"resolution": "C48_MG",
"DT": 1800,
"tsteps": 36,
Expand All @@ -136,9 +136,9 @@
{% do task_dict.update({"kgo_checks": []}) %}
{% endif %}

{% elif task_ns.conf_name == "nwp_gal9_noukca_2T-C48_MG" %}
{% elif task_ns.conf_name == "nwp_gal9_2T-C48_MG" %}
{% do task_dict.update({
"opt_confs": ["physics_segmentation","no_dust","um_dump","no_diags"],
"opt_confs": ["physics_segmentation","um_dump","no_diags"],
"resolution": "C48_MG",
"DT": 1800,
"tsteps": 36,
Expand All @@ -152,9 +152,9 @@
{% do task_dict.update({"kgo_checks": []}) %}
{% endif %}

{% elif task_ns.conf_name == "nwp_gal9_noukca_4T-C48_MG" %}
{% elif task_ns.conf_name == "nwp_gal9_4T-C48_MG" %}
{% do task_dict.update({
"opt_confs": ["physics_segmentation","no_dust","um_dump","no_diags"],
"opt_confs": ["physics_segmentation","um_dump","no_diags"],
"resolution": "C48_MG",
"DT": 1800,
"tsteps": 36,
Expand All @@ -168,21 +168,21 @@
{% do task_dict.update({"kgo_checks": []}) %}
{% endif %}

{% elif task_ns.conf_name == "nwp_gal9_noukca_3n_1T-C192_MG" %}
{% elif task_ns.conf_name == "nwp_gal9_3n_1T-C192_MG" %}

{% do task_dict.update({
"opt_confs": ["physics_segmentation","no_dust","um_dump","no_diags"],
"opt_confs": ["physics_segmentation","um_dump","no_diags"],
"resolution": "C192_MG",
"DT": 720,
"tsteps": 120,
"mpi_parts": 384,
"threads": 1,
}) %}

{% elif task_ns.conf_name == "nwp_gal9_noukca_3n_2T-C192_MG" %}
{% elif task_ns.conf_name == "nwp_gal9_3n_2T-C192_MG" %}

{% do task_dict.update({
"opt_confs": ["physics_segmentation","no_dust","um_dump","no_diags"],
"opt_confs": ["physics_segmentation","um_dump","no_diags"],
"resolution": "C192_MG",
"DT": 720,
"tsteps": 120,
Expand All @@ -191,10 +191,10 @@
"threads": 2,
}) %}

{% elif task_ns.conf_name == "nwp_gal9_noukca_3n_4T-C192_MG" %}
{% elif task_ns.conf_name == "nwp_gal9_3n_4T-C192_MG" %}

{% do task_dict.update({
"opt_confs": ["physics_segmentation","no_dust","um_dump","no_diags"],
"opt_confs": ["physics_segmentation","um_dump","no_diags"],
"resolution": "C192_MG",
"DT": 720,
"tsteps": 120,
Expand Down
1 change: 1 addition & 0 deletions rose-stem/site/meto/common/suite_config_ex1a.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
NUMA_REGIONS_PER_NODE = 2
LUSTRE_FILESYSTEM = true
ROSE_LAUNCHER = 'mpiexec'
OMP_STACKSIZE=1g

[[EX1A_BUILD]]
[[[environment]]]
Expand Down
36 changes: 18 additions & 18 deletions rose-stem/site/meto/groups/groups_lfric_atm.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@
"ex1a_omp_gnu",
],
"lfric_atm_ex1a_threaded": [
"lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_full-debug-32bit",
"lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_production-32bit",
"lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_full-debug-32bit",
"lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_production-32bit",
"lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_cce_fast-debug-32bit",
"lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_cce_production-32bit",
"lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_gnu_fast-debug-32bit",
Expand All @@ -215,35 +215,35 @@
"ex1a_omp_gnu",
],
"ex1a_omp_C12_cce": [
"lfric_atm_nwp_gal9_noukca_1T-C12_ex1a_cce_fast-debug-32bit",
"lfric_atm_nwp_gal9_noukca_2T-C12_ex1a_cce_fast-debug-32bit",
"lfric_atm_nwp_gal9_1T-C12_ex1a_cce_fast-debug-32bit",
"lfric_atm_nwp_gal9_2T-C12_ex1a_cce_fast-debug-32bit",
"lfric_atm_clim_gal9_1T-C12_ex1a_cce_fast-debug-32bit",
"lfric_atm_clim_gal9_2T-C12_ex1a_cce_fast-debug-32bit",
"lfric_atm_clim_gal9_chem_1T-C12_ex1a_cce_fast-debug-32bit",
"lfric_atm_clim_gal9_chem_2T-C12_ex1a_cce_fast-debug-32bit",
],
"ex1a_omp_C48_cce": [
"lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_cce_fast-debug-32bit",
"lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_cce_fast-debug-32bit",
"lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_cce_fast-debug-32bit",
"lfric_atm_nwp_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit",
"lfric_atm_nwp_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit",
"lfric_atm_nwp_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit",
"lfric_atm_clim_gal9_1T-C48_MG_ex1a_cce_fast-debug-32bit",
"lfric_atm_clim_gal9_2T-C48_MG_ex1a_cce_fast-debug-32bit",
"lfric_atm_clim_gal9_4T-C48_MG_ex1a_cce_fast-debug-32bit",
],
"ex1a_omp_C192_cce": [
"lfric_atm_nwp_gal9_noukca_3n_1T-C192_MG_ex1a_cce_fast-debug-32bit",
"lfric_atm_nwp_gal9_noukca_3n_2T-C192_MG_ex1a_cce_fast-debug-32bit",
"lfric_atm_nwp_gal9_noukca_3n_4T-C192_MG_ex1a_cce_fast-debug-32bit",
"lfric_atm_nwp_gal9_3n_1T-C192_MG_ex1a_cce_fast-debug-32bit",
"lfric_atm_nwp_gal9_3n_2T-C192_MG_ex1a_cce_fast-debug-32bit",
"lfric_atm_nwp_gal9_3n_4T-C192_MG_ex1a_cce_fast-debug-32bit",
],
"ex1a_omp_gnu": [
"lfric_atm_nwp_gal9_noukca_1T-C12_ex1a_gnu_fast-debug-32bit",
"lfric_atm_nwp_gal9_noukca_2T-C12_ex1a_gnu_fast-debug-32bit",
"lfric_atm_nwp_gal9_noukca_1T-C48_MG_ex1a_gnu_fast-debug-32bit",
"lfric_atm_nwp_gal9_noukca_2T-C48_MG_ex1a_gnu_fast-debug-32bit",
"lfric_atm_nwp_gal9_noukca_4T-C48_MG_ex1a_gnu_fast-debug-32bit",
"lfric_atm_nwp_gal9_noukca_3n_1T-C192_MG_ex1a_gnu_fast-debug-32bit",
"lfric_atm_nwp_gal9_noukca_3n_2T-C192_MG_ex1a_gnu_fast-debug-32bit",
"lfric_atm_nwp_gal9_noukca_3n_4T-C192_MG_ex1a_gnu_fast-debug-32bit",
"lfric_atm_nwp_gal9_1T-C12_ex1a_gnu_fast-debug-32bit",
"lfric_atm_nwp_gal9_2T-C12_ex1a_gnu_fast-debug-32bit",
"lfric_atm_nwp_gal9_1T-C48_MG_ex1a_gnu_fast-debug-32bit",
"lfric_atm_nwp_gal9_2T-C48_MG_ex1a_gnu_fast-debug-32bit",
"lfric_atm_nwp_gal9_4T-C48_MG_ex1a_gnu_fast-debug-32bit",
"lfric_atm_nwp_gal9_3n_1T-C192_MG_ex1a_gnu_fast-debug-32bit",
"lfric_atm_nwp_gal9_3n_2T-C192_MG_ex1a_gnu_fast-debug-32bit",
"lfric_atm_nwp_gal9_3n_4T-C192_MG_ex1a_gnu_fast-debug-32bit",
"lfric_atm_clim_gal9_1T-C12_ex1a_gnu_fast-debug-32bit",
"lfric_atm_clim_gal9_2T-C12_ex1a_gnu_fast-debug-32bit",
"lfric_atm_clim_gal9_chem_1T-C12_ex1a_gnu_fast-debug-32bit",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Inner product checksum rho = 46D7F6F5
Inner product checksum theta = 518E7E86
Inner product checksum u = 6B17CB5F
Inner product checksum mr1 = 3FCBD858
Inner product checksum mr2 = 37C2FD11
Inner product checksum mr3 = 34CEC474
Inner product checksum mr4 = 36CCBB27
Inner product checksum mr5 = 0
Inner product checksum mr6 = 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Inner product checksum rho = 48D7FDF2
Inner product checksum theta = 5392A6D4
Inner product checksum u = 6A97C1C8
Inner product checksum mr1 = 41CD0A6C
Inner product checksum mr2 = 39CA0FC6
Inner product checksum mr3 = 37B1AE5A
Inner product checksum mr4 = 39608489
Inner product checksum mr5 = 0
Inner product checksum mr6 = 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Inner product checksum rho = 46D7F7DE
Inner product checksum theta = 518E7EA1
Inner product checksum u = 6B17C572
Inner product checksum mr1 = 3FCBE9BB
Inner product checksum mr2 = 37B9B7A7
Inner product checksum mr3 = 34CF2B07
Inner product checksum mr4 = 36D31CAE
Inner product checksum mr5 = 0
Inner product checksum mr6 = 0
Loading