From 2aa3304fd2dccdf7901d7b0f7d86869566fd52b7 Mon Sep 17 00:00:00 2001 From: "ukmo-juan.castillo" Date: Fri, 30 Jan 2026 16:17:09 +0000 Subject: [PATCH 1/3] Issue 192: update partitioning namelist in lfric2lfric --- rose-stem/app/lfric2lfric/rose-app.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rose-stem/app/lfric2lfric/rose-app.conf b/rose-stem/app/lfric2lfric/rose-app.conf index 3da09230b..d90433391 100644 --- a/rose-stem/app/lfric2lfric/rose-app.conf +++ b/rose-stem/app/lfric2lfric/rose-app.conf @@ -835,7 +835,7 @@ wavelength=0 [namelist:partitioning(destination)] generate_inner_halos=.false. -mesh_type='destination' +mesh_target='destination' panel_decomposition='auto' !!panel_xproc=0 !!panel_yproc=0 @@ -843,7 +843,7 @@ partitioner='cubedsphere' [namelist:partitioning(source)] generate_inner_halos=.false. -mesh_type='source' +mesh_target='source' panel_decomposition='auto' !!panel_xproc=0 !!panel_yproc=0 From d94a99871d1e37e7b39260c8cfb69819bda7691b Mon Sep 17 00:00:00 2001 From: "ukmo-juan.castillo" Date: Fri, 30 Jan 2026 16:19:22 +0000 Subject: [PATCH 2/3] Revert previous change, intended for another branch --- rose-stem/app/lfric2lfric/rose-app.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rose-stem/app/lfric2lfric/rose-app.conf b/rose-stem/app/lfric2lfric/rose-app.conf index d90433391..3da09230b 100644 --- a/rose-stem/app/lfric2lfric/rose-app.conf +++ b/rose-stem/app/lfric2lfric/rose-app.conf @@ -835,7 +835,7 @@ wavelength=0 [namelist:partitioning(destination)] generate_inner_halos=.false. -mesh_target='destination' +mesh_type='destination' panel_decomposition='auto' !!panel_xproc=0 !!panel_yproc=0 @@ -843,7 +843,7 @@ partitioner='cubedsphere' [namelist:partitioning(source)] generate_inner_halos=.false. -mesh_target='source' +mesh_type='source' panel_decomposition='auto' !!panel_xproc=0 !!panel_yproc=0 From 19a34ea73ba04ef067f88f810f1e013a07f07084 Mon Sep 17 00:00:00 2001 From: "ukmo-juan.castillo" Date: Fri, 8 May 2026 10:07:05 +0100 Subject: [PATCH 3/3] Substitute lfric2lfric code initiating the source I/O context by call to init_io --- .../lfric2lfric_infrastructure_mod.X90 | 36 ++++++------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 b/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 index aed2ca7f1..9aa08468d 100644 --- a/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 +++ b/applications/lfric2lfric/source/initialisation/lfric2lfric_infrastructure_mod.X90 @@ -132,8 +132,6 @@ contains intent(inout) :: oasis_clock ! Coordinate field - type(field_type), pointer :: chi(:) - type(field_type), pointer :: panel_id type(field_type) :: surface_altitude_dst type(field_type) :: surface_altitude_src type(field_type) :: surface_altitude_src_on_dst @@ -200,10 +198,8 @@ contains procedure(callback_clock_arg), pointer :: before_close ! Source context pointer and temporary context for setup - type(lfric_xios_context_type) :: tmp_io_context_src type(lfric_xios_context_type), pointer :: io_context_src type(lfric_xios_context_type), pointer :: io_context_dst - type(linked_list_type), pointer :: file_list ! ------------------------------- @@ -409,30 +405,20 @@ contains !----------------------------------------------------------------------- ! Create the IO context for source files !----------------------------------------------------------------------- - ! Because the source files are not the same as the 'prime mesh', we have - ! to initialise the source context manually with the desired mesh + ! Set a pointer to the method for setting files in the source + ! IO context + files_init_ptr => init_lfric2lfric_src_files + + ! Initialise the IO context with all the required info + call init_io( context_src, & + mesh_names(src), & + modeldb, & + chi_inventory, & + panel_id_inventory, & + populate_filelist=files_init_ptr ) - ! Add the source context to modeldb and return a pointer to it - call tmp_io_context_src%initialise(context_src) - call modeldb%io_contexts%add_context(tmp_io_context_src) call modeldb%io_contexts%get_io_context(context_src, io_context_src) - ! Get the file list of context and populate - file_list => io_context_src%get_filelist() - call init_lfric2lfric_src_files( file_list, modeldb ) - - ! Get panel_id and chi from correct mesh - call chi_inventory%get_field_array(mesh_src, chi) - call panel_id_inventory%get_field(mesh_src, panel_id) - - ! Using correct chi and panel_id, initialise xios context for source mesh - nullify( before_close ) - call io_context_src%initialise_xios_context( modeldb%mpi%get_comm(), & - chi, & - panel_id, & - modeldb%clock, & - modeldb%calendar, & - before_close ) !======================================================================= ! Initialise source orography