Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
4a7b1fc
Merge pull request #5 from MetOffice/stable
tommbendall Mar 9, 2026
92ac379
Merge pull request #13 from MetOffice/stable
tommbendall Jul 20, 2026
364168f
first pass at factoring constants out of SI operators
tommbendall Jul 23, 2026
3190af6
all tests passing
tommbendall Jul 24, 2026
306a844
update copyright statement
tommbendall Jul 24, 2026
2b97cf4
update KGOs
tommbendall Jul 24, 2026
db22e60
rose-meta tidy up and upgrade macro
tommbendall Aug 4, 2026
7376d41
fix upgrade macro
tommbendall Aug 4, 2026
c1cc154
fix upgrade macro again
tommbendall Aug 4, 2026
340712d
more rose-meta fixes
tommbendall Aug 4, 2026
5917577
TR-BDF2 compiling. Also add tasks
tommbendall Aug 7, 2026
bd7b8ab
fixes, which get a local example running
tommbendall Aug 7, 2026
a3d4e15
fix typo in tasks
tommbendall Aug 7, 2026
a20692e
fix task names
tommbendall Aug 7, 2026
2f2a264
tau_r_dt fix
tommbendall Aug 7, 2026
f817866
get tau_r_dt from stored value
tommbendall Aug 7, 2026
e151e8f
some fixes, and first attempt at TR-BDF2 diagnostics
tommbendall Aug 8, 2026
b807692
copy over KGOs
tommbendall Aug 8, 2026
189e6b8
Merge branch 'si_operator_dt' into tr_bdf2
tommbendall Aug 8, 2026
830205c
adopt new SI operator split
tommbendall Aug 8, 2026
1c946e7
fix silly error
tommbendall Aug 8, 2026
f5b19b3
missing KGO file
tommbendall Aug 10, 2026
08396f3
fixes to test cases
tommbendall Aug 10, 2026
0a3cc39
linear and adjoint fixes
tommbendall Aug 11, 2026
35b1081
adjustments for RAL task
tommbendall Aug 11, 2026
9e08fec
revert diagnostic changes, and add documentation
tommbendall Aug 13, 2026
952d14d
new lines at end of file
tommbendall Aug 13, 2026
88292d1
fixes to shallow-water app and gungho unit-tests
tommbendall Aug 13, 2026
89859c6
actually fix shallow water
tommbendall Aug 13, 2026
9d90abf
copilot review suggestions
tommbendall Aug 17, 2026
d3cf600
fix linear integration test, improve config checks, correct upgrade
tommbendall Aug 17, 2026
1a556dc
Merge branch 'tr_bdf2' of github.com:tommbendall/lfric_apps into tr_bdf2
tommbendall Aug 17, 2026
ddaadcd
actually fix upgrade macro
tommbendall Aug 17, 2026
77c1268
urgh silly typo
tommbendall Aug 17, 2026
b08c1e1
ian comments
tommbendall Aug 19, 2026
4b3b8df
typo
tommbendall Aug 19, 2026
de850ab
and update memory
tommbendall Aug 19, 2026
b30b42a
change RAL settings
tommbendall Aug 19, 2026
ac252eb
remove rogue extra line
tommbendall Aug 21, 2026
b2a01f5
documentation improvements, and add solver flux to BDF tracer transport
tommbendall Aug 21, 2026
be6cc39
documentation improvements, and avoid unnecessary flux precomputations
tommbendall Aug 25, 2026
1d12ccf
fix precision issue
tommbendall Aug 25, 2026
31b28bd
improvements following science review
tommbendall Sep 21, 2026
5d7be04
oops missed one thing
tommbendall Sep 21, 2026
871ca51
and also missed this science review request
tommbendall Sep 21, 2026
a3eefe1
update lfric_atm rose-stem README
tommbendall Sep 21, 2026
bfc480a
align ampersands
tommbendall Sep 24, 2026
200ab1a
pass stepper through adjoint transport controller
tommbendall Sep 24, 2026
c20069b
allow multiple solver instances
tommbendall Oct 23, 2026
bc738c8
Merge branch 'si_operator_dt' into tr_bdf2
tommbendall Oct 23, 2026
cffb14b
tr and bdf2 have different solvers
tommbendall Oct 23, 2026
987eb59
Merge remote-tracking branch 'upstream/main' into tr_bdf2
tommbendall Oct 28, 2026
aca1fb1
fix typo in upgrade macro
tommbendall Oct 28, 2026
b2cbe62
fix radiation issue by ensuring that n_inc_radstep isn't trig-ignored
tommbendall Oct 30, 2026
5d81a1b
update settings
tommbendall Oct 30, 2026
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 applications/adjoint_tests/example/configuration.nml
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ timestep_start='1',
&timestepping
alpha=0.55,
dt=1800,
inner_iterations=1,
inner_iterations_si=1,1
method='semi_implicit',
outer_iterations=2,
runge_kutta_method='forward_euler',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module atlt_rhs_alg_mod
use adjoint_test_parameters_mod, only : ls_u_range, ls_theta_range, &
ls_rho_range, ls_exner_range, &
ls_md1_range, ls_md2_range, ls_md3_range
use dycore_constants_mod, only : stepper_siqn

implicit none

Expand Down Expand Up @@ -208,7 +209,7 @@ module atlt_rhs_alg_mod
! Tangent linear
call tl_rhs_alg( rhs, alpha_dt, base_state, state, moist_dyn, &
ls_state, ls_moist_dyn, compute_eos, &
dlayer_rhs, model_clock )
dlayer_rhs, stepper_siqn, model_clock )

! < Mx, Mx >
call invoke( x_innerproduct_x( base_state_inner_prod(igh_u), base_state(igh_u) ), &
Expand Down Expand Up @@ -312,7 +313,7 @@ module atlt_rhs_alg_mod
! Adjoint
call atl_rhs_alg( rhs, alpha_dt, base_state, state, moist_dyn, &
ls_state, ls_moist_dyn, compute_eos, &
dlayer_rhs, model_clock )
dlayer_rhs, stepper_siqn, model_clock )

! < AMx, x >
call invoke( x_innerproduct_y( base_state_base_state_input_inner_prod(igh_u), &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module adjt_transport_controller_alg_mod
use finite_element_config_mod, only : element_order_h, &
element_order_v
use fs_continuity_mod, only : W2, W3
use dycore_constants_mod, only : stepper_siqn
use init_from_controller_alg_mod, only : init_ctrlr_fieldvals
use inner_from_controller_rdef_alg_mod, only : ctrlr_ref_field_prod_rdef, &
ctrlr_ref_field_inp_prod_rdef, &
Expand Down Expand Up @@ -166,6 +167,7 @@ module adjt_transport_controller_alg_mod
ref_field_inner_prod = 0.0_r_def
call ls_wind_pert_rho_controller%initialise( config, &
model_clock, &
stepper_siqn, &
ref_field_rdef, &
ls_wind_n_rdef, &
ls_wind_np1_rdef, &
Expand Down Expand Up @@ -355,6 +357,7 @@ module adjt_transport_controller_alg_mod
wind_np1_inner_prod = 0.0_r_def
call pert_wind_ls_rho_controller%initialise( config, &
model_clock, &
stepper_siqn, &
ls_ref_field_rdef, &
wind_n_rdef, &
wind_np1_rdef, &
Expand Down Expand Up @@ -398,7 +401,7 @@ module adjt_transport_controller_alg_mod
wn_wn_inp_inner_prod = 0.0_r_def
wnp1_wnp1_inp_inner_prod = 0.0_r_def
call adj_pert_wind_ls_rho_initialiser( pert_wind_ls_rho_controller, &
model_clock, &
model_clock, stepper_siqn, &
wind_n_rdef, &
wind_np1_rdef )

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module atlt_transport_control_alg_mod
use field_mod, only : field_type
use function_space_mod, only : function_space_type
use constants_mod, only : r_def, i_def, l_def
use dycore_constants_mod, only : stepper_siqn
use log_mod, only : log_event, &
log_scratch_space, &
LOG_LEVEL_INFO, &
Expand Down Expand Up @@ -275,7 +276,7 @@ module atlt_transport_control_alg_mod
wind_np1, wind_n, mr_out, mr_in, &
ls_advected_fields, &
ls_wind_np1, ls_wind_n, ls_mr_in, &
model_clock, outer )
model_clock, outer, stepper_siqn )

! < Mx, Mx >
adv_inc_inner_prod = 0.0_r_def
Expand Down Expand Up @@ -384,7 +385,8 @@ module atlt_transport_control_alg_mod
wind_np1, wind_n, mr_out, mr_in, &
ls_advected_fields, &
ls_wind_np1, ls_wind_n, ls_mr_in, &
model_clock, outer, adj_lookup_table_cache )
model_clock, outer, stepper_siqn, &
adj_lookup_table_cache )

! < AMx, x >
ai_ai_inp_inner_prod = 0.0_r_def
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module atlt_transport_controller_alg_mod

use config_mod, only : config_type
use constants_mod, only : i_def, r_def, l_def
use dycore_constants_mod, only : stepper_siqn
use field_mod, only : field_type
use r_tran_field_mod, only : r_tran_field_type
use log_mod, only : log_event, &
Expand Down Expand Up @@ -197,7 +198,7 @@ module atlt_transport_controller_alg_mod
setval_X( wind_np1_rdef_inp, wind_np1_rdef ) )

! Initialise tl_transport_controller object
call tl_transport_controller%initialise( config, model_clock, &
call tl_transport_controller%initialise( config, model_clock, stepper_siqn, &
Comment thread
DrTVockerodtMO marked this conversation as resolved.
Resolved
ref_field_rdef, ls_ref_field_rdef, &
wind_n_rdef, wind_np1_rdef, &
ls_wind_n_rdef, ls_wind_np1_rdef, &
Expand Down Expand Up @@ -257,6 +258,7 @@ module atlt_transport_controller_alg_mod
rf_rf_inp_inner_prod = 0.0_r_def
call atl_transport_controller_initialiser( tl_transport_controller, &
model_clock, &
stepper_siqn, &
ref_field_rdef, &
wind_n_rdef, &
wind_np1_rdef )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module setup_test_alg_mod
use transport_metadata_collection_mod, only : transport_metadata_collection
use transport_controller_mod, only : transport_controller_type
use transport_counter_mod, only : transport_counter_type
use dycore_constants_mod, only : stepper_siqn

implicit none

Expand Down Expand Up @@ -167,7 +168,7 @@ module setup_test_alg_mod
outer = 1_i_def

! Initialise tl_transport_controller object
call tl_transport_controller%initialise( config, model_clock, &
call tl_transport_controller%initialise( config, model_clock, stepper_siqn, &
ref_field_rdef, ls_ref_field_rdef, &
wind_n_rdef, wind_np1_rdef, &
ls_wind_n_rdef, ls_wind_np1_rdef, &
Expand Down
2 changes: 1 addition & 1 deletion applications/gravity_wave/example/configuration.nml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ max_tiled_multigrid_level = 1
&timestepping
alpha = 0.5
dt = 100.0
inner_iterations = 2
inner_iterations_si = 2,2
method = 'semi_implicit'
outer_iterations = 2
runge_kutta_method = 'ssp3'
Expand Down
2 changes: 1 addition & 1 deletion applications/gungho_model/example/configuration.nml
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ timestep_start='1',
&timestepping
alpha=0.55,
dt=3600,
inner_iterations=2,
inner_iterations_si=2,2
method='semi_implicit',
outer_iterations=2,
runge_kutta_method='forward_euler',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ calendar_start='2016-01-01 15:00:00',
&timestepping
alpha=0.5,
dt=1000.0,
inner_iterations=2,
inner_iterations_si=2,2
method='semi_implicit',
outer_iterations=2,
runge_kutta_method='ssp5',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ calendar_start='2016-01-01 15:00:00',
&timestepping
alpha=0.5,
dt=1000.0,
inner_iterations=2,
inner_iterations_si=2,2
method='semi_implicit',
outer_iterations=2,
runge_kutta_method='ssp5',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ calendar_start='2016-01-01 15:00:00',
&timestepping
alpha=0.5,
dt=10.0,
inner_iterations=2,
inner_iterations_si=2,2
method='semi_implicit',
outer_iterations=2,
runge_kutta_method='ssp5',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ calendar_start='2016-01-01 15:00:00',
&timestepping
alpha=0.5,
dt=10.0,
inner_iterations=2,
inner_iterations_si=2,2
method='semi_implicit',
outer_iterations=2,
runge_kutta_method='ssp5',
Expand Down
2 changes: 1 addition & 1 deletion applications/jedi_lfric_tests/example/configuration.nml
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ timestep_start='1',
&timestepping
alpha=0.55,
dt=1800,
inner_iterations=1,
inner_iterations_si=1,1
method='semi_implicit',
outer_iterations=2,
runge_kutta_method='forward_euler',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ timestep_start='1',
&timestepping
alpha=0.5,
dt=90,
inner_iterations=2,
inner_iterations_si=2,2
method='semi_implicit',
outer_iterations=2,
runge_kutta_method='forward_euler',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ timestep_start='1',
&timestepping
alpha=0.55,
dt=1800,
inner_iterations=1,
inner_iterations_si=1,1
method='semi_implicit',
outer_iterations=2,
runge_kutta_method='forward_euler',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ timestep_start='1',
&timestepping
alpha=0.55,
dt=1800,
inner_iterations=1,
inner_iterations_si=1,
method='semi_implicit',
outer_iterations=1,
runge_kutta_method='forward_euler',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ timestep_start='1',
&timestepping
alpha=0.55,
dt=3600,
inner_iterations=2,
inner_iterations_si=2,2
method='semi_implicit',
outer_iterations=2,
runge_kutta_method='forward_euler',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ timestep_start='1',
&timestepping
alpha=0.55,
dt=1800,
inner_iterations=1,
inner_iterations_si=1,
method='semi_implicit',
outer_iterations=1,
runge_kutta_method='forward_euler',
Expand Down
2 changes: 1 addition & 1 deletion applications/jules/example/configuration.nml
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ timestep_start='1',
&timestepping
alpha=0.55,
dt=600,
inner_iterations=2,
inner_iterations_si=2,
method='jules',
outer_iterations=1,
runge_kutta_method='forward_euler',
Expand Down
2 changes: 1 addition & 1 deletion applications/lfric_atm/example/configuration.nml
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ timestep_start='1',
&timestepping
alpha=0.55,
dt=1200,
inner_iterations=2,
inner_iterations_si=2
method='semi_implicit',
outer_iterations=1,
runge_kutta_method='forward_euler',
Expand Down
2 changes: 1 addition & 1 deletion applications/name_transport/example/configuration.nml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ calendar_origin='2016-01-01 15:00:00'
&timestepping
alpha=0.5,
dt=4050.0,
inner_iterations=2,
inner_iterations_si=2,2
method='rk',
outer_iterations=2,
runge_kutta_method='forward_euler',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ contains
subroutine name_transport_step( config, model_clock, wind, tracer_con, &
rho, transport_density )

use dycore_constants_mod, only: stepper_rk
use init_gungho_prognostics_alg_mod, only: init_u_field
use model_clock_mod, only: model_clock_type
use sci_mass_matrix_solver_alg_mod, only: mass_matrix_solver_alg
Expand Down Expand Up @@ -226,7 +227,7 @@ contains
primary_mesh => wind%get_mesh()

! Initialise the main transport controller ---------------------------------
call transport_controller%initialise( config, model_clock, rho, wind )
call transport_controller%initialise( config, model_clock, stepper_rk, rho, wind )

! Transport dry density
if (transport_density) then
Expand Down
2 changes: 1 addition & 1 deletion applications/ngarch/example/configuration_bl.nml
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ timestep_start='1',
&timestepping
alpha=0.55,
dt=600,
inner_iterations=2,
inner_iterations_si=2,
method='semi_implicit',
outer_iterations=1,
runge_kutta_method='forward_euler',
Expand Down
2 changes: 1 addition & 1 deletion applications/ngarch/example/configuration_casim.nml
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ timestep_start='1',
&timestepping
alpha=0.55,
dt=600,
inner_iterations=2,
inner_iterations_si=2,
method='semi_implicit',
outer_iterations=1,
runge_kutta_method='forward_euler',
Expand Down
2 changes: 1 addition & 1 deletion applications/shallow_water/example/configuration.nml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ dt = 0.001
! O(500) for thermal double vortex test case (res 120: 486 s)
alpha = 0.5
outer_iterations = 2
inner_iterations = 2
inner_iterations_si = 2,2
runge_kutta_method = 'ssp3'
! This runge_kutta_method does not affect the shallow water miniapp
spinup_alpha = .false.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module swe_timestep_alg_mod

! Constants
use constants_mod, only: i_def, r_def
use dycore_constants_mod, only: stepper_siqn, stepper_rk
use field_indices_mod, only: isw_u, &
isw_g, &
isw_b, &
Expand All @@ -36,7 +37,7 @@ module swe_timestep_alg_mod
tik, LPROF
use timestepping_config_mod, only: alpha, &
outer_iterations, &
inner_iterations
inner_iterations_si
use transport_config_mod, only: cheap_update

! Derived Types
Expand Down Expand Up @@ -486,13 +487,14 @@ contains
outer_dynamics_loop: do outer = 1,outer_iterations

! Advect quantities
call swe_transport_control_alg_step( config, &
rhs_adv, &
adv_fields, &
state_n, &
state, &
model_clock, &
outer, &
call swe_transport_control_alg_step( config, &
rhs_adv, &
adv_fields, &
state_n, &
state, &
model_clock, &
outer, &
stepper_siqn, &
wind_prev )

! Set wind_prev to be latest estimate of wind
Expand Down Expand Up @@ -530,7 +532,7 @@ contains
!============================================================================
! Start the inner loop
!============================================================================
inner_dynamics_loop: do inner = 1,inner_iterations
inner_dynamics_loop: do inner = 1,inner_iterations_si(outer)

! Build residual: -R = -( rhs(state, alpha) - rhs(state_n, alpha-1) - rhs_adv)
call swe_rhs_alg( rhs_np1, alpha_dt, state, s_geopot )
Expand Down Expand Up @@ -668,13 +670,14 @@ contains
! Advect quantities
outer_iteration = 1_i_def
call rhs_adv%set_scalar(0.0_r_def)
call swe_transport_control_alg_step( config, &
rhs_adv, &
adv_fields, &
state_n, &
state, &
model_clock, &
outer_iteration )
call swe_transport_control_alg_step( config, &
rhs_adv, &
adv_fields, &
state_n, &
state, &
model_clock, &
outer_iteration, &
stepper_rk )

! Put RHS together
call rhs_n%axpy(1.0_r_def, rhs_adv)
Expand Down
Loading
Loading