From 219fbb781ba41de07354644949a4210bd8b7f394 Mon Sep 17 00:00:00 2001 From: Christine Johnson <74597224+cjohnson-pi@users.noreply.github.com> Date: Wed, 22 Jul 2026 16:54:54 +0100 Subject: [PATCH 01/12] Create multiple meshes and reorganise configs --- .../lfric2lfric/opt/rose-app-C128-lam.conf | 9 -- .../lfric2lfric/opt/rose-app-C12_C16_lam.conf | 19 ---- .../opt/rose-app-clim_gal9_ral_seuk.conf | 20 ----- ...app-C24_C12.conf => rose-app-dst_C24.conf} | 2 - ..._MG.conf => rose-app-dst_seuk-coarse.conf} | 7 +- .../lfric2lfric/opt/rose-app-dst_seuk.conf | 8 ++ ...im_gal9.conf => rose-app-src_C12_L70.conf} | 4 + ...l_seuk.conf => rose-app-src_seuk_L70.conf} | 4 +- .../app/mesh/opt/rose-app-C12_C16_lam.conf | 2 - .../common/lfric2lfric/tasks_lfric2lfric.cylc | 44 ++++----- .../graph/populate_gen_weights_graph.cylc | 58 ++++++++---- .../graph/populate_graph_sections.cylc | 89 +++++++++++-------- .../runtime/generate_runtime_application.cylc | 2 +- 13 files changed, 137 insertions(+), 131 deletions(-) delete mode 100644 rose-stem/app/lfric2lfric/opt/rose-app-C128-lam.conf delete mode 100644 rose-stem/app/lfric2lfric/opt/rose-app-C12_C16_lam.conf delete mode 100644 rose-stem/app/lfric2lfric/opt/rose-app-clim_gal9_ral_seuk.conf rename rose-stem/app/lfric2lfric/opt/{rose-app-C24_C12.conf => rose-app-dst_C24.conf} (58%) rename rose-stem/app/lfric2lfric/opt/{rose-app-seuk_MG.conf => rose-app-dst_seuk-coarse.conf} (56%) create mode 100644 rose-stem/app/lfric2lfric/opt/rose-app-dst_seuk.conf rename rose-stem/app/lfric2lfric/opt/{rose-app-clim_gal9.conf => rose-app-src_C12_L70.conf} (80%) rename rose-stem/app/lfric2lfric/opt/{rose-app-ral_seuk.conf => rose-app-src_seuk_L70.conf} (88%) delete mode 100644 rose-stem/app/mesh/opt/rose-app-C12_C16_lam.conf diff --git a/rose-stem/app/lfric2lfric/opt/rose-app-C128-lam.conf b/rose-stem/app/lfric2lfric/opt/rose-app-C128-lam.conf deleted file mode 100644 index cbdda18859..0000000000 --- a/rose-stem/app/lfric2lfric/opt/rose-app-C128-lam.conf +++ /dev/null @@ -1,9 +0,0 @@ -[namelist:lfric2lfric] -destination_meshfile_prefix='${MESH_DIR}/C128-lam_MG/mesh_C128-lam_MG' -source_meshfile_prefix='${MESH_DIR}/C128-lam_MG/mesh_C128-lam_MG' - -[namelist:partitioning(destination)] -partitioner='planar' - -[namelist:partitioning(source)] -partitioner='planar' diff --git a/rose-stem/app/lfric2lfric/opt/rose-app-C12_C16_lam.conf b/rose-stem/app/lfric2lfric/opt/rose-app-C12_C16_lam.conf deleted file mode 100644 index 330c8f6e26..0000000000 --- a/rose-stem/app/lfric2lfric/opt/rose-app-C12_C16_lam.conf +++ /dev/null @@ -1,19 +0,0 @@ -[file:iodef.xml] -source=$ROSE_SUITE_DIR/app/lfric2lfric/file/iodef_orography.xml - -[namelist:files] -orography_mean_ancil_path='' - -[namelist:lfric2lfric] -destination_mesh_name='dynamics' -destination_meshfile_prefix='${MESH_DIR}/seuk_MG/mesh_seuk_MG' -dst_ancil_directory='$BIG_DATA_DIR/ancils/proto-ral/Ticket3510/seuk' -dst_orography_mean_ancil_path='orography/gmted_ramp2/qrparm.orog.ugrid' -regrid_method='oasis' -source_mesh_name='C12' -source_meshfile_prefix='${MESH_DIR}/C24_C12/mesh_C24_C12' -src_ancil_directory='$BIG_DATA_DIR/ancils/basic-gagl/Puku/C12/n96e' -src_orography_mean_ancil_path='orography/globe30/qrparm.orog.ugrid' - -[namelist:orography] -orog_init_option='ancil' diff --git a/rose-stem/app/lfric2lfric/opt/rose-app-clim_gal9_ral_seuk.conf b/rose-stem/app/lfric2lfric/opt/rose-app-clim_gal9_ral_seuk.conf deleted file mode 100644 index c9a2536321..0000000000 --- a/rose-stem/app/lfric2lfric/opt/rose-app-clim_gal9_ral_seuk.conf +++ /dev/null @@ -1,20 +0,0 @@ -[file:lfric2lfric_clim_gal9_C12_MG.nc] -source="$BIG_DATA_DIR/start_dumps/proto-ral/AppsTicket110/lfric_atm_clim_gal9_C12_dt-1800p0_intel_64-bit_fast-debug_000072.nc" - -[namelist:extrusion] -domain_height=80000.0 -method='um_L70_50t_20s_80km' -number_of_layers=70 -stretching_height=17507.0 -stretching_method='smooth' - -[namelist:files] -checkpoint_stem_name='restart_lfric2lfric_ral_seuk_MG' -start_dump_filename='lfric2lfric_clim_gal9_C12_MG' - -[namelist:lfric2lfric] -destination_topology='non_periodic' -target_domain='LAM' - -[namelist:partitioning(destination)] -partitioner='planar' diff --git a/rose-stem/app/lfric2lfric/opt/rose-app-C24_C12.conf b/rose-stem/app/lfric2lfric/opt/rose-app-dst_C24.conf similarity index 58% rename from rose-stem/app/lfric2lfric/opt/rose-app-C24_C12.conf rename to rose-stem/app/lfric2lfric/opt/rose-app-dst_C24.conf index 1da248c8cf..f913fd1682 100644 --- a/rose-stem/app/lfric2lfric/opt/rose-app-C24_C12.conf +++ b/rose-stem/app/lfric2lfric/opt/rose-app-dst_C24.conf @@ -1,5 +1,3 @@ [namelist:lfric2lfric] destination_mesh_name='C24' destination_meshfile_prefix='${MESH_DIR}/C24_C12/mesh_C24_C12' -source_mesh_name='C12' -source_meshfile_prefix='${MESH_DIR}/C24_C12/mesh_C24_C12' diff --git a/rose-stem/app/lfric2lfric/opt/rose-app-seuk_MG.conf b/rose-stem/app/lfric2lfric/opt/rose-app-dst_seuk-coarse.conf similarity index 56% rename from rose-stem/app/lfric2lfric/opt/rose-app-seuk_MG.conf rename to rose-stem/app/lfric2lfric/opt/rose-app-dst_seuk-coarse.conf index 270bb7bf7f..db61a35ba8 100644 --- a/rose-stem/app/lfric2lfric/opt/rose-app-seuk_MG.conf +++ b/rose-stem/app/lfric2lfric/opt/rose-app-dst_seuk-coarse.conf @@ -1,9 +1,8 @@ [namelist:lfric2lfric] destination_meshfile_prefix='${MESH_DIR}/seuk_MG/mesh_seuk_MG' -source_meshfile_prefix='${MESH_DIR}/seuk_MG/mesh_seuk_MG' +destination_mesh_name='multigrid_l1' +destination_topology='non_periodic' +target_domain='LAM' [namelist:partitioning(destination)] partitioner='planar' - -[namelist:partitioning(source)] -partitioner='planar' diff --git a/rose-stem/app/lfric2lfric/opt/rose-app-dst_seuk.conf b/rose-stem/app/lfric2lfric/opt/rose-app-dst_seuk.conf new file mode 100644 index 0000000000..26c7459b27 --- /dev/null +++ b/rose-stem/app/lfric2lfric/opt/rose-app-dst_seuk.conf @@ -0,0 +1,8 @@ +[namelist:lfric2lfric] +destination_meshfile_prefix='${MESH_DIR}/seuk_MG/mesh_seuk_MG' +destination_mesh_name='dynamics' +destination_topology='non_periodic' +target_domain='LAM' + +[namelist:partitioning(destination)] +partitioner='planar' diff --git a/rose-stem/app/lfric2lfric/opt/rose-app-clim_gal9.conf b/rose-stem/app/lfric2lfric/opt/rose-app-src_C12_L70.conf similarity index 80% rename from rose-stem/app/lfric2lfric/opt/rose-app-clim_gal9.conf rename to rose-stem/app/lfric2lfric/opt/rose-app-src_C12_L70.conf index 723f79bc39..a6e2f95317 100644 --- a/rose-stem/app/lfric2lfric/opt/rose-app-clim_gal9.conf +++ b/rose-stem/app/lfric2lfric/opt/rose-app-src_C12_L70.conf @@ -11,3 +11,7 @@ stretching_method='smooth' [namelist:files] checkpoint_stem_name='restart_lfric2lfric_clim_gal9_C12_MG' start_dump_filename='lfric2lfric_clim_gal9_C12_MG' + +[namelist:lfric2lfric] +source_mesh_name='C12' +source_meshfile_prefix='${MESH_DIR}/C24_C12/mesh_C24_C12' \ No newline at end of file diff --git a/rose-stem/app/lfric2lfric/opt/rose-app-ral_seuk.conf b/rose-stem/app/lfric2lfric/opt/rose-app-src_seuk_L70.conf similarity index 88% rename from rose-stem/app/lfric2lfric/opt/rose-app-ral_seuk.conf rename to rose-stem/app/lfric2lfric/opt/rose-app-src_seuk_L70.conf index 558c0e5789..e5c261d9d5 100644 --- a/rose-stem/app/lfric2lfric/opt/rose-app-ral_seuk.conf +++ b/rose-stem/app/lfric2lfric/opt/rose-app-src_seuk_L70.conf @@ -20,10 +20,10 @@ coord_order=2 coord_order_nonprime=2 [namelist:lfric2lfric] -destination_topology='non_periodic' origin_domain='LAM' +source_meshfile_prefix='${MESH_DIR}/seuk_MG/mesh_seuk_MG' +source_mesh_name='dynamics' source_topology='non_periodic' -target_domain='LAM' [namelist:orography] orography_order=2 diff --git a/rose-stem/app/mesh/opt/rose-app-C12_C16_lam.conf b/rose-stem/app/mesh/opt/rose-app-C12_C16_lam.conf deleted file mode 100644 index fb1dde9ad4..0000000000 --- a/rose-stem/app/mesh/opt/rose-app-C12_C16_lam.conf +++ /dev/null @@ -1,2 +0,0 @@ -[command] -default=echo "There is no generator for mixed global and regional multigrid meshes, nothing to do" diff --git a/rose-stem/site/common/lfric2lfric/tasks_lfric2lfric.cylc b/rose-stem/site/common/lfric2lfric/tasks_lfric2lfric.cylc index 535f735232..3c3b6620f2 100644 --- a/rose-stem/site/common/lfric2lfric/tasks_lfric2lfric.cylc +++ b/rose-stem/site/common/lfric2lfric/tasks_lfric2lfric.cylc @@ -3,12 +3,12 @@ {# The file LICENCE, distributed with this code, contains details of the terms #} {# under which the code may be used. #} {# ########################################################################### #} -{% do LOG.debug("Entered site/common/lfric2lfric/tasks_solver.cylc") %} +{% do LOG.debug("Entered site/common/lfric2lfric/tasks_lfric2lfric.cylc") %} {% if task_ns.conf_name == "ral_seuk-C32_lam_MG_1cpu" %} {% do task_dict.update({ - "opt_confs": ["ral_seuk"], + "opt_confs": ["src_seuk_L70","dst_seuk-coarse"], "resolution": "seuk_MG", "dst_mesh": "", "dst_name": "", @@ -21,7 +21,7 @@ {% elif task_ns.conf_name == "ral_seuk-C32_lam_MG_4cpu" %} {% do task_dict.update({ - "opt_confs": ["ral_seuk"], + "opt_confs": ["src_seuk_L70","dst_seuk-coarse"], "resolution": "seuk_MG", "dst_mesh": "", "dst_name": "", @@ -35,7 +35,7 @@ {% elif task_ns.conf_name == "oasis_ral_seuk-C32_lam_MG_1cpu" %} {% do task_dict.update({ - "opt_confs": ["ral_seuk","oasis"], + "opt_confs": ["oasis","src_seuk_L70","dst_seuk-coarse"], "resolution": "seuk_MG", "dst_mesh": "seuk_MG", "dst_name": "multigrid_l1", @@ -48,7 +48,7 @@ {% elif task_ns.conf_name == "oasis_ral_seuk-C32_lam_MG_4cpu" %} {% do task_dict.update({ - "opt_confs": ["ral_seuk","oasis"], + "opt_confs": ["oasis","src_seuk_L70","dst_seuk-coarse"], "resolution": "seuk_MG", "dst_mesh": "seuk_MG", "dst_name": "multigrid_l1", @@ -62,7 +62,7 @@ {% elif task_ns.conf_name == "ral3-seuk" %} {% do task_dict.update({ - "opt_confs": ["ral3"], + "opt_confs": ["ral3","ral3_seuk"], "resolution": "ral3_seuk", "dst_mesh": "", "dst_name": "", @@ -75,7 +75,7 @@ {% elif task_ns.conf_name == "ral3-uk" %} {% do task_dict.update({ - "opt_confs": ["ral3"], + "opt_confs": ["ral3","ral3_uk"], "resolution": "ral3_uk", "dst_mesh": "", "dst_name": "", @@ -88,7 +88,7 @@ {% elif task_ns.conf_name == "ral3-ukv" %} {% do task_dict.update({ - "opt_confs": ["ral3"], + "opt_confs": ["ral3","ral3_ukv"], "resolution": "ral3_ukv", "dst_mesh": "", "dst_name": "", @@ -101,7 +101,7 @@ {% elif task_ns.conf_name == "clim_gal9-C24_C12_1cpu" %} {% do task_dict.update({ - "opt_confs": ["clim_gal9"], + "opt_confs": ["src_C12_L70","dst_C24"], "resolution": "C24_C12", "dst_mesh": "", "dst_name": "", @@ -114,7 +114,7 @@ {% elif task_ns.conf_name == "clim_gal9-C24_C12_6cpu" %} {% do task_dict.update({ - "opt_confs": ["clim_gal9"], + "opt_confs": ["src_C12_L70","dst_C24"], "resolution": "C24_C12", "dst_mesh": "", "dst_name": "", @@ -127,7 +127,7 @@ {% elif task_ns.conf_name == "oasis_clim_gal9-C24_C12_1cpu" %} {% do task_dict.update({ - "opt_confs": ["clim_gal9","oasis"], + "opt_confs": ["oasis","src_C12_L70","dst_C24"], "resolution": "C24_C12", "dst_mesh": "C24_C12", "dst_name": "C24", @@ -140,7 +140,7 @@ {% elif task_ns.conf_name == "oasis_clim_gal9-C24_C12_6cpu" %} {% do task_dict.update({ - "opt_confs": ["clim_gal9","oasis"], + "opt_confs": ["oasis","src_C12_L70","dst_C24"], "resolution": "C24_C12", "dst_mesh": "C24_C12", "dst_name": "C24", @@ -154,8 +154,8 @@ {% elif task_ns.conf_name == "oasis_clim_gal9_C12-ral_seuk_C16_lam_1cpu" %} {% do task_dict.update({ - "opt_confs": ["clim_gal9_ral_seuk","oasis"], - "resolution": "C12_C16_lam", + "opt_confs": ["oasis","src_C12_L70","dst_seuk"], + "resolution": ["C24_C12", "seuk_MG"], "dst_mesh": "seuk_MG", "dst_name": "dynamics", "dst_type": "regional", @@ -167,8 +167,8 @@ {% elif task_ns.conf_name == "oasis_clim_gal9_C12-ral_seuk_C16_lam_4cpu" %} {% do task_dict.update({ - "opt_confs": ["clim_gal9_ral_seuk","oasis", "multi-cpu"], - "resolution": "C12_C16_lam", + "opt_confs": [ "oasis","src_C12_L70","dst_seuk","multi-cpu"], + "resolution": ["C24_C12", "seuk_MG"], "dst_mesh": "seuk_MG", "dst_name": "dynamics", "dst_type": "regional", @@ -181,8 +181,8 @@ {% elif task_ns.conf_name == "oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_1cpu" %} {% do task_dict.update({ - "opt_confs": ["clim_gal9_ral_seuk","oasis","lbc"], - "resolution": "C12_C16_lam", + "opt_confs": ["oasis","src_C12_L70","dst_seuk","lbc"], + "resolution": ["C24_C12", "seuk_MG"], "dst_mesh": "seuk_MG", "dst_name": "dynamics-lbc", "dst_type": "regional", @@ -194,8 +194,8 @@ {% elif task_ns.conf_name == "oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_4cpu" %} {% do task_dict.update({ - "opt_confs": ["clim_gal9_ral_seuk","oasis","lbc", "multi-cpu"], - "resolution": "C12_C16_lam", + "opt_confs": ["oasis","src_C12_L70","dst_seuk","lbc","multi-cpu"], + "resolution": ["C24_C12", "seuk_MG"], "dst_mesh": "seuk_MG", "dst_name": "dynamics-lbc", "dst_type": "regional", @@ -227,7 +227,7 @@ {% endif %} -{# Set default values for Solver tasks #} +{# Set default values for Lfric2lfric tasks #} {% if task_dict %} {% do task_dict.update({"application_dir": "lfric_apps/applications/lfric2lfric"}) %} {% if "app_name" not in task_dict %} @@ -238,4 +238,4 @@ {% endif %} {% endif %} -{% do LOG.debug("Finished in site/common/lfric2lfric/tasks_solver.cylc") %} +{% do LOG.debug("Finished in site/common/lfric2lfric/tasks_lfric2lfric.cylc") %} diff --git a/rose-stem/templates/graph/populate_gen_weights_graph.cylc b/rose-stem/templates/graph/populate_gen_weights_graph.cylc index cd9b97eaf4..b89d7537d6 100644 --- a/rose-stem/templates/graph/populate_gen_weights_graph.cylc +++ b/rose-stem/templates/graph/populate_gen_weights_graph.cylc @@ -46,25 +46,53 @@ {% do tasks_to_run.update({mesh_build_weights_platform: {} }) %} {% endif %} -{# Set mesh generate task for weights platform #} -{% set mesh_run_weights_platform = "run_mesh_"~ - task_values["resolution"]~"_"~ - site_vars["scripts_platform"]~"_"~ - site_vars["mesh_build"][site_vars["scripts_platform"]] %} -{% if mesh_run_weights_platform not in tasks_to_run %} - {% do tasks_to_run.update({mesh_run_weights_platform: {} }) %} -{% endif %} - {% do graph_sections.append([ export_task_weights_platform, mesh_build_weights_platform ]) %} -{% do graph_sections.append([ - mesh_build_weights_platform, mesh_run_weights_platform - ]) %} -{% do graph_sections.append([ - mesh_run_weights_platform, generate_weights_task~"?" - ]) %} +{% if task_values["resolution"] is iterable and task_values["resolution"] is not string %} + {% set resolutions = task_values["resolution"] %} +{% else %} + {% set resolutions = [task_values["resolution"]] %} +{% endif %} + +{% set previous_graph_task = mesh_build_weights_platform %} + +{% for res in resolutions %} + +{# Set mesh generate task for weights platform #} + {% set mesh_run_weights_platform = "run_mesh_"~ + res~"_"~ + site_vars["scripts_platform"]~"_"~ + site_vars["mesh_build"][site_vars["scripts_platform"]] %} + + {% if mesh_run_weights_platform not in tasks_to_run %} + {% do tasks_to_run.update({mesh_run_weights_platform: {} }) %} + {% endif %} + +{# Define the previous task (i.e. the resolution in the list before) #} + {% if not loop.first %} + {% set prev_res = resolutions[loop.index0 -1] %} + {% set previous_graph_task = "run_mesh_"~ + prev_res~"_"~ + site_vars["scripts_platform"]~"_"~ + site_vars["mesh_build"][site_vars["scripts_platform"]] %} + {% endif %} + +{# Trigger the current mesh from the previous mesh (unless they are the same) #} + {% if mesh_run_weights_platform != previous_graph_task %} + {% do graph_sections.append([ + previous_graph_task, mesh_run_weights_platform + ]) %} + {% endif %} + +{# Trigger the weights generation if this is the last mesh #} + {% if loop.last %} + {% do graph_sections.append([ + mesh_run_weights_platform, generate_weights_task + ]) %} + {% endif %} +{% endfor %} {% do graph_sections.append([ generate_weights_task~":finish", export_weights_task diff --git a/rose-stem/templates/graph/populate_graph_sections.cylc b/rose-stem/templates/graph/populate_graph_sections.cylc index ccdbe94405..1225189475 100644 --- a/rose-stem/templates/graph/populate_graph_sections.cylc +++ b/rose-stem/templates/graph/populate_graph_sections.cylc @@ -131,25 +131,66 @@ {% endif %} {% endif %} + +{# ################################### #} +{# Create the graph - only for 1 cycle #} +{# ################################### #} + +{% if mesh_build_task %} + {% do graph_sections.append([ + export_task, + mesh_build_task]) %} +{% endif %} + +{% if application_build_task %} + {% do graph_sections.append([ + export_task, + application_build_task]) %} +{% endif %} + +{# ################################### #} +{# Create the meshes #} +{# ################################### #} + {# Do we need to run the mesh? #} {# Any run task will need mesh unless it is a canned test #} {% if task.startswith("run") and task_values["app_name"] != "canned_test" %} - {% set mesh_run_task = "run_mesh_"~ - task_values["resolution"]~"_"~ - task_ns.platform~"_"~ - site_vars["mesh_build"][task_ns.platform] %} + {% if task_values["resolution"] is iterable and task_values["resolution"] is not string %} + {% set resolutions = task_values["resolution"] %} + {% else %} + {% set resolutions = [task_values["resolution"]] %} + {% endif %} + {% for res in resolutions %} + + {% set mesh_run_task = "run_mesh_"~ + res~"_"~ + task_ns.platform~"_"~ + site_vars["mesh_build"][task_ns.platform] %} {# If the task is the mesh run task then use the task dictionary #} {# Otherwise use an empty dict to be populated later #} - {% if mesh_run_task not in tasks_to_run %} - {% if task_ns.application == "mesh" %} - {% do tasks_to_run.update({mesh_run_task: task_values}) %} - {% else %} - {% set mesh_dict = {} %} - {% if "mpi_parts" in task_values %} - {% do mesh_dict.update({"mpi_parts": task_values["mpi_parts"]}) %} + {% if mesh_run_task not in tasks_to_run %} + {% if task_ns.application == "mesh" %} + {% do tasks_to_run.update({mesh_run_task: task_values}) %} + {% else %} + {% set mesh_dict = {} %} + {% if "mpi_parts" in task_values %} + {% do mesh_dict.update({"mpi_parts": task_values["mpi_parts"]}) %} + {% endif %} + {% do tasks_to_run.update({mesh_run_task: mesh_dict}) %} + {% endif %} +{# Add the mesh (for resolution res) to the graph, so all meshes are triggered by build #} + {% if mesh_run_task %} + {% do graph_sections.append([ + mesh_build_task, + mesh_run_task]) %} {% endif %} - {% do tasks_to_run.update({mesh_run_task: mesh_dict}) %} {% endif %} + {% endfor %} + {% if task_values["resolution"] is string %} + {% set mesh_run_task = "run_mesh_"~ + task_values["resolution"]~"_"~ + task_ns.platform~"_"~ + site_vars["mesh_build"][task_ns.platform] %} {% endif %} {% endif %} @@ -179,28 +220,6 @@ {% endif %} {% endif %} -{# ################################### #} -{# Create the graph - only for 1 cycle #} -{# ################################### #} - -{% if mesh_build_task %} - {% do graph_sections.append([ - export_task, - mesh_build_task]) %} -{% endif %} - -{% if application_build_task %} - {% do graph_sections.append([ - export_task, - application_build_task]) %} -{% endif %} - -{% if mesh_run_task %} - {% do graph_sections.append([ - mesh_build_task, - mesh_run_task]) %} -{% endif %} - {# If running the nrun task, define application, plot, check and phystest #} {% if running_nrun and task.startswith("run") %} {% if application_run_task %} @@ -335,4 +354,4 @@ {% include "templates/graph/populate_pert_compare_graph.cylc" %} {% endif %} -{% do LOG.debug("Finished in templates/graph/populate_graph_sections.cylc") %} +{% do LOG.debug("Finished in templates/graph/populate_graph_sections.cylc") %} \ No newline at end of file diff --git a/rose-stem/templates/runtime/generate_runtime_application.cylc b/rose-stem/templates/runtime/generate_runtime_application.cylc index c101fed93b..81c2237ff7 100644 --- a/rose-stem/templates/runtime/generate_runtime_application.cylc +++ b/rose-stem/templates/runtime/generate_runtime_application.cylc @@ -26,7 +26,7 @@ {% if task_values["app_name"] == "canned_test" %} {% set script_str.name = script_str.name~" --command-key=$RUN_METHOD" %} {% else %} - {% if task_ns.application != "lfricinputs" %} + {% if task_ns.application != "lfricinputs" and task_ns.application != "lfric2lfric" %} {% set script_str.name = script_str.name~" --opt-conf-key="~task_values["resolution"] %} {% endif %} {% for opt_conf in task_values["opt_confs"] %} From bdc0f14067db464c6ba29d8419f09163e3bbb697 Mon Sep 17 00:00:00 2001 From: Christine Johnson <74597224+cjohnson-pi@users.noreply.github.com> Date: Thu, 23 Jul 2026 09:55:05 +0100 Subject: [PATCH 02/12] rose checks corrections --- .../rose-meta/lfric-lfric2lfric/HEAD/rose-meta.conf | 5 ----- .../app/lfric2lfric/opt/rose-app-dst_seuk-coarse.conf | 2 +- rose-stem/app/lfric2lfric/opt/rose-app-dst_seuk.conf | 2 +- rose-stem/app/lfric2lfric/opt/rose-app-src_C12_L70.conf | 2 +- rose-stem/app/lfric2lfric/opt/rose-app-src_seuk_L70.conf | 2 +- rose-stem/templates/graph/populate_gen_weights_graph.cylc | 8 ++++---- rose-stem/templates/graph/populate_graph_sections.cylc | 4 ++-- 7 files changed, 10 insertions(+), 15 deletions(-) diff --git a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/HEAD/rose-meta.conf b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/HEAD/rose-meta.conf index bfde8cee42..c4d79d9dd7 100644 --- a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/HEAD/rose-meta.conf +++ b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/HEAD/rose-meta.conf @@ -28,7 +28,6 @@ values='planar', 'spherical' [namelist:lfric2lfric=destination_mesh_name] compulsory=true description=Tag-name for destination-mesh -fail-if=this == namelist:lfric2lfric=source_mesh_name ; help=Mesh topologies are held in UGRID conformant NetCDF files which =may contain more than one mesh topology. This tag-name identifies =the mesh topology to use from the mesh file namelist:lfric2lfric=destination_meshfile_prefix. @@ -183,7 +182,6 @@ values='planar', 'spherical' [namelist:lfric2lfric=source_mesh_name] compulsory=true description=Tag-name for source-mesh -fail-if=this == namelist:lfric2lfric=destination_mesh_name ; help=Mesh topologies are held in UGRID conformant NetCDF files which =may contain more than one mesh topology. This tag-name identifies =the mesh topology to use from the mesh file namelist:lfric2lfric=source_meshfile_prefix. @@ -194,7 +192,6 @@ type=character [namelist:lfric2lfric=source_meshfile_prefix] compulsory=true description=Location of source 2D mesh input file(s) (prefix). -fail-if=namelist:lfric2lfric=regrid_method == "'map'" and this != namelist:lfric2lfric=destination_meshfile_prefix ; help=Input files for 2D meshes are in NetCDF file format. The mesh topologies in the file should =be conformant to UGRID convention. = @@ -240,8 +237,6 @@ type=character compulsory=true description=The domain type that the source data will be regridded to. !enumeration=true -fail-if=this == "'LBC'" and namelist:lfric2lfric=origin_domain == "'LAM'" # LAM cannot provide source values for LBC creation - =this == "'global'" and namelist:lfric2lfric=origin_domain == "'LAM'" # LAM cannot currently be regrid into global help=Target domains currently not supported include: = = origin => target diff --git a/rose-stem/app/lfric2lfric/opt/rose-app-dst_seuk-coarse.conf b/rose-stem/app/lfric2lfric/opt/rose-app-dst_seuk-coarse.conf index db61a35ba8..c02009442c 100644 --- a/rose-stem/app/lfric2lfric/opt/rose-app-dst_seuk-coarse.conf +++ b/rose-stem/app/lfric2lfric/opt/rose-app-dst_seuk-coarse.conf @@ -1,6 +1,6 @@ [namelist:lfric2lfric] -destination_meshfile_prefix='${MESH_DIR}/seuk_MG/mesh_seuk_MG' destination_mesh_name='multigrid_l1' +destination_meshfile_prefix='${MESH_DIR}/seuk_MG/mesh_seuk_MG' destination_topology='non_periodic' target_domain='LAM' diff --git a/rose-stem/app/lfric2lfric/opt/rose-app-dst_seuk.conf b/rose-stem/app/lfric2lfric/opt/rose-app-dst_seuk.conf index 26c7459b27..c713566a5e 100644 --- a/rose-stem/app/lfric2lfric/opt/rose-app-dst_seuk.conf +++ b/rose-stem/app/lfric2lfric/opt/rose-app-dst_seuk.conf @@ -1,6 +1,6 @@ [namelist:lfric2lfric] -destination_meshfile_prefix='${MESH_DIR}/seuk_MG/mesh_seuk_MG' destination_mesh_name='dynamics' +destination_meshfile_prefix='${MESH_DIR}/seuk_MG/mesh_seuk_MG' destination_topology='non_periodic' target_domain='LAM' diff --git a/rose-stem/app/lfric2lfric/opt/rose-app-src_C12_L70.conf b/rose-stem/app/lfric2lfric/opt/rose-app-src_C12_L70.conf index a6e2f95317..19506acd9b 100644 --- a/rose-stem/app/lfric2lfric/opt/rose-app-src_C12_L70.conf +++ b/rose-stem/app/lfric2lfric/opt/rose-app-src_C12_L70.conf @@ -14,4 +14,4 @@ start_dump_filename='lfric2lfric_clim_gal9_C12_MG' [namelist:lfric2lfric] source_mesh_name='C12' -source_meshfile_prefix='${MESH_DIR}/C24_C12/mesh_C24_C12' \ No newline at end of file +source_meshfile_prefix='${MESH_DIR}/C24_C12/mesh_C24_C12' diff --git a/rose-stem/app/lfric2lfric/opt/rose-app-src_seuk_L70.conf b/rose-stem/app/lfric2lfric/opt/rose-app-src_seuk_L70.conf index e5c261d9d5..0dff03cb40 100644 --- a/rose-stem/app/lfric2lfric/opt/rose-app-src_seuk_L70.conf +++ b/rose-stem/app/lfric2lfric/opt/rose-app-src_seuk_L70.conf @@ -21,8 +21,8 @@ coord_order_nonprime=2 [namelist:lfric2lfric] origin_domain='LAM' -source_meshfile_prefix='${MESH_DIR}/seuk_MG/mesh_seuk_MG' source_mesh_name='dynamics' +source_meshfile_prefix='${MESH_DIR}/seuk_MG/mesh_seuk_MG' source_topology='non_periodic' [namelist:orography] diff --git a/rose-stem/templates/graph/populate_gen_weights_graph.cylc b/rose-stem/templates/graph/populate_gen_weights_graph.cylc index b89d7537d6..142f9ceba1 100644 --- a/rose-stem/templates/graph/populate_gen_weights_graph.cylc +++ b/rose-stem/templates/graph/populate_gen_weights_graph.cylc @@ -63,9 +63,9 @@ {# Set mesh generate task for weights platform #} {% set mesh_run_weights_platform = "run_mesh_"~ res~"_"~ - site_vars["scripts_platform"]~"_"~ + site_vars["scripts_platform"]~"_"~ site_vars["mesh_build"][site_vars["scripts_platform"]] %} - + {% if mesh_run_weights_platform not in tasks_to_run %} {% do tasks_to_run.update({mesh_run_weights_platform: {} }) %} {% endif %} @@ -73,9 +73,9 @@ {# Define the previous task (i.e. the resolution in the list before) #} {% if not loop.first %} {% set prev_res = resolutions[loop.index0 -1] %} - {% set previous_graph_task = "run_mesh_"~ + {% set previous_graph_task = "run_mesh_"~ prev_res~"_"~ - site_vars["scripts_platform"]~"_"~ + site_vars["scripts_platform"]~"_"~ site_vars["mesh_build"][site_vars["scripts_platform"]] %} {% endif %} diff --git a/rose-stem/templates/graph/populate_graph_sections.cylc b/rose-stem/templates/graph/populate_graph_sections.cylc index 1225189475..56038ac049 100644 --- a/rose-stem/templates/graph/populate_graph_sections.cylc +++ b/rose-stem/templates/graph/populate_graph_sections.cylc @@ -161,7 +161,7 @@ {% set resolutions = [task_values["resolution"]] %} {% endif %} {% for res in resolutions %} - + {% set mesh_run_task = "run_mesh_"~ res~"_"~ task_ns.platform~"_"~ @@ -179,7 +179,7 @@ {% do tasks_to_run.update({mesh_run_task: mesh_dict}) %} {% endif %} {# Add the mesh (for resolution res) to the graph, so all meshes are triggered by build #} - {% if mesh_run_task %} + {% if mesh_run_task %} {% do graph_sections.append([ mesh_build_task, mesh_run_task]) %} From 92f9af74900d8e2a2579cb07618204666b28ec54 Mon Sep 17 00:00:00 2001 From: Christine Johnson <74597224+cjohnson-pi@users.noreply.github.com> Date: Thu, 23 Jul 2026 10:28:32 +0100 Subject: [PATCH 03/12] upgrade macro --- .../rose-meta/lfric-lfric2lfric/versions.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py index 01e65a2b91..d03d9a35cc 100644 --- a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py +++ b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py @@ -31,3 +31,13 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ + +class vn32_t655(MacroUpgrade): + # Upgrade macro for #655 by Christine Johnson + + BEFORE_TAG = "vn3.2" + AFTER_TAG = "vn3.2_t655" + + def upgrade(self, config, meta_config=None): + # Add settings + return config, self.reports From 20d944cad9b6bec103b10e7f9ec895bd0a7996d6 Mon Sep 17 00:00:00 2001 From: Christine Johnson <74597224+cjohnson-pi@users.noreply.github.com> Date: Fri, 14 Aug 2026 15:11:36 +0100 Subject: [PATCH 04/12] code review response --- .../templates/graph/populate_crun_graph.cylc | 8 ++-- .../graph/populate_gen_weights_graph.cylc | 34 +++------------ .../graph/populate_graph_sections.cylc | 41 +++++++++---------- .../graph/populate_pert_compare_graph.cylc | 11 ++--- 4 files changed, 37 insertions(+), 57 deletions(-) diff --git a/rose-stem/templates/graph/populate_crun_graph.cylc b/rose-stem/templates/graph/populate_crun_graph.cylc index 5476f5c0c0..7fef983114 100644 --- a/rose-stem/templates/graph/populate_crun_graph.cylc +++ b/rose-stem/templates/graph/populate_crun_graph.cylc @@ -59,9 +59,11 @@ {% do graph_sections.append([ application_build_task, crun_task]) %} - {% do graph_sections.append([ - mesh_run_task, - crun_task]) %} + {% for mesh_run_task in mesh_run_tasks %} + {% do graph_sections.append([ + mesh_run_task, + crun_task]) %} + {% endfor %} {% else %} {# All other runs depend on the run previously #} {% do graph_sections.append([ diff --git a/rose-stem/templates/graph/populate_gen_weights_graph.cylc b/rose-stem/templates/graph/populate_gen_weights_graph.cylc index 142f9ceba1..0aa19545c9 100644 --- a/rose-stem/templates/graph/populate_gen_weights_graph.cylc +++ b/rose-stem/templates/graph/populate_gen_weights_graph.cylc @@ -50,19 +50,16 @@ export_task_weights_platform, mesh_build_weights_platform ]) %} -{% if task_values["resolution"] is iterable and task_values["resolution"] is not string %} - {% set resolutions = task_values["resolution"] %} -{% else %} - {% set resolutions = [task_values["resolution"]] %} +{% if task_values["resolution"] is string %} + {% set res = task_values["resolution"] %} + {% do task_values.update({"resolution": [res]}) %} {% endif %} -{% set previous_graph_task = mesh_build_weights_platform %} - -{% for res in resolutions %} +{% for resolution in task_values["resolution"] %} {# Set mesh generate task for weights platform #} {% set mesh_run_weights_platform = "run_mesh_"~ - res~"_"~ + resolution~"_"~ site_vars["scripts_platform"]~"_"~ site_vars["mesh_build"][site_vars["scripts_platform"]] %} @@ -70,28 +67,9 @@ {% do tasks_to_run.update({mesh_run_weights_platform: {} }) %} {% endif %} -{# Define the previous task (i.e. the resolution in the list before) #} - {% if not loop.first %} - {% set prev_res = resolutions[loop.index0 -1] %} - {% set previous_graph_task = "run_mesh_"~ - prev_res~"_"~ - site_vars["scripts_platform"]~"_"~ - site_vars["mesh_build"][site_vars["scripts_platform"]] %} - {% endif %} - -{# Trigger the current mesh from the previous mesh (unless they are the same) #} - {% if mesh_run_weights_platform != previous_graph_task %} - {% do graph_sections.append([ - previous_graph_task, mesh_run_weights_platform - ]) %} - {% endif %} - -{# Trigger the weights generation if this is the last mesh #} - {% if loop.last %} - {% do graph_sections.append([ + {% do graph_sections.append([ mesh_run_weights_platform, generate_weights_task ]) %} - {% endif %} {% endfor %} {% do graph_sections.append([ diff --git a/rose-stem/templates/graph/populate_graph_sections.cylc b/rose-stem/templates/graph/populate_graph_sections.cylc index 56038ac049..7420f45f0b 100644 --- a/rose-stem/templates/graph/populate_graph_sections.cylc +++ b/rose-stem/templates/graph/populate_graph_sections.cylc @@ -84,7 +84,7 @@ {# These will be populated if the task is required #} {% set mesh_build_task = "" %} {% set application_build_task = "" %} -{% set mesh_run_task = "" %} +{% set mesh_run_tasks = [] %} {% set application_run_task = "" %} {# Do we need to build the mesh? #} @@ -155,17 +155,22 @@ {# Do we need to run the mesh? #} {# Any run task will need mesh unless it is a canned test #} {% if task.startswith("run") and task_values["app_name"] != "canned_test" %} - {% if task_values["resolution"] is iterable and task_values["resolution"] is not string %} - {% set resolutions = task_values["resolution"] %} - {% else %} - {% set resolutions = [task_values["resolution"]] %} + {% if task_values["resolution"] is string %} + {% set res = task_values["resolution"] %} + {% do task_values.update({"resolution": [res]}) %} {% endif %} - {% for res in resolutions %} + {% for resolution in task_values["resolution"] %} {% set mesh_run_task = "run_mesh_"~ - res~"_"~ + resolution~"_"~ task_ns.platform~"_"~ site_vars["mesh_build"][task_ns.platform] %} + {% do LOG.debug("mesh: "~mesh_run_task) %} + + {% if mesh_run_task not in mesh_run_tasks %} + {% do mesh_run_tasks.append(mesh_run_task) %} + {% endif %} + {# If the task is the mesh run task then use the task dictionary #} {# Otherwise use an empty dict to be populated later #} {% if mesh_run_task not in tasks_to_run %} @@ -178,20 +183,13 @@ {% endif %} {% do tasks_to_run.update({mesh_run_task: mesh_dict}) %} {% endif %} -{# Add the mesh (for resolution res) to the graph, so all meshes are triggered by build #} - {% if mesh_run_task %} - {% do graph_sections.append([ - mesh_build_task, - mesh_run_task]) %} - {% endif %} + +{# Add the mesh to the graph, so all meshes are triggered by build #} + {% do graph_sections.append([ + mesh_build_task, + mesh_run_task]) %} {% endif %} {% endfor %} - {% if task_values["resolution"] is string %} - {% set mesh_run_task = "run_mesh_"~ - task_values["resolution"]~"_"~ - task_ns.platform~"_"~ - site_vars["mesh_build"][task_ns.platform] %} - {% endif %} {% endif %} {# Do we need to run an application? #} @@ -226,11 +224,12 @@ {% do graph_sections.append([ application_build_task, application_run_task]) %} - {% if mesh_run_task %} + + {% for mesh_run_task in mesh_run_tasks %} {% do graph_sections.append([ mesh_run_task, application_run_task]) %} - {% endif %} + {% endfor %} {% endif %} {#Maybe emulate one of these for the perftools? We could do the whole thing this way round#} {#but that would require a slight rewrite of the build susystem checks#} diff --git a/rose-stem/templates/graph/populate_pert_compare_graph.cylc b/rose-stem/templates/graph/populate_pert_compare_graph.cylc index 584ba0d6d2..70c1aa7d79 100644 --- a/rose-stem/templates/graph/populate_pert_compare_graph.cylc +++ b/rose-stem/templates/graph/populate_pert_compare_graph.cylc @@ -22,11 +22,12 @@ application_build_task, pert_off_task ]) %} -{% do graph_sections.append([ - mesh_run_task, - pert_off_task - ]) %} - +{% for mesh_run_task in mesh_run_tasks %} + {% do graph_sections.append([ + mesh_run_task, + pert_off_task + ]) %} +{% endfor %} {# Setup Perturbation Comparison Test #} {% set pert_compare_task = "pert_compare_"~task_values["task_family"] %} From 5463a5d5ad025d99a2071a8e99680f5100dc2f83 Mon Sep 17 00:00:00 2001 From: Christine Johnson <74597224+cjohnson-pi@users.noreply.github.com> Date: Fri, 14 Aug 2026 16:16:15 +0100 Subject: [PATCH 05/12] correction --- .../templates/runtime/generate_runtime_application.cylc | 7 ++++++- .../templates/runtime/generate_runtime_gen_weights.cylc | 2 +- .../templates/runtime/lfricinputs_task_environment.cylc | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/rose-stem/templates/runtime/generate_runtime_application.cylc b/rose-stem/templates/runtime/generate_runtime_application.cylc index 81c2237ff7..2cc666a91a 100644 --- a/rose-stem/templates/runtime/generate_runtime_application.cylc +++ b/rose-stem/templates/runtime/generate_runtime_application.cylc @@ -26,8 +26,13 @@ {% if task_values["app_name"] == "canned_test" %} {% set script_str.name = script_str.name~" --command-key=$RUN_METHOD" %} {% else %} + {# Use the first resolution is multiple supplied #} + {% set resolution = task_values["resolution"] %} + {% if resolution is not string %} + {% set resolution = resolution[0] %} + {% endif %} {% if task_ns.application != "lfricinputs" and task_ns.application != "lfric2lfric" %} - {% set script_str.name = script_str.name~" --opt-conf-key="~task_values["resolution"] %} + {% set script_str.name = script_str.name~" --opt-conf-key="~resolution %} {% endif %} {% for opt_conf in task_values["opt_confs"] %} {% if opt_conf.strip() %} diff --git a/rose-stem/templates/runtime/generate_runtime_gen_weights.cylc b/rose-stem/templates/runtime/generate_runtime_gen_weights.cylc index 48c0df0474..f7c7ff76a8 100644 --- a/rose-stem/templates/runtime/generate_runtime_gen_weights.cylc +++ b/rose-stem/templates/runtime/generate_runtime_gen_weights.cylc @@ -22,7 +22,7 @@ [[[environment]]] MPIRUN_N_JOBS = {{task_values["gen_weights_tasks"]}} INTERPOLATION_DIRECTION = {{task_values["app_name"]}} - LFRIC_MESH_FILE = {{mesh_dir}}/{{task_values["resolution"]}}/mesh_{{task_values["resolution"]}}.nc + LFRIC_MESH_FILE = {{mesh_dir}}/{{task_values["resolution"][0]}}/mesh_{{task_values["resolution"][0]}}.nc LFRIC_MESH_NAME = {{task_values["mesh_name"]|default("")}} {% if task_ns.application == "lfric2lfric" %} DST_GRID_PATH = {{mesh_dir}}/{{task_values["dst_mesh"]}}/mesh_{{task_values["dst_mesh"]}}.nc diff --git a/rose-stem/templates/runtime/lfricinputs_task_environment.cylc b/rose-stem/templates/runtime/lfricinputs_task_environment.cylc index dabe0bf89a..9c0d86d49d 100644 --- a/rose-stem/templates/runtime/lfricinputs_task_environment.cylc +++ b/rose-stem/templates/runtime/lfricinputs_task_environment.cylc @@ -7,7 +7,7 @@ NUMBER_OF_LAYERS = {{task_values["target_grid_levs"]}} SOURCE_DUMP = {{task_values["source_dump"]}} - LFRIC_MESH_FILE = {{mesh_dir}}/{{task_values["resolution"]}}/mesh_{{task_values["resolution"]}}.nc + LFRIC_MESH_FILE = {{mesh_dir}}/{{task_values["resolution"][0]}}/mesh_{{task_values["resolution"][0]}}.nc LFRIC_MESH_NAME = {{task_values["mesh_name"]}} WEIGHT_LOC = $CYLC_WORKFLOW_WORK_DIR/1/generate_weights_lfricinputs_{{task_ns.conf_name}}_{{site_vars["scripts_platform"]}}_weightgen_script {% if task_values["app_name"] == "um2lfric" or task_values["app_name"] == "scintelapi" %} From b3e71c05470e9748d96e2e491940f49d505e283a Mon Sep 17 00:00:00 2001 From: Christine Johnson <74597224+cjohnson-pi@users.noreply.github.com> Date: Fri, 14 Aug 2026 16:36:44 +0100 Subject: [PATCH 06/12] correction --- rose-stem/templates/runtime/generate_runtime_application.cylc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rose-stem/templates/runtime/generate_runtime_application.cylc b/rose-stem/templates/runtime/generate_runtime_application.cylc index 2cc666a91a..9af154d5c4 100644 --- a/rose-stem/templates/runtime/generate_runtime_application.cylc +++ b/rose-stem/templates/runtime/generate_runtime_application.cylc @@ -118,7 +118,7 @@ {% if task_ns.application == "lfric2lfric" %} MESH_DIR = {{mesh_dir}} {% else %} - MESH_DIR = {{mesh_dir}}/{{task_values["resolution"]}} + MESH_DIR = {{mesh_dir}}/{{resolution}} {% endif %} TASK_OUTPUT_DIR = {{task_output_dir}} APP_NAME = {{task_values["app_name"]}} From b9125428992a9e5a52f9b45b473de907440432d0 Mon Sep 17 00:00:00 2001 From: Christine Johnson <74597224+cjohnson-pi@users.noreply.github.com> Date: Fri, 14 Aug 2026 16:39:31 +0100 Subject: [PATCH 07/12] correction --- rose-stem/templates/runtime/generate_runtime_application.cylc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rose-stem/templates/runtime/generate_runtime_application.cylc b/rose-stem/templates/runtime/generate_runtime_application.cylc index 9af154d5c4..b34cff13af 100644 --- a/rose-stem/templates/runtime/generate_runtime_application.cylc +++ b/rose-stem/templates/runtime/generate_runtime_application.cylc @@ -118,7 +118,7 @@ {% if task_ns.application == "lfric2lfric" %} MESH_DIR = {{mesh_dir}} {% else %} - MESH_DIR = {{mesh_dir}}/{{resolution}} + MESH_DIR = {{mesh_dir}}/{{task_values["resolution"][0]}} {% endif %} TASK_OUTPUT_DIR = {{task_output_dir}} APP_NAME = {{task_values["app_name"]}} From 05526a74952f209494f2de06661092e4d4a2d850 Mon Sep 17 00:00:00 2001 From: Christine Johnson <74597224+cjohnson-pi@users.noreply.github.com> Date: Fri, 14 Aug 2026 18:00:51 +0100 Subject: [PATCH 08/12] correction --- rose-stem/templates/runtime/generate_runtime_application.cylc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rose-stem/templates/runtime/generate_runtime_application.cylc b/rose-stem/templates/runtime/generate_runtime_application.cylc index b34cff13af..a76db708ef 100644 --- a/rose-stem/templates/runtime/generate_runtime_application.cylc +++ b/rose-stem/templates/runtime/generate_runtime_application.cylc @@ -124,7 +124,7 @@ APP_NAME = {{task_values["app_name"]}} APPLICATION = {{task_ns.application}} LOG_LEVEL = {{task_values["log_level"]}} - RESOLUTION = {{task_values["resolution"]|replace("_MG","")}} + RESOLUTION = {{task_values["resolution"][0]|replace("_MG","")}} ancil_resolution = {{task_values["ancil_resolution"]|default('NONE')}} DT = {{task_values["DT"]}} USE_XIOS_IO = {{task_values["use_xios_io"]}} From 0139f482fc43f40e99717d0f8d6d2c4ee8735b04 Mon Sep 17 00:00:00 2001 From: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Date: Thu, 3 Sep 2026 13:18:52 +0100 Subject: [PATCH 09/12] run upgrade macro --- .../rose-meta/lfric-lfric2lfric/versions.py | 10 +++------- .../app/lfric2lfric/opt/rose-app-dst_seuk-coarse.conf | 1 - .../app/lfric2lfric/opt/rose-app-src_seuk_L70.conf | 1 - rose-stem/app/lfric2lfric/rose-app.conf | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py index f87f15d471..13631c80bf 100644 --- a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py +++ b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py @@ -20,13 +20,10 @@ def __repr__(self): """ Copy this template and complete to add your macro - class vnXX_txxx(MacroUpgrade): # Upgrade macro for by - BEFORE_TAG = "vnX.X" AFTER_TAG = "vnX.X_txxx" - def upgrade(self, config, meta_config=None): # Add settings return config, self.reports @@ -50,7 +47,6 @@ def upgrade(self, config, meta_config=None): self.add_setting(config, [nml, "init_eos_height"], eos_height) self.add_setting(config, [nml, "init_exner_method"], "'hydrostatic'") self.add_setting(config, [nml, "init_sort_theta"], ".true.") - return config, self.reports @@ -63,16 +59,16 @@ class vn32_t479(MacroUpgrade): def upgrade(self, config, meta_config=None): # Commands From: rose-meta/lfric-gungho self.add_setting(config, ["namelist:mixing", "fullstress"], ".false.") - return config, self.reports class vn32_t655(MacroUpgrade): - # Upgrade macro for #655 by Christine Johnson + """Upgrade macro for ticket #655 by Christine Johnson.""" BEFORE_TAG = "vn3.2_t479" AFTER_TAG = "vn3.2_t655" def upgrade(self, config, meta_config=None): - # Add settings + # Commands From: rose-meta/lfric-lfric2lfric + # Blank Upgrade Macro return config, self.reports diff --git a/rose-stem/app/lfric2lfric/opt/rose-app-dst_seuk-coarse.conf b/rose-stem/app/lfric2lfric/opt/rose-app-dst_seuk-coarse.conf index c02009442c..187c1843f8 100644 --- a/rose-stem/app/lfric2lfric/opt/rose-app-dst_seuk-coarse.conf +++ b/rose-stem/app/lfric2lfric/opt/rose-app-dst_seuk-coarse.conf @@ -1,5 +1,4 @@ [namelist:lfric2lfric] -destination_mesh_name='multigrid_l1' destination_meshfile_prefix='${MESH_DIR}/seuk_MG/mesh_seuk_MG' destination_topology='non_periodic' target_domain='LAM' diff --git a/rose-stem/app/lfric2lfric/opt/rose-app-src_seuk_L70.conf b/rose-stem/app/lfric2lfric/opt/rose-app-src_seuk_L70.conf index 0dff03cb40..d0d27fdf6d 100644 --- a/rose-stem/app/lfric2lfric/opt/rose-app-src_seuk_L70.conf +++ b/rose-stem/app/lfric2lfric/opt/rose-app-src_seuk_L70.conf @@ -21,7 +21,6 @@ coord_order_nonprime=2 [namelist:lfric2lfric] origin_domain='LAM' -source_mesh_name='dynamics' source_meshfile_prefix='${MESH_DIR}/seuk_MG/mesh_seuk_MG' source_topology='non_periodic' diff --git a/rose-stem/app/lfric2lfric/rose-app.conf b/rose-stem/app/lfric2lfric/rose-app.conf index b6beee0b08..2409a61aca 100644 --- a/rose-stem/app/lfric2lfric/rose-app.conf +++ b/rose-stem/app/lfric2lfric/rose-app.conf @@ -1,4 +1,4 @@ -meta=lfric-lfric2lfric/vn3.2_t479 +meta=lfric-lfric2lfric/vn3.2_t655 [command] default=$CORE_ROOT_DIR/bin/tweak_iodef; \ From fff2ebf6827e7f5094ecc81ba7c027ebe3b7928d Mon Sep 17 00:00:00 2001 From: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Date: Thu, 3 Sep 2026 13:26:55 +0100 Subject: [PATCH 10/12] merge correction --- rose-stem/templates/graph/populate_graph_sections.cylc | 1 + 1 file changed, 1 insertion(+) diff --git a/rose-stem/templates/graph/populate_graph_sections.cylc b/rose-stem/templates/graph/populate_graph_sections.cylc index c5dde3b3fb..56a97d63f2 100644 --- a/rose-stem/templates/graph/populate_graph_sections.cylc +++ b/rose-stem/templates/graph/populate_graph_sections.cylc @@ -207,6 +207,7 @@ {% do mesh_dict.update({"mesh_yproc": task_values["yproc"]}) %} {% endif %} {% do tasks_to_run.update({mesh_run_task: mesh_dict}) %} + {% endif %} {# Add the mesh to the graph, so all meshes are triggered by build #} {% do graph_sections.append([ From 542d7c0561fb32c1d16bc358f9f28735b4e1ce0f Mon Sep 17 00:00:00 2001 From: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Date: Thu, 3 Sep 2026 13:49:02 +0100 Subject: [PATCH 11/12] fix merge error --- .../templates/graph/populate_gen_weights_graph.cylc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/rose-stem/templates/graph/populate_gen_weights_graph.cylc b/rose-stem/templates/graph/populate_gen_weights_graph.cylc index 0aa19545c9..3b1ae2808c 100644 --- a/rose-stem/templates/graph/populate_gen_weights_graph.cylc +++ b/rose-stem/templates/graph/populate_gen_weights_graph.cylc @@ -68,8 +68,11 @@ {% endif %} {% do graph_sections.append([ - mesh_run_weights_platform, generate_weights_task - ]) %} + mesh_build_weights_platform, mesh_run_weights_platform + ]) %} + {% do graph_sections.append([ + mesh_run_weights_platform, generate_weights_task + ]) %} {% endfor %} {% do graph_sections.append([ @@ -99,4 +102,4 @@ generate_weights_task~"?", application_run_task ]) %} -{% do LOG.debug("Finished in templates/graph/populate_gen_weights_graph.cylc") %} \ No newline at end of file +{% do LOG.debug("Finished in templates/graph/populate_gen_weights_graph.cylc") %} From 02811cc679d7cd0680fb855649546ab4842e51f6 Mon Sep 17 00:00:00 2001 From: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Date: Thu, 3 Sep 2026 17:04:25 +0100 Subject: [PATCH 12/12] merge fix --- rose-stem/templates/runtime/generate_runtime_application.cylc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rose-stem/templates/runtime/generate_runtime_application.cylc b/rose-stem/templates/runtime/generate_runtime_application.cylc index 63c4bdd972..e81dac909d 100644 --- a/rose-stem/templates/runtime/generate_runtime_application.cylc +++ b/rose-stem/templates/runtime/generate_runtime_application.cylc @@ -116,7 +116,7 @@ {% if task_ns.application == "lfric2lfric" %} MESH_DIR = {{mesh_dir}} {% else %} - {% if "_op" in task_values["resolution"] %} + {% if "_op" in task_values["resolution"][0] %} MESH_DIR = {{mesh_dir}}/{{task_values["resolution"][0]}}/{{task_values["mesh_op_name"]}} {% else %} MESH_DIR = {{mesh_dir}}/{{task_values["resolution"][0]}}