Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions components/driver/rose-meta/lfric-driver/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ def upgrade(self, config, meta_config=None):
# Add settings
return config, self.reports
"""


122 changes: 119 additions & 3 deletions mesh_tools/rose-meta/lfric-mesh_tools/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,130 @@ def __repr__(self):

"""
Copy this template and complete to add your macro

class vnXX_txxx(MacroUpgrade):
# Upgrade macro for <TICKET> by <Author>

BEFORE_TAG = "vnX.X"
AFTER_TAG = "vnX.X_txxx"

def upgrade(self, config, meta_config=None):
# Add settings
return config, self.reports
"""


class vn31_t11(MacroUpgrade):
"""Upgrade macro for ticket TTTT by Unknown."""

BEFORE_TAG = "vn3.1"
AFTER_TAG = "vn3.1_t11"

def upgrade(self, config, meta_config=None):
# Commands From: rose-meta/lfric-mesh_tools
n_meshes = self.get_setting_value(config, ["namelist:mesh", "n_meshes"])
if config.get_value(["namelist:planar_mesh"]) is not None:
if n_meshes == "4":
self.add_setting(
config,
["namelist:mesh", "mesh_maps"],
"'planar_l0:planar_l1','planar_l1:planar_l2','planar_l2:planar_l3'",
forced=True,
)
self.add_setting(
config,
["namelist:mesh", "mesh_names"],
"'planar_l0','planar_l1','planar_l2','planar_l3'",
forced=True,
)
elif n_meshes == "3":
self.add_setting(
config,
["namelist:mesh", "mesh_maps"],
"'planar_l0:planar_l1','planar_l1:planar_l2'",
forced=True,
)
self.add_setting(
config,
["namelist:mesh", "mesh_names"],
"'planar_l0','planar_l1','planar_l2'",
forced=True,
)
elif n_meshes == "2":
self.add_setting(
config,
["namelist:mesh", "mesh_maps"],
"'planar_l0:planar_l1'",
forced=True,
)
self.add_setting(
config,
["namelist:mesh", "mesh_names"],
"'planar_l0','planar_l1'",
forced=True,
)
else:
self.add_setting(
config,
["namelist:mesh", "mesh_names"],
"'planar_l0'",
forced=True,
)
else:
if n_meshes == "4":
self.add_setting(
config,
["namelist:mesh", "mesh_maps"],
"'cubedsphere_l0:cubedsphere_l1','cubedsphere_l1:cubedsphere_l2','cubedsphere_l2:cubedsphere_l3'",
forced=True,
)
self.add_setting(
config,
["namelist:mesh", "mesh_names"],
"'cubedsphere_l0','cubedsphere_l1','cubedsphere_l2','cubedsphere_l3'",
forced=True,
)
elif n_meshes == "3":
self.add_setting(
config,
["namelist:mesh", "mesh_maps"],
"'cubedsphere_l0:cubedsphere_l1','cubedsphere_l1:cubedsphere_l2'",
forced=True,
)
self.add_setting(
config,
["namelist:mesh", "mesh_names"],
"'cubedsphere_l0','cubedsphere_l1','cubedsphere_l2'",
forced=True,
)
elif n_meshes == "2":
self.add_setting(
config,
["namelist:mesh", "mesh_maps"],
"'cubedsphere_l0:cubedsphere_l1'",
forced=True,
)
self.add_setting(
config,
["namelist:mesh", "mesh_names"],
"'cubedsphere_l0','cubedsphere_l1'",
forced=True,
)
else:
self.add_setting(
config,
["namelist:mesh", "mesh_names"],
"'cubedsphere_l0'",
forced=True,
)

self.change_setting_value(
config,
["namelist:planar_mesh", "lbc_parent_mesh"],
"'planar_l0'"
)

self.change_setting_value(
config,
["namelist:stretch_transform", "transform_mesh"],
"'planar_l0'"
)

return config, self.reports
1 change: 1 addition & 0 deletions rose-stem/app/coupled/opt/rose-app-LAM50x50-2x2.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ source=$MESH_DIR/mesh_LAM50x50-2x2.nc

[namelist:base_mesh]
file_prefix='mesh_LAM50x50-2x2'
prime_mesh_name='planar_l0'
topology='non_periodic'

[namelist:partitioning]
Expand Down
2 changes: 1 addition & 1 deletion rose-stem/app/coupled/rose-app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ file_prefix='mesh'
fplane=.false.
geometry='spherical'
prepartitioned=.false.
prime_mesh_name='dynamics'
prime_mesh_name='cubedsphere_l0'
topology='fully_periodic'

[namelist:extrusion]
Expand Down
2 changes: 1 addition & 1 deletion rose-stem/app/io_demo/rose-app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ file_prefix=''
fplane=.false.
geometry='planar'
prepartitioned=.false.
prime_mesh_name='dynamics'
prime_mesh_name='cubedsphere_l0'
topology='fully_periodic'

[namelist:development]
Expand Down
4 changes: 0 additions & 4 deletions rose-stem/app/lbc_demo/opt/rose-app-lbc.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,5 @@ XIOS_SERVER_RANKS=1

[namelist:base_mesh]
file_prefix='${MESH_DIR}/mesh_lbc'
geometry='spherical'
prepartitioned=.true.
prime_mesh_name='primary'
topology='non_periodic'

[!!namelist:partitioning]
4 changes: 0 additions & 4 deletions rose-stem/app/lbc_demo/opt/rose-app-lbc_1x1P.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,5 @@ XIOS_SERVER_RANKS=1

[namelist:base_mesh]
file_prefix='${MESH_DIR}/mesh_lbc_1x1P'
geometry='spherical'
prepartitioned=.true.
prime_mesh_name='primary'
topology='non_periodic'

[!!namelist:partitioning]
4 changes: 0 additions & 4 deletions rose-stem/app/lbc_demo/opt/rose-app-lbc_2x2P.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,5 @@ XIOS_SERVER_RANKS=1

[namelist:base_mesh]
file_prefix='${MESH_DIR}/mesh_lbc_2x2P'
geometry='spherical'
prepartitioned=.true.
prime_mesh_name='primary'
topology='non_periodic'

[!!namelist:partitioning]
4 changes: 0 additions & 4 deletions rose-stem/app/lbc_demo/opt/rose-app-lbc_8x2P.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,5 @@ XIOS_SERVER_RANKS=1

[namelist:base_mesh]
file_prefix='${MESH_DIR}/mesh_lbc_8x2P'
geometry='spherical'
prepartitioned=.true.
prime_mesh_name='primary'
topology='non_periodic'

[!!namelist:partitioning]
4 changes: 0 additions & 4 deletions rose-stem/app/lbc_demo/opt/rose-app-mesh_lbc_demo.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,5 @@ source=$MESH_DIR/mesh_lbc_demo.nc

[namelist:base_mesh]
file_prefix='mesh_lbc_demo'
geometry='spherical'
prepartitioned=.true.,
prime_mesh_name='primary',
topology='non_periodic',

[!!namelist:partitioning]
9 changes: 8 additions & 1 deletion rose-stem/app/lbc_demo/rose-app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ file_prefix=''
fplane=.false.
geometry='spherical'
prepartitioned=.true.
prime_mesh_name='primary'
prime_mesh_name='planar_l0'
topology='non_periodic'

[namelist:extrusion]
domain_height=1000.0
!!eta_values=''
method='uniform'
number_of_layers=3
planet_radius=6371229.0
Expand All @@ -54,6 +55,7 @@ checkpoint_read=.false.
checkpoint_write=.false.
counter_output_suffix='counter.txt'
diagnostic_frequency=1
!!end_of_run_checkpoint=.true.
file_convention='UGRID'
!!nodal_output_on_w3=.false.
subroutine_counters=.false.
Expand All @@ -75,8 +77,13 @@ set_lbc='quadrant'
write_lbc=.false.

[namelist:logging]
log_to_rank_zero_only=.false.
run_log_level='info'

[namelist:multigrid]
chain_mesh_tags=''
multigrid_chain_nitems=1

[!!namelist:partitioning]
generate_inner_halos=.false.
panel_decomposition='auto'
Expand Down
2 changes: 1 addition & 1 deletion rose-stem/app/simple_diffusion/rose-app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ file_prefix=''
fplane=.false.
geometry='planar'
prepartitioned=.false.
prime_mesh_name='dynamics'
prime_mesh_name='cubedsphere_l0'
topology='fully_periodic'

[namelist:development]
Expand Down
2 changes: 1 addition & 1 deletion rose-stem/app/skeleton/rose-app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ file_prefix=''
fplane=.false.
geometry='planar'
prepartitioned=.false.
prime_mesh_name='dynamics'
prime_mesh_name='cubedsphere_l0'
topology='fully_periodic'

[namelist:extrusion]
Expand Down