Skip to content
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
| james-bruten-mo | James Bruten | Met Office | 2025-12-09 |
| jennyhickson | Jenny Hickson | Met Office | 2025-12-10 |
| mo-marqh | mark Hedley | Met Office | 2025-12-11 |
| tommbendall | Thomas Bendall | Met Office | 2025-01-15 |
4 changes: 2 additions & 2 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ lfric_apps:
ref:

lfric_core:
source: git@github.com:MetOffice/lfric_core.git
ref: 2025.12.1
source: git@github.com:tommbendall/lfric_core.git
ref: TBendall/FixW0WthFilter

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

!!!!!!!!!! END OF VARIABLE DEFINITION, START OF CODE !!!!!!!!!!
if ( subroutine_timers ) call timer("skeb_main_alg")

Expand Down Expand Up @@ -378,10 +382,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 @@ -223,6 +223,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

if ( subroutine_timers ) call timer("spt_main_alg")

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Expand Down Expand Up @@ -284,10 +288,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 @@ -47,6 +47,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 @@ -56,10 +62,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 @@ -79,8 +85,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 @@ -151,12 +157,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 = 46D6652A
Inner product checksum theta = 518E93EC
Inner product checksum u = 6AF54A1D
Inner product checksum mr1 = 3FD199FC
Inner product checksum mr2 = 373A4F06
Inner product checksum mr3 = 35526759
Inner product checksum mr4 = 36CD3F45
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
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 46D65056
Inner product checksum theta = 51925277
Inner product checksum u = 6B2213D6
Inner product checksum mr1 = 3FCF401D
Inner product checksum mr2 = 3723DA1E
Inner product checksum mr3 = 353FBE95
Inner product checksum mr4 = 369202EA
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
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 48D65CA4
Inner product checksum theta = 5399FF37
Inner product checksum u = 6B12F9D3
Inner product checksum mr1 = 41CC35F8
Inner product checksum mr2 = 3964700B
Inner product checksum mr3 = 37C885DA
Inner product checksum mr4 = 393CC0EB
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
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 46D65029
Inner product checksum theta = 51925282
Inner product checksum u = 6B222646
Inner product checksum mr1 = 3FCF441A
Inner product checksum mr2 = 373420D6
Inner product checksum mr3 = 353B5108
Inner product checksum mr4 = 369534B7
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
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 48D65C9E
Inner product checksum theta = 5399FF36
Inner product checksum u = 6B12F9E6
Inner product checksum mr1 = 41CC34F5
Inner product checksum mr2 = 39628562
Inner product checksum mr3 = 37CADBE8
Inner product checksum mr4 = 393CFC10
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
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 48D65C98
Inner product checksum theta = 5399FF37
Inner product checksum u = 6B12FA76
Inner product checksum mr1 = 41CC32D9
Inner product checksum mr2 = 396638BD
Inner product checksum mr3 = 37CAADA4
Inner product checksum mr4 = 393EB70D
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
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 46D66780
Inner product checksum theta = 518E9690
Inner product checksum u = 6AF50DE9
Inner product checksum mr1 = 3FD15B81
Inner product checksum mr2 = 37581AA6
Inner product checksum mr3 = 355FE797
Inner product checksum mr4 = 36D86CA0
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
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 46D6516E
Inner product checksum theta = 519250DF
Inner product checksum u = 6B22BA14
Inner product checksum mr1 = 3FCF2C92
Inner product checksum mr2 = 3737929A
Inner product checksum mr3 = 35357886
Inner product checksum mr4 = 36A9CD80
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
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 46D65134
Inner product checksum theta = 5192506E
Inner product checksum u = 6B22D6CD
Inner product checksum mr1 = 3FCF4DA0
Inner product checksum mr2 = 3736B1D8
Inner product checksum mr3 = 353E60FE
Inner product checksum mr4 = 36A0052E
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
Loading