Skip to content
2 changes: 1 addition & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
| mo-jmanners | James Manners | Met Office | 2026-01-14 |
| maggiehendry | Maggie Hendry | Met Office | 2026-01-29 |
| stevemullerworth | Steve Mullerworth | Met Office | 2026-01-28 |
| jameskent-metoffice | James Kent | Met Office | 2026-01-21 |
| jameskent-metoffice | James Kent | Met Office | 2026-01-21 |
5 changes: 2 additions & 3 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ jules:
ref: 69aaf4d8e5dcf4e0134aac006b183e591aeb94d7

lfric_apps:
source:
ref:

lfric_core:
source: git@github.com:MetOffice/lfric_core.git
ref: bbb3d8a69a2671df93859f617bbe336c6715476f
source: cazld00001N:/home/users/cameron.bateman/code-reviews/lfric_core
ref: b71dd878b642a04a2142bc63db0b0e142177cc46

moci:
source: git@github.com:MetOffice/moci.git
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,8 @@ values='fd','fe'
[namelist:stochastic_physics=skeb_level_bottom]
compulsory=true
description=Bottom level of SKEB calculations
help=Bottom level of SKEB calculations - model level a little above surface
help=The bottom pressure-level at which SKEB is active.
=A value of 1 corresponds to the lowest level of the model.
ns=namelist/Science/Stochastic Physics/SKEB
range=2:60
sort-key=Panel-A3a
Expand All @@ -845,7 +846,7 @@ type=integer
[namelist:stochastic_physics=skeb_level_top]
compulsory=true
description=Top level of SKEB calculations
help=Top level of SKEB calculations - model level at or just above tropopause
help=If the model has N layers, a value of N would correspond to the top layer.
ns=namelist/Science/Stochastic Physics/SKEB
range=30:200
sort-key=Panel-A3b
Expand Down Expand Up @@ -963,25 +964,29 @@ type=integer

[namelist:stochastic_physics=spt_level_bottom]
compulsory=true
description=Bottom level where SPT is active
=See Help panel for details
help=Bottom level wehre SPT perturbations are applied.
=Though, the tapering at this level is 0 so effectively
=SPT perturbations start one level above, see help-panel
= of spt_level_begin_tapering_bottom.
description=Bottom level at which SPT is active
help=The bottom theta-level at which SPT perturbations are applied.
=A value of 0 would correspond to the surface, so a value of 2 means that
=perturbations are applied from the third theta-level and above.
=Note that the perturbations are actually tapered, so that at the level
=specified here the perturbations will still be 0, and SPT perturbations
=effectively start at one level above this specified value.
=For more information, see help-panel of spt_level_begin_tapering_bottom.
ns=namelist/Science/Stochastic Physics/SPT
range=2:60
sort-key=Panel-A6a
type=integer

[namelist:stochastic_physics=spt_level_top]
compulsory=true
description=Top level where SPT is active
=See Help panel for details
help=Top level where SPT perturbations are applied.
description=Top level at which SPT is active
help=The top theta-level at which SPT perturbations are applied.
=If the model has N layers, a value of N would correspond to the top
=boundary. Note that the perturbations are actually tapered, so that at the
=level specified here the perturbations will still be 0, and SPT
=perturbations effectively start at one level below this specified value.
=Though, the tapering at this level is 0 so effectively
=SPT perturbations start one level below, see help-panel
= of spt_level_begin_tapering_top.
=For more information, see help-panel of spt_level_begin_tapering_top.
ns=namelist/Science/Stochastic Physics/SPT
range=30:200
sort-key=Panel-A6d
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,10 @@ module skeb_main_alg_mod
! Iterators in for loops
integer(i_def) :: m, n, n_row, stencil_extent

! SKEB calculations are performed at cell centres (W3 points). To index the
! "eta_theta_levels" array correctly at these points, set offset to 1
integer(kind=i_def), parameter :: lev_offset = 1

! Timing handle
integer(tik) :: id_skeb, id_diags

Expand Down Expand Up @@ -381,10 +385,10 @@ module skeb_main_alg_mod
end if

!!!!!! 1.b call stph_fp_main to create forcing pattern for SKEB
call stph_fp_main_alg(skeb_level_bottom-1_i_def, skeb_level_top-1_i_def, &
stph_n_min, stph_n_max, stph_spectral_dim, &
skeb_alpha, skeb_power_law, &
skeb_spectral_coeffc, skeb_spectral_coeffs, &
call stph_fp_main_alg(skeb_level_bottom-1_i_def, skeb_level_top-1_i_def, &
lev_offset, stph_n_min, stph_n_max, stph_spectral_dim, &
skeb_alpha, skeb_power_law, &
skeb_spectral_coeffc, skeb_spectral_coeffs, &
fp_skeb)

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ module spt_main_alg_mod
! iterators in for loops
integer(i_def) :: n,n_row, m

! SPT calculations are performed at theta-levels (Wtheta points). To index the
! "eta_theta_levels" array correctly at these points, set offset to 0
integer(kind=i_def), parameter :: lev_offset = 0

! Timestepping_config_mod scalar (for PSyclone to know data type)
real(kind=r_second) :: timestepping_config_mod_dt

Expand Down Expand Up @@ -298,10 +302,10 @@ module spt_main_alg_mod
call invoke( setval_c(fp_spt, 0.0_r_def))

! Create forcing pattern for SPT
call stph_fp_main_alg(spt_level_bottom, spt_level_top, &
1, stph_n_max, stph_spectral_dim, &
spt_alpha, spt_power_law, &
spt_spectral_coeffc, spt_spectral_coeffs, &
call stph_fp_main_alg(spt_level_bottom, spt_level_top, lev_offset, &
1, stph_n_max, stph_spectral_dim, &
spt_alpha, spt_power_law, &
spt_spectral_coeffc, spt_spectral_coeffs, &
fp_spt)

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ module stph_fp_main_alg_mod

!>@param[in] level_bottom Bottom level of the stochastic scheme
!>@param[in] level_top Top level of the stochastic scheme
!>@param[in] level_offset Level offset. This routine can be
!! applied at W3 and Wtheta points,
!! but both implementations index
!! from the same "eta_theta_levels"
!! array, so need an offset to index
!! correctly. Set 0 Wtheta, 1 for W3
!>@param[in] wavenumber_min Minimum wavenumber applied to build the FP
!>@param[in] wavenumber_max Maximum wavenumber applied to build the FP
!>@param[in] spectral_dim Dimension of spectral coeffients arrays
Expand All @@ -55,10 +61,10 @@ module stph_fp_main_alg_mod
!>@param[in,out] spectral_coeffs Imaginary Spectral coefficients
!>@param[i,out] fp Forcing pattern

subroutine stph_fp_main_alg(level_bottom, level_top, &
wavenumber_min, wavenumber_max, &
spectral_dim, alpha, power_law, &
spectral_coeffc, spectral_coeffs, &
subroutine stph_fp_main_alg(level_bottom, level_top, level_offset, &
wavenumber_min, wavenumber_max, &
spectral_dim, alpha, power_law, &
spectral_coeffc, spectral_coeffs, &
fp)

! TO DO after PSyclone ticket 1312
Expand All @@ -78,8 +84,8 @@ module stph_fp_main_alg_mod

!!!! Arguments
! Scalars with scheme levels, wavenumbers and spectral dimensions
integer(kind=i_def), intent(in) :: level_bottom, level_top, &
wavenumber_min, wavenumber_max, &
integer(kind=i_def), intent(in) :: level_bottom, level_top, level_offset, &
wavenumber_min, wavenumber_max, &
spectral_dim

! spectral coefficients power law and decorrelation
Expand Down Expand Up @@ -153,12 +159,13 @@ module stph_fp_main_alg_mod
my_phi_stph = ATAN2(spectral_coeffs(n_row+m), &
spectral_coeffc(n_row+m))
! Max shift ranges from 0 <-> pi for wavenos 1 <-> wavenumber_max
my_phishft_stph = (wavenumber_max - max(n,m)) * pi / (wavenumber_max-1)
my_phishft_stph = (wavenumber_max - max(n,m)) * pi &
/ (wavenumber_max - wavenumber_min)

do k = level_bottom, level_top

! Apply vertical scaling Level 1 = no change -> 12km Level = max change (=pi)
kr = (domain_height*eta_theta_levels(k))/12.0e3_r_def
kr = (domain_height*eta_theta_levels(k + level_offset))/12.0e3_r_def

! Create coeff with phase shift
coeffc_phase(k, n_row+m) = my_coeff_rad * cos(my_phi_stph + &
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 46D66411
Inner product checksum theta = 518E95C2
Inner product checksum u = 6AF4A509
Inner product checksum mr1 = 3FD1977C
Inner product checksum mr2 = 375C8794
Inner product checksum mr3 = 3534A85C
Inner product checksum mr4 = 36B9C166
Inner product checksum rho = 46D66391
Inner product checksum theta = 518E960E
Inner product checksum u = 6AF41D3E
Inner product checksum mr1 = 3FD1EF1A
Inner product checksum mr2 = 3744B62D
Inner product checksum mr3 = 353557CA
Inner product checksum mr4 = 36C14665
Inner product checksum mr5 = 0
Inner product checksum mr6 = 0
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 46D66282
Inner product checksum theta = 518E9697
Inner product checksum u = 6AF4EDB0
Inner product checksum mr1 = 3FD1A816
Inner product checksum mr2 = 372DA48E
Inner product checksum mr3 = 355FEEE4
Inner product checksum mr4 = 36BADA78
Inner product checksum rho = 46D66988
Inner product checksum theta = 518E9953
Inner product checksum u = 6AF43368
Inner product checksum mr1 = 3FD1683B
Inner product checksum mr2 = 3745B57B
Inner product checksum mr3 = 352B1260
Inner product checksum mr4 = 36B980D2
Inner product checksum mr5 = 0
Inner product checksum mr6 = 0
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 46D66645
Inner product checksum theta = 518E9258
Inner product checksum u = 6AF5B934
Inner product checksum mr1 = 3FD1882C
Inner product checksum mr2 = 372DB77C
Inner product checksum mr3 = 3550CFFF
Inner product checksum mr4 = 36CE2190
Inner product checksum rho = 46D6654E
Inner product checksum theta = 518E92A4
Inner product checksum u = 6AF61ED5
Inner product checksum mr1 = 3FD1D7F4
Inner product checksum mr2 = 373D2894
Inner product checksum mr3 = 354A0F92
Inner product checksum mr4 = 36C033B4
Inner product checksum mr5 = 0
Inner product checksum mr6 = 0
Inner product checksum mr6 = 0
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 46D65050
Inner product checksum theta = 519252CF
Inner product checksum u = 6B21E348
Inner product checksum mr1 = 3FCF42D1
Inner product checksum mr2 = 37381DAF
Inner product checksum mr3 = 3540D096
Inner product checksum mr4 = 368F0E56
Inner product checksum rho = 46D64EC9
Inner product checksum theta = 51925235
Inner product checksum u = 6B21E18C
Inner product checksum mr1 = 3FCF590B
Inner product checksum mr2 = 37287735
Inner product checksum mr3 = 3538B55A
Inner product checksum mr4 = 36B2F572
Inner product checksum mr5 = 0
Inner product checksum mr6 = 0
Inner product checksum mr6 = 0
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 48D65CA2
Inner product checksum theta = 5399FF3C
Inner product checksum u = 6B12FA97
Inner product checksum mr1 = 41CC37A2
Inner product checksum mr2 = 39653132
Inner product checksum mr3 = 37D05F64
Inner product checksum mr4 = 393DABFB
Inner product checksum rho = 48D65C72
Inner product checksum theta = 5399FF3A
Inner product checksum u = 6B12FBEA
Inner product checksum mr1 = 41CC3576
Inner product checksum mr2 = 3967A439
Inner product checksum mr3 = 37C304A7
Inner product checksum mr4 = 3940CDC7
Inner product checksum mr5 = 0
Inner product checksum mr6 = 0
Inner product checksum mr6 = 0
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 46D65168
Inner product checksum theta = 5192527C
Inner product checksum u = 6B222314
Inner product checksum mr1 = 3FCF2D3A
Inner product checksum mr2 = 37213889
Inner product checksum mr3 = 35332238
Inner product checksum mr4 = 369777BC
Inner product checksum rho = 46D64F18
Inner product checksum theta = 51925206
Inner product checksum u = 6B21EEF5
Inner product checksum mr1 = 3FCF4050
Inner product checksum mr2 = 37532624
Inner product checksum mr3 = 3537ACEB
Inner product checksum mr4 = 369CB401
Inner product checksum mr5 = 0
Inner product checksum mr6 = 0
Inner product checksum mr6 = 0
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 48D65C88
Inner product checksum theta = 5399FF36
Inner product checksum u = 6B12FAA8
Inner product checksum mr1 = 41CC3316
Inner product checksum mr2 = 3964F6F4
Inner product checksum mr3 = 37D7B383
Inner product checksum mr4 = 393DDB1C
Inner product checksum rho = 48D65C64
Inner product checksum theta = 5399FF3D
Inner product checksum u = 6B12FBE8
Inner product checksum mr1 = 41CC35EE
Inner product checksum mr2 = 39665FD3
Inner product checksum mr3 = 37C5CAC2
Inner product checksum mr4 = 3940CE5A
Inner product checksum mr5 = 0
Inner product checksum mr6 = 0
Inner product checksum mr6 = 0
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 48D65C9A
Inner product checksum theta = 5399FF32
Inner product checksum u = 6B12FB2D
Inner product checksum mr1 = 41CC3064
Inner product checksum mr2 = 3965037F
Inner product checksum mr3 = 37CA7B1F
Inner product checksum mr4 = 393E5CEB
Inner product checksum rho = 48D65C6C
Inner product checksum theta = 5399FF3A
Inner product checksum u = 6B12FC64
Inner product checksum mr1 = 41CC350A
Inner product checksum mr2 = 39664DB9
Inner product checksum mr3 = 37C0EC20
Inner product checksum mr4 = 394121CC
Inner product checksum mr5 = 0
Inner product checksum mr6 = 0
Inner product checksum mr6 = 0
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 46D66721
Inner product checksum theta = 518E9952
Inner product checksum u = 6AF570FF
Inner product checksum mr1 = 3FD149C8
Inner product checksum mr2 = 373B0B70
Inner product checksum mr3 = 3542F26A
Inner product checksum mr4 = 36D60834
Inner product checksum rho = 46D6651C
Inner product checksum theta = 518E911A
Inner product checksum u = 6AF6B692
Inner product checksum mr1 = 3FD1AA6E
Inner product checksum mr2 = 374E6452
Inner product checksum mr3 = 35374226
Inner product checksum mr4 = 36CAD2D2
Inner product checksum mr5 = 0
Inner product checksum mr6 = 0
Inner product checksum mr6 = 0
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 46D65158
Inner product checksum theta = 51925088
Inner product checksum u = 6B22E36C
Inner product checksum mr1 = 3FCF38CE
Inner product checksum mr2 = 373B43CF
Inner product checksum mr3 = 3538FC26
Inner product checksum mr4 = 369D3958
Inner product checksum rho = 46D64E5B
Inner product checksum theta = 51925086
Inner product checksum u = 6B228DC3
Inner product checksum mr1 = 3FCF67FD
Inner product checksum mr2 = 37390858
Inner product checksum mr3 = 3548209F
Inner product checksum mr4 = 36B280B6
Inner product checksum mr5 = 0
Inner product checksum mr6 = 0
Inner product checksum mr6 = 0
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 46D650A6
Inner product checksum theta = 519250BE
Inner product checksum u = 6B229F64
Inner product checksum mr1 = 3FCF2FBF
Inner product checksum mr2 = 373591AE
Inner product checksum mr3 = 3535C603
Inner product checksum mr4 = 36A3BD88
Inner product checksum rho = 46D64DA0
Inner product checksum theta = 519250B4
Inner product checksum u = 6B2268C8
Inner product checksum mr1 = 3FCF6324
Inner product checksum mr2 = 37350051
Inner product checksum mr3 = 353CED64
Inner product checksum mr4 = 36A91426
Inner product checksum mr5 = 0
Inner product checksum mr6 = 0
Inner product checksum mr6 = 0