-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #172 from amoodie/docs_sediment
Docs water and sediment routing (partial)
- Loading branch information
Showing
11 changed files
with
560 additions
and
24 deletions.
There are no files selected for viewing
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
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
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,30 @@ | ||
import warnings | ||
|
||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
|
||
import pyDeltaRCM | ||
|
||
# filter out the warning raised about no netcdf being found | ||
warnings.filterwarnings("ignore", category=UserWarning) | ||
|
||
|
||
# init delta model | ||
with pyDeltaRCM.shared_tools._docs_temp_directory() as output_dir: | ||
delta = pyDeltaRCM.DeltaModel( | ||
out_dir=output_dir, | ||
resume_checkpoint='../../_resources/checkpoint') | ||
|
||
_shp = delta.eta.shape | ||
|
||
# set up axis | ||
fig, ax = plt.subplots() | ||
|
||
# fill in axis2 | ||
pyDeltaRCM.debug_tools.plot_domain( | ||
delta.eta, ax=ax, grid=False, cmap='cividis') | ||
ax.set_title('intial bed elevation (m)') | ||
|
||
|
||
plt.tight_layout() | ||
plt.show() |
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,39 @@ | ||
import warnings | ||
|
||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
|
||
import pyDeltaRCM | ||
|
||
# filter out the warning raised about no netcdf being found | ||
warnings.filterwarnings("ignore", category=UserWarning) | ||
|
||
|
||
# init delta model | ||
with pyDeltaRCM.shared_tools._docs_temp_directory() as output_dir: | ||
delta = pyDeltaRCM.DeltaModel( | ||
out_dir=output_dir, | ||
resume_checkpoint='../../_resources/checkpoint') | ||
|
||
_shp = delta.eta.shape | ||
|
||
_eta_before = np.copy(delta.eta) | ||
|
||
delta.route_all_mud_parcels() | ||
|
||
_eta_after = np.copy(delta.eta) | ||
|
||
|
||
# set up axis | ||
fig, ax = plt.subplots() | ||
|
||
# fill in axis2 | ||
_diff = _eta_after - _eta_before | ||
pyDeltaRCM.debug_tools.plot_domain( | ||
_diff, ax=ax, grid=False, cmap='RdBu', | ||
vmin=-0.1, vmax=0.1) | ||
ax.set_title('bed elevation change (m) \n due to mud parcels') | ||
|
||
|
||
plt.tight_layout() | ||
plt.show() |
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,39 @@ | ||
import warnings | ||
|
||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
|
||
import pyDeltaRCM | ||
|
||
# filter out the warning raised about no netcdf being found | ||
warnings.filterwarnings("ignore", category=UserWarning) | ||
|
||
|
||
# init delta model | ||
with pyDeltaRCM.shared_tools._docs_temp_directory() as output_dir: | ||
delta = pyDeltaRCM.DeltaModel( | ||
out_dir=output_dir, | ||
resume_checkpoint='../../_resources/checkpoint') | ||
|
||
_shp = delta.eta.shape | ||
|
||
_eta_before = np.copy(delta.eta) | ||
|
||
delta.route_all_sand_parcels() | ||
|
||
_eta_after = np.copy(delta.eta) | ||
|
||
|
||
# set up axis | ||
fig, ax = plt.subplots() | ||
|
||
# fill in axis2 | ||
_diff = _eta_after - _eta_before | ||
pyDeltaRCM.debug_tools.plot_domain( | ||
_diff, ax=ax, grid=False, cmap='RdBu', | ||
vmin=-0.1, vmax=0.1) | ||
ax.set_title('bed elevation change (m) \n due to sand parcels') | ||
|
||
|
||
plt.tight_layout() | ||
plt.show() |
Oops, something went wrong.