-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Mesh: WCAtl12to45E2r4 #60
Merged
Merged
Changes from 3 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
8d0e103
Add first draft of WC_SO_Atl10
xylar 633e24d
Update ocean/develop submodule
xylar 387d5b6
Include Arctic in RRS30to10 region
xylar b0a1574
Rename mesh to WC_Atl12
xylar a8e5d13
Update metadata
xylar f4b97f0
Remove topography smoothing (not in WC14)
xylar cdc0f79
Remove ice-shelf cavities
xylar 0997207
Set highest resoltuion to 12 km (Arctic and Antarctic)
xylar ea3787f
Set coarsest res to 45 km
xylar f411fc7
Rename WC_Atl12 --> WCAtl12
xylar db29ef8
Delete unused script
xylar 1c17d96
Add back topography smoothing
xylar 209fb7c
Fix templates in initial_state
xylar 3edd901
Fix topography namelist options
xylar a6ece5d
Adds spin up settings for WCAtl12
vanroekel 16ab745
Updates ramp settings so GM is off in the Atlantic
vanroekel 5639920
Reduce time step in first spin-up stage
xylar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Submodule develop
updated
51 files
5 changes: 5 additions & 0 deletions
5
ocean/global_ocean/WC_SO_Atl10/files_for_e3sm/config_driver.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
78 changes: 78 additions & 0 deletions
78
ocean/global_ocean/WC_SO_Atl10/files_for_e3sm/config_files_for_e3sm.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# This is the custom config file specific to this test case. Any values here | ||
# will override the defaults in defaults.ini Users wishing to alter the | ||
# configuration should modify this file, rather than defaults.ini | ||
|
||
[main] | ||
nprocs = 1 | ||
# the file name of the initial condition, possibly after spin-up | ||
initial_condition = ../../spin_up/simulation/restarts/restart.0001-01-21_00.00.00.nc | ||
|
||
[mesh] | ||
short_name = ${prefix}${min_res}to${max_res}E${e3sm_version}r${mesh_version} | ||
long_name = ${prefix}${min_res}to${max_res}kmL${levels}E3SMv${e3sm_version}r${mesh_version} | ||
prefix = WC_SO_Atl | ||
description = MPAS Southern Ocean regionally refined mesh for E3SM version | ||
${e3sm_version} with enhanced resolution (${min_res} km) around | ||
Antarctica, 45-km resolution in the mid southern latitudes, | ||
30-km resolution in a 15-degree band around the equator, 60-km | ||
resolution in northern mid latitudes, 30 km in the north | ||
Atlantic and 35 km in the Arctic. This mesh has ${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 | ||
xylar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
e3sm_version = 2 | ||
mesh_version = x | ||
xylar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
creation_date = autodetect | ||
min_res = 12 | ||
xylar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
max_res = 60 | ||
max_depth = autodetect | ||
levels = autodetect | ||
|
||
# The following options are detected from .gitconfig if not explicitly entered | ||
author = autodetect | ||
email = autodetect | ||
|
||
[initial_condition_ocean] | ||
enable = true | ||
|
||
[graph_partition_ocean] | ||
enable = true | ||
|
||
[initial_condition_seaice] | ||
enable = true | ||
|
||
[scrip] | ||
enable = true | ||
|
||
[transects_and_regions] | ||
enable = true | ||
|
||
[mapping_analysis] | ||
enable = true | ||
|
||
[mapping_CORE_Gcase] | ||
enable = false | ||
|
||
[mapping_JRA_Gcase] | ||
enable = false | ||
|
||
[mapping_ne30] | ||
enable = false | ||
|
||
[domain_CORE_Gcase] | ||
enable = false | ||
|
||
[domain_JRA_Gcase] | ||
enable = false | ||
|
||
[domain_ne30] | ||
enable = false | ||
|
||
[mapping_runoff] | ||
enable = false | ||
|
||
[salinity_restoring] | ||
enable = false | ||
|
||
[prescribed_ismf] | ||
enable = false |
17 changes: 17 additions & 0 deletions
17
ocean/global_ocean/WC_SO_Atl10/files_for_e3sm/config_files_for_e3sm.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?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> | ||
<argument flag="--ice_shelf_cavities"/> | ||
</step> | ||
</run_script> | ||
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"name": "Atlantic region", | ||
"component": "ocean", | ||
"object": "region", | ||
"author": "Xylar Asay-Davis" | ||
}, | ||
"geometry": { | ||
"type": "Polygon", | ||
"coordinates": [ | ||
[ | ||
[ | ||
180.0, | ||
90.0 | ||
], | ||
[ | ||
0.0, | ||
90.0 | ||
], | ||
[ | ||
-180.0, | ||
90.0 | ||
], | ||
[ | ||
-180.0, | ||
65.0 | ||
], | ||
[ | ||
-157.85156249999997, | ||
65.0 | ||
], | ||
[ | ||
-116.71874999999999, | ||
60.413852350464914 | ||
], | ||
[ | ||
-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 | ||
], | ||
[ | ||
-56.6015625, | ||
-15.623036831528252 | ||
], | ||
[ | ||
-72.421875, | ||
-49.38237278700955 | ||
], | ||
[ | ||
-67.5, | ||
-73.92246884621463 | ||
], | ||
[ | ||
27.421875, | ||
-72.81607371878991 | ||
], | ||
[ | ||
24.960937499999996, | ||
-25.48295117535531 | ||
], | ||
[ | ||
16.171875, | ||
0 | ||
], | ||
[ | ||
27.773437499999996, | ||
26.745610382199022 | ||
], | ||
[ | ||
37.96875, | ||
32.24997445586331 | ||
], | ||
[ | ||
39.7265625, | ||
39.36827914916014 | ||
], | ||
[ | ||
32.6953125, | ||
53.9560855309879 | ||
], | ||
[ | ||
37.6171875, | ||
61.438767493682825 | ||
], | ||
[ | ||
80.15625, | ||
65.0 | ||
], | ||
[ | ||
180.0, | ||
65.0 | ||
], | ||
[ | ||
180.0, | ||
90.0 | ||
] | ||
] | ||
] | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
#!/usr/bin/env python | ||
import numpy as np | ||
import mpas_tools.mesh.creation.mesh_definition_tools as mdt | ||
from mpas_tools.mesh.creation.signed_distance import \ | ||
signed_distance_from_geojson | ||
from geometric_features import read_feature_collection | ||
from mpas_tools.ocean import build_spherical_mesh | ||
from mpas_tools.cime.constants import constants | ||
|
||
|
||
def cellWidthVsLatLon(): | ||
""" | ||
Create cell width array for this mesh on a regular latitude-longitude grid. | ||
Returns | ||
------- | ||
cellWidth : ndarray | ||
m x n array, entries are desired cell width in km | ||
|
||
lat : ndarray | ||
latitude, vector of length m, with entries between -90 and 90, | ||
degrees | ||
|
||
lon : ndarray | ||
longitude, vector of length n, with entries between -180 and 180, | ||
degrees | ||
""" | ||
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) | ||
|
||
cellWidthVsLat = mdt.EC_CellWidthVsLat( | ||
lat, cellWidthEq=30., cellWidthMidLat=60., cellWidthPole=35.) | ||
|
||
_, cellWidth = np.meshgrid(lon, cellWidthVsLat) | ||
|
||
cellWidthAtlantic = mdt.RRS_CellWidthVsLat( | ||
lat, cellWidthEq=30., cellWidthPole=10.) | ||
|
||
_, 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('so_high_res_region.geojson') | ||
|
||
so_signed_distance = signed_distance_from_geojson(fc, lon, lat, | ||
earth_radius, | ||
max_length=0.25) | ||
|
||
# Equivalent to 20 degrees latitude | ||
trans_width = 1600e3 | ||
trans_start = 500e3 | ||
dx_min = 12. | ||
|
||
weights = 0.5 * (1 + np.tanh((so_signed_distance - trans_start) / | ||
trans_width)) | ||
|
||
cellWidth = dx_min * (1 - weights) + cellWidth * weights | ||
|
||
return cellWidth, lon, lat | ||
|
||
|
||
def main(): | ||
cellWidth, lon, lat = cellWidthVsLatLon() | ||
build_spherical_mesh(cellWidth, lon, lat, out_filename='base_mesh.nc') | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0"?> | ||
<config case="base_mesh"> | ||
|
||
<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="so_high_res_region.geojson" dest="so_high_res_region.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"> | ||
</step> | ||
</run_script> | ||
</config> |
13 changes: 13 additions & 0 deletions
13
ocean/global_ocean/WC_SO_Atl10/init/config_culled_mesh.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0"?> | ||
<config case="culled_mesh"> | ||
|
||
<add_link source="../base_mesh/base_mesh.nc" dest="base_mesh.nc"/> | ||
<add_link source_path="script_configuration_dir" source="scripts/cull_mesh.py" dest="cull_mesh.py"/> | ||
|
||
<run_script name="run.py"> | ||
<step executable="./cull_mesh.py"> | ||
<argument flag="--with_critical_passages"></argument> | ||
<argument flag="--with_cavities"></argument> | ||
xylar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</step> | ||
</run_script> | ||
</config> |
25 changes: 25 additions & 0 deletions
25
ocean/global_ocean/WC_SO_Atl10/init/config_driver_init.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<driver_script name="run.py"> | ||
<case name="base_mesh"> | ||
<step executable="./run.py" quiet="true" pre_message=" * Creating 2D global base mesh with jigsaw..." post_message=" complete! Created file: base_mesh/base_mesh.nc"/> | ||
</case> | ||
<case name="culled_mesh"> | ||
<step executable="./run.py" quiet="true" pre_message=" * Culling land cells from 2D global mesh, including ice shelf cavities..." post_message=" complete! Created file: culled_mesh/culled_mesh.nc"/> | ||
</case> | ||
<case name="initial_state"> | ||
<step executable="./run.py" quiet="true" pre_message=" * Initializing ocean state with bathymetry and tracers..." post_message=" complete! Created file: initial_state/initial_state.nc"/> | ||
</case> | ||
<case name="ssh_adjustment"> | ||
<step executable="./run.py" quiet="true" pre_message=" * Adjusting SSH for ice shelf cavities..." post_message=" complete! Created file: ssh_adjustment/init.nc"/> | ||
</case> | ||
xylar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<case name="test"> | ||
<step executable="./run.py" quiet="true" pre_message=" * Quick test run with ice shelf cavities..." post_message=" complete! Created file: test/land_ice_fluxes.nc"/> | ||
</case> | ||
<validation> | ||
<compare_fields file1="test/output.nc"> | ||
<template file="prognostic_comparison.xml" path_base="script_core_dir" path="templates/validations"/> | ||
</compare_fields> | ||
<compare_fields file1="test/land_ice_fluxes.nc"> | ||
<template file="land_ice_flux_comparison.xml" path_base="script_core_dir" path="templates/validations"/> | ||
</compare_fields> | ||
xylar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</validation> | ||
</driver_script> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We likely want a different name. Just
WC
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking WC_Atl would be a reasonable choice. We may want Atl as just having the resolution min/max could be misleading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think WCAtl (without any underscores) would be better. I think I recall there were problems with punctuation in mesh names (possibly including underscores).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WCAtl sounds good to me.