-
Notifications
You must be signed in to change notification settings - Fork 0
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 #86 from EcohydrologyTeam/constituents-dev
Simulating multiple constituents
- Loading branch information
Showing
30 changed files
with
52,026 additions
and
2,255 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
37,791 changes: 37,791 additions & 0 deletions
37,791
examples/04_coupling_riverine_NSM_modules.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
1,775 changes: 1,775 additions & 0 deletions
1,775
examples/dev_sandbox/02_coupling_riverine_modules_updated_(scaled)_crs_1sec.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
1,669 changes: 1,669 additions & 0 deletions
1,669
examples/dev_sandbox/02_coupling_riverine_modules_updated_(scaled)_crs_30sec.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
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,36 @@ | ||
# import modules | ||
from pathlib import Path | ||
import os | ||
import pandas as pd | ||
import xarray as xr | ||
import clearwater_riverine as cwr | ||
|
||
|
||
#point to config | ||
dir_str = os.path.abspath("") | ||
dir = Path(dir_str) | ||
dir_sandbox = dir / "examples" / "dev_sandbox" | ||
config_filepath = dir_sandbox / "demo_config.yml" | ||
print(dir) | ||
print(config_filepath) | ||
print(config_filepath.exists()) | ||
|
||
|
||
#setup model | ||
transport_model = cwr.ClearwaterRiverine( | ||
config_filepath=config_filepath, | ||
verbose=True, | ||
) | ||
|
||
|
||
#make an array the shape of the temp array with 5,000 everywhere | ||
arbitrary_values_tracer = xr.full_like(transport_model.mesh.conservative_tracer, 200) | ||
#print(arbitrary_values_tracer) | ||
arbitrary_values_temp = xr.full_like(transport_model.mesh.temperature, 5000) | ||
update_concentration = {'conservative_tracer_IncorrectName':arbitrary_values_tracer.isel(time=1), | ||
'conservative_tracer':arbitrary_values_tracer.isel(time=1), | ||
'temperature_IncorrectName': arbitrary_values_temp.isel(time=1), | ||
'temperature': arbitrary_values_temp.isel(time=1)} | ||
|
||
transport_model.update(update_concentration) | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
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,41 @@ | ||
,0.0,0.001,0.01,0.1 | ||
Vol_start,0.0,0.0,0.0,0.0 | ||
Mass_start,0.0,0.0,0.0,0.0 | ||
Vol_end,0.0,0.0,0.0,0.0 | ||
Mass_end,-2.0961972422383542e-07,-2.088112535843494e-07,-2.0231457938803223e-07,-1.8298047208465243e-07 | ||
US_Flow_vol,-0.0,-0.0,-0.0,-0.0 | ||
US_Flow_mass,-0.0,-1.9893818911062342e-08,-1.9905176797972897e-07,-2.001597413602265e-06 | ||
US_Flow_in_vol,-0.0,-0.0,-0.0,-0.0 | ||
US_Flow_in_mass,-0.0,-1.9893818911062342e-08,-1.9905176797972897e-07,-2.001597413602265e-06 | ||
US_Flow_out_vol,,,, | ||
US_Flow_out_mass,,,, | ||
DS_Stage_vol,0.0,0.0,0.0,0.0 | ||
DS_Stage_mass,-0.000197640316704926,-0.00019763322197439173,-0.0001975681525397757,-0.00019680960059493792 | ||
DS_Stage_in_vol,,,, | ||
DS_Stage_in_mass,,inf,inf,inf | ||
DS_Stage_out_vol,0.0,0.0,0.0,0.0 | ||
DS_Stage_out_mass,-0.000197640316704926,-0.0001976332221109606,-0.00019756817862477986,-0.0001968137165046367 | ||
PwrPlnt_Flow_vol,-0.0,-0.0,-0.0,-0.0 | ||
PwrPlnt_Flow_mass,-0.0,-3.0276420092383476e-08,-3.0284386462453933e-07,-3.0369720805790324e-06 | ||
PwrPlnt_Flow_in_vol,-0.0,-0.0,-0.0,-0.0 | ||
PwrPlnt_Flow_in_mass,-0.0,-3.0276420092383476e-08,-3.0284386462453933e-07,-3.0369720805790324e-06 | ||
PwrPlnt_Flow_out_vol,,,, | ||
PwrPlnt_Flow_out_mass,,,, | ||
CoriolisColdSpringCreek_vol,-0.0,-0.0,-0.0,-0.0 | ||
CoriolisColdSpringCreek_mass,-0.0,-8.110066371570102e-08,-8.10597728490835e-07,-8.066427521322806e-06 | ||
CoriolisColdSpringCreek_in_vol,-0.0,-0.0,-0.0,-0.0 | ||
CoriolisColdSpringCreek_in_mass,-0.0,-8.110066371570102e-08,-8.10597728490835e-07,-8.066427521322806e-06 | ||
CoriolisColdSpringCreek_out_vol,,,, | ||
CoriolisColdSpringCreek_out_mass,,,, | ||
bcTotalVolInOutAll,-0.0,-0.0,-0.0,-0.0 | ||
bcTotalVolInAll,-0.0,-0.0,-0.0,-0.0 | ||
bcTotalVolOutAll,0.0,0.0,0.0,0.0 | ||
bcTotalMassInOutAll,0.001502367205097536,0.00150201524053505,0.0014988383636570341,0.0014662535655106898 | ||
bcTotalMassInAll,-0.0,-3.464908356652066e-08,-3.465063811739662e-07,-3.468016498448916e-06 | ||
bcTotalMassOutAll,-0.000197640316704926,-0.0001976332221109606,-0.00019756817862477986,-0.0001968137165046367 | ||
vol_end_calc,0.0,0.0,0.0,0.0 | ||
error_vol,-0.0,-0.0,-0.0,-0.0 | ||
prct_error_vol,0.0,0.0,0.0,0.0 | ||
mass_end_calc,0.0009312506119426283,0.0009310324447628957,0.0009290632400796364,0.000908865372932729 | ||
error_mass,-222.53046856168783,-222.47815419212978,-222.00614933405544,-217.176159680256 | ||
prct_error_mass,-222.53046856168783,-222.47814644881683,-222.00607206102842,-217.1754030443587 |
41 changes: 41 additions & 0 deletions
41
examples/dev_sandbox/data/diffusion_coefficient_differences.csv
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,41 @@ | ||
,0.0,0.001,0.01,0.1 | ||
Vol_start,0.0,0.0,0.0,0.0 | ||
Mass_start,0.0,0.0,0.0,0.0 | ||
Vol_end,0.0,0.0,0.0,0.0 | ||
Mass_end,-30.250933796167374,-30.134260654449463,-29.196703553199768,-26.406532913446426 | ||
US_Flow_vol,0.0,0.0,0.0,0.0 | ||
US_Flow_mass,0.0,10.204635500907898,102.10461586713791,1026.7295644283295 | ||
US_Flow_in_vol,0.0,0.0,0.0,0.0 | ||
US_Flow_in_mass,0.0,10.204635500907898,102.10461586713791,1026.7295644283295 | ||
US_Flow_out_vol,0.0,0.0,0.0,0.0 | ||
US_Flow_out_mass,0.0,0.0,0.0,0.0 | ||
DS_Stage_vol,0.0,0.0,0.0,0.0 | ||
DS_Stage_mass,-134391.3736948967,-134386.54942321777,-134342.30353832245,-133826.5037279129 | ||
DS_Stage_in_vol,0.0,0.0,0.0,0.0 | ||
DS_Stage_in_mass,0.0,9.283453138039548e-05,0.017737281406800455,2.798734537592982 | ||
DS_Stage_out_vol,0.0,0.0,0.0,0.0 | ||
DS_Stage_out_mass,-134391.3736948967,-134386.5495160818,-134342.32127559185,-133829.3024623394 | ||
PwrPlnt_Flow_vol,0.0,0.0,0.0,0.0 | ||
PwrPlnt_Flow_mass,0.0,2.588407337665558,25.890884026885033,259.6383850425482 | ||
PwrPlnt_Flow_in_vol,0.0,0.0,0.0,0.0 | ||
PwrPlnt_Flow_in_mass,0.0,2.588407337665558,25.890884026885033,259.6383850425482 | ||
PwrPlnt_Flow_out_vol,0.0,0.0,0.0,0.0 | ||
PwrPlnt_Flow_out_mass,0.0,0.0,0.0,0.0 | ||
CoriolisColdSpringCreek_vol,0.0,0.0,0.0,0.0 | ||
CoriolisColdSpringCreek_mass,0.0,13.866999626159668,138.60007899999619,1379.2383723855019 | ||
CoriolisColdSpringCreek_in_vol,0.0,0.0,0.0,0.0 | ||
CoriolisColdSpringCreek_in_mass,0.0,13.866999626159668,138.60007899999619,1379.2383723855019 | ||
CoriolisColdSpringCreek_out_vol,0.0,0.0,0.0,0.0 | ||
CoriolisColdSpringCreek_out_mass,0.0,0.0,0.0,0.0 | ||
bcTotalVolInOutAll,0.0,0.0,0.0,0.0 | ||
bcTotalVolInAll,0.0,0.0,0.0,0.0 | ||
bcTotalVolOutAll,0.0,0.0,0.0,0.0 | ||
bcTotalMassInOutAll,-134391.3736948967,-134359.88938075304,-134075.70795942843,-131160.89740605652 | ||
bcTotalMassInAll,0.0,26.660135507583618,266.6133162975311,2668.405056476593 | ||
bcTotalMassOutAll,-134391.3736948967,-134386.5495160818,-134342.32127559185,-133829.3024623394 | ||
vol_end_calc,0.0,0.0,0.0,0.0 | ||
error_vol,0.0,0.0,0.0,0.0 | ||
prct_error_vol,0.0,0.0,0.0,0.0 | ||
mass_end_calc,134391.3736948967,134359.88938057423,134075.70795929432,131160.8974058628 | ||
error_mass,134421.62462869287,134390.02364122868,134104.90466284752,131187.30393877625 | ||
prct_error_mass,-0.017470226674512496,-0.017466119016006882,-0.017429057814387163,-0.017049815891893434 |
Oops, something went wrong.