diff --git a/applications/lfric2lfric/example/configuration.nml b/applications/lfric2lfric/example/configuration.nml index ea19ff585..4836db534 100644 --- a/applications/lfric2lfric/example/configuration.nml +++ b/applications/lfric2lfric/example/configuration.nml @@ -73,13 +73,13 @@ coord_order = 1, / &partitioning - mesh_type = 'destination', + mesh_target = 'destination', partitioner = 'cubedsphere', panel_decomposition = 'auto', / &partitioning - mesh_type = 'source', + mesh_target = 'source', partitioner = 'cubedsphere', panel_decomposition = 'auto', / 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 dbe84fe41..a055110c4 100644 --- a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/HEAD/rose-meta.conf +++ b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/HEAD/rose-meta.conf @@ -278,15 +278,17 @@ type=character [namelist:partitioning] duplicate=true -!instance_key_member=mesh_type +!instance_key_member=mesh_target -[namelist:partitioning=mesh_type] +[namelist:partitioning=mesh_target] compulsory=true description=The purpose of the mesh -!enumeration=true -help=The mesh can be used to perform a LFRic forecast (Dynamics), - =or to describe the source and the destination grids in - =the lfric2lfric regridding program. +help=The designation of the mesh to which this + =partitioning profile is to be applied. + = + =Recognised designations are: + = * 'source' + = * 'destination' ns=namelist/lfric2lfric/configuration -value-titles=Dynamics, Source, Destination -values='dynamics', 'source', 'destination' +!string_length=default +type=character diff --git a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py index 01798ad2b..f78dd43d0 100644 --- a/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py +++ b/applications/lfric2lfric/rose-meta/lfric-lfric2lfric/versions.py @@ -1,3 +1,4 @@ +import re import sys from metomi.rose.upgrade import MacroUpgrade # noqa: F401 @@ -20,14 +21,33 @@ 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 """ + + +class vn31_t192(MacroUpgrade): + """Upgrade macro for ticket #192 by Juan M. Castillo.""" + + BEFORE_TAG = "vn3.1" + AFTER_TAG = "vn3.1_t192" + + def upgrade(self, config, meta_config=None): + # Commands From: rose-meta/lfric-lfric2lfric + self.rename_setting( + config, + ["namelist:partitioning(source)", "mesh_type"], + ["namelist:partitioning(source)", "mesh_target"], + ) + self.rename_setting( + config, + ["namelist:partitioning(destination)", "mesh_type"], + ["namelist:partitioning(destination)", "mesh_target"], + ) + + return config, self.reports diff --git a/applications/lfric2lfric/source/algorithm/lfric2lfric_oasis_regrid_mod.X90 b/applications/lfric2lfric/source/algorithm/lfric2lfric_oasis_regrid_mod.X90 index 18e87d041..0b75efdd6 100644 --- a/applications/lfric2lfric/source/algorithm/lfric2lfric_oasis_regrid_mod.X90 +++ b/applications/lfric2lfric/source/algorithm/lfric2lfric_oasis_regrid_mod.X90 @@ -123,7 +123,7 @@ contains field_src, l, k)) ! send the layer via OASIS - ! Extract the version that was actaully placed in the collection + ! Extract the version that was actually placed in the collection coupling_ptr => get_coupling_from_collection(modeldb%values, "coupling" ) local_index => coupling_ptr%get_local_index() call coupler_exchange_2d%initialise(src_field, local_index) @@ -132,7 +132,7 @@ contains call coupler_exchange_2d%clear() ! receive the layer via OASIS - ! Extract the version that was actaully placed in the collection + ! Extract the version that was actually placed in the collection coupling_ptr => get_coupling_from_collection(modeldb%values, "coupling_dst" ) local_index => coupling_ptr%get_local_index() call coupler_exchange_2d%initialise(dst_field, local_index) diff --git a/applications/lfric2lfric/source/initialisation/lfric2lfric_init_mesh.f90 b/applications/lfric2lfric/source/initialisation/lfric2lfric_init_mesh.f90 index 5c2333869..231e141f5 100644 --- a/applications/lfric2lfric/source/initialisation/lfric2lfric_init_mesh.f90 +++ b/applications/lfric2lfric/source/initialisation/lfric2lfric_init_mesh.f90 @@ -158,6 +158,17 @@ subroutine init_mesh( config, configuration, & end if end do + if (.not. associated(src_partitioning_nml)) then + write( log_scratch_space, '(A)' ) & + 'Source mesh partitioning namelist (partitioning:source) not found.' + call log_event(log_scratch_space, log_level_error) + end if + if (.not. associated(dst_partitioning_nml)) then + write( log_scratch_space, '(A)' ) & + 'Destination mesh partitioning namelist (partitioning:destination) not found.' + call log_event(log_scratch_space, log_level_error) + end if + generate_inner_halos(src) = src_partitioning_nml%generate_inner_halos() generate_inner_halos(dst) = dst_partitioning_nml%generate_inner_halos() diff --git a/rose-stem/app/lfric2lfric/rose-app.conf b/rose-stem/app/lfric2lfric/rose-app.conf index 3da09230b..369e0ea19 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.1 +meta=lfric-lfric2lfric/vn3.1_t192 [command] default=$LAUNCH_SCRIPT/launch-exe @@ -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