Skip to content

Commit

Permalink
Merge pull request MPAS-Dev#37 from xylar/add_SOwISC12to60E2r4
Browse files Browse the repository at this point in the history
New Mesh: SOwISC12to60E2r4
Long name: SOwISC12to60kmL60E3SMv2r4

This version of the Southern Ocean Regionally Refined Mesh (SORRM) includes:
* 12 km resolution around Antarctica, about 1000 km farther north than in revision 3 of the mesh
* 45 km resolution at southern mid-latitudes
* 30 km resolution at the equator and the north Atlantic
* 60 km resolution in the north Pacific
* 35 km resolution in the Arctic

It matches the EC30to60 mesh except in the Southern Ocean and north Atlantic.

The merge includes some reorganization of the SOwISC test cases within COMPASS:
* the "resolution" has been renamed from `SO10to60wISC` to `SOwISC12to60`
* a new test case `files_for_e3sm` has been added to create the initial condition, graph files, analysis region masks and mapping files, etc.

The script that produces files for E3SM has been modified to use the short name of the mesh in output file names, rather than the long name.

Initial condition, spin-up and files for E3SM are on Anvil at:
```
lcrc/group/e3sm/ac.xylar/mpas/spinup_expand_hr_SOwISC12to60E2r4/ocean/global_ocean/SOwISC12to60/
```
  • Loading branch information
xylar authored Jan 14, 2021
2 parents 449ab39 + 38c43dd commit 579f410
Show file tree
Hide file tree
Showing 24 changed files with 169 additions and 188 deletions.

This file was deleted.

57 changes: 0 additions & 57 deletions ocean/global_ocean/SO60to10wISC/init/greenland.geojson

This file was deleted.

70 changes: 0 additions & 70 deletions ocean/global_ocean/SO60to10wISC/init/north_mid_res_region.geojson

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<driver_script name="run.py">
<case name="files_for_e3sm">
<step executable="./run.py" quiet="true" pre_message=" * Creating ocean and sea-ice initial conditions and supporting files for E3SM" post_message=" - Complete"/>
</case>
</driver_script>
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ description = MPAS Southern Ocean regionally refined mesh for E3SM version
${e3sm_version} with enhanced resolution (${min_res} km) around
Antarctica, 45-km resolution in the mid southern latitudes,
30-km resolution in a 15-degree band around the equator, 60-km
resolution in northern mid latitudes, and a region transitioning
from 35-km resolution at the Arctic and North-Atlantic margins to
15 km near Greenland. This mesh has ${levels} vertical levels and
includes cavities under the ice shelves in the Antarctic.
resolution in northern mid latitudes, 30 km in the north
Atlantic and 35 km in the Arctic. This mesh has ${levels}
vertical levels and includes cavities under the ice shelves
around Antarctica. The mesh is described in the following pull
request: https://github.com/MPAS-Dev/compass/pull/37
e3sm_version = 2
mesh_version = 03
mesh_version = 4
creation_date = autodetect
min_res = 12
max_res = 60
max_depth = autodetect
levels = autodetect
runoff_description = <<<Spreading function described here>>>

# The following options are detected from .gitconfig if not explicitly entered
author = autodetect
Expand Down Expand Up @@ -76,6 +76,3 @@ enable = false

[prescribed_ismf]
enable = false
# path to the Rignot2013 data set.
# The default is a symlink to the initial conditions database
rignot_2013_file = ../MeltRatesRignot2013.nc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<config case="files_for_e3sm">

<add_link source="../../init/initial_state/initial_state.nc" dest="mesh_before_metadata.nc"/>
<add_link source="../../init/initial_state/graph.info" dest="graph.info"/>
<add_link source_path="script_configuration_dir" source="scripts/create_E3SM_coupling_files.py" dest="create_files_for_e3sm.py"/>
<add_link source_path="script_configuration_dir" source="scripts/config_E3SM_coupling_files.ini" dest="defaults.ini"/>
<copy_file source_path="script_test_dir" source="config_files_for_e3sm.ini" dest="config_files_for_e3sm.ini"/>
<add_link source_path="script_configuration_dir" source="scripts/readme_E3SM_coupling_files" dest="readme"/>

<run_script name="run.py">
<step executable="./create_files_for_e3sm.py">
<argument flag="--config">config_files_for_e3sm.ini</argument>
</step>
</run_script>
</config>
97 changes: 97 additions & 0 deletions ocean/global_ocean/SOwISC12to60/init/atlantic.geojson
Original file line number Diff line number Diff line change
@@ -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
]
]
]
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ def cellWidthVsLatLon():
cellWidthPole=45.,
latPosEq=7.5, latWidthEq=3.0)

# Transition at Equator
cellWidthNorth = mdt.EC_CellWidthVsLat(lat, cellWidthEq=30.,
cellWidthMidLat=60.,
cellWidthPole=60.,
cellWidthPole=35.,
latPosEq=7.5, latWidthEq=3.0)

# Transition at Equator
latTransition = 0.0
latWidthTransition = 2.5
cellWidthVsLat = mdt.mergeCellWidthVsLat(
Expand All @@ -53,51 +54,47 @@ def cellWidthVsLatLon():

_, cellWidth = np.meshgrid(lon, cellWidthVsLat)

# now, add the high-res region
fc = read_feature_collection('high_res_region.geojson')
cellWidthAtlantic = mdt.EC_CellWidthVsLat(lat, cellWidthEq=30.,
cellWidthMidLat=30.,
cellWidthPole=35.,
latPosEq=7.5, latWidthEq=3.0)

so_signed_distance = signed_distance_from_geojson(fc, lon, lat,
earth_radius,
max_length=0.25)
cellWidthAtlantic = mdt.mergeCellWidthVsLat(
lat,
cellWidthSouth,
cellWidthAtlantic,
latTransition,
latWidthTransition)

# Equivalent to 20 degrees latitude
trans_width = 1600e3
trans_start = -500e3
dx_min = 12.
_, cellWidthAtlantic = np.meshgrid(lon, cellWidthAtlantic)

weights = 0.5 * (1 + np.tanh((so_signed_distance - trans_start) /
trans_width))
fc = read_feature_collection('atlantic.geojson')

cellWidth = dx_min * (1 - weights) + cellWidth * weights
atlantic_signed_distance = signed_distance_from_geojson(
fc, lon, lat, earth_radius, max_length=0.25)

fc = read_feature_collection('north_mid_res_region.geojson')
trans_width = 400e3
trans_start = 0.
weights = 0.5 * (1 + np.tanh((atlantic_signed_distance - trans_start) /
trans_width))

ar_signed_distance = signed_distance_from_geojson(fc, lon, lat,
earth_radius,
max_length=0.25)
cellWidth = cellWidthAtlantic * (1 - weights) + cellWidth * weights

fc = read_feature_collection('greenland.geojson')
fc = read_feature_collection('high_res_region.geojson')

gr_signed_distance = signed_distance_from_geojson(fc, lon, lat,
so_signed_distance = signed_distance_from_geojson(fc, lon, lat,
earth_radius,
max_length=0.25)

frac = (-ar_signed_distance/(-ar_signed_distance + gr_signed_distance))

frac = np.maximum(0., np.minimum(1., frac))

dx_min = 15.
dx_max = 35.

arctic_widths = dx_max + (dx_min - dx_max)*frac

trans_width = 1000e3
trans_start = 0.
# Equivalent to 20 degrees latitude
trans_width = 1600e3
trans_start = 500e3
dx_min = 12.

weights = 0.5 * (1 + np.tanh((ar_signed_distance - trans_start) /
weights = 0.5 * (1 + np.tanh((so_signed_distance - trans_start) /
trans_width))

cellWidth = arctic_widths * (1 - weights) + cellWidth * weights
cellWidth = dx_min * (1 - weights) + cellWidth * weights

return cellWidth, lon, lat

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

<add_link source_path="script_test_dir" source="build_base_mesh.py" dest="build_base_mesh.py"/>
<add_link source_path="script_test_dir" source="high_res_region.geojson" dest="high_res_region.geojson"/>
<add_link source_path="script_test_dir" source="north_mid_res_region.geojson" dest="north_mid_res_region.geojson"/>
<add_link source_path="script_test_dir" source="greenland.geojson" dest="greenland.geojson"/>
<add_link source_path="script_test_dir" source="atlantic.geojson" dest="atlantic.geojson"/>

<run_script name="run.py">
<step executable="./build_base_mesh.py">
Expand Down
Loading

0 comments on commit 579f410

Please sign in to comment.