diff --git a/compass/ocean/tests/global_ocean/__init__.py b/compass/ocean/tests/global_ocean/__init__.py index 5c846b2e84..6eb83d8b56 100644 --- a/compass/ocean/tests/global_ocean/__init__.py +++ b/compass/ocean/tests/global_ocean/__init__.py @@ -53,6 +53,11 @@ def __init__(self, mpas_core): # Kuroshio meshes without ice-shelf cavities self._add_tests(mesh_names=['Kuroshio12to60', 'Kuroshio8to60']) + self._add_tests(mesh_names=['FRISwISC01to60']) + self._add_tests(mesh_names=['FRISwISC02to60']) + self._add_tests(mesh_names=['FRISwISC04to60']) + self._add_tests(mesh_names=['FRISwISC08to60']) + # A test case for making E3SM support files from an existing mesh self.add_test_case(FilesForE3SM(test_group=self)) diff --git a/compass/ocean/tests/global_ocean/mesh/__init__.py b/compass/ocean/tests/global_ocean/mesh/__init__.py index a99550407a..da9884177a 100644 --- a/compass/ocean/tests/global_ocean/mesh/__init__.py +++ b/compass/ocean/tests/global_ocean/mesh/__init__.py @@ -6,6 +6,10 @@ from compass.ocean.mesh.remap_topography import RemapTopography 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.fris01to60 import FRIS01to60BaseMesh +from compass.ocean.tests.global_ocean.mesh.fris02to60 import FRIS02to60BaseMesh +from compass.ocean.tests.global_ocean.mesh.fris04to60 import FRIS04to60BaseMesh +from compass.ocean.tests.global_ocean.mesh.fris08to60 import FRIS08to60BaseMesh from compass.ocean.tests.global_ocean.mesh.kuroshio import KuroshioBaseMesh from compass.ocean.tests.global_ocean.mesh.qu import ( IcosMeshFromConfigStep, @@ -96,6 +100,14 @@ def __init__(self, test_group, mesh_name, high_res_topography): 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 ['FRIS01to60', 'FRISwISC01to60']: + base_mesh_step = FRIS01to60BaseMesh(self, name=name, subdir=subdir) + elif mesh_name in ['FRIS02to60', 'FRISwISC02to60']: + base_mesh_step = FRIS02to60BaseMesh(self, name=name, subdir=subdir) + elif mesh_name in ['FRIS04to60', 'FRISwISC04to60']: + base_mesh_step = FRIS04to60BaseMesh(self, name=name, subdir=subdir) + elif mesh_name in ['FRIS08to60', 'FRISwISC08to60']: + base_mesh_step = FRIS08to60BaseMesh(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/ec30to60/__init__.py b/compass/ocean/tests/global_ocean/mesh/ec30to60/__init__.py index cb1b0e19d3..dcbe22f1c9 100644 --- a/compass/ocean/tests/global_ocean/mesh/ec30to60/__init__.py +++ b/compass/ocean/tests/global_ocean/mesh/ec30to60/__init__.py @@ -1,5 +1,5 @@ -import numpy as np import mpas_tools.mesh.creation.mesh_definition_tools as mdt +import numpy as np from compass.mesh import QuasiUniformSphericalMeshStep @@ -28,8 +28,8 @@ def build_cell_width_lat_lon(self): dlon = 10. dlat = 0.1 - nlon = int(360./dlon) + 1 - nlat = int(180./dlat) + 1 + nlon = int(360. / dlon) + 1 + nlat = int(180. / dlat) + 1 lon = np.linspace(-180., 180., nlon) lat = np.linspace(-90., 90., nlat) diff --git a/compass/ocean/tests/global_ocean/mesh/fris01to60/__init__.py b/compass/ocean/tests/global_ocean/mesh/fris01to60/__init__.py new file mode 100644 index 0000000000..e1197e7e72 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris01to60/__init__.py @@ -0,0 +1,203 @@ +import mpas_tools.mesh.creation.mesh_definition_tools as mdt +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 FRIS01to60BaseMesh(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__) + + self.add_input_file(filename='fris_v1_transition.geojson', + package=self.__module__) + + self.add_input_file(filename='fris_v1_peninsula_12km_v2.geojson', + package=self.__module__) + + self.add_input_file( + filename='fris_v1_peninsula_12km_transition.geojson', + package=self.__module__) + + self.add_input_file(filename='fris_v1.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 + + # Add high res FRIS region transition + dx_min_fris = 1. # minimum resolution within the FRIS cavity + + fc = read_feature_collection('fris_v1_transition.geojson') + + so_signed_distance = signed_distance_from_geojson(fc, lon, lat, + earth_radius, + max_length=0.25) + + # Equivalent to 600 km + trans_width = 600e3 + trans_start = 0 + dx_min = dx_min_fris + + weights = 0.5 * (1 + np.tanh((so_signed_distance - trans_start) / + trans_width)) + + cellWidth = dx_min * (1 - weights) + cellWidth * weights + + # Add 12 km sharp correction west of the peninsula + fc = read_feature_collection('fris_v1_peninsula_12km_v2.geojson') + + so_signed_distance = signed_distance_from_geojson(fc, lon, lat, + earth_radius, + max_length=0.25) + + # Equivalent to 10 km + trans_width = 10e3 + trans_start = 0 + dx_min = 12. + + weights = 0.5 * (1 + np.tanh((so_signed_distance - trans_start) / + trans_width)) + + cellWidth = dx_min * (1 - weights) + cellWidth * weights + + # Add 12 km transition correction west of the peninsula + fc = read_feature_collection( + 'fris_v1_peninsula_12km_transition.geojson') + + so_signed_distance = signed_distance_from_geojson(fc, lon, lat, + earth_radius, + max_length=0.25) + + # Equivalent to 150 km + trans_width = 150e3 + trans_start = 0 + dx_min = 12. + + weights = 0.5 * (1 + np.tanh((so_signed_distance - trans_start) / + trans_width)) + + cellWidth = dx_min * (1 - weights) + cellWidth * weights + + # Add high res FRIS region inner + fc = read_feature_collection('fris_v1.geojson') + + so_signed_distance = signed_distance_from_geojson(fc, lon, lat, + earth_radius, + max_length=0.25) + + # Equivalent to 100 km (0 should be enough given the setup but to be + # safe) + trans_width = 100e3 + trans_start = 0 + dx_min = dx_min_fris + + 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/fris01to60/atlantic.geojson b/compass/ocean/tests/global_ocean/mesh/fris01to60/atlantic.geojson new file mode 100644 index 0000000000..227a57f066 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris01to60/atlantic.geojson @@ -0,0 +1,97 @@ +{ + "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 + ] + ] + ] + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris01to60/dynamic_adjustment.yaml b/compass/ocean/tests/global_ocean/mesh/fris01to60/dynamic_adjustment.yaml new file mode 100644 index 0000000000..5f46356813 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris01to60/dynamic_adjustment.yaml @@ -0,0 +1,44 @@ +dynamic_adjustment: + land_ice_flux_mode: pressure_only + get_dt_from_min_res: False + + steps: + damped_adjustment_1: + run_duration: 02_00:00:00 + output_interval: 01_00:00:00 + restart_interval: 02_00:00:00 + dt: 00:00:30 + btr_dt: 00:00:01 + Rayleigh_damping_coeff: 1.0e-4 + + damped_adjustment_2: + run_duration: 08_00:00:00 + output_interval: 10_00:00:00 + restart_interval: 02_00:00:00 + dt: 00:00:30 + btr_dt: 00:00:01 + Rayleigh_damping_coeff: 1.0e-5 + + damped_adjustment_3: + run_duration: 10_00:00:00 + output_interval: 10_00:00:00 + restart_interval: 10_00:00:00 + dt: 00:00:30 + btr_dt: 00:00:01 + Rayleigh_damping_coeff: 1.0e-6 + + damped_adjustment_4: + run_duration: 20_00:00:00 + output_interval: 10_00:00:00 + restart_interval: 10_00:00:00 + dt: 00:00:30 + btr_dt: 00:00:01 + Rayleigh_damping_coeff: None + + simulation: + run_duration: 10_00:00:00 + output_interval: 10_00:00:00 + restart_interval: 10_00:00:00 + dt: 00:00:50 + btr_dt: 00:00:01.7 + Rayleigh_damping_coeff: None diff --git a/compass/ocean/tests/global_ocean/mesh/fris01to60/fris01to60.cfg b/compass/ocean/tests/global_ocean/mesh/fris01to60/fris01to60.cfg new file mode 100644 index 0000000000..c9f3cadb15 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris01to60/fris01to60.cfg @@ -0,0 +1,86 @@ +# Options related to the vertical grid +[vertical_grid] + +# the type of vertical grid +grid_type = index_tanh_dz + +# Number of vertical levels +vert_levels = 64 + +# Depth of the bottom of the ocean +bottom_depth = 5500.0 + +# The minimum layer thickness +min_layer_thickness = 10.0 + +# The maximum layer thickness +max_layer_thickness = 250.0 + +# The characteristic number of levels over which the transition between +# the min and max occurs +transition_levels = 28 + +# Anvil runs out of memory so do the following +# config options related to remapping topography to an MPAS-Ocean mesh +[remap_topography] + +# the target and minimum number of MPI tasks to use in remapping +ntasks = 4096 +min_tasks = 360 + +# options for global ocean testcases +[global_ocean] + +## config options related to the initial_state step +# number of cores to use +init_ntasks = 512 +# minimum of cores, below which the step fails +init_min_tasks = 64 +# The number of cores per task in init mode -- used to avoid running out of +# memory where needed +init_cpus_per_task = 4 +# whether to update PIO tasks and stride +init_update_pio = False + +# whether to update PIO tasks and stride +forward_update_pio = False + +# the approximate number of cells in the mesh +approx_cell_count = 2200000# time step per resolution (s/km), since dt is proportional to resolution + +dt_per_km = 5 +# barotropic time step per resolution (s/km) +btr_dt_per_km = 0.2 + +## metadata related to the mesh +# the prefix (e.g. QU, EC, WC, SO) +prefix = FRIS +# a description of the mesh and initial condition +mesh_description = MPAS Southern Ocean regionally refined mesh for E3SM version + ${e3sm_version} with enhanced resolution (12 km) around + Antarctica and even more enhanced around the Filchner-Ronne Ice + Shelf (${min_res} km), 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 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 +# the minimum (finest) resolution in the mesh +min_res = 1 +# the maximum (coarsest) resolution in the mesh, can be the same as min_res +max_res = 60 +# The URL of the pull request documenting the creation of the mesh +pull_request = N/A + + +# config options related to initial condition and diagnostics support files +# for E3SM +[files_for_e3sm] + +# CMIP6 grid resolution +cmip6_grid_res = 180x360 diff --git a/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1.geojson b/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1.geojson new file mode 100644 index 0000000000..51e767e649 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1.geojson @@ -0,0 +1 @@ +{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"FRIS high res region","component":"ocean","object":"region","author":"Irena Vankova"},"geometry":{"coordinates":[[[-64.7438723001555,-72.8054024693636],[-69.76898821706332,-74.19251323259206],[-74.02484092117425,-74.47843628310608],[-92.43607426605669,-76.75259948500253],[-101.5379406548874,-80.18910132153749],[-97.25418139197761,-83.23536684168135],[-56.69746887655441,-85.05112877980659],[-39.90477420089397,-85],[-14.020185809699171,-83.36577201994825],[-20.52300577998716,-79.88944960088696],[-17.202195820003567,-76.59018199209325],[-14.53780624392931,-74.27113220357664],[-14.621251472019907,-72.71417212450604],[-15.457525929908314,-72.11805949893571],[-16.735628416005596,-71.3506375575714],[-18.81770866866242,-70.89188604300722],[-21.024357086561025,-70.9256187691209],[-24.78630070550588,-71.36235128369906],[-27.81675331568485,-72.1132700200943],[-31.314772897052507,-72.29684652688603],[-35.143774445838886,-72.21433963956319],[-39.97348523222354,-71.75366563644273],[-44.89032326598664,-70.87082796536023],[-50.40043324305111,-70.2508442400395],[-54.354093738939596,-70.20075756173516],[-58.7763090757868,-71.27289439521846],[-64.7438723001555,-72.8054024693636]]],"type":"Polygon"}}]} diff --git a/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1_correction_peninsula.geojson b/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1_correction_peninsula.geojson new file mode 100644 index 0000000000..01859be40c --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1_correction_peninsula.geojson @@ -0,0 +1,73 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.51168188592774, + -63.34469553787141 + ], + [ + -75.7308231480595, + -67.71524986365019 + ], + [ + -82.23302312713369, + -71.9805712785419 + ], + [ + -81.63135111895728, + -75.59567609845988 + ], + [ + -75.9055834859653, + -75.34148074887518 + ], + [ + -72.47014717927561, + -74.7673143097562 + ], + [ + -68.00554191414759, + -73.77984973214085 + ], + [ + -65.3550099151992, + -71.77205397981956 + ], + [ + -66.27933986206787, + -70.52162831122558 + ], + [ + -64.58699491448971, + -69.47546835230543 + ], + [ + -65.97822782804397, + -67.77544209184867 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -57.51168188592774, + -63.34469553787141 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1_correction_peninsula_v2.geojson b/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1_correction_peninsula_v2.geojson new file mode 100644 index 0000000000..22d512589f --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1_correction_peninsula_v2.geojson @@ -0,0 +1,97 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.51168188592774, + -63.34469553787141 + ], + [ + -53.05987330787791, + -60.9791790833165 + ], + [ + -53.06885379594741, + -59.10724141600171 + ], + [ + -69.3124237875646, + -61.21460931439017 + ], + [ + -83.38421745911926, + -62.77272333644538 + ], + [ + -97.90929281723952, + -66.221448196283 + ], + [ + -105.3263003641532, + -68.89292813601311 + ], + [ + -106.3307246723799, + -72.31928061089278 + ], + [ + -96.38678419860847, + -74.86775750756654 + ], + [ + -80.96950547249958, + -74.8917003828374 + ], + [ + -75.9055834859653, + -75.34148074887518 + ], + [ + -72.33775353811286, + -75.0153658885297 + ], + [ + -66.56769783304944, + -74.21440843603395 + ], + [ + -64.79776921678202, + -72.25395416577506 + ], + [ + -65.48170522640746, + -70.69919310630064 + ], + [ + -64.58699491448971, + -69.47546835230543 + ], + [ + -65.5606241702666, + -67.78677626662034 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -57.51168188592774, + -63.34469553787141 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1_correction_peninsula_v3.geojson b/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1_correction_peninsula_v3.geojson new file mode 100644 index 0000000000..3c79f8ae21 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1_correction_peninsula_v3.geojson @@ -0,0 +1,97 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.51168188592774, + -63.34469553787141 + ], + [ + -53.05987330787791, + -60.9791790833165 + ], + [ + -53.06885379594741, + -59.10724141600171 + ], + [ + -69.14223788466518, + -62.14576624144387 + ], + [ + -77.16348450278696, + -64.13666710372263 + ], + [ + -85.897068042515, + -66.25640705824505 + ], + [ + -94.59878299061488, + -69.72254279603585 + ], + [ + -100.24805622281325, + -72.26566396175254 + ], + [ + -96.38678419860847, + -74.86775750756654 + ], + [ + -80.96950547249958, + -74.8917003828374 + ], + [ + -75.9055834859653, + -75.34148074887518 + ], + [ + -72.33775353811286, + -75.0153658885297 + ], + [ + -66.56769783304944, + -74.21440843603395 + ], + [ + -64.79776921678202, + -72.25395416577506 + ], + [ + -65.48170522640746, + -70.69919310630064 + ], + [ + -64.58699491448971, + -69.47546835230543 + ], + [ + -65.5606241702666, + -67.78677626662034 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -57.51168188592774, + -63.34469553787141 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1_peninsula_12km.geojson b/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1_peninsula_12km.geojson new file mode 100644 index 0000000000..7a4aec28d1 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1_peninsula_12km.geojson @@ -0,0 +1,93 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.69353078184756, + -61.96708124373723 + ], + [ + -61.80022030800379, + -63.008208452662345 + ], + [ + -67.32103132588126, + -64.04079340739024 + ], + [ + -78.16701758864495, + -66.88371277926564 + ], + [ + -87.41765762163665, + -70.17410005159073 + ], + [ + -92.77451946184793, + -72.57628695883871 + ], + [ + -90.82481328167913, + -74.34659424903947 + ], + [ + -81.2027800330412, + -74.8636788514809 + ], + [ + -75.9055834859653, + -75.34148074887518 + ], + [ + -72.22449654558793, + -75.015667940154 + ], + [ + -66.58805223365164, + -74.20709557717424 + ], + [ + -64.5942902255466, + -72.25137878330746 + ], + [ + -65.51019680255283, + -70.6800717849537 + ], + [ + -64.58699491448971, + -69.47546835230543 + ], + [ + -65.55143595844069, + -67.79157062052742 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -58.35195871411565, + -63.31306460865669 + ], + [ + -57.69353078184756, + -61.96708124373723 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1_peninsula_12km_transition.geojson b/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1_peninsula_12km_transition.geojson new file mode 100644 index 0000000000..b8aaed8edb --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1_peninsula_12km_transition.geojson @@ -0,0 +1,89 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -54.54564191055567, + -63.1725569390185 + ], + [ + -53.05987330787791, + -60.9791790833165 + ], + [ + -53.06885379594741, + -59.10724141600171 + ], + [ + -69.14223788466518, + -62.14576624144387 + ], + [ + -77.16348450278696, + -64.13666710372263 + ], + [ + -85.897068042515, + -66.25640705824505 + ], + [ + -94.59878299061488, + -69.72254279603585 + ], + [ + -100.24805622281325, + -72.26566396175254 + ], + [ + -96.38678419860847, + -74.86775750756654 + ], + [ + -89.07987805140462, + -73.74748954581011 + ], + [ + -83.42453978625146, + -72.01434576499264 + ], + [ + -78.97666329388788, + -70.01288831317304 + ], + [ + -73.84932654865166, + -68.18364067984133 + ], + [ + -68.87563501264184, + -66.90585850491902 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -59.3178981972859, + -64.13380186083748 + ], + [ + -54.54564191055567, + -63.1725569390185 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1_peninsula_12km_v2.geojson b/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1_peninsula_12km_v2.geojson new file mode 100644 index 0000000000..aa2a173208 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1_peninsula_12km_v2.geojson @@ -0,0 +1,97 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.69353078184756, + -61.96708124373723 + ], + [ + -60.60980216459852, + -61.55452131445545 + ], + [ + -69.55211766107989, + -63.152080989803714 + ], + [ + -80.85673116951071, + -66.05555597379733 + ], + [ + -88.13681707469551, + -68.58641430243729 + ], + [ + -95.69478642361177, + -71.59338385976186 + ], + [ + -96.62401026588171, + -72.86186735741381 + ], + [ + -90.82481328167913, + -74.34659424903947 + ], + [ + -81.2027800330412, + -74.8636788514809 + ], + [ + -75.9055834859653, + -75.34148074887518 + ], + [ + -72.22449654558793, + -75.015667940154 + ], + [ + -66.58805223365164, + -74.20709557717424 + ], + [ + -64.5942902255466, + -72.25137878330746 + ], + [ + -65.51019680255283, + -70.6800717849537 + ], + [ + -64.58699491448971, + -69.47546835230543 + ], + [ + -65.55143595844069, + -67.79157062052742 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -58.35195871411565, + -63.31306460865669 + ], + [ + -57.69353078184756, + -61.96708124373723 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1_transition.geojson b/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1_transition.geojson new file mode 100644 index 0000000000..20ad8b8d9b --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris01to60/fris_v1_transition.geojson @@ -0,0 +1,93 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - transition region", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.51168188592774, + -63.34469553787141 + ], + [ + -75.7308231480595, + -67.71524986365019 + ], + [ + -82.23302312713369, + -71.9805712785419 + ], + [ + -81.63135111895728, + -75.59567609845988 + ], + [ + -72.43392556848906, + -77.89255200360182 + ], + [ + -58.71407611692999, + -77.78724511207038 + ], + [ + -46.208104421831024, + -79.00092023048762 + ], + [ + -18.338759042014715, + -79.45787446576274 + ], + [ + -2.7857142568166466, + -77.44116982233017 + ], + [ + 6.813437365949312, + -73.42744971284144 + ], + [ + 5.00921262812011, + -68.98423794486757 + ], + [ + -0.7923051110294352, + -65.9398557197854 + ], + [ + -10.402032107542851, + -64.99932710553239 + ], + [ + -18.521043388561708, + -64.3196282813596 + ], + [ + -29.861824936615392, + -65.13348750621226 + ], + [ + -40.06168534685344, + -64.54083717367145 + ], + [ + -50.97065707925094, + -63.2302794039998 + ], + [ + -57.51168188592774, + -63.34469553787141 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris01to60/high_res_region.geojson b/compass/ocean/tests/global_ocean/mesh/fris01to60/high_res_region.geojson new file mode 100644 index 0000000000..a536ebaba9 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris01to60/high_res_region.geojson @@ -0,0 +1,73 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "SO12to60 high res region", + "component": "ocean", + "object": "region", + "author": "Xylar Asay-Davis" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -75.5859375, + -48.92249926375823 + ], + [ + -96.50390625, + -54.67383096593114 + ], + [ + -124.45312499999999, + -53.95608553098789 + ], + [ + -180, + -53 + ], + [ + -180, + -90 + ], + [ + 180, + -90 + ], + [ + 180, + -53 + ], + [ + 168.3984375, + -51.17934297928927 + ], + [ + 121.640625, + -45.82879925192133 + ], + [ + 22.148437499999996, + -37.99616267972812 + ], + [ + -61.17187499999999, + -34.30714385628803 + ], + [ + -68.90625, + -40.97989806962013 + ], + [ + -75.5859375, + -48.92249926375823 + ] + ] + ] + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris01to60/namelist.init b/compass/ocean/tests/global_ocean/mesh/fris01to60/namelist.init new file mode 100644 index 0000000000..fe4098d055 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris01to60/namelist.init @@ -0,0 +1,8 @@ +config_rx1_inner_iter_count = 20 +config_rx1_horiz_smooth_weight = 10.0 +config_rx1_vert_smooth_weight = 10.0 +config_rx1_slope_weight = 1e-1 +config_rx1_zstar_weight = 10.0 +config_rx1_horiz_smooth_open_ocean_cells = 240 +config_rx1_min_levels = 5 +config_rx1_min_layer_thickness = 2 diff --git a/compass/ocean/tests/global_ocean/mesh/fris01to60/namelist.split_explicit_ab2 b/compass/ocean/tests/global_ocean/mesh/fris01to60/namelist.split_explicit_ab2 new file mode 100644 index 0000000000..9193d6b176 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris01to60/namelist.split_explicit_ab2 @@ -0,0 +1,12 @@ +config_time_integrator = 'split_explicit_ab2' +config_dt = '00:00:05' +config_btr_dt = '00:00:00.17' +config_run_duration = '0000_01:00:00' +config_use_mom_del2 = .true. +config_mom_del2 = 38.5 +config_use_mom_del4 = .true. +config_mom_del4 = 6.83e6 +config_hmix_scaleWithMesh = .true. +config_use_GM = .true. +config_GM_closure = 'constant' +config_GM_constant_kappa = 600.0 diff --git a/compass/ocean/tests/global_ocean/mesh/fris01to60/streams.forward b/compass/ocean/tests/global_ocean/mesh/fris01to60/streams.forward new file mode 100644 index 0000000000..bd42317610 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris01to60/streams.forward @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/compass/ocean/tests/global_ocean/mesh/fris02to60/__init__.py b/compass/ocean/tests/global_ocean/mesh/fris02to60/__init__.py new file mode 100644 index 0000000000..21ecc9dedf --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris02to60/__init__.py @@ -0,0 +1,203 @@ +import mpas_tools.mesh.creation.mesh_definition_tools as mdt +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 FRIS02to60BaseMesh(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__) + + self.add_input_file(filename='fris_v1_transition.geojson', + package=self.__module__) + + self.add_input_file(filename='fris_v1_peninsula_12km_v2.geojson', + package=self.__module__) + + self.add_input_file( + filename='fris_v1_peninsula_12km_transition.geojson', + package=self.__module__) + + self.add_input_file(filename='fris_v1.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 + + # Add high res FRIS region transition + dx_min_fris = 2. # minimum resolution within the FRIS cavity + + fc = read_feature_collection('fris_v1_transition.geojson') + + so_signed_distance = signed_distance_from_geojson(fc, lon, lat, + earth_radius, + max_length=0.25) + + # Equivalent to 600 km + trans_width = 600e3 + trans_start = 0 + dx_min = dx_min_fris + + weights = 0.5 * (1 + np.tanh((so_signed_distance - trans_start) / + trans_width)) + + cellWidth = dx_min * (1 - weights) + cellWidth * weights + + # Add 12 km sharp correction west of the peninsula + fc = read_feature_collection('fris_v1_peninsula_12km_v2.geojson') + + so_signed_distance = signed_distance_from_geojson(fc, lon, lat, + earth_radius, + max_length=0.25) + + # Equivalent to 10 km + trans_width = 10e3 + trans_start = 0 + dx_min = 12. + + weights = 0.5 * (1 + np.tanh((so_signed_distance - trans_start) / + trans_width)) + + cellWidth = dx_min * (1 - weights) + cellWidth * weights + + # Add 12 km transition correction west of the peninsula + fc = read_feature_collection( + 'fris_v1_peninsula_12km_transition.geojson') + + so_signed_distance = signed_distance_from_geojson(fc, lon, lat, + earth_radius, + max_length=0.25) + + # Equivalent to 150 km + trans_width = 150e3 + trans_start = 0 + dx_min = 12. + + weights = 0.5 * (1 + np.tanh((so_signed_distance - trans_start) / + trans_width)) + + cellWidth = dx_min * (1 - weights) + cellWidth * weights + + # Add high res FRIS region inner + fc = read_feature_collection('fris_v1.geojson') + + so_signed_distance = signed_distance_from_geojson(fc, lon, lat, + earth_radius, + max_length=0.25) + + # Equivalent to 100 km (0 should be enough given the setup but to be + # safe) + trans_width = 100e3 + trans_start = 0 + dx_min = dx_min_fris + + 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/fris02to60/atlantic.geojson b/compass/ocean/tests/global_ocean/mesh/fris02to60/atlantic.geojson new file mode 100644 index 0000000000..227a57f066 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris02to60/atlantic.geojson @@ -0,0 +1,97 @@ +{ + "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 + ] + ] + ] + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris02to60/dynamic_adjustment.yaml b/compass/ocean/tests/global_ocean/mesh/fris02to60/dynamic_adjustment.yaml new file mode 100644 index 0000000000..67af59f008 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris02to60/dynamic_adjustment.yaml @@ -0,0 +1,44 @@ +dynamic_adjustment: + land_ice_flux_mode: pressure_only + get_dt_from_min_res: False + + steps: + damped_adjustment_1: + run_duration: 02_00:00:00 + output_interval: 01_00:00:00 + restart_interval: 02_00:00:00 + dt: 00:01:00 + btr_dt: 00:00:01.7 + Rayleigh_damping_coeff: 1.0e-4 + + damped_adjustment_2: + run_duration: 08_00:00:00 + output_interval: 10_00:00:00 + restart_interval: 02_00:00:00 + dt: 00:01:00 + btr_dt: 00:00:01.7 + Rayleigh_damping_coeff: 1.0e-5 + + damped_adjustment_3: + run_duration: 10_00:00:00 + output_interval: 10_00:00:00 + restart_interval: 10_00:00:00 + dt: 00:01:00 + btr_dt: 00:00:01.7 + Rayleigh_damping_coeff: 1.0e-6 + + damped_adjustment_4: + run_duration: 20_00:00:00 + output_interval: 10_00:00:00 + restart_interval: 10_00:00:00 + dt: 00:01:00 + btr_dt: 00:00:01.7 + Rayleigh_damping_coeff: None + + simulation: + run_duration: 10_00:00:00 + output_interval: 10_00:00:00 + restart_interval: 10_00:00:00 + dt: 00:01:40 + btr_dt: 00:00:02.5 + Rayleigh_damping_coeff: None diff --git a/compass/ocean/tests/global_ocean/mesh/fris02to60/fris02to60.cfg b/compass/ocean/tests/global_ocean/mesh/fris02to60/fris02to60.cfg new file mode 100644 index 0000000000..0bb5a761fc --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris02to60/fris02to60.cfg @@ -0,0 +1,87 @@ +# Options related to the vertical grid +[vertical_grid] + +# the type of vertical grid +grid_type = index_tanh_dz + +# Number of vertical levels +vert_levels = 64 + +# Depth of the bottom of the ocean +bottom_depth = 5500.0 + +# The minimum layer thickness +min_layer_thickness = 10.0 + +# The maximum layer thickness +max_layer_thickness = 250.0 + +# The characteristic number of levels over which the transition between +# the min and max occurs +transition_levels = 28 + +# Anvil runs out of memory so do the following +# config options related to remapping topography to an MPAS-Ocean mesh +[remap_topography] + +# the target and minimum number of MPI tasks to use in remapping +ntasks = 4096 +min_tasks = 360 + +# options for global ocean testcases +[global_ocean] + +## config options related to the initial_state step +# number of cores to use +init_ntasks = 512 +# minimum of cores, below which the step fails +init_min_tasks = 64 +# The number of cores per task in init mode -- used to avoid running out of +# memory where needed +init_cpus_per_task = 4 +# whether to update PIO tasks and stride +init_update_pio = False + +# whether to update PIO tasks and stride +forward_update_pio = False + +# the approximate number of cells in the mesh +approx_cell_count = 1100000 +# time step per resolution (s/km), since dt is proportional to resolution + +dt_per_km = 5 +# barotropic time step per resolution (s/km) +btr_dt_per_km = 0.2 + +## metadata related to the mesh +# the prefix (e.g. QU, EC, WC, SO) +prefix = FRIS +# a description of the mesh and initial condition +mesh_description = MPAS Southern Ocean regionally refined mesh for E3SM version + ${e3sm_version} with enhanced resolution (12 km) around + Antarctica and even more enhanced around the Filchner-Ronne Ice + Shelf (${min_res} km), 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 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 +# the minimum (finest) resolution in the mesh +min_res = 2 +# the maximum (coarsest) resolution in the mesh, can be the same as min_res +max_res = 60 +# The URL of the pull request documenting the creation of the mesh +pull_request = N/A + + +# config options related to initial condition and diagnostics support files +# for E3SM +[files_for_e3sm] + +# CMIP6 grid resolution +cmip6_grid_res = 180x360 diff --git a/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1.geojson b/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1.geojson new file mode 100644 index 0000000000..51e767e649 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1.geojson @@ -0,0 +1 @@ +{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"FRIS high res region","component":"ocean","object":"region","author":"Irena Vankova"},"geometry":{"coordinates":[[[-64.7438723001555,-72.8054024693636],[-69.76898821706332,-74.19251323259206],[-74.02484092117425,-74.47843628310608],[-92.43607426605669,-76.75259948500253],[-101.5379406548874,-80.18910132153749],[-97.25418139197761,-83.23536684168135],[-56.69746887655441,-85.05112877980659],[-39.90477420089397,-85],[-14.020185809699171,-83.36577201994825],[-20.52300577998716,-79.88944960088696],[-17.202195820003567,-76.59018199209325],[-14.53780624392931,-74.27113220357664],[-14.621251472019907,-72.71417212450604],[-15.457525929908314,-72.11805949893571],[-16.735628416005596,-71.3506375575714],[-18.81770866866242,-70.89188604300722],[-21.024357086561025,-70.9256187691209],[-24.78630070550588,-71.36235128369906],[-27.81675331568485,-72.1132700200943],[-31.314772897052507,-72.29684652688603],[-35.143774445838886,-72.21433963956319],[-39.97348523222354,-71.75366563644273],[-44.89032326598664,-70.87082796536023],[-50.40043324305111,-70.2508442400395],[-54.354093738939596,-70.20075756173516],[-58.7763090757868,-71.27289439521846],[-64.7438723001555,-72.8054024693636]]],"type":"Polygon"}}]} diff --git a/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1_correction_peninsula.geojson b/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1_correction_peninsula.geojson new file mode 100644 index 0000000000..01859be40c --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1_correction_peninsula.geojson @@ -0,0 +1,73 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.51168188592774, + -63.34469553787141 + ], + [ + -75.7308231480595, + -67.71524986365019 + ], + [ + -82.23302312713369, + -71.9805712785419 + ], + [ + -81.63135111895728, + -75.59567609845988 + ], + [ + -75.9055834859653, + -75.34148074887518 + ], + [ + -72.47014717927561, + -74.7673143097562 + ], + [ + -68.00554191414759, + -73.77984973214085 + ], + [ + -65.3550099151992, + -71.77205397981956 + ], + [ + -66.27933986206787, + -70.52162831122558 + ], + [ + -64.58699491448971, + -69.47546835230543 + ], + [ + -65.97822782804397, + -67.77544209184867 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -57.51168188592774, + -63.34469553787141 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1_correction_peninsula_v2.geojson b/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1_correction_peninsula_v2.geojson new file mode 100644 index 0000000000..22d512589f --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1_correction_peninsula_v2.geojson @@ -0,0 +1,97 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.51168188592774, + -63.34469553787141 + ], + [ + -53.05987330787791, + -60.9791790833165 + ], + [ + -53.06885379594741, + -59.10724141600171 + ], + [ + -69.3124237875646, + -61.21460931439017 + ], + [ + -83.38421745911926, + -62.77272333644538 + ], + [ + -97.90929281723952, + -66.221448196283 + ], + [ + -105.3263003641532, + -68.89292813601311 + ], + [ + -106.3307246723799, + -72.31928061089278 + ], + [ + -96.38678419860847, + -74.86775750756654 + ], + [ + -80.96950547249958, + -74.8917003828374 + ], + [ + -75.9055834859653, + -75.34148074887518 + ], + [ + -72.33775353811286, + -75.0153658885297 + ], + [ + -66.56769783304944, + -74.21440843603395 + ], + [ + -64.79776921678202, + -72.25395416577506 + ], + [ + -65.48170522640746, + -70.69919310630064 + ], + [ + -64.58699491448971, + -69.47546835230543 + ], + [ + -65.5606241702666, + -67.78677626662034 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -57.51168188592774, + -63.34469553787141 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1_correction_peninsula_v3.geojson b/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1_correction_peninsula_v3.geojson new file mode 100644 index 0000000000..3c79f8ae21 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1_correction_peninsula_v3.geojson @@ -0,0 +1,97 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.51168188592774, + -63.34469553787141 + ], + [ + -53.05987330787791, + -60.9791790833165 + ], + [ + -53.06885379594741, + -59.10724141600171 + ], + [ + -69.14223788466518, + -62.14576624144387 + ], + [ + -77.16348450278696, + -64.13666710372263 + ], + [ + -85.897068042515, + -66.25640705824505 + ], + [ + -94.59878299061488, + -69.72254279603585 + ], + [ + -100.24805622281325, + -72.26566396175254 + ], + [ + -96.38678419860847, + -74.86775750756654 + ], + [ + -80.96950547249958, + -74.8917003828374 + ], + [ + -75.9055834859653, + -75.34148074887518 + ], + [ + -72.33775353811286, + -75.0153658885297 + ], + [ + -66.56769783304944, + -74.21440843603395 + ], + [ + -64.79776921678202, + -72.25395416577506 + ], + [ + -65.48170522640746, + -70.69919310630064 + ], + [ + -64.58699491448971, + -69.47546835230543 + ], + [ + -65.5606241702666, + -67.78677626662034 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -57.51168188592774, + -63.34469553787141 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1_peninsula_12km.geojson b/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1_peninsula_12km.geojson new file mode 100644 index 0000000000..7a4aec28d1 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1_peninsula_12km.geojson @@ -0,0 +1,93 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.69353078184756, + -61.96708124373723 + ], + [ + -61.80022030800379, + -63.008208452662345 + ], + [ + -67.32103132588126, + -64.04079340739024 + ], + [ + -78.16701758864495, + -66.88371277926564 + ], + [ + -87.41765762163665, + -70.17410005159073 + ], + [ + -92.77451946184793, + -72.57628695883871 + ], + [ + -90.82481328167913, + -74.34659424903947 + ], + [ + -81.2027800330412, + -74.8636788514809 + ], + [ + -75.9055834859653, + -75.34148074887518 + ], + [ + -72.22449654558793, + -75.015667940154 + ], + [ + -66.58805223365164, + -74.20709557717424 + ], + [ + -64.5942902255466, + -72.25137878330746 + ], + [ + -65.51019680255283, + -70.6800717849537 + ], + [ + -64.58699491448971, + -69.47546835230543 + ], + [ + -65.55143595844069, + -67.79157062052742 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -58.35195871411565, + -63.31306460865669 + ], + [ + -57.69353078184756, + -61.96708124373723 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1_peninsula_12km_transition.geojson b/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1_peninsula_12km_transition.geojson new file mode 100644 index 0000000000..b8aaed8edb --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1_peninsula_12km_transition.geojson @@ -0,0 +1,89 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -54.54564191055567, + -63.1725569390185 + ], + [ + -53.05987330787791, + -60.9791790833165 + ], + [ + -53.06885379594741, + -59.10724141600171 + ], + [ + -69.14223788466518, + -62.14576624144387 + ], + [ + -77.16348450278696, + -64.13666710372263 + ], + [ + -85.897068042515, + -66.25640705824505 + ], + [ + -94.59878299061488, + -69.72254279603585 + ], + [ + -100.24805622281325, + -72.26566396175254 + ], + [ + -96.38678419860847, + -74.86775750756654 + ], + [ + -89.07987805140462, + -73.74748954581011 + ], + [ + -83.42453978625146, + -72.01434576499264 + ], + [ + -78.97666329388788, + -70.01288831317304 + ], + [ + -73.84932654865166, + -68.18364067984133 + ], + [ + -68.87563501264184, + -66.90585850491902 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -59.3178981972859, + -64.13380186083748 + ], + [ + -54.54564191055567, + -63.1725569390185 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1_peninsula_12km_v2.geojson b/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1_peninsula_12km_v2.geojson new file mode 100644 index 0000000000..aa2a173208 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1_peninsula_12km_v2.geojson @@ -0,0 +1,97 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.69353078184756, + -61.96708124373723 + ], + [ + -60.60980216459852, + -61.55452131445545 + ], + [ + -69.55211766107989, + -63.152080989803714 + ], + [ + -80.85673116951071, + -66.05555597379733 + ], + [ + -88.13681707469551, + -68.58641430243729 + ], + [ + -95.69478642361177, + -71.59338385976186 + ], + [ + -96.62401026588171, + -72.86186735741381 + ], + [ + -90.82481328167913, + -74.34659424903947 + ], + [ + -81.2027800330412, + -74.8636788514809 + ], + [ + -75.9055834859653, + -75.34148074887518 + ], + [ + -72.22449654558793, + -75.015667940154 + ], + [ + -66.58805223365164, + -74.20709557717424 + ], + [ + -64.5942902255466, + -72.25137878330746 + ], + [ + -65.51019680255283, + -70.6800717849537 + ], + [ + -64.58699491448971, + -69.47546835230543 + ], + [ + -65.55143595844069, + -67.79157062052742 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -58.35195871411565, + -63.31306460865669 + ], + [ + -57.69353078184756, + -61.96708124373723 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1_transition.geojson b/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1_transition.geojson new file mode 100644 index 0000000000..20ad8b8d9b --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris02to60/fris_v1_transition.geojson @@ -0,0 +1,93 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - transition region", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.51168188592774, + -63.34469553787141 + ], + [ + -75.7308231480595, + -67.71524986365019 + ], + [ + -82.23302312713369, + -71.9805712785419 + ], + [ + -81.63135111895728, + -75.59567609845988 + ], + [ + -72.43392556848906, + -77.89255200360182 + ], + [ + -58.71407611692999, + -77.78724511207038 + ], + [ + -46.208104421831024, + -79.00092023048762 + ], + [ + -18.338759042014715, + -79.45787446576274 + ], + [ + -2.7857142568166466, + -77.44116982233017 + ], + [ + 6.813437365949312, + -73.42744971284144 + ], + [ + 5.00921262812011, + -68.98423794486757 + ], + [ + -0.7923051110294352, + -65.9398557197854 + ], + [ + -10.402032107542851, + -64.99932710553239 + ], + [ + -18.521043388561708, + -64.3196282813596 + ], + [ + -29.861824936615392, + -65.13348750621226 + ], + [ + -40.06168534685344, + -64.54083717367145 + ], + [ + -50.97065707925094, + -63.2302794039998 + ], + [ + -57.51168188592774, + -63.34469553787141 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris02to60/high_res_region.geojson b/compass/ocean/tests/global_ocean/mesh/fris02to60/high_res_region.geojson new file mode 100644 index 0000000000..a536ebaba9 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris02to60/high_res_region.geojson @@ -0,0 +1,73 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "SO12to60 high res region", + "component": "ocean", + "object": "region", + "author": "Xylar Asay-Davis" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -75.5859375, + -48.92249926375823 + ], + [ + -96.50390625, + -54.67383096593114 + ], + [ + -124.45312499999999, + -53.95608553098789 + ], + [ + -180, + -53 + ], + [ + -180, + -90 + ], + [ + 180, + -90 + ], + [ + 180, + -53 + ], + [ + 168.3984375, + -51.17934297928927 + ], + [ + 121.640625, + -45.82879925192133 + ], + [ + 22.148437499999996, + -37.99616267972812 + ], + [ + -61.17187499999999, + -34.30714385628803 + ], + [ + -68.90625, + -40.97989806962013 + ], + [ + -75.5859375, + -48.92249926375823 + ] + ] + ] + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris02to60/namelist.init b/compass/ocean/tests/global_ocean/mesh/fris02to60/namelist.init new file mode 100644 index 0000000000..8c804177ad --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris02to60/namelist.init @@ -0,0 +1,8 @@ +config_rx1_inner_iter_count = 20 +config_rx1_horiz_smooth_weight = 10.0 +config_rx1_vert_smooth_weight = 10.0 +config_rx1_slope_weight = 1e-1 +config_rx1_zstar_weight = 10.0 +config_rx1_horiz_smooth_open_ocean_cells = 120 +config_rx1_min_levels = 5 +config_rx1_min_layer_thickness = 2 diff --git a/compass/ocean/tests/global_ocean/mesh/fris02to60/namelist.split_explicit_ab2 b/compass/ocean/tests/global_ocean/mesh/fris02to60/namelist.split_explicit_ab2 new file mode 100644 index 0000000000..3df13d16e0 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris02to60/namelist.split_explicit_ab2 @@ -0,0 +1,12 @@ +config_time_integrator = 'split_explicit_ab2' +config_dt = '00:00:10' +config_btr_dt = '00:00:00.3' +config_run_duration = '0000_01:00:00' +config_use_mom_del2 = .true. +config_mom_del2 = 77.0 +config_use_mom_del4 = .true. +config_mom_del4 = 5.46e7 +config_hmix_scaleWithMesh = .true. +config_use_GM = .true. +config_GM_closure = 'constant' +config_GM_constant_kappa = 600.0 diff --git a/compass/ocean/tests/global_ocean/mesh/fris02to60/streams.forward b/compass/ocean/tests/global_ocean/mesh/fris02to60/streams.forward new file mode 100644 index 0000000000..bd42317610 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris02to60/streams.forward @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/compass/ocean/tests/global_ocean/mesh/fris04to60/__init__.py b/compass/ocean/tests/global_ocean/mesh/fris04to60/__init__.py new file mode 100644 index 0000000000..6a04070b34 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris04to60/__init__.py @@ -0,0 +1,203 @@ +import mpas_tools.mesh.creation.mesh_definition_tools as mdt +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 FRIS04to60BaseMesh(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__) + + self.add_input_file(filename='fris_v1_transition.geojson', + package=self.__module__) + + self.add_input_file(filename='fris_v1_peninsula_12km_v2.geojson', + package=self.__module__) + + self.add_input_file( + filename='fris_v1_peninsula_12km_transition.geojson', + package=self.__module__) + + self.add_input_file(filename='fris_v1.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 + + # Add high res FRIS region transition + dx_min_fris = 4. # minimum resolution within the FRIS cavity + + fc = read_feature_collection('fris_v1_transition.geojson') + + so_signed_distance = signed_distance_from_geojson(fc, lon, lat, + earth_radius, + max_length=0.25) + + # Equivalent to 600 km + trans_width = 600e3 + trans_start = 0 + dx_min = dx_min_fris + + weights = 0.5 * (1 + np.tanh((so_signed_distance - trans_start) / + trans_width)) + + cellWidth = dx_min * (1 - weights) + cellWidth * weights + + # Add 12 km sharp correction west of the peninsula + fc = read_feature_collection('fris_v1_peninsula_12km_v2.geojson') + + so_signed_distance = signed_distance_from_geojson(fc, lon, lat, + earth_radius, + max_length=0.25) + + # Equivalent to 10 km + trans_width = 10e3 + trans_start = 0 + dx_min = 12. + + weights = 0.5 * (1 + np.tanh((so_signed_distance - trans_start) / + trans_width)) + + cellWidth = dx_min * (1 - weights) + cellWidth * weights + + # Add 12 km transition correction west of the peninsula + fc = read_feature_collection( + 'fris_v1_peninsula_12km_transition.geojson') + + so_signed_distance = signed_distance_from_geojson(fc, lon, lat, + earth_radius, + max_length=0.25) + + # Equivalent to 150 km + trans_width = 150e3 + trans_start = 0 + dx_min = 12. + + weights = 0.5 * (1 + np.tanh((so_signed_distance - trans_start) / + trans_width)) + + cellWidth = dx_min * (1 - weights) + cellWidth * weights + + # Add high res FRIS region inner + fc = read_feature_collection('fris_v1.geojson') + + so_signed_distance = signed_distance_from_geojson(fc, lon, lat, + earth_radius, + max_length=0.25) + + # Equivalent to 100 km (0 should be enough given the setup but to be + # safe) + trans_width = 100e3 + trans_start = 0 + dx_min = dx_min_fris + + 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/fris04to60/atlantic.geojson b/compass/ocean/tests/global_ocean/mesh/fris04to60/atlantic.geojson new file mode 100644 index 0000000000..227a57f066 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris04to60/atlantic.geojson @@ -0,0 +1,97 @@ +{ + "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 + ] + ] + ] + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris04to60/dynamic_adjustment.yaml b/compass/ocean/tests/global_ocean/mesh/fris04to60/dynamic_adjustment.yaml new file mode 100644 index 0000000000..d092d92e3c --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris04to60/dynamic_adjustment.yaml @@ -0,0 +1,44 @@ +dynamic_adjustment: + land_ice_flux_mode: pressure_only + get_dt_from_min_res: False + + steps: + damped_adjustment_1: + run_duration: 02_00:00:00 + output_interval: 01_00:00:00 + restart_interval: 02_00:00:00 + dt: 00:01:40 + btr_dt: 00:00:03.3 + Rayleigh_damping_coeff: 1.0e-4 + + damped_adjustment_2: + run_duration: 08_00:00:00 + output_interval: 10_00:00:00 + restart_interval: 02_00:00:00 + dt: 00:01:40 + btr_dt: 00:00:03.3 + Rayleigh_damping_coeff: 1.0e-5 + + damped_adjustment_3: + run_duration: 10_00:00:00 + output_interval: 10_00:00:00 + restart_interval: 10_00:00:00 + dt: 00:01:40 + btr_dt: 00:00:03.3 + Rayleigh_damping_coeff: 1.0e-6 + + damped_adjustment_4: + run_duration: 20_00:00:00 + output_interval: 10_00:00:00 + restart_interval: 10_00:00:00 + dt: 00:01:40 + btr_dt: 00:00:03.3 + Rayleigh_damping_coeff: None + + simulation: + run_duration: 10_00:00:00 + output_interval: 10_00:00:00 + restart_interval: 10_00:00:00 + dt: 00:03:20 + btr_dt: 00:00:05 + Rayleigh_damping_coeff: None diff --git a/compass/ocean/tests/global_ocean/mesh/fris04to60/fris04to60.cfg b/compass/ocean/tests/global_ocean/mesh/fris04to60/fris04to60.cfg new file mode 100644 index 0000000000..f43d190570 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris04to60/fris04to60.cfg @@ -0,0 +1,92 @@ +# Options related to the vertical grid +[vertical_grid] + +# the type of vertical grid +grid_type = index_tanh_dz + +# Number of vertical levels +vert_levels = 64 + +# Depth of the bottom of the ocean +bottom_depth = 5500.0 + +# The minimum layer thickness +min_layer_thickness = 10.0 + +# The maximum layer thickness +max_layer_thickness = 250.0 + +# The characteristic number of levels over which the transition between +# the min and max occurs +transition_levels = 28 + +# Anvil runs out of memory so do the following +# config options related to remapping topography to an MPAS-Ocean mesh +[remap_topography] + +# the target and minimum number of MPI tasks to use in remapping +ntasks = 4096 +min_tasks = 360 + +# options for global ocean testcases +[global_ocean] + +## config options related to the initial_state step +# number of cores to use +init_ntasks = 512 +# minimum of cores, below which the step fails +init_min_tasks = 64 +# The number of cores per task in init mode -- used to avoid running out of +# memory where needed +init_cpus_per_task = 4 +# whether to update PIO tasks and stride +init_update_pio = False + +# whether to update PIO tasks and stride +forward_update_pio = False + +# the approximate number of cells in the mesh +approx_cell_count = 720000 + +# time step per resolution (s/km), since dt is proportional to resolution +dt_per_km = 5 +# barotropic time step per resolution (s/km) +btr_dt_per_km = 0.2 + +## metadata related to the mesh +# the prefix (e.g. QU, EC, WC, SO) +prefix = FRIS +# a description of the mesh and initial condition +mesh_description = MPAS Southern Ocean regionally refined mesh for E3SM version + ${e3sm_version} with enhanced resolution (12 km) around + Antarctica and even more enhanced around the Filchner-Ronne Ice + Shelf (${min_res} km), 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 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 + +# time step per resolution (s/km), since dt is proportional to resolution (dt = dt_per_km * min_res) +dt_per_km = 30 +# barotropic time step per resolution (s/km) (dt = dt_per_km * min_res) +btr_dt_per_km = 0.5 +# the minimum (finest) resolution in the mesh +min_res = 4 +# the maximum (coarsest) resolution in the mesh, can be the same as min_res +max_res = 60 +# The URL of the pull request documenting the creation of the mesh +pull_request = N/A + + +# config options related to initial condition and diagnostics support files +# for E3SM +[files_for_e3sm] + +# CMIP6 grid resolution +cmip6_grid_res = 180x360 diff --git a/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1.geojson b/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1.geojson new file mode 100644 index 0000000000..51e767e649 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1.geojson @@ -0,0 +1 @@ +{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"FRIS high res region","component":"ocean","object":"region","author":"Irena Vankova"},"geometry":{"coordinates":[[[-64.7438723001555,-72.8054024693636],[-69.76898821706332,-74.19251323259206],[-74.02484092117425,-74.47843628310608],[-92.43607426605669,-76.75259948500253],[-101.5379406548874,-80.18910132153749],[-97.25418139197761,-83.23536684168135],[-56.69746887655441,-85.05112877980659],[-39.90477420089397,-85],[-14.020185809699171,-83.36577201994825],[-20.52300577998716,-79.88944960088696],[-17.202195820003567,-76.59018199209325],[-14.53780624392931,-74.27113220357664],[-14.621251472019907,-72.71417212450604],[-15.457525929908314,-72.11805949893571],[-16.735628416005596,-71.3506375575714],[-18.81770866866242,-70.89188604300722],[-21.024357086561025,-70.9256187691209],[-24.78630070550588,-71.36235128369906],[-27.81675331568485,-72.1132700200943],[-31.314772897052507,-72.29684652688603],[-35.143774445838886,-72.21433963956319],[-39.97348523222354,-71.75366563644273],[-44.89032326598664,-70.87082796536023],[-50.40043324305111,-70.2508442400395],[-54.354093738939596,-70.20075756173516],[-58.7763090757868,-71.27289439521846],[-64.7438723001555,-72.8054024693636]]],"type":"Polygon"}}]} diff --git a/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1_correction_peninsula.geojson b/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1_correction_peninsula.geojson new file mode 100644 index 0000000000..01859be40c --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1_correction_peninsula.geojson @@ -0,0 +1,73 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.51168188592774, + -63.34469553787141 + ], + [ + -75.7308231480595, + -67.71524986365019 + ], + [ + -82.23302312713369, + -71.9805712785419 + ], + [ + -81.63135111895728, + -75.59567609845988 + ], + [ + -75.9055834859653, + -75.34148074887518 + ], + [ + -72.47014717927561, + -74.7673143097562 + ], + [ + -68.00554191414759, + -73.77984973214085 + ], + [ + -65.3550099151992, + -71.77205397981956 + ], + [ + -66.27933986206787, + -70.52162831122558 + ], + [ + -64.58699491448971, + -69.47546835230543 + ], + [ + -65.97822782804397, + -67.77544209184867 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -57.51168188592774, + -63.34469553787141 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1_correction_peninsula_v2.geojson b/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1_correction_peninsula_v2.geojson new file mode 100644 index 0000000000..22d512589f --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1_correction_peninsula_v2.geojson @@ -0,0 +1,97 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.51168188592774, + -63.34469553787141 + ], + [ + -53.05987330787791, + -60.9791790833165 + ], + [ + -53.06885379594741, + -59.10724141600171 + ], + [ + -69.3124237875646, + -61.21460931439017 + ], + [ + -83.38421745911926, + -62.77272333644538 + ], + [ + -97.90929281723952, + -66.221448196283 + ], + [ + -105.3263003641532, + -68.89292813601311 + ], + [ + -106.3307246723799, + -72.31928061089278 + ], + [ + -96.38678419860847, + -74.86775750756654 + ], + [ + -80.96950547249958, + -74.8917003828374 + ], + [ + -75.9055834859653, + -75.34148074887518 + ], + [ + -72.33775353811286, + -75.0153658885297 + ], + [ + -66.56769783304944, + -74.21440843603395 + ], + [ + -64.79776921678202, + -72.25395416577506 + ], + [ + -65.48170522640746, + -70.69919310630064 + ], + [ + -64.58699491448971, + -69.47546835230543 + ], + [ + -65.5606241702666, + -67.78677626662034 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -57.51168188592774, + -63.34469553787141 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1_correction_peninsula_v3.geojson b/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1_correction_peninsula_v3.geojson new file mode 100644 index 0000000000..3c79f8ae21 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1_correction_peninsula_v3.geojson @@ -0,0 +1,97 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.51168188592774, + -63.34469553787141 + ], + [ + -53.05987330787791, + -60.9791790833165 + ], + [ + -53.06885379594741, + -59.10724141600171 + ], + [ + -69.14223788466518, + -62.14576624144387 + ], + [ + -77.16348450278696, + -64.13666710372263 + ], + [ + -85.897068042515, + -66.25640705824505 + ], + [ + -94.59878299061488, + -69.72254279603585 + ], + [ + -100.24805622281325, + -72.26566396175254 + ], + [ + -96.38678419860847, + -74.86775750756654 + ], + [ + -80.96950547249958, + -74.8917003828374 + ], + [ + -75.9055834859653, + -75.34148074887518 + ], + [ + -72.33775353811286, + -75.0153658885297 + ], + [ + -66.56769783304944, + -74.21440843603395 + ], + [ + -64.79776921678202, + -72.25395416577506 + ], + [ + -65.48170522640746, + -70.69919310630064 + ], + [ + -64.58699491448971, + -69.47546835230543 + ], + [ + -65.5606241702666, + -67.78677626662034 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -57.51168188592774, + -63.34469553787141 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1_peninsula_12km.geojson b/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1_peninsula_12km.geojson new file mode 100644 index 0000000000..7a4aec28d1 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1_peninsula_12km.geojson @@ -0,0 +1,93 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.69353078184756, + -61.96708124373723 + ], + [ + -61.80022030800379, + -63.008208452662345 + ], + [ + -67.32103132588126, + -64.04079340739024 + ], + [ + -78.16701758864495, + -66.88371277926564 + ], + [ + -87.41765762163665, + -70.17410005159073 + ], + [ + -92.77451946184793, + -72.57628695883871 + ], + [ + -90.82481328167913, + -74.34659424903947 + ], + [ + -81.2027800330412, + -74.8636788514809 + ], + [ + -75.9055834859653, + -75.34148074887518 + ], + [ + -72.22449654558793, + -75.015667940154 + ], + [ + -66.58805223365164, + -74.20709557717424 + ], + [ + -64.5942902255466, + -72.25137878330746 + ], + [ + -65.51019680255283, + -70.6800717849537 + ], + [ + -64.58699491448971, + -69.47546835230543 + ], + [ + -65.55143595844069, + -67.79157062052742 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -58.35195871411565, + -63.31306460865669 + ], + [ + -57.69353078184756, + -61.96708124373723 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1_peninsula_12km_transition.geojson b/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1_peninsula_12km_transition.geojson new file mode 100644 index 0000000000..b8aaed8edb --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1_peninsula_12km_transition.geojson @@ -0,0 +1,89 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -54.54564191055567, + -63.1725569390185 + ], + [ + -53.05987330787791, + -60.9791790833165 + ], + [ + -53.06885379594741, + -59.10724141600171 + ], + [ + -69.14223788466518, + -62.14576624144387 + ], + [ + -77.16348450278696, + -64.13666710372263 + ], + [ + -85.897068042515, + -66.25640705824505 + ], + [ + -94.59878299061488, + -69.72254279603585 + ], + [ + -100.24805622281325, + -72.26566396175254 + ], + [ + -96.38678419860847, + -74.86775750756654 + ], + [ + -89.07987805140462, + -73.74748954581011 + ], + [ + -83.42453978625146, + -72.01434576499264 + ], + [ + -78.97666329388788, + -70.01288831317304 + ], + [ + -73.84932654865166, + -68.18364067984133 + ], + [ + -68.87563501264184, + -66.90585850491902 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -59.3178981972859, + -64.13380186083748 + ], + [ + -54.54564191055567, + -63.1725569390185 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1_peninsula_12km_v2.geojson b/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1_peninsula_12km_v2.geojson new file mode 100644 index 0000000000..aa2a173208 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1_peninsula_12km_v2.geojson @@ -0,0 +1,97 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.69353078184756, + -61.96708124373723 + ], + [ + -60.60980216459852, + -61.55452131445545 + ], + [ + -69.55211766107989, + -63.152080989803714 + ], + [ + -80.85673116951071, + -66.05555597379733 + ], + [ + -88.13681707469551, + -68.58641430243729 + ], + [ + -95.69478642361177, + -71.59338385976186 + ], + [ + -96.62401026588171, + -72.86186735741381 + ], + [ + -90.82481328167913, + -74.34659424903947 + ], + [ + -81.2027800330412, + -74.8636788514809 + ], + [ + -75.9055834859653, + -75.34148074887518 + ], + [ + -72.22449654558793, + -75.015667940154 + ], + [ + -66.58805223365164, + -74.20709557717424 + ], + [ + -64.5942902255466, + -72.25137878330746 + ], + [ + -65.51019680255283, + -70.6800717849537 + ], + [ + -64.58699491448971, + -69.47546835230543 + ], + [ + -65.55143595844069, + -67.79157062052742 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -58.35195871411565, + -63.31306460865669 + ], + [ + -57.69353078184756, + -61.96708124373723 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1_transition.geojson b/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1_transition.geojson new file mode 100644 index 0000000000..20ad8b8d9b --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris04to60/fris_v1_transition.geojson @@ -0,0 +1,93 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - transition region", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.51168188592774, + -63.34469553787141 + ], + [ + -75.7308231480595, + -67.71524986365019 + ], + [ + -82.23302312713369, + -71.9805712785419 + ], + [ + -81.63135111895728, + -75.59567609845988 + ], + [ + -72.43392556848906, + -77.89255200360182 + ], + [ + -58.71407611692999, + -77.78724511207038 + ], + [ + -46.208104421831024, + -79.00092023048762 + ], + [ + -18.338759042014715, + -79.45787446576274 + ], + [ + -2.7857142568166466, + -77.44116982233017 + ], + [ + 6.813437365949312, + -73.42744971284144 + ], + [ + 5.00921262812011, + -68.98423794486757 + ], + [ + -0.7923051110294352, + -65.9398557197854 + ], + [ + -10.402032107542851, + -64.99932710553239 + ], + [ + -18.521043388561708, + -64.3196282813596 + ], + [ + -29.861824936615392, + -65.13348750621226 + ], + [ + -40.06168534685344, + -64.54083717367145 + ], + [ + -50.97065707925094, + -63.2302794039998 + ], + [ + -57.51168188592774, + -63.34469553787141 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris04to60/high_res_region.geojson b/compass/ocean/tests/global_ocean/mesh/fris04to60/high_res_region.geojson new file mode 100644 index 0000000000..a536ebaba9 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris04to60/high_res_region.geojson @@ -0,0 +1,73 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "SO12to60 high res region", + "component": "ocean", + "object": "region", + "author": "Xylar Asay-Davis" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -75.5859375, + -48.92249926375823 + ], + [ + -96.50390625, + -54.67383096593114 + ], + [ + -124.45312499999999, + -53.95608553098789 + ], + [ + -180, + -53 + ], + [ + -180, + -90 + ], + [ + 180, + -90 + ], + [ + 180, + -53 + ], + [ + 168.3984375, + -51.17934297928927 + ], + [ + 121.640625, + -45.82879925192133 + ], + [ + 22.148437499999996, + -37.99616267972812 + ], + [ + -61.17187499999999, + -34.30714385628803 + ], + [ + -68.90625, + -40.97989806962013 + ], + [ + -75.5859375, + -48.92249926375823 + ] + ] + ] + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris04to60/namelist.init b/compass/ocean/tests/global_ocean/mesh/fris04to60/namelist.init new file mode 100644 index 0000000000..5750b71537 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris04to60/namelist.init @@ -0,0 +1,8 @@ +config_rx1_inner_iter_count = 20 +config_rx1_horiz_smooth_weight = 10.0 +config_rx1_vert_smooth_weight = 10.0 +config_rx1_slope_weight = 1e-1 +config_rx1_zstar_weight = 10.0 +config_rx1_horiz_smooth_open_ocean_cells = 60 +config_rx1_min_levels = 5 +config_rx1_min_layer_thickness = 2 diff --git a/compass/ocean/tests/global_ocean/mesh/fris04to60/namelist.split_explicit_ab2 b/compass/ocean/tests/global_ocean/mesh/fris04to60/namelist.split_explicit_ab2 new file mode 100644 index 0000000000..db9ee3d13d --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris04to60/namelist.split_explicit_ab2 @@ -0,0 +1,12 @@ +config_time_integrator = 'split_explicit_ab2' +config_dt = '00:00:20' +config_btr_dt = '00:00:00.6' +config_run_duration = '0000_01:00:00' +config_use_mom_del2 = .true. +config_mom_del2 = 154.0 +config_use_mom_del4 = .true. +config_mom_del4 = 4.37e8 +config_hmix_scaleWithMesh = .true. +config_use_GM = .true. +config_GM_closure = 'constant' +config_GM_constant_kappa = 600.0 diff --git a/compass/ocean/tests/global_ocean/mesh/fris04to60/streams.forward b/compass/ocean/tests/global_ocean/mesh/fris04to60/streams.forward new file mode 100644 index 0000000000..bd42317610 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris04to60/streams.forward @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/compass/ocean/tests/global_ocean/mesh/fris08to60/__init__.py b/compass/ocean/tests/global_ocean/mesh/fris08to60/__init__.py new file mode 100644 index 0000000000..0a702f905c --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris08to60/__init__.py @@ -0,0 +1,203 @@ +import mpas_tools.mesh.creation.mesh_definition_tools as mdt +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 FRIS08to60BaseMesh(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__) + + self.add_input_file(filename='fris_v1_transition.geojson', + package=self.__module__) + + self.add_input_file(filename='fris_v1_peninsula_12km_v2.geojson', + package=self.__module__) + + self.add_input_file( + filename='fris_v1_peninsula_12km_transition.geojson', + package=self.__module__) + + self.add_input_file(filename='fris_v1.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 + + # Add high res FRIS region transition + dx_min_fris = 8. # minimum resolution within the FRIS cavity + + fc = read_feature_collection('fris_v1_transition.geojson') + + so_signed_distance = signed_distance_from_geojson(fc, lon, lat, + earth_radius, + max_length=0.25) + + # Equivalent to 600 km + trans_width = 600e3 + trans_start = 0 + dx_min = dx_min_fris + + weights = 0.5 * (1 + np.tanh((so_signed_distance - trans_start) / + trans_width)) + + cellWidth = dx_min * (1 - weights) + cellWidth * weights + + # Add 12 km sharp correction west of the peninsula + fc = read_feature_collection('fris_v1_peninsula_12km_v2.geojson') + + so_signed_distance = signed_distance_from_geojson(fc, lon, lat, + earth_radius, + max_length=0.25) + + # Equivalent to 10 km + trans_width = 10e3 + trans_start = 0 + dx_min = 12. + + weights = 0.5 * (1 + np.tanh((so_signed_distance - trans_start) / + trans_width)) + + cellWidth = dx_min * (1 - weights) + cellWidth * weights + + # Add 12 km transition correction west of the peninsula + fc = read_feature_collection( + 'fris_v1_peninsula_12km_transition.geojson') + + so_signed_distance = signed_distance_from_geojson(fc, lon, lat, + earth_radius, + max_length=0.25) + + # Equivalent to 150 km + trans_width = 150e3 + trans_start = 0 + dx_min = 12. + + weights = 0.5 * (1 + np.tanh((so_signed_distance - trans_start) / + trans_width)) + + cellWidth = dx_min * (1 - weights) + cellWidth * weights + + # Add high res FRIS region inner + fc = read_feature_collection('fris_v1.geojson') + + so_signed_distance = signed_distance_from_geojson(fc, lon, lat, + earth_radius, + max_length=0.25) + + # Equivalent to 100 km (0 should be enough given the setup but to be + # safe) + trans_width = 100e3 + trans_start = 0 + dx_min = dx_min_fris + + 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/fris08to60/atlantic.geojson b/compass/ocean/tests/global_ocean/mesh/fris08to60/atlantic.geojson new file mode 100644 index 0000000000..227a57f066 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris08to60/atlantic.geojson @@ -0,0 +1,97 @@ +{ + "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 + ] + ] + ] + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris08to60/dynamic_adjustment.yaml b/compass/ocean/tests/global_ocean/mesh/fris08to60/dynamic_adjustment.yaml new file mode 100644 index 0000000000..2b6476e53c --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris08to60/dynamic_adjustment.yaml @@ -0,0 +1,44 @@ +dynamic_adjustment: + land_ice_flux_mode: pressure_only + get_dt_from_min_res: False + + steps: + damped_adjustment_1: + run_duration: 02_00:00:00 + output_interval: 01_00:00:00 + restart_interval: 02_00:00:00 + dt: 00:03:20 + btr_dt: 00:00:06.7 + Rayleigh_damping_coeff: 1.0e-4 + + damped_adjustment_2: + run_duration: 08_00:00:00 + output_interval: 10_00:00:00 + restart_interval: 02_00:00:00 + dt: 00:03:20 + btr_dt: 00:00:06.7 + Rayleigh_damping_coeff: 1.0e-5 + + damped_adjustment_3: + run_duration: 10_00:00:00 + output_interval: 10_00:00:00 + restart_interval: 10_00:00:00 + dt: 00:03:20 + btr_dt: 00:00:06.7 + Rayleigh_damping_coeff: 1.0e-6 + + damped_adjustment_4: + run_duration: 20_00:00:00 + output_interval: 10_00:00:00 + restart_interval: 10_00:00:00 + dt: 00:03:20 + btr_dt: 00:00:06.7 + Rayleigh_damping_coeff: None + + simulation: + run_duration: 10_00:00:00 + output_interval: 10_00:00:00 + restart_interval: 10_00:00:00 + dt: 00:06:40 + btr_dt: 00:00:10 + Rayleigh_damping_coeff: None diff --git a/compass/ocean/tests/global_ocean/mesh/fris08to60/fris08to60.cfg b/compass/ocean/tests/global_ocean/mesh/fris08to60/fris08to60.cfg new file mode 100644 index 0000000000..f11a7b53e7 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris08to60/fris08to60.cfg @@ -0,0 +1,87 @@ +# Options related to the vertical grid +[vertical_grid] + +# the type of vertical grid +grid_type = index_tanh_dz + +# Number of vertical levels +vert_levels = 64 + +# Depth of the bottom of the ocean +bottom_depth = 5500.0 + +# The minimum layer thickness +min_layer_thickness = 10.0 + +# The maximum layer thickness +max_layer_thickness = 250.0 + +# The characteristic number of levels over which the transition between +# the min and max occurs +transition_levels = 28 + +# Anvil runs out of memory so do the following +# config options related to remapping topography to an MPAS-Ocean mesh +[remap_topography] + +# the target and minimum number of MPI tasks to use in remapping +ntasks = 4096 +min_tasks = 360 + +# options for global ocean testcases +[global_ocean] + +## config options related to the initial_state step +# number of cores to use +init_ntasks = 512 +# minimum of cores, below which the step fails +init_min_tasks = 64 +# The number of cores per task in init mode -- used to avoid running out of +# memory where needed +init_cpus_per_task = 4 +# whether to update PIO tasks and stride +init_update_pio = False + +# whether to update PIO tasks and stride +forward_update_pio = False + +# the approximate number of cells in the mesh +approx_cell_count = 610000 + +# time step per resolution (s/km), since dt is proportional to resolution +dt_per_km = 5 +# barotropic time step per resolution (s/km) +btr_dt_per_km = 0.2 + +## metadata related to the mesh +# the prefix (e.g. QU, EC, WC, SO) +prefix = FRIS +# a description of the mesh and initial condition +mesh_description = MPAS Southern Ocean regionally refined mesh for E3SM version + ${e3sm_version} with enhanced resolution (12 km) around + Antarctica and even more enhanced around the Filchner-Ronne Ice + Shelf (${min_res} km), 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 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 +# the minimum (finest) resolution in the mesh +min_res = 8 +# the maximum (coarsest) resolution in the mesh, can be the same as min_res +max_res = 60 +# The URL of the pull request documenting the creation of the mesh +pull_request = N/A + + +# config options related to initial condition and diagnostics support files +# for E3SM +[files_for_e3sm] + +# CMIP6 grid resolution +cmip6_grid_res = 180x360 diff --git a/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1.geojson b/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1.geojson new file mode 100644 index 0000000000..51e767e649 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1.geojson @@ -0,0 +1 @@ +{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"FRIS high res region","component":"ocean","object":"region","author":"Irena Vankova"},"geometry":{"coordinates":[[[-64.7438723001555,-72.8054024693636],[-69.76898821706332,-74.19251323259206],[-74.02484092117425,-74.47843628310608],[-92.43607426605669,-76.75259948500253],[-101.5379406548874,-80.18910132153749],[-97.25418139197761,-83.23536684168135],[-56.69746887655441,-85.05112877980659],[-39.90477420089397,-85],[-14.020185809699171,-83.36577201994825],[-20.52300577998716,-79.88944960088696],[-17.202195820003567,-76.59018199209325],[-14.53780624392931,-74.27113220357664],[-14.621251472019907,-72.71417212450604],[-15.457525929908314,-72.11805949893571],[-16.735628416005596,-71.3506375575714],[-18.81770866866242,-70.89188604300722],[-21.024357086561025,-70.9256187691209],[-24.78630070550588,-71.36235128369906],[-27.81675331568485,-72.1132700200943],[-31.314772897052507,-72.29684652688603],[-35.143774445838886,-72.21433963956319],[-39.97348523222354,-71.75366563644273],[-44.89032326598664,-70.87082796536023],[-50.40043324305111,-70.2508442400395],[-54.354093738939596,-70.20075756173516],[-58.7763090757868,-71.27289439521846],[-64.7438723001555,-72.8054024693636]]],"type":"Polygon"}}]} diff --git a/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1_correction_peninsula.geojson b/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1_correction_peninsula.geojson new file mode 100644 index 0000000000..01859be40c --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1_correction_peninsula.geojson @@ -0,0 +1,73 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.51168188592774, + -63.34469553787141 + ], + [ + -75.7308231480595, + -67.71524986365019 + ], + [ + -82.23302312713369, + -71.9805712785419 + ], + [ + -81.63135111895728, + -75.59567609845988 + ], + [ + -75.9055834859653, + -75.34148074887518 + ], + [ + -72.47014717927561, + -74.7673143097562 + ], + [ + -68.00554191414759, + -73.77984973214085 + ], + [ + -65.3550099151992, + -71.77205397981956 + ], + [ + -66.27933986206787, + -70.52162831122558 + ], + [ + -64.58699491448971, + -69.47546835230543 + ], + [ + -65.97822782804397, + -67.77544209184867 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -57.51168188592774, + -63.34469553787141 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1_correction_peninsula_v2.geojson b/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1_correction_peninsula_v2.geojson new file mode 100644 index 0000000000..22d512589f --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1_correction_peninsula_v2.geojson @@ -0,0 +1,97 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.51168188592774, + -63.34469553787141 + ], + [ + -53.05987330787791, + -60.9791790833165 + ], + [ + -53.06885379594741, + -59.10724141600171 + ], + [ + -69.3124237875646, + -61.21460931439017 + ], + [ + -83.38421745911926, + -62.77272333644538 + ], + [ + -97.90929281723952, + -66.221448196283 + ], + [ + -105.3263003641532, + -68.89292813601311 + ], + [ + -106.3307246723799, + -72.31928061089278 + ], + [ + -96.38678419860847, + -74.86775750756654 + ], + [ + -80.96950547249958, + -74.8917003828374 + ], + [ + -75.9055834859653, + -75.34148074887518 + ], + [ + -72.33775353811286, + -75.0153658885297 + ], + [ + -66.56769783304944, + -74.21440843603395 + ], + [ + -64.79776921678202, + -72.25395416577506 + ], + [ + -65.48170522640746, + -70.69919310630064 + ], + [ + -64.58699491448971, + -69.47546835230543 + ], + [ + -65.5606241702666, + -67.78677626662034 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -57.51168188592774, + -63.34469553787141 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1_correction_peninsula_v3.geojson b/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1_correction_peninsula_v3.geojson new file mode 100644 index 0000000000..3c79f8ae21 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1_correction_peninsula_v3.geojson @@ -0,0 +1,97 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.51168188592774, + -63.34469553787141 + ], + [ + -53.05987330787791, + -60.9791790833165 + ], + [ + -53.06885379594741, + -59.10724141600171 + ], + [ + -69.14223788466518, + -62.14576624144387 + ], + [ + -77.16348450278696, + -64.13666710372263 + ], + [ + -85.897068042515, + -66.25640705824505 + ], + [ + -94.59878299061488, + -69.72254279603585 + ], + [ + -100.24805622281325, + -72.26566396175254 + ], + [ + -96.38678419860847, + -74.86775750756654 + ], + [ + -80.96950547249958, + -74.8917003828374 + ], + [ + -75.9055834859653, + -75.34148074887518 + ], + [ + -72.33775353811286, + -75.0153658885297 + ], + [ + -66.56769783304944, + -74.21440843603395 + ], + [ + -64.79776921678202, + -72.25395416577506 + ], + [ + -65.48170522640746, + -70.69919310630064 + ], + [ + -64.58699491448971, + -69.47546835230543 + ], + [ + -65.5606241702666, + -67.78677626662034 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -57.51168188592774, + -63.34469553787141 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1_peninsula_12km.geojson b/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1_peninsula_12km.geojson new file mode 100644 index 0000000000..7a4aec28d1 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1_peninsula_12km.geojson @@ -0,0 +1,93 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.69353078184756, + -61.96708124373723 + ], + [ + -61.80022030800379, + -63.008208452662345 + ], + [ + -67.32103132588126, + -64.04079340739024 + ], + [ + -78.16701758864495, + -66.88371277926564 + ], + [ + -87.41765762163665, + -70.17410005159073 + ], + [ + -92.77451946184793, + -72.57628695883871 + ], + [ + -90.82481328167913, + -74.34659424903947 + ], + [ + -81.2027800330412, + -74.8636788514809 + ], + [ + -75.9055834859653, + -75.34148074887518 + ], + [ + -72.22449654558793, + -75.015667940154 + ], + [ + -66.58805223365164, + -74.20709557717424 + ], + [ + -64.5942902255466, + -72.25137878330746 + ], + [ + -65.51019680255283, + -70.6800717849537 + ], + [ + -64.58699491448971, + -69.47546835230543 + ], + [ + -65.55143595844069, + -67.79157062052742 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -58.35195871411565, + -63.31306460865669 + ], + [ + -57.69353078184756, + -61.96708124373723 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1_peninsula_12km_transition.geojson b/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1_peninsula_12km_transition.geojson new file mode 100644 index 0000000000..b8aaed8edb --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1_peninsula_12km_transition.geojson @@ -0,0 +1,89 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -54.54564191055567, + -63.1725569390185 + ], + [ + -53.05987330787791, + -60.9791790833165 + ], + [ + -53.06885379594741, + -59.10724141600171 + ], + [ + -69.14223788466518, + -62.14576624144387 + ], + [ + -77.16348450278696, + -64.13666710372263 + ], + [ + -85.897068042515, + -66.25640705824505 + ], + [ + -94.59878299061488, + -69.72254279603585 + ], + [ + -100.24805622281325, + -72.26566396175254 + ], + [ + -96.38678419860847, + -74.86775750756654 + ], + [ + -89.07987805140462, + -73.74748954581011 + ], + [ + -83.42453978625146, + -72.01434576499264 + ], + [ + -78.97666329388788, + -70.01288831317304 + ], + [ + -73.84932654865166, + -68.18364067984133 + ], + [ + -68.87563501264184, + -66.90585850491902 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -59.3178981972859, + -64.13380186083748 + ], + [ + -54.54564191055567, + -63.1725569390185 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1_peninsula_12km_v2.geojson b/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1_peninsula_12km_v2.geojson new file mode 100644 index 0000000000..aa2a173208 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1_peninsula_12km_v2.geojson @@ -0,0 +1,97 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - peninsula correction", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.69353078184756, + -61.96708124373723 + ], + [ + -60.60980216459852, + -61.55452131445545 + ], + [ + -69.55211766107989, + -63.152080989803714 + ], + [ + -80.85673116951071, + -66.05555597379733 + ], + [ + -88.13681707469551, + -68.58641430243729 + ], + [ + -95.69478642361177, + -71.59338385976186 + ], + [ + -96.62401026588171, + -72.86186735741381 + ], + [ + -90.82481328167913, + -74.34659424903947 + ], + [ + -81.2027800330412, + -74.8636788514809 + ], + [ + -75.9055834859653, + -75.34148074887518 + ], + [ + -72.22449654558793, + -75.015667940154 + ], + [ + -66.58805223365164, + -74.20709557717424 + ], + [ + -64.5942902255466, + -72.25137878330746 + ], + [ + -65.51019680255283, + -70.6800717849537 + ], + [ + -64.58699491448971, + -69.47546835230543 + ], + [ + -65.55143595844069, + -67.79157062052742 + ], + [ + -64.15647518604584, + -65.7193069906435 + ], + [ + -58.35195871411565, + -63.31306460865669 + ], + [ + -57.69353078184756, + -61.96708124373723 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1_transition.geojson b/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1_transition.geojson new file mode 100644 index 0000000000..20ad8b8d9b --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris08to60/fris_v1_transition.geojson @@ -0,0 +1,93 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "FRIS - transition region", + "component": "ocean", + "object": "region", + "author": "Irena Vankova" + }, + "geometry": { + "coordinates": [ + [ + [ + -57.51168188592774, + -63.34469553787141 + ], + [ + -75.7308231480595, + -67.71524986365019 + ], + [ + -82.23302312713369, + -71.9805712785419 + ], + [ + -81.63135111895728, + -75.59567609845988 + ], + [ + -72.43392556848906, + -77.89255200360182 + ], + [ + -58.71407611692999, + -77.78724511207038 + ], + [ + -46.208104421831024, + -79.00092023048762 + ], + [ + -18.338759042014715, + -79.45787446576274 + ], + [ + -2.7857142568166466, + -77.44116982233017 + ], + [ + 6.813437365949312, + -73.42744971284144 + ], + [ + 5.00921262812011, + -68.98423794486757 + ], + [ + -0.7923051110294352, + -65.9398557197854 + ], + [ + -10.402032107542851, + -64.99932710553239 + ], + [ + -18.521043388561708, + -64.3196282813596 + ], + [ + -29.861824936615392, + -65.13348750621226 + ], + [ + -40.06168534685344, + -64.54083717367145 + ], + [ + -50.97065707925094, + -63.2302794039998 + ], + [ + -57.51168188592774, + -63.34469553787141 + ] + ] + ], + "type": "Polygon" + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris08to60/high_res_region.geojson b/compass/ocean/tests/global_ocean/mesh/fris08to60/high_res_region.geojson new file mode 100644 index 0000000000..a536ebaba9 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris08to60/high_res_region.geojson @@ -0,0 +1,73 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "SO12to60 high res region", + "component": "ocean", + "object": "region", + "author": "Xylar Asay-Davis" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -75.5859375, + -48.92249926375823 + ], + [ + -96.50390625, + -54.67383096593114 + ], + [ + -124.45312499999999, + -53.95608553098789 + ], + [ + -180, + -53 + ], + [ + -180, + -90 + ], + [ + 180, + -90 + ], + [ + 180, + -53 + ], + [ + 168.3984375, + -51.17934297928927 + ], + [ + 121.640625, + -45.82879925192133 + ], + [ + 22.148437499999996, + -37.99616267972812 + ], + [ + -61.17187499999999, + -34.30714385628803 + ], + [ + -68.90625, + -40.97989806962013 + ], + [ + -75.5859375, + -48.92249926375823 + ] + ] + ] + } + } + ] +} diff --git a/compass/ocean/tests/global_ocean/mesh/fris08to60/namelist.init b/compass/ocean/tests/global_ocean/mesh/fris08to60/namelist.init new file mode 100644 index 0000000000..789a5d76b9 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris08to60/namelist.init @@ -0,0 +1,8 @@ +config_rx1_inner_iter_count = 20 +config_rx1_horiz_smooth_weight = 10.0 +config_rx1_vert_smooth_weight = 10.0 +config_rx1_slope_weight = 1e-1 +config_rx1_zstar_weight = 10.0 +config_rx1_horiz_smooth_open_ocean_cells = 30 +config_rx1_min_levels = 5 +config_rx1_min_layer_thickness = 2 diff --git a/compass/ocean/tests/global_ocean/mesh/fris08to60/namelist.split_explicit_ab2 b/compass/ocean/tests/global_ocean/mesh/fris08to60/namelist.split_explicit_ab2 new file mode 100644 index 0000000000..91db7382a6 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris08to60/namelist.split_explicit_ab2 @@ -0,0 +1,12 @@ +config_time_integrator = 'split_explicit_ab2' +config_dt = '00:00:40' +config_btr_dt = '00:00:01.3' +config_run_duration = '0000_01:00:00' +config_use_mom_del2 = .true. +config_mom_del2 = 308.0 +config_use_mom_del4 = .true. +config_mom_del4 = 3.5e9 +config_hmix_scaleWithMesh = .true. +config_use_GM = .true. +config_GM_closure = 'constant' +config_GM_constant_kappa = 600.0 diff --git a/compass/ocean/tests/global_ocean/mesh/fris08to60/streams.forward b/compass/ocean/tests/global_ocean/mesh/fris08to60/streams.forward new file mode 100644 index 0000000000..bd42317610 --- /dev/null +++ b/compass/ocean/tests/global_ocean/mesh/fris08to60/streams.forward @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/compass/ocean/tests/global_ocean/mesh/so12to60/__init__.py b/compass/ocean/tests/global_ocean/mesh/so12to60/__init__.py index b04ffd6d43..c7edd16a57 100644 --- a/compass/ocean/tests/global_ocean/mesh/so12to60/__init__.py +++ b/compass/ocean/tests/global_ocean/mesh/so12to60/__init__.py @@ -1,10 +1,10 @@ -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 +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 @@ -46,8 +46,8 @@ def build_cell_width_lat_lon(self): dlon = 0.1 dlat = dlon earth_radius = constants['SHR_CONST_REARTH'] - nlon = int(360./dlon) + 1 - nlat = int(180./dlat) + 1 + nlon = int(360. / dlon) + 1 + nlat = int(180. / dlat) + 1 lon = np.linspace(-180., 180., nlon) lat = np.linspace(-90., 90., nlat)