Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Mesh: Add ARRM10to60E2r1 mesh #414

Merged
merged 7 commits into from
Sep 14, 2022
Merged
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
1 change: 1 addition & 0 deletions compass/ocean/mesh/cull.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ def _cull_mesh_with_logging(logger, with_cavities, with_critical_passages,
dsLandMask = add_land_locked_cells_to_mask(dsLandMask, dsBaseMesh,
latitude_threshold=43.0,
nSweeps=20)
write_netcdf(dsLandMask, 'land_mask_with_land_locked_cells.nc')

# create seed points for a flood fill of the ocean
# use all points in the ocean directory, on the assumption that they are,
Expand Down
25 changes: 25 additions & 0 deletions compass/ocean/tests/global_ocean/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
QU240DynamicAdjustment
from compass.ocean.tests.global_ocean.mesh.ec30to60.dynamic_adjustment import \
EC30to60DynamicAdjustment
from compass.ocean.tests.global_ocean.mesh.arrm10to60.dynamic_adjustment \
import ARRM10to60DynamicAdjustment
from compass.ocean.tests.global_ocean.mesh.so12to60.dynamic_adjustment import \
SO12to60DynamicAdjustment
from compass.ocean.tests.global_ocean.mesh.wc14.dynamic_adjustment import \
Expand Down Expand Up @@ -155,6 +157,29 @@ def __init__(self, mpas_core):
test_group=self, mesh=mesh, init=init,
dynamic_adjustment=dynamic_adjustment))

# ARRM10to60: just the version without cavities
for mesh_name in ['ARRM10to60']:
mesh = Mesh(test_group=self, mesh_name=mesh_name)
self.add_test_case(mesh)

init = Init(test_group=self, mesh=mesh,
initial_condition='PHC',
with_bgc=False)
self.add_test_case(init)
time_integrator = 'split_explicit'
self.add_test_case(
PerformanceTest(
test_group=self, mesh=mesh, init=init,
time_integrator=time_integrator))
dynamic_adjustment = ARRM10to60DynamicAdjustment(
test_group=self, mesh=mesh, init=init,
time_integrator=time_integrator)
self.add_test_case(dynamic_adjustment)
self.add_test_case(
FilesForE3SM(
test_group=self, mesh=mesh, init=init,
dynamic_adjustment=dynamic_adjustment))

# SOwISC12to60: just the version with cavities for now
for mesh_name in ['SOwISC12to60']:
mesh = Mesh(test_group=self, mesh_name=mesh_name)
Expand Down
4 changes: 2 additions & 2 deletions compass/ocean/tests/global_ocean/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def configure_global_ocean(test_case, mesh, init=None):

# a description of the bathymetry
config.set('global_ocean', 'bathy_description',
'Bathymetry is from GEBCO 2019, combined with BedMachine '
'Antarctica around Antarctica.')
'Bathymetry is from GEBCO 2022, combined with BedMachine '
'Antarctica v2 around Antarctica.')

if init is not None and init.with_bgc:
# todo: this needs to be filled in!
Expand Down
14 changes: 13 additions & 1 deletion compass/ocean/tests/global_ocean/init/initial_state.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from importlib.resources import contents

from compass.ocean.tests.global_ocean.metadata import \
add_mesh_and_init_metadata
from compass.model import run_model
Expand Down Expand Up @@ -66,9 +68,19 @@ def __init__(self, test_case, mesh, initial_condition, with_bgc):
if mesh.with_ice_shelf_cavities:
self.add_streams_file(package, 'streams.wisc', mode='init')

mesh_package = mesh.package
mesh_package_contents = list(contents(mesh_package))
mesh_namelist = 'namelist.init'
if mesh_namelist in mesh_package_contents:
self.add_namelist_file(mesh_package, mesh_namelist, mode='init')

mesh_streams = 'streams.init'
if mesh_streams in mesh_package_contents:
self.add_streams_file(mesh_package, mesh_streams, mode='init')

self.add_input_file(
filename='topography.nc',
target='BedMachineAntarctica_and_GEBCO_2019_0.05_degree.200128.nc',
target='BedMachineAntarctica_v2_and_GEBCO_2022_0.05_degree_20220729.nc',
database='bathymetry_database')

self.add_input_file(
Expand Down
7 changes: 5 additions & 2 deletions compass/ocean/tests/global_ocean/mesh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from compass.mesh.spherical import IcosahedralMeshStep, \
QuasiUniformSphericalMeshStep
from compass.ocean.mesh.cull import CullMeshStep
from compass.ocean.tests.global_ocean.mesh.arrm10to60 import ARRM10to60BaseMesh
from compass.ocean.tests.global_ocean.mesh.ec30to60 import EC30to60BaseMesh
from compass.ocean.tests.global_ocean.mesh.so12to60 import SO12to60BaseMesh
from compass.ocean.tests.global_ocean.mesh.wc14 import WC14BaseMesh
Expand Down Expand Up @@ -37,7 +38,7 @@ def __init__(self, test_group, mesh_name):
The name of the mesh
"""
name = 'mesh'
subdir = '{}/{}'.format(mesh_name, name)
subdir = f'{mesh_name}/{name}'
super().__init__(test_group=test_group, name=name, subdir=subdir)

with_ice_shelf_cavities = 'wISC' in mesh_name
Expand All @@ -63,9 +64,11 @@ def __init__(self, test_group, mesh_name):
self, name=name, subdir=subdir, cell_width=240)
elif mesh_name in ['EC30to60', 'ECwISC30to60']:
base_mesh_step = EC30to60BaseMesh(self, name=name, subdir=subdir)
elif mesh_name in ['ARRM10to60']:
base_mesh_step = ARRM10to60BaseMesh(self, name=name, subdir=subdir)
elif mesh_name in ['SOwISC12to60']:
base_mesh_step = SO12to60BaseMesh(self, name=name, subdir=subdir)
elif mesh_name in 'WC14':
elif mesh_name in ['WC14']:
base_mesh_step = WC14BaseMesh(self, name=name, subdir=subdir)
else:
raise ValueError(f'Unknown mesh name {mesh_name}')
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"name": "Americas land mask",
"component": "ocean",
"object": "region",
"author": "Mark Petersen"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-38.67187499999999,
-55.578344672182055
],
[
-24.960937499999996,
-55.578344672182055
],
[
-34.453125,
53.12040528310657
],
[
-59.765625,
53.12040528310657
],
[
-131.8359375,
49.15296965617042
],
[
-132.1875,
-56.55948248376223
],
[
-38.67187499999999,
-55.578344672182055
]
]
]
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"name": "Atlantic region",
"component": "ocean",
"object": "region",
"author": "Mark Petersen"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-68.203125,
-78.1344931829381
],
[
26.015625,
-77.8418477505252
],
[
23.5546875,
-26.431228064506424
],
[
21.4453125,
26.745610382199022
],
[
34.80468749999999,
30.14512718337613
],
[
40.078125,
33.7243396617476
],
[
37.6171875,
39.36827914916014
],
[
28.4765625,
40.17887331434696
],
[
25.3125,
43.58039085560784
],
[
28.828124999999996,
54.77534585936447
],
[
41.8359375,
64.01449619484472
],
[
65.7421875,
76.434603583513
],
[
67.8515625,
84.95930495623836
],
[
-70.3125,
84.89714695160268
],
[
-126.21093749999999,
75.05035357407698
],
[
-112.5,
60.58696734225869
],
[
-104.4140625,
51.39920565355378
],
[
-101.953125,
29.38217507514529
],
[
-97.734375,
18.145851771694467
],
[
-93.515625,
16.97274101999902
],
[
-88.24218749999999,
14.604847155053898
],
[
-85.25390625,
11.695272733029402
],
[
-82.6171875,
9.44906182688142
],
[
-80.5078125,
8.407168163601076
],
[
-79.1015625,
8.928487062665504
],
[
-76.9921875,
7.536764322084078
],
[
-62.22656249999999,
-2.108898659243126
],
[
-70.6640625,
-52.696361078274464
],
[
-64.3359375,
-67.60922060496382
],
[
-68.203125,
-78.1344931829381
]
]
]
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"name": "Europe Africa land mask",
"component": "ocean",
"object": "region",
"author": "Mark Petersen"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
15.1171875,
58.07787626787517
],
[
8.4375,
49.61070993807422
],
[
0.703125,
43.068887774169625
],
[
-5.2734375,
39.095962936305476
],
[
-3.1640625,
20.96143961409684
],
[
2.109375,
-33.43144133557529
],
[
55.54687499999999,
-31.653381399663985
],
[
53.0859375,
60.58696734225869
],
[
33.046875,
63.704722429433225
],
[
24.2578125,
68.00757101804004
],
[
17.2265625,
65.07213008560697
],
[
15.1171875,
58.07787626787517
]
]
]
}
}
]
}
Loading