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/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py index 7316eda68f..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,5 +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 ticket #655 by Christine Johnson.""" + + BEFORE_TAG = "vn3.2_t479" + AFTER_TAG = "vn3.2_t655" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric2lfric + # Blank Upgrade Macro return config, self.reports 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..187c1843f8 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,7 @@ [namelist:lfric2lfric] destination_meshfile_prefix='${MESH_DIR}/seuk_MG/mesh_seuk_MG' -source_meshfile_prefix='${MESH_DIR}/seuk_MG/mesh_seuk_MG' +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..c713566a5e --- /dev/null +++ b/rose-stem/app/lfric2lfric/opt/rose-app-dst_seuk.conf @@ -0,0 +1,8 @@ +[namelist:lfric2lfric] +destination_mesh_name='dynamics' +destination_meshfile_prefix='${MESH_DIR}/seuk_MG/mesh_seuk_MG' +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..19506acd9b 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' 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 92% 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..d0d27fdf6d 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,9 @@ 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_topology='non_periodic' -target_domain='LAM' [namelist:orography] orography_order=2 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; \ 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 855e37c85e..daf0da4be3 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": "", @@ -22,7 +22,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": "", @@ -37,7 +37,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", @@ -51,7 +51,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", @@ -66,7 +66,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": "", @@ -80,7 +80,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": "", @@ -94,7 +94,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": "", @@ -108,7 +108,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": "", @@ -121,7 +121,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": "", @@ -134,7 +134,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", @@ -147,7 +147,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", @@ -161,8 +161,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", @@ -175,8 +175,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", @@ -190,8 +190,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", @@ -204,8 +204,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", @@ -238,7 +238,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 %} @@ -249,4 +249,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_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 cd9b97eaf4..3b1ae2808c 100644 --- a/rose-stem/templates/graph/populate_gen_weights_graph.cylc +++ b/rose-stem/templates/graph/populate_gen_weights_graph.cylc @@ -46,25 +46,34 @@ {% 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 string %} + {% set res = task_values["resolution"] %} + {% do task_values.update({"resolution": [res]}) %} +{% endif %} + +{% for resolution in task_values["resolution"] %} + +{# Set mesh generate task for weights platform #} + {% set mesh_run_weights_platform = "run_mesh_"~ + 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([ + mesh_build_weights_platform, mesh_run_weights_platform + ]) %} + {% do graph_sections.append([ + mesh_run_weights_platform, generate_weights_task + ]) %} +{% endfor %} {% do graph_sections.append([ generate_weights_task~":finish", export_weights_task @@ -93,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") %} diff --git a/rose-stem/templates/graph/populate_graph_sections.cylc b/rose-stem/templates/graph/populate_graph_sections.cylc index b5ce7538d1..56a97d63f2 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? #} @@ -131,57 +131,90 @@ {% 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" %} - {% if "_op" in task_values["resolution"] %} - {% set mesh_op_name = task_values["mpi_parts"]~"P-"~ - task_values["panel_decomp"]~"-"~ - task_values["xproc"]~"X-"~ - task_values["yproc"]~"Y" %} - {% do task_values.update({"mesh_op_name": mesh_op_name}) %} - {% set mesh_run_task = "run_mesh_"~ - task_values["resolution"]~"-"~ - mesh_op_name~"_"~ - task_ns.platform~"_"~ - site_vars["mesh_build"][task_ns.platform] %} - {% else %} - {% set mesh_run_task = "run_mesh_"~ - task_values["resolution"]~"_"~ - task_ns.platform~"_"~ - site_vars["mesh_build"][task_ns.platform] %} + {% if task_values["resolution"] is string %} + {% set res = task_values["resolution"] %} + {% do task_values.update({"resolution": [res]}) %} {% endif %} + {% for resolution in task_values["resolution"] %} + + {% if "_op" in resolution %} + {% set mesh_op_name = task_values["mpi_parts"]~"P-"~ + task_values["panel_decomp"]~"-"~ + task_values["xproc"]~"X-"~ + task_values["yproc"]~"Y" %} + {% do task_values.update({"mesh_op_name": mesh_op_name}) %} + {% set mesh_run_task = "run_mesh_"~ + resolution~"-"~ + mesh_op_name~"_"~ + task_ns.platform~"_"~ + site_vars["mesh_build"][task_ns.platform] %} + {% else %} + {% set mesh_run_task = "run_mesh_"~ + resolution~"_"~ + task_ns.platform~"_"~ + site_vars["mesh_build"][task_ns.platform] %} + {% 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 %} - {% if task_ns.application == "mesh" %} - {% do tasks_to_run.update({mesh_run_task: task_values}) %} - {% else %} - {% set mesh_dict = {} %} - {% if "_op" in task_values["resolution"] %} - {% do mesh_dict.update({"mesh_op_name": mesh_op_name}) %} - {% endif %} - {% 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 "_op" in resolution %} + {% do mesh_dict.update({"mesh_op_name": mesh_op_name}) %} + {% endif %} + {% if "mpi_parts" in task_values %} + {% do mesh_dict.update({"mpi_parts": task_values["mpi_parts"]}) %} + {% endif %} + {% if "mesh_cpus" in task_values %} + {% do mesh_dict.update({"mesh_cpus": task_values["mesh_cpus"]}) %} + {% endif %} + {% if "mesh_memory" in task_values %} + {% do mesh_dict.update({"mesh_memory": task_values["mesh_memory"]}) %} + {% endif %} + {% if "panel_decomp" in task_values %} + {% do mesh_dict.update({"mesh_panel_decomp": task_values["panel_decomp"]}) %} + {% endif %} + {% if "xproc" in task_values %} + {% do mesh_dict.update({"mesh_xproc": task_values["xproc"]}) %} + {% endif %} + {% if "yproc" in task_values %} + {% do mesh_dict.update({"mesh_yproc": task_values["yproc"]}) %} + {% endif %} + {% do tasks_to_run.update({mesh_run_task: mesh_dict}) %} {% endif %} - {% if "mesh_cpus" in task_values %} - {% do mesh_dict.update({"mesh_cpus": task_values["mesh_cpus"]}) %} - {% endif %} - {% if "mesh_memory" in task_values %} - {% do mesh_dict.update({"mesh_memory": task_values["mesh_memory"]}) %} - {% endif %} - {% if "panel_decomp" in task_values %} - {% do mesh_dict.update({"mesh_panel_decomp": task_values["panel_decomp"]}) %} - {% endif %} - {% if "xproc" in task_values %} - {% do mesh_dict.update({"mesh_xproc": task_values["xproc"]}) %} - {% endif %} - {% if "yproc" in task_values %} - {% do mesh_dict.update({"mesh_yproc": task_values["yproc"]}) %} - {% endif %} - {% do tasks_to_run.update({mesh_run_task: mesh_dict}) %} + +{# Add the mesh to the graph, so all meshes are triggered by build #} + {% do graph_sections.append([ + mesh_build_task, + mesh_run_task]) %} {% endif %} - {% endif %} + {% endfor %} {% endif %} {# Do we need to run an application? #} @@ -210,39 +243,18 @@ {% 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 %} {% 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"] %} diff --git a/rose-stem/templates/runtime/generate_runtime_application.cylc b/rose-stem/templates/runtime/generate_runtime_application.cylc index 77b0552d2d..e81dac909d 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 %} - {% if task_ns.application != "lfricinputs" %} - {% set script_str.name = script_str.name~" --opt-conf-key="~task_values["resolution"] %} + {# 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="~resolution %} {% endif %} {% for opt_conf in task_values["opt_confs"] %} {% if opt_conf.strip() %} @@ -111,17 +116,17 @@ {% if task_ns.application == "lfric2lfric" %} MESH_DIR = {{mesh_dir}} {% else %} - {% if "_op" in task_values["resolution"] %} - MESH_DIR = {{mesh_dir}}/{{task_values["resolution"]}}/{{task_values["mesh_op_name"]}} + {% 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"]}} + MESH_DIR = {{mesh_dir}}/{{task_values["resolution"][0]}} {% endif %} {% endif %} TASK_OUTPUT_DIR = {{task_output_dir}} APP_NAME = {{task_values["app_name"]}} APPLICATION = {{task_ns.application}} LOG_LEVEL = {{task_values["log_level"]}} - RESOLUTION = {{task_values["resolution"]|replace("_MG","")|replace("_op","")}} + RESOLUTION = {{task_values["resolution"][0]|replace("_MG","")|replace("_op","")}} ancil_resolution = {{task_values["ancil_resolution"]|default('NONE')}} DT = {{task_values["DT"]}} USE_XIOS_IO = {{task_values["use_xios_io"]}} 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" %}