Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
e9bdaf4
Progress save
mo-rickywong Mar 17, 2026
bb966f5
Remove global config from init_fem and surrounding code
mo-rickywong Mar 20, 2026
eff9a44
Merge branch 'main' into RmGlobalCfg_Init_fem
mo-rickywong Mar 20, 2026
15b9dda
Commit changes that mean this branch is clear of chi_tranform_mod
mo-rickywong Mar 20, 2026
d55e7c2
Merge branch 'main' into RmGlobalCfg_driver_pt1
mo-rickywong Mar 20, 2026
4becb8b
Merge branch 'RmGlobalCfg_driver_pt1' into RmGlobalCfg_Init_fem
mo-rickywong Mar 21, 2026
27de4c4
Clean out rest of driver
mo-rickywong Mar 22, 2026
4259432
Update multitile provision
mo-rickywong Mar 23, 2026
97a85fe
Update
mo-rickywong Mar 24, 2026
05e0850
Add a newer version of gemoetric constants
mo-rickywong Mar 25, 2026
df1eecc
Reverting file back to original on main
mo-rickywong Mar 25, 2026
7869db7
Need an unaltered compute latlon
mo-rickywong Mar 25, 2026
a019544
Revert old compute latlon
mo-rickywong Mar 25, 2026
131f7fc
Duplicate more
mo-rickywong Mar 25, 2026
bffc6d9
duplicate chi_transform
mo-rickywong Mar 25, 2026
a9ed9e1
update
mo-rickywong Mar 25, 2026
d57f71a
test for new files
mo-rickywong Mar 25, 2026
827e6e1
new files
mo-rickywong Mar 25, 2026
3951a00
update
mo-rickywong Mar 26, 2026
7dd12a7
Getting it back to before
mo-rickywong Mar 26, 2026
f08b803
Pass args, not config_type
mo-rickywong Mar 26, 2026
da8ece9
Merge branch 'main' into RmGlobalCfg_CoreDriver
mo-rickywong Mar 26, 2026
98f849f
Updates
mo-rickywong Mar 31, 2026
e560f49
updates
mo-rickywong Mar 31, 2026
41c3151
Updates
mo-rickywong Apr 1, 2026
33172d9
Merge branch 'main' into RmGlobalCfg_CoreDriver
mo-rickywong Apr 1, 2026
c1220e0
Tidy up and don't pass config type to initialise lfrix-xios as it wil…
mo-rickywong Apr 2, 2026
e1396eb
Passing geometry and toplogy as lfric2lfric may not be using base mesh
mo-rickywong Apr 3, 2026
05d8bc1
Merge branch 'main' into RmGlobalCfg_CoreDriver
mo-rickywong Apr 21, 2026
c3cbd14
Some tidy up, doxygen comments
mo-rickywong Apr 22, 2026
515f892
Remove this accidental commit
mo-rickywong Apr 22, 2026
d4f8af7
Update doxygen comments
mo-rickywong Apr 23, 2026
135eaff
Merge branch 'main' into RmGlobalCfg_CoreDriver
mo-rickywong Apr 23, 2026
71ebba6
Add in update macros
mo-rickywong Apr 29, 2026
6d2589c
Update rose stem to pre-macro state
mo-rickywong Apr 29, 2026
e740180
Add some kinds
mo-rickywong Apr 29, 2026
c68bc2b
Change the version on apps so the upgrade macros will work
mo-rickywong Apr 29, 2026
781111b
Fix existing issues on trunk cause update macro failures
mo-rickywong Apr 29, 2026
c5bfc2f
Update rose meta and macros for driver
mo-rickywong Apr 29, 2026
d9e59d5
Update versions update so that lfric2lfric partition duplicates aren'…
mo-rickywong Apr 29, 2026
946b1ad
Correct rose metadata settings
mo-rickywong Apr 30, 2026
284d495
Merge branch 'main' into fix_rose_stem_io_demo_and_lbc_demo
mo-rickywong Apr 30, 2026
6e2d278
Set io_demo to point to corresponding version of driver
mo-rickywong Apr 30, 2026
2ad260e
Merge branch 'fix_rose_stem_io_demo_and_lbc_demo' into RmGlobalCfg_Co…
mo-rickywong Apr 30, 2026
41fc339
update versions file
mo-rickywong Apr 30, 2026
6f9cdc4
Update some breakages from mergin on head on main
mo-rickywong May 1, 2026
be3a8c3
Tweaks
mo-rickywong May 1, 2026
e55befb
typo
mo-rickywong May 1, 2026
3c135d4
update
mo-rickywong May 1, 2026
ea62f92
Update metadata and macro so that unecessary namlists are not injected
mo-rickywong May 1, 2026
c275342
Update versions.py after app macros modified it
mo-rickywong May 1, 2026
b2c37c9
typo
mo-rickywong May 1, 2026
3395c89
Merge branch 'main' into RmGlobalCfg_CoreDriver
mo-rickywong May 1, 2026
dce3a6c
Remove explict false
mo-rickywong May 2, 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
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ OPERATE_ON ?= infrastructure \
mesh_tools \
applications/skeleton \
applications/simple_diffusion \
applications/coupled \
applications/lbc_demo \
applications/io_demo

Expand Down
3 changes: 3 additions & 0 deletions applications/coupled/example/configuration_glo.nml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ coord_system='native'
&partitioning
partitioner='cubedsphere',
panel_decomposition = 'auto',
tile_size_x=1,
tile_size_y=1,
inner_halo_tiles=.false.
/

&planet
Expand Down
3 changes: 3 additions & 0 deletions applications/coupled/example/configuration_lam.nml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ coord_system='native'
&partitioning
partitioner='planar',
panel_decomposition = 'auto',
tile_size_x=1,
tile_size_y=1,
inner_halo_tiles=.false.
/

&planet
Expand Down
3 changes: 2 additions & 1 deletion applications/coupled/source/coupled.f90
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ program coupled
call init_config( filename, coupled_required_namelists, &
config=modeldb%config )

call init_logger( modeldb%mpi%get_comm(), &
call init_logger( modeldb%config, &
modeldb%mpi%get_comm(), &
program_name//"_"//cpl_component_name )

write(log_scratch_space,'(A)') &
Expand Down
25 changes: 24 additions & 1 deletion applications/coupled/source/driver/coupled_driver_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,17 @@ subroutine initialise( program_name, modeldb, calendar )
integer(i_def) :: geometry
integer(i_def) :: method
integer(i_def) :: number_of_layers
integer(i_def) :: tile_size_x
integer(i_def) :: tile_size_y
real(r_def) :: domain_bottom
real(r_def) :: domain_height
real(r_def) :: scaled_radius
logical :: check_partitions

logical :: inner_halo_tiles
logical :: prepartitioned

integer(i_def), allocatable :: tile_size(:,:)
integer(i_def) :: i
integer(i_def), parameter :: one_layer = 1_i_def

Expand All @@ -91,6 +97,17 @@ subroutine initialise( program_name, modeldb, calendar )
domain_height = modeldb%config%extrusion%domain_height()
number_of_layers = modeldb%config%extrusion%number_of_layers()
scaled_radius = modeldb%config%planet%scaled_radius()
prepartitioned = modeldb%config%base_mesh%prepartitioned()

if (prepartitioned) then
tile_size_x = 1
tile_size_y = 1
inner_halo_tiles = .false.
else
tile_size_x = maxval([1,modeldb%config%partitioning%tile_size_x()])
tile_size_y = maxval([1,modeldb%config%partitioning%tile_size_y()])
inner_halo_tiles = modeldb%config%partitioning%inner_halo_tiles()
end if

! Initialise mesh
! Determine the required meshes
Expand Down Expand Up @@ -120,23 +137,29 @@ subroutine initialise( program_name, modeldb, calendar )
! Create the required meshes
stencil_depth = 1
check_partitions = .false.
allocate(tile_size(2,size(base_mesh_names)))
tile_size(1,:) = tile_size_x
tile_size(2,:) = tile_size_y
call init_mesh( modeldb%config, &
modeldb%mpi%get_comm_rank(), &
modeldb%mpi%get_comm_size(), &
base_mesh_names, extrusion, &
inner_halo_tiles, tile_size, &
stencil_depth, check_partitions )

allocate( twod_names, source=base_mesh_names )
do i=1, size(twod_names)
twod_names(i) = trim(twod_names(i))//'_2d'
end do

call create_mesh( base_mesh_names, extrusion_2d, &
inner_halo_tiles, tile_size, &
alt_name=twod_names )
call assign_mesh_maps( twod_names )


! Build the FEM function spaces and coordinate fields
call init_fem( mesh_collection, chi_inventory, panel_id_inventory )
call init_fem( modeldb%config, chi_inventory, panel_id_inventory )

! Create and initialise prognostic fields
mesh => mesh_collection%get_mesh(prime_mesh_name)
Expand Down
19 changes: 15 additions & 4 deletions applications/coupled/source/driver/init_coupled_mod.X90
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,24 @@ module init_coupled_mod
procedure(write_interface), pointer :: tmp_ptr

integer(i_def) :: order_h, order_v
integer(i_def) :: coord_system
integer(i_def) :: geometry
integer(i_def) :: topology
real(r_def) :: scaled_radius

type(function_space_type), pointer :: fs

call log_event( 'coupled: Initialising app ...', LOG_LEVEL_INFO )

! Get the name of the coupling component
call modeldb%values%get_value("cpl_name", cpl_component_name)

order_h = modeldb%config%finite_element%element_order_h()
order_v = modeldb%config%finite_element%element_order_v()
order_h = modeldb%config%finite_element%element_order_h()
order_v = modeldb%config%finite_element%element_order_v()
coord_system = modeldb%config%finite_element%coord_system()
geometry = modeldb%config%base_mesh%geometry()
topology = modeldb%config%base_mesh%topology()
scaled_radius = modeldb%config%planet%scaled_radius()

fs => function_space_collection%get_fs(mesh, order_h, order_v, W3)

Expand Down Expand Up @@ -122,8 +131,10 @@ module init_coupled_mod
call depository%get_field( trim(name), field_1_ptr)
! Initialise the values in the field that will be sent to the coupler.
! Set them to the longitude of the cell-centre (converted to degrees)
call invoke(compute_latlon_kernel_type(field_2, field_1_ptr, &
chi, panel_id), &
call invoke(compute_latlon_kernel_type(field_2, field_1_ptr, &
chi, panel_id, geometry, &
topology, coord_system, &
scaled_radius), &
inc_a_times_X(radians_to_degrees, field_1_ptr))
! Add that field to the coupling 2d "send" field collection
abs_field_ptr => field_1_ptr
Expand Down
3 changes: 3 additions & 0 deletions applications/io_demo/example/configuration.nml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ coord_system='native'
&partitioning
partitioner='cubedsphere',
panel_decomposition = 'auto',
tile_size_x=1,
tile_size_y=1,
inner_halo_tiles=.false.
/

&planet
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,41 @@
import=lfric-driver/vn3.1

[namelist:io=multifile_io]
[namelist:io_demo]
compulsory=true
description=Provides options for configuring the runtime behaviour of the IO_Demo app
ns=namelist/io_demo
sort-key=Section-A02
title=IO_Demo

[namelist:io_demo=benchmark_sleep_time]
compulsory=true
description=Number of seconds to sleep for each timestep in I/O benchmark mode
!kind=default
type=integer

[namelist:io_demo=io_benchmark]
compulsory=true
description=Configure application to run as an I/O benchmarking tool
help=Configure application to run as an I/O benchmarking tool
!kind=default
trigger=namelist:io_demo=benchmark_sleep_time: .true. ;
=namelist:io_demo=n_benchmark_fields: .true. ;
type=logical

[namelist:io_demo=multifile_io]
compulsory=true
description=Use multifile_io functionality
help=This is used to turn the multifile_io functionality in the io_demo app
=on and off
!kind=default
type=logical

[namelist:io_demo=n_benchmark_fields]
compulsory=true
description=Number of fields created in I/O benchmark
!kind=default
type=integer

[namelist:multifile_io]
compulsory=false
duplicate=true
Expand Down
37 changes: 31 additions & 6 deletions applications/io_demo/source/driver/io_demo_driver_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,22 @@ subroutine initialise(program_name, modeldb)

integer(i_def) :: stencil_depth(1)
integer(i_def) :: geometry
integer(i_def) :: topology
integer(i_def) :: method
integer(i_def) :: number_of_layers
integer(i_def) :: tile_size_x
integer(i_def) :: tile_size_y
real(r_def) :: domain_bottom
real(r_def) :: domain_height
real(r_def) :: scaled_radius
logical :: check_partitions
logical :: multifile_io
logical :: io_benchmark

logical :: check_partitions
logical :: inner_halo_tiles
logical :: prepartitioned
logical :: multifile_io
logical :: io_benchmark

integer(i_def), allocatable :: tile_size(:,:)
integer(i_def), parameter :: one_layer = 1_i_def
integer(i_def) :: i

Expand All @@ -107,13 +114,25 @@ subroutine initialise(program_name, modeldb)
!=======================================================================
prime_mesh_name = modeldb%config%base_mesh%prime_mesh_name()
geometry = modeldb%config%base_mesh%geometry()
topology = modeldb%config%base_mesh%topology()
method = modeldb%config%extrusion%method()
domain_height = modeldb%config%extrusion%domain_height()
number_of_layers = modeldb%config%extrusion%number_of_layers()
scaled_radius = modeldb%config%planet%scaled_radius()
prepartitioned = modeldb%config%base_mesh%prepartitioned()
multifile_io = modeldb%config%io_demo%multifile_io()
io_benchmark = modeldb%config%io_demo%io_benchmark()

if (prepartitioned) then
tile_size_x = 1
tile_size_y = 1
inner_halo_tiles = .false.
else
tile_size_x = maxval([1,modeldb%config%partitioning%tile_size_x()])
tile_size_y = maxval([1,modeldb%config%partitioning%tile_size_y()])
inner_halo_tiles = modeldb%config%partitioning%inner_halo_tiles()
end if

!=======================================================================
! Mesh
!=======================================================================
Expand Down Expand Up @@ -161,24 +180,29 @@ subroutine initialise(program_name, modeldb)
! ---------------------------------------------------------
stencil_depth = 1
check_partitions = .false.
allocate(tile_size(2,size(base_mesh_names)))
tile_size(1,:) = tile_size_x
tile_size(2,:) = tile_size_y
call init_mesh( modeldb%config, &
modeldb%mpi%get_comm_rank(), &
modeldb%mpi%get_comm_size(), &
base_mesh_names, extrusion, &
inner_halo_tiles, tile_size, &
stencil_depth, check_partitions )

allocate( twod_names, source=base_mesh_names )
do i=1, size(twod_names)
twod_names(i) = trim(twod_names(i))//'_2d'
end do
call create_mesh( base_mesh_names, extrusion_2d, &
inner_halo_tiles, tile_size, &
alt_name=twod_names )
call assign_mesh_maps(twod_names)

!=======================================================================
! Build the FEM function spaces and coordinate fields
!=======================================================================
call init_fem( mesh_collection, chi_inventory, panel_id_inventory )
call init_fem( modeldb%config, chi_inventory, panel_id_inventory )

!=======================================================================
! Setup multifile reading
Expand All @@ -201,10 +225,11 @@ subroutine initialise(program_name, modeldb)
if (associated(files_init_ptr)) then
call init_io( program_name, prime_mesh_name, modeldb, &
chi_inventory, panel_id_inventory, &
populate_filelist=files_init_ptr )
geometry, topology, populate_filelist=files_init_ptr )
else
call init_io( program_name, prime_mesh_name, modeldb, &
chi_inventory, panel_id_inventory )
chi_inventory, panel_id_inventory, &
geometry, topology )
end if


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
module multifile_io_mod

use calendar_mod, only: calendar_type
use constants_mod, only: str_def, i_def
use constants_mod, only: str_def, i_def, r_def
use driver_model_data_mod, only: model_data_type
use driver_modeldb_mod, only: modeldb_type
use empty_io_context_mod, only: empty_io_context_type
Expand Down Expand Up @@ -123,11 +123,21 @@ subroutine step_multifile_io(modeldb, chi_inventory, panel_id_inventory)
procedure(event_action), pointer :: context_advance
procedure(callback_clock_arg), pointer :: before_close

integer(i_def) :: geometry
integer(i_def) :: topology
integer(i_def) :: coord_system
real(r_def) :: scaled_radius

nullify(mesh)
nullify(chi)
nullify(panel_id)
nullify(before_close)

geometry = modeldb%config%base_mesh%geometry()
topology = modeldb%config%base_mesh%topology()
coord_system = modeldb%config%finite_element%coord_system()
scaled_radius = modeldb%config%planet%scaled_radius()

call iter%initialise(modeldb%config%multifile_io)
do while (iter%has_next())

Expand Down Expand Up @@ -163,6 +173,8 @@ subroutine step_multifile_io(modeldb, chi_inventory, panel_id_inventory)
chi, panel_id, &
modeldb%clock, tmp_calendar, &
before_close, &
geometry, topology, &
coord_system, scaled_radius, &
start_at_zero=.true. )

! Attach context advancement to the model's clock
Expand Down
4 changes: 3 additions & 1 deletion applications/io_demo/source/io_demo.f90
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ program io_demo

deallocate( filename )

call init_logger(modeldb%mpi%get_comm(), program_name)
call init_logger( modeldb%config, &
modeldb%mpi%get_comm(), &
program_name )

subroutine_timers = modeldb%config%io%subroutine_timers()
timer_output_path = modeldb%config%io%timer_output_path()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ class vn22_t4231(MacroUpgrade):
def upgrade(self, config, meta_config=None):
# Add settings
return config, self.reports
"""


"""
class vn22_t34(MacroUpgrade):
# Upgrade macro for 34 by jennifer hickson

Expand All @@ -50,3 +49,4 @@ class vn22_t34(MacroUpgrade):

def upgrade(self, config, meta_config=None):
return config, self.reports
"""
Loading
Loading