Skip to content

Commit db6fda2

Browse files
committed
Add remap topography step to tides mesh step
1 parent 3f7d98a commit db6fda2

File tree

3 files changed

+80
-5
lines changed

3 files changed

+80
-5
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from compass.mesh.spherical import IcosahedralMeshStep
22
from compass.ocean.mesh.cull import CullMeshStep
3+
from compass.ocean.mesh.remap_topography import RemapTopography
34
from compass.ocean.tests.tides.configure import configure_tides
45
from compass.ocean.tests.tides.dem import CreatePixelFile
56
from compass.ocean.tests.tides.mesh.vr45to5 import VRTidesMesh
@@ -52,9 +53,14 @@ def __init__(self, test_group, mesh_name):
5253

5354
self.add_step(base_mesh_step)
5455

56+
remap_step = RemapTopography(test_case=self,
57+
base_mesh_step=base_mesh_step,
58+
mesh_name=mesh_name)
59+
self.add_step(remap_step)
60+
5561
self.add_step(CullMeshStep(
5662
test_case=self, base_mesh_step=base_mesh_step,
57-
with_ice_shelf_cavities=True))
63+
with_ice_shelf_cavities=True, remap_topography=remap_step))
5864

5965
def configure(self):
6066
"""

compass/ocean/tests/tides/mesh/icos7/icos7.cfg

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# number of cores to use
66
cull_mesh_cpus_per_task = 18
77
# minimum of cores, below which the step fails
8-
cull_mesh_min_cpus_per_task = 1
8+
cull_mesh_min_cpus_per_task = 1
99
# maximum memory usage allowed (in MB)
1010
cull_mesh_max_memory = 1000
1111

@@ -36,11 +36,11 @@ min_depth = 1
3636
# number of cores to use
3737
init_ntasks = 36
3838
# minimum of cores, below which the step fails
39-
init_min_tasks = 8
39+
init_min_tasks = 8
4040
# maximum memory usage allowed (in MB)
4141
init_max_memory = 1000
4242
# number of threads
43-
init_threads = 1
43+
init_threads = 1
4444

4545
## config options related to the forward steps
4646
# number of cores to use
@@ -52,5 +52,40 @@ forward_max_memory = 1000
5252
# number of threads
5353
forward_threads = 1
5454

55-
# TPXO version for validation
55+
# TPXO version for validation
5656
tpxo_version = TPXO9
57+
58+
59+
# config options related to remapping topography to an MPAS-Ocean mesh
60+
[remap_topography]
61+
62+
# the name of the topography file in the bathymetry database
63+
topo_filename = BedMachineAntarctica_v3_and_GEBCO_2023_0.0125_degree_20240828.nc
64+
65+
# variable names in topo_filename
66+
lon_var = lon
67+
lat_var = lat
68+
bathymetry_var = bathymetry
69+
ice_thickness_var = thickness
70+
ice_frac_var = ice_mask
71+
grounded_ice_frac_var = grounded_mask
72+
ocean_frac_var = ocean_mask
73+
bathy_frac_var = bathymetry_mask
74+
75+
# the description to include in metadata
76+
description = Bathymetry is from GEBCO 2023, combined with BedMachine
77+
Antarctica v3 around Antarctica.
78+
79+
# the target and minimum number of MPI tasks to use in remapping
80+
ntasks = 4096
81+
min_tasks = 360
82+
83+
# remapping method {'bilinear', 'neareststod', 'conserve'}
84+
method = conserve
85+
86+
# threshold of what fraction of an MPAS cell must contain ocean in order to
87+
# perform renormalization of elevation variables
88+
renorm_threshold = 0.01
89+
90+
# the density of land ice from MALI (kg/m^3)
91+
ice_density = 910.0

compass/ocean/tests/tides/mesh/vr45to5/vr45to5.cfg

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,37 @@ forward_threads = 1
6060

6161
# TPXO version for validation
6262
tpxo_version = TPXO9
63+
64+
# config options related to remapping topography to an MPAS-Ocean mesh
65+
[remap_topography]
66+
67+
# the name of the topography file in the bathymetry database
68+
topo_filename = BedMachineAntarctica_v3_and_GEBCO_2023_0.0125_degree_20240828.nc
69+
70+
# variable names in topo_filename
71+
lon_var = lon
72+
lat_var = lat
73+
bathymetry_var = bathymetry
74+
ice_thickness_var = thickness
75+
ice_frac_var = ice_mask
76+
grounded_ice_frac_var = grounded_mask
77+
ocean_frac_var = ocean_mask
78+
bathy_frac_var = bathymetry_mask
79+
80+
# the description to include in metadata
81+
description = Bathymetry is from GEBCO 2023, combined with BedMachine
82+
Antarctica v3 around Antarctica.
83+
84+
# the target and minimum number of MPI tasks to use in remapping
85+
ntasks = 4096
86+
min_tasks = 360
87+
88+
# remapping method {'bilinear', 'neareststod', 'conserve'}
89+
method = conserve
90+
91+
# threshold of what fraction of an MPAS cell must contain ocean in order to
92+
# perform renormalization of elevation variables
93+
renorm_threshold = 0.01
94+
95+
# the density of land ice from MALI (kg/m^3)
96+
ice_density = 910.0

0 commit comments

Comments
 (0)