From 5fc09f1050d3d235d2b3bacc5ae9def3096823ff Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Wed, 3 Jan 2024 11:16:29 +0100 Subject: [PATCH 1/4] Add land-locked cells to land-ice mask If there are land-locked cells at calving fronts of ice shelves, they need to be added to the land-ice mask so sea-ice doesn't get trapped there. This merge also gets the minimum latitude and number of sweeps used in finding land-locked cells from config options. --- compass/ocean/mesh/cull.py | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/compass/ocean/mesh/cull.py b/compass/ocean/mesh/cull.py index b7a015425f..7e57761720 100644 --- a/compass/ocean/mesh/cull.py +++ b/compass/ocean/mesh/cull.py @@ -166,12 +166,19 @@ def run(self): convert_to_cdf5 = config.getboolean('spherical_mesh', 'convert_culled_mesh_to_cdf5') + latitude_threshold = config.getfloat('spherical_mesh', + 'latitude_threshold') + + sweep_count = config.getint('spherical_mesh', 'sweep_count') + cull_mesh(with_critical_passages=True, logger=logger, use_progress_bar=use_progress_bar, preserve_floodplain=preserve_floodplain, with_cavities=with_ice_shelf_cavities, process_count=self.cpus_per_task, - convert_to_cdf5=convert_to_cdf5) + convert_to_cdf5=convert_to_cdf5, + latitude_threshold=latitude_threshold, + sweep_count=sweep_count) if do_inject_bathymetry: inject_bathymetry(mesh_file='culled_mesh.nc') @@ -180,7 +187,8 @@ def run(self): def cull_mesh(with_cavities=False, with_critical_passages=False, custom_critical_passages=None, custom_land_blockages=None, preserve_floodplain=False, logger=None, use_progress_bar=True, - process_count=1, convert_to_cdf5=False): + process_count=1, convert_to_cdf5=False, latitude_threshold=43., + sweep_count=20): """ First step of initializing the global ocean: @@ -241,21 +249,29 @@ def cull_mesh(with_cavities=False, with_critical_passages=False, process_count : int, optional The number of cores to use to create masks (``None`` to use all available cores) + convert_to_cdf5 : bool, optional Convert the culled mesh to PNetCDF CDF-5 format + + latitude_threshold : float, optional + Minimum latitude, in degrees, for masking land-locked cells + + sweep_count : int, optional + Maximum number of sweeps to search for land-locked cells """ with LoggingContext(name=__name__, logger=logger) as logger: _cull_mesh_with_logging( logger, with_cavities, with_critical_passages, custom_critical_passages, custom_land_blockages, preserve_floodplain, use_progress_bar, process_count, - convert_to_cdf5) + convert_to_cdf5, latitude_threshold, sweep_count) def _cull_mesh_with_logging(logger, with_cavities, with_critical_passages, custom_critical_passages, custom_land_blockages, preserve_floodplain, use_progress_bar, - process_count, convert_to_cdf5): + process_count, convert_to_cdf5, latitude_threshold, + sweep_count): """ Cull the mesh once the logger is defined for sure """ critical_passages = with_critical_passages or \ @@ -286,9 +302,9 @@ def _cull_mesh_with_logging(logger, with_cavities, with_critical_passages, dsBaseMesh = xr.open_dataset('base_mesh.nc') dsLandMask = xr.open_dataset('land_mask.nc') - dsLandMask = add_land_locked_cells_to_mask(dsLandMask, dsBaseMesh, - latitude_threshold=43.0, - nSweeps=20) + dsLandMask = add_land_locked_cells_to_mask( + dsLandMask, dsBaseMesh, latitude_threshold=latitude_threshold, + nSweeps=sweep_count) write_netcdf(dsLandMask, 'land_mask_with_land_locked_cells.nc') # create seed points for a flood fill of the ocean @@ -425,6 +441,10 @@ def _cull_mesh_with_logging(logger, with_cavities, with_critical_passages, dsMask = xr.open_dataset('ice_coverage.nc') + dsMask = add_land_locked_cells_to_mask( + dsMask, dsCulledMesh, latitude_threshold=latitude_threshold, + nSweeps=sweep_count) + landIceMask = dsMask.regionCellMasks.isel(nRegions=0) dsLandIceMask = xr.Dataset() dsLandIceMask['landIceMask'] = landIceMask From d78b6f10309d3bd9bcce4da7477e3008327c0235 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Wed, 3 Jan 2024 11:18:29 +0100 Subject: [PATCH 2/4] Add new config options related to masking land-locked cells --- compass/ocean/tests/global_ocean/global_ocean.cfg | 4 ++++ compass/ocean/tests/hurricane/hurricane.cfg | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/compass/ocean/tests/global_ocean/global_ocean.cfg b/compass/ocean/tests/global_ocean/global_ocean.cfg index e6657eb166..18b11ae447 100644 --- a/compass/ocean/tests/global_ocean/global_ocean.cfg +++ b/compass/ocean/tests/global_ocean/global_ocean.cfg @@ -10,6 +10,10 @@ cull_mesh_min_cpus_per_task = 1 cull_mesh_max_memory = 1000 # Whether to convert the culled mesh file to CDF5 format convert_culled_mesh_to_cdf5 = False +# Minimum latitude, in degrees, for masking land-locked cells +latitude_threshold = 43.0 +# Maximum number of sweeps to search for land-locked cells +sweep_count = 20 # Options relate to adjusting the sea-surface height or land-ice pressure diff --git a/compass/ocean/tests/hurricane/hurricane.cfg b/compass/ocean/tests/hurricane/hurricane.cfg index 7940fde3bc..2f1678f65c 100644 --- a/compass/ocean/tests/hurricane/hurricane.cfg +++ b/compass/ocean/tests/hurricane/hurricane.cfg @@ -4,3 +4,7 @@ # Config options related to the step for culling land from the mesh # Whether to convert the culled mesh file to CDF5 format convert_culled_mesh_to_cdf5 = False +# Minimum latitude, in degrees, for masking land-locked cells +latitude_threshold = 43.0 +# Maximum number of sweeps to search for land-locked cells +sweep_count = 20 From 8a59947ef74dbe04638236212f90208724300849 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Wed, 3 Jan 2024 05:32:33 -0600 Subject: [PATCH 3/4] Update to SOwISC12to30E3r2 Switch SO12to60 to SO12to30 with a base resolution that is now uniformly 30 km. --- compass/ocean/suites/so12to30.txt | 5 + compass/ocean/suites/so12to60.txt | 5 - compass/ocean/suites/sowisc12to30.txt | 5 + compass/ocean/suites/sowisc12to60.txt | 5 - compass/ocean/tests/global_ocean/__init__.py | 2 +- .../ocean/tests/global_ocean/mesh/__init__.py | 6 +- .../global_ocean/mesh/so12to30/__init__.py | 70 +++++++++++ .../dynamic_adjustment.yaml | 0 .../high_res_region.geojson | 2 +- .../namelist.split_explicit | 0 .../so12to60.cfg => so12to30/so12to30.cfg} | 11 +- .../global_ocean/mesh/so12to60/__init__.py | 118 ------------------ .../mesh/so12to60/atlantic.geojson | 97 -------------- 13 files changed, 89 insertions(+), 237 deletions(-) create mode 100644 compass/ocean/suites/so12to30.txt delete mode 100644 compass/ocean/suites/so12to60.txt create mode 100644 compass/ocean/suites/sowisc12to30.txt delete mode 100644 compass/ocean/suites/sowisc12to60.txt create mode 100644 compass/ocean/tests/global_ocean/mesh/so12to30/__init__.py rename compass/ocean/tests/global_ocean/mesh/{so12to60 => so12to30}/dynamic_adjustment.yaml (100%) rename compass/ocean/tests/global_ocean/mesh/{so12to60 => so12to30}/high_res_region.geojson (96%) rename compass/ocean/tests/global_ocean/mesh/{so12to60 => so12to30}/namelist.split_explicit (100%) rename compass/ocean/tests/global_ocean/mesh/{so12to60/so12to60.cfg => so12to30/so12to30.cfg} (78%) delete mode 100644 compass/ocean/tests/global_ocean/mesh/so12to60/__init__.py delete mode 100644 compass/ocean/tests/global_ocean/mesh/so12to60/atlantic.geojson diff --git a/compass/ocean/suites/so12to30.txt b/compass/ocean/suites/so12to30.txt new file mode 100644 index 0000000000..d9fb27d8c0 --- /dev/null +++ b/compass/ocean/suites/so12to30.txt @@ -0,0 +1,5 @@ +ocean/global_ocean/SO12to30/mesh +ocean/global_ocean/SO12to30/WOA23/init +ocean/global_ocean/SO12to30/WOA23/performance_test +ocean/global_ocean/SO12to30/WOA23/dynamic_adjustment +ocean/global_ocean/SO12to30/WOA23/files_for_e3sm diff --git a/compass/ocean/suites/so12to60.txt b/compass/ocean/suites/so12to60.txt deleted file mode 100644 index 42c0943056..0000000000 --- a/compass/ocean/suites/so12to60.txt +++ /dev/null @@ -1,5 +0,0 @@ -ocean/global_ocean/SO12to60/mesh -ocean/global_ocean/SO12to60/WOA23/init -ocean/global_ocean/SO12to60/WOA23/performance_test -ocean/global_ocean/SO12to60/WOA23/dynamic_adjustment -ocean/global_ocean/SO12to60/WOA23/files_for_e3sm diff --git a/compass/ocean/suites/sowisc12to30.txt b/compass/ocean/suites/sowisc12to30.txt new file mode 100644 index 0000000000..377f440bb6 --- /dev/null +++ b/compass/ocean/suites/sowisc12to30.txt @@ -0,0 +1,5 @@ +ocean/global_ocean/SOwISC12to30/mesh +ocean/global_ocean/SOwISC12to30/WOA23/init +ocean/global_ocean/SOwISC12to30/WOA23/performance_test +ocean/global_ocean/SOwISC12to30/WOA23/dynamic_adjustment +ocean/global_ocean/SOwISC12to30/WOA23/files_for_e3sm diff --git a/compass/ocean/suites/sowisc12to60.txt b/compass/ocean/suites/sowisc12to60.txt deleted file mode 100644 index 6d638a1859..0000000000 --- a/compass/ocean/suites/sowisc12to60.txt +++ /dev/null @@ -1,5 +0,0 @@ -ocean/global_ocean/SOwISC12to60/mesh -ocean/global_ocean/SOwISC12to60/WOA23/init -ocean/global_ocean/SOwISC12to60/WOA23/performance_test -ocean/global_ocean/SOwISC12to60/WOA23/dynamic_adjustment -ocean/global_ocean/SOwISC12to60/WOA23/files_for_e3sm diff --git a/compass/ocean/tests/global_ocean/__init__.py b/compass/ocean/tests/global_ocean/__init__.py index 37daf5e206..8d926002aa 100644 --- a/compass/ocean/tests/global_ocean/__init__.py +++ b/compass/ocean/tests/global_ocean/__init__.py @@ -43,7 +43,7 @@ def __init__(self, mpas_core): self._add_tests(mesh_names=['ARRM10to60', 'ARRMwISC10to60']) - self._add_tests(mesh_names=['SO12to60', 'SOwISC12to60']) + self._add_tests(mesh_names=['SO12to30', 'SOwISC12to30']) self._add_tests(mesh_names=['WC14', 'WCwISC14']) diff --git a/compass/ocean/tests/global_ocean/mesh/__init__.py b/compass/ocean/tests/global_ocean/mesh/__init__.py index a99550407a..1178a6488f 100644 --- a/compass/ocean/tests/global_ocean/mesh/__init__.py +++ b/compass/ocean/tests/global_ocean/mesh/__init__.py @@ -12,7 +12,7 @@ QUMeshFromConfigStep, ) from compass.ocean.tests.global_ocean.mesh.rrs6to18 import RRS6to18BaseMesh -from compass.ocean.tests.global_ocean.mesh.so12to60 import SO12to60BaseMesh +from compass.ocean.tests.global_ocean.mesh.so12to30 import SO12to30BaseMesh from compass.ocean.tests.global_ocean.mesh.wc14 import WC14BaseMesh from compass.ocean.tests.global_ocean.metadata import ( get_author_and_email_from_git, @@ -94,8 +94,8 @@ def __init__(self, test_group, mesh_name, high_res_topography): base_mesh_step = ARRM10to60BaseMesh(self, name=name, subdir=subdir) elif mesh_name in ['RRS6to18', 'RRSwISC6to18']: base_mesh_step = RRS6to18BaseMesh(self, name=name, subdir=subdir) - elif mesh_name in ['SO12to60', 'SOwISC12to60']: - base_mesh_step = SO12to60BaseMesh(self, name=name, subdir=subdir) + elif mesh_name in ['SO12to30', 'SOwISC12to30']: + base_mesh_step = SO12to30BaseMesh(self, name=name, subdir=subdir) elif mesh_name.startswith('Kuroshio'): base_mesh_step = KuroshioBaseMesh(self, name=name, subdir=subdir) elif mesh_name in ['WC14', 'WCwISC14']: diff --git a/compass/ocean/tests/global_ocean/mesh/so12to30/__init__.py b/compass/ocean/tests/global_ocean/mesh/so12to30/__init__.py new file mode 100644 index 0000000000..2f05894fb4 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/so12to30/__init__.py @@ -0,0 +1,70 @@ +import numpy as np +from geometric_features import read_feature_collection +from mpas_tools.cime.constants import constants +from mpas_tools.mesh.creation.signed_distance import ( + signed_distance_from_geojson, +) + +from compass.mesh import QuasiUniformSphericalMeshStep + + +class SO12to30BaseMesh(QuasiUniformSphericalMeshStep): + """ + A step for creating SO12to30 meshes + """ + def setup(self): + """ + Add some input files + """ + + self.add_input_file(filename='high_res_region.geojson', + package=self.__module__) + + super().setup() + + def build_cell_width_lat_lon(self): + """ + Create cell width array for this mesh on a regular latitude-longitude + grid + + Returns + ------- + cellWidth : numpy.array + m x n array of cell width in km + + lon : numpy.array + longitude in degrees (length n and between -180 and 180) + + lat : numpy.array + longitude in degrees (length m and between -90 and 90) + """ + + dlon = 0.1 + dlat = dlon + earth_radius = constants['SHR_CONST_REARTH'] + nlon = int(360. / dlon) + 1 + nlat = int(180. / dlat) + 1 + lon = np.linspace(-180., 180., nlon) + lat = np.linspace(-90., 90., nlat) + + # start with a uniform 30 km background resolution + dx_max = 30. + cell_width = dx_max * np.ones((nlat, nlon)) + + fc = read_feature_collection('high_res_region.geojson') + + so_signed_distance = signed_distance_from_geojson(fc, lon, lat, + earth_radius, + max_length=0.25) + + # Equivalent to 20 degrees latitude + trans_width = 1600e3 + trans_start = 500e3 + dx_min = 12. + + weights = 0.5 * (1 + np.tanh((so_signed_distance - trans_start) / + trans_width)) + + cell_width = dx_min * (1 - weights) + cell_width * weights + + return cell_width, lon, lat diff --git a/compass/ocean/tests/global_ocean/mesh/so12to60/dynamic_adjustment.yaml b/compass/ocean/tests/global_ocean/mesh/so12to30/dynamic_adjustment.yaml similarity index 100% rename from compass/ocean/tests/global_ocean/mesh/so12to60/dynamic_adjustment.yaml rename to compass/ocean/tests/global_ocean/mesh/so12to30/dynamic_adjustment.yaml diff --git a/compass/ocean/tests/global_ocean/mesh/so12to60/high_res_region.geojson b/compass/ocean/tests/global_ocean/mesh/so12to30/high_res_region.geojson similarity index 96% rename from compass/ocean/tests/global_ocean/mesh/so12to60/high_res_region.geojson rename to compass/ocean/tests/global_ocean/mesh/so12to30/high_res_region.geojson index a536ebaba9..4b8b7202c6 100644 --- a/compass/ocean/tests/global_ocean/mesh/so12to60/high_res_region.geojson +++ b/compass/ocean/tests/global_ocean/mesh/so12to30/high_res_region.geojson @@ -4,7 +4,7 @@ { "type": "Feature", "properties": { - "name": "SO12to60 high res region", + "name": "SO12to30 high res region", "component": "ocean", "object": "region", "author": "Xylar Asay-Davis" diff --git a/compass/ocean/tests/global_ocean/mesh/so12to60/namelist.split_explicit b/compass/ocean/tests/global_ocean/mesh/so12to30/namelist.split_explicit similarity index 100% rename from compass/ocean/tests/global_ocean/mesh/so12to60/namelist.split_explicit rename to compass/ocean/tests/global_ocean/mesh/so12to30/namelist.split_explicit diff --git a/compass/ocean/tests/global_ocean/mesh/so12to60/so12to60.cfg b/compass/ocean/tests/global_ocean/mesh/so12to30/so12to30.cfg similarity index 78% rename from compass/ocean/tests/global_ocean/mesh/so12to60/so12to60.cfg rename to compass/ocean/tests/global_ocean/mesh/so12to30/so12to30.cfg index 541b71e917..6239b2ddaa 100644 --- a/compass/ocean/tests/global_ocean/mesh/so12to60/so12to60.cfg +++ b/compass/ocean/tests/global_ocean/mesh/so12to30/so12to30.cfg @@ -33,23 +33,20 @@ prefix = SO # a description of the mesh and initial condition mesh_description = MPAS Southern Ocean regionally refined mesh for E3SM version ${e3sm_version} with enhanced resolution (${min_res} km) around - Antarctica, 45-km resolution in the mid southern latitudes, - 30-km resolution in a 15-degree band around the equator, 60-km - resolution in northern mid latitudes, 30 km in the north - Atlantic and 35 km in the Arctic. This mesh has <<>> + Antarctica and ${max_res} km elsewhere. This mesh has <<>> vertical levels and includes cavities under the ice shelves around Antarctica. # E3SM version that the mesh is intended for e3sm_version = 3 # The revision number of the mesh, which should be incremented each time the # mesh is revised -mesh_revision = 1 +mesh_revision = 2 # the minimum (finest) resolution in the mesh min_res = 12 # the maximum (coarsest) resolution in the mesh, can be the same as min_res -max_res = 60 +max_res = 30 # The URL of the pull request documenting the creation of the mesh -pull_request = https://github.com/MPAS-Dev/compass/pull/669 +pull_request = https://github.com/MPAS-Dev/compass/pull/753 # config options related to initial condition and diagnostics support files diff --git a/compass/ocean/tests/global_ocean/mesh/so12to60/__init__.py b/compass/ocean/tests/global_ocean/mesh/so12to60/__init__.py deleted file mode 100644 index b04ffd6d43..0000000000 --- a/compass/ocean/tests/global_ocean/mesh/so12to60/__init__.py +++ /dev/null @@ -1,118 +0,0 @@ -import numpy as np - -import mpas_tools.mesh.creation.mesh_definition_tools as mdt -from mpas_tools.mesh.creation.signed_distance import \ - signed_distance_from_geojson -from geometric_features import read_feature_collection -from mpas_tools.cime.constants import constants - -from compass.mesh import QuasiUniformSphericalMeshStep - - -class SO12to60BaseMesh(QuasiUniformSphericalMeshStep): - """ - A step for creating SO12to60 meshes - """ - def setup(self): - """ - Add some input files - """ - - self.add_input_file(filename='atlantic.geojson', - package=self.__module__) - - self.add_input_file(filename='high_res_region.geojson', - package=self.__module__) - - super().setup() - - def build_cell_width_lat_lon(self): - """ - Create cell width array for this mesh on a regular latitude-longitude - grid - - Returns - ------- - cellWidth : numpy.array - m x n array of cell width in km - - lon : numpy.array - longitude in degrees (length n and between -180 and 180) - - lat : numpy.array - longitude in degrees (length m and between -90 and 90) - """ - - dlon = 0.1 - dlat = dlon - earth_radius = constants['SHR_CONST_REARTH'] - nlon = int(360./dlon) + 1 - nlat = int(180./dlat) + 1 - lon = np.linspace(-180., 180., nlon) - lat = np.linspace(-90., 90., nlat) - - cellWidthSouth = mdt.EC_CellWidthVsLat(lat, cellWidthEq=30., - cellWidthMidLat=45., - cellWidthPole=45., - latPosEq=7.5, latWidthEq=3.0) - - cellWidthNorth = mdt.EC_CellWidthVsLat(lat, cellWidthEq=30., - cellWidthMidLat=60., - cellWidthPole=35., - latPosEq=7.5, latWidthEq=3.0) - - # Transition at Equator - latTransition = 0.0 - latWidthTransition = 2.5 - cellWidthVsLat = mdt.mergeCellWidthVsLat( - lat, - cellWidthSouth, - cellWidthNorth, - latTransition, - latWidthTransition) - - _, cellWidth = np.meshgrid(lon, cellWidthVsLat) - - cellWidthAtlantic = mdt.EC_CellWidthVsLat(lat, cellWidthEq=30., - cellWidthMidLat=30., - cellWidthPole=35., - latPosEq=7.5, latWidthEq=3.0) - - cellWidthAtlantic = mdt.mergeCellWidthVsLat( - lat, - cellWidthSouth, - cellWidthAtlantic, - latTransition, - latWidthTransition) - - _, cellWidthAtlantic = np.meshgrid(lon, cellWidthAtlantic) - - fc = read_feature_collection('atlantic.geojson') - - atlantic_signed_distance = signed_distance_from_geojson( - fc, lon, lat, earth_radius, max_length=0.25) - - trans_width = 400e3 - trans_start = 0. - weights = 0.5 * (1 + np.tanh((atlantic_signed_distance - trans_start) / - trans_width)) - - cellWidth = cellWidthAtlantic * (1 - weights) + cellWidth * weights - - fc = read_feature_collection('high_res_region.geojson') - - so_signed_distance = signed_distance_from_geojson(fc, lon, lat, - earth_radius, - max_length=0.25) - - # Equivalent to 20 degrees latitude - trans_width = 1600e3 - trans_start = 500e3 - dx_min = 12. - - weights = 0.5 * (1 + np.tanh((so_signed_distance - trans_start) / - trans_width)) - - cellWidth = dx_min * (1 - weights) + cellWidth * weights - - return cellWidth, lon, lat diff --git a/compass/ocean/tests/global_ocean/mesh/so12to60/atlantic.geojson b/compass/ocean/tests/global_ocean/mesh/so12to60/atlantic.geojson deleted file mode 100644 index 1df1af372d..0000000000 --- a/compass/ocean/tests/global_ocean/mesh/so12to60/atlantic.geojson +++ /dev/null @@ -1,97 +0,0 @@ -{ - "type": "FeatureCollection", - "features": [ - { - "type": "Feature", - "properties": { - "name": "Atlantic region", - "component": "ocean", - "object": "region", - "author": "Xylar Asay-Davis" - }, - "geometry": { - "type": "Polygon", - "coordinates": [ - [ - [ - -97.3828125, - 85.05112877979998 - ], - [ - -102.3046875, - 40.17887331434696 - ], - [ - -102.3046875, - 23.241346102386135 - ], - [ - -93.1640625, - 15.623036831528264 - ], - [ - -85.78125, - 13.581920900545844 - ], - [ - -83.583984375, - 9.535748998133627 - ], - [ - -81.2109375, - 8.059229627200192 - ], - [ - -79.013671875, - 9.795677582829743 - ], - [ - -75.9375, - 5.61598581915534 - ], - [ - -77.6953125, - 0 - ], - [ - 16.171875, - 0 - ], - [ - 27.773437499999996, - 26.745610382199022 - ], - [ - 37.96875, - 32.24997445586331 - ], - [ - 39.7265625, - 39.36827914916014 - ], - [ - 32.6953125, - 53.9560855309879 - ], - [ - 37.6171875, - 61.438767493682825 - ], - [ - 25.664062500000004, - 68.26938680456564 - ], - [ - 24.609375, - 85.05112877979998 - ], - [ - -97.3828125, - 85.05112877979998 - ] - ] - ] - } - } - ] -} \ No newline at end of file From eb978b3760feddb662826969224fdb9da8ae5e65 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Wed, 3 Jan 2024 07:58:37 -0600 Subject: [PATCH 4/4] Update the docs for SO12to30 --- docs/developers_guide/ocean/api.rst | 4 +-- .../ocean/test_groups/global_ocean.rst | 34 ++++++++----------- docs/developers_guide/organization.rst | 2 +- docs/tutorials/dev_add_rrm.rst | 4 +-- .../ocean/test_groups/global_ocean.rst | 17 +++++----- docs/users_guide/quick_start.rst | 4 +-- docs/users_guide/test_suites.rst | 4 +-- 7 files changed, 32 insertions(+), 37 deletions(-) diff --git a/docs/developers_guide/ocean/api.rst b/docs/developers_guide/ocean/api.rst index b6926e0e8b..3c0fe76931 100644 --- a/docs/developers_guide/ocean/api.rst +++ b/docs/developers_guide/ocean/api.rst @@ -233,8 +233,8 @@ test cases and steps mesh.rrs6to18.RRS6to18BaseMesh mesh.rrs6to18.RRS6to18BaseMesh.build_cell_width_lat_lon - mesh.so12to60.SO12to60BaseMesh - mesh.so12to60.SO12to60BaseMesh.build_cell_width_lat_lon + mesh.so12to30.SO12to30BaseMesh + mesh.so12to30.SO12to30BaseMesh.build_cell_width_lat_lon mesh.wc14.WC14BaseMesh mesh.wc14.WC14BaseMesh.build_cell_width_lat_lon diff --git a/docs/developers_guide/ocean/test_groups/global_ocean.rst b/docs/developers_guide/ocean/test_groups/global_ocean.rst index 25f52368c9..e7ffd767dd 100644 --- a/docs/developers_guide/ocean/test_groups/global_ocean.rst +++ b/docs/developers_guide/ocean/test_groups/global_ocean.rst @@ -768,20 +768,18 @@ the higher surface resolution of the 80-layer RRS vertical coordinate. config_rx1_min_layer_thickness = 0.1 -.. _dev_ocean_global_ocean_sowisc12to60: +.. _dev_ocean_global_ocean_sowisc12to30: -SO12to60 and SOwISC12to60 +SO12to30 and SOwISC12to30 +++++++++++++++++++++++++ -The ``SO12to60`` and ``SOwISC12to60`` meshes are Southern Ocean regionally -refined meshes with 12-km resolution around the Southern Ocean and Antarctica, -45-km at southern mid-latitudes, 30-km at the equator and in the North -Atlantic, 60-km resolution in the North Pacific, and 35-km resolution in the -Arctic. +The ``SO12to30`` and ``SOwISC12to30`` meshes are Southern Ocean regionally +refined meshes with 12-km resolution around the Southern Ocean and Antarctica +and have 30-km resoltuion elsewhere. The class -:py:class:`compass.ocean.tests.global_ocean.mesh.so12to60.SO12to60BaseMesh` defines -the resolution for the meshes. The ``compass.ocean.tests.global_ocean.mesh.so12to60`` +:py:class:`compass.ocean.tests.global_ocean.mesh.so12to30.SO12to30BaseMesh` defines +the resolution for the meshes. The ``compass.ocean.tests.global_ocean.mesh.so12to30`` module includes namelist options appropriate for forward simulations with split-explicit (but not RK4) time integration on these meshes. These set the time step and default run duration for short runs with these meshes. @@ -824,24 +822,21 @@ The default config options for these meshes are: prefix = SO # a description of the mesh and initial condition mesh_description = MPAS Southern Ocean regionally refined mesh for E3SM version - ${e3sm_version} with enhanced resolution (${min_res} km) around - Antarctica, 45-km resolution in the mid southern latitudes, - 30-km resolution in a 15-degree band around the equator, 60-km - resolution in northern mid latitudes, 30 km in the north - Atlantic and 35 km in the Arctic. This mesh has <<>> - vertical levels and includes cavities under the ice shelves - around Antarctica. + ${e3sm_version} with enhanced resolution (${min_res} km) around + Antarctica and 30 km elsewhere. This mesh has <<>> + vertical levels and includes cavities under the ice shelves + around Antarctica. # E3SM version that the mesh is intended for e3sm_version = 3 # The revision number of the mesh, which should be incremented each time the # mesh is revised - mesh_revision = 1 + mesh_revision = 2 # the minimum (finest) resolution in the mesh min_res = 12 # the maximum (coarsest) resolution in the mesh, can be the same as min_res - max_res = 60 + max_res = 30 # The URL of the pull request documenting the creation of the mesh - pull_request = https://github.com/MPAS-Dev/compass/pull/460 + pull_request = https://github.com/MPAS-Dev/compass/pull/752 # config options related to initial condition and diagnostics support files @@ -851,6 +846,7 @@ The default config options for these meshes are: # CMIP6 grid resolution cmip6_grid_res = 180x360 + The vertical grid is an ``index_tanh_dz`` profile (see :ref:`dev_ocean_framework_vertical`) with 64 vertical levels ranging in thickness from 10 to 250 m. diff --git a/docs/developers_guide/organization.rst b/docs/developers_guide/organization.rst index f4e478bdd1..c41c421f5a 100644 --- a/docs/developers_guide/organization.rst +++ b/docs/developers_guide/organization.rst @@ -1675,7 +1675,7 @@ should have cached outputs, the suffix ``c`` can be added to the test number: compass setup -n 90c 91c 92 ... In this example, test cases 90 and 91 (``mesh`` and ``init`` test cases from -the ``SOwISC12to60`` global ocean mesh, in this case) are set up with cached +the ``SOwISC12to30`` global ocean mesh, in this case) are set up with cached outputs in all steps and 92 (``performance_test``) is not. This approach is efficient but does not provide any control of which steps use cached outputs and which do not. diff --git a/docs/tutorials/dev_add_rrm.rst b/docs/tutorials/dev_add_rrm.rst index 840666ab14..701c6e9e50 100644 --- a/docs/tutorials/dev_add_rrm.rst +++ b/docs/tutorials/dev_add_rrm.rst @@ -7,7 +7,7 @@ This tutorial presents a step-by-step guide to adding a new mesh to the ``global_ocean`` test group in ``compass`` (see the :ref:`glossary` for definitions of some relevant terms). In this tutorial, I will add a new mesh called YAM ("yet another mesh") that is based on techniques used to build -the existing :ref:`dev_ocean_global_ocean_sowisc12to60` as well as +the existing :ref:`dev_ocean_global_ocean_sowisc12to30` as well as :ref:`dev_ocean_global_ocean_wc14` meshes. .. _dev_tutorial_add_rrm_getting_started: @@ -164,7 +164,7 @@ Next, we need to add this mesh to the list of known meshes: ... - from compass.ocean.tests.global_ocean.mesh.so12to60 import SO12to60BaseMesh + from compass.ocean.tests.global_ocean.mesh.so12to30 import SO12to30BaseMesh from compass.ocean.tests.global_ocean.mesh.wc14 import WC14BaseMesh from compass.ocean.tests.global_ocean.mesh.yam10to60 import YAM10to60BaseMesh from compass.ocean.tests.global_ocean.metadata import ( diff --git a/docs/users_guide/ocean/test_groups/global_ocean.rst b/docs/users_guide/ocean/test_groups/global_ocean.rst index 7a64e72d0c..ab67cc0efb 100644 --- a/docs/users_guide/ocean/test_groups/global_ocean.rst +++ b/docs/users_guide/ocean/test_groups/global_ocean.rst @@ -431,24 +431,23 @@ ice-shelf cavities around Antarctica, whereas the RRS6to18 mesh does not. :width: 500 px :align: center -.. _global_ocean_mesh_sowisc12to60: +.. _global_ocean_mesh_sowisc12to30: -SO12to60 and SOwISC12to60 +SO12to30 and SOwISC12to30 ^^^^^^^^^^^^^^^^^^^^^^^^^ -The Southern Ocean 12- to 60-km mesh with ice-shelf cavities (SOwISC12to60), +The Southern Ocean 12- to 30-km mesh with ice-shelf cavities (SOwISC12to30), sometimes called the Southern Ocean regionally refined mesh (SORRM), is the main simulation mesh for the `E3SM v2 Cryosphere Science Campaign `_ and E3SM v3 Polar Processes, Sea-Level Rise, and Coastal Impacts Campaign. -The SO12to60 is the same mesh but without ice-shelf cavities. -The mesh has 12 km resolution around Antarctica, tapering to 45 km in mid -Southern latitudes, 30 km at the equator and in the North Atlantic, 60 km -in the North Pacific, and 35 km in the Arctic. The mesh includes the -:ref:`global_ocean_ice_shelf_cavities` around Antarctica in the ocean domain. +The SO12to30 is the same mesh but without ice-shelf cavities. +The mesh has 12-km resolution around Antarctica and 30-km resolution elsewhere. +The mesh includes the :ref:`global_ocean_ice_shelf_cavities` around Antarctica +in the ocean domain. -.. image:: images/sowisc12to60.png +.. image:: images/sowisc12to30.png :width: 500 px :align: center diff --git a/docs/users_guide/quick_start.rst b/docs/users_guide/quick_start.rst index 2f875ad713..ed3f5f01fc 100644 --- a/docs/users_guide/quick_start.rst +++ b/docs/users_guide/quick_start.rst @@ -428,8 +428,8 @@ The output is: -c ocean -t qu240_for_e3sm -c ocean -t quwisc240 -c ocean -t quwisc240_for_e3sm - -c ocean -t so12to60 - -c ocean -t sowisc12to60 + -c ocean -t so12to30 + -c ocean -t sowisc12to30 -c ocean -t wc14 -c ocean -t wcwisc14 -c ocean -t wetdry diff --git a/docs/users_guide/test_suites.rst b/docs/users_guide/test_suites.rst index bea5dd7582..94943129bb 100644 --- a/docs/users_guide/test_suites.rst +++ b/docs/users_guide/test_suites.rst @@ -41,8 +41,8 @@ the current set of available test suites is: -c ocean -t qu240_for_e3sm -c ocean -t quwisc240 -c ocean -t quwisc240_for_e3sm - -c ocean -t so12to60 - -c ocean -t sowisc12to60 + -c ocean -t so12to30 + -c ocean -t sowisc12to30 -c ocean -t wc14 -c ocean -t wcwisc14 -c ocean -t wetdry