Skip to content

Commit a0d8ab8

Browse files
committed
Put low res topography options in a config file
This is much less confusing than having them hard-coded deep inside of global ocean.
1 parent 1279a40 commit a0d8ab8

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# config options related to remapping topography to an MPAS-Ocean mesh
2+
[remap_topography]
3+
4+
# the name of the topography file in the bathymetry database
5+
topo_filename = BedMachineAntarctica_v2_and_GEBCO_2022_0.05_degree_20220729.nc
6+
7+
# variable names in topo_filename
8+
bathy_frac_var = ocean_mask
9+
10+
# the description to include in metadata
11+
description = Bathymetry is from GEBCO 2022, combined with BedMachine
12+
Antarctica v2 around Antarctica.
13+
14+
# the target and minimum number of MPI tasks to use in remapping
15+
ntasks = 64
16+
min_tasks = 4

compass/ocean/tests/global_ocean/mesh/__init__.py

+4-10
Original file line numberDiff line numberDiff line change
@@ -137,20 +137,14 @@ def configure(self, config=None):
137137
if config is None:
138138
config = self.config
139139
config.add_from_package('compass.mesh', 'mesh.cfg', exception=True)
140-
# a description of the bathymetry
141140
if 'remap_topography' in self.steps:
142141
config.add_from_package('compass.ocean.mesh',
143142
'remap_topography.cfg', exception=True)
144143

145-
if not self.high_res_topography:
146-
filename = 'BedMachineAntarctica_v2_and_GEBCO_2022_0.05_degree_20220729.nc' # noqa: E501
147-
description = 'Bathymetry is from GEBCO 2022, combined with ' \
148-
'BedMachine Antarctica v2 around Antarctica.'
149-
config.set('remap_topography', 'topo_filename', filename)
150-
config.set('remap_topography', 'bathy_frac_var', 'ocean_mask')
151-
config.set('remap_topography', 'description', description)
152-
config.set('remap_topography', 'ntasks', '64')
153-
config.set('remap_topography', 'min_tasks', '4')
144+
if not self.high_res_topography:
145+
config.add_from_package('compass.ocean.mesh',
146+
'low_res_topography.cfg',
147+
exception=True)
154148

155149
if self.mesh_name.startswith('Kuroshio'):
156150
# add the config options for all kuroshio meshes

0 commit comments

Comments
 (0)