Comments (4)
@aufdenkampe, @xaviernogueira
I'm having some trouble pip installing the clearwater-modules-python as I typically have (pip install git+https://github.com/EcohydrologyTeam/ClearWater-modules-python.git
), I think because this is a private repo.
Potential solves:
- Make clearwater-modules-python public. Are there any concerns with this?
- Try
pip install . -e
in my clone of the clearwater-modules-python repo while in my clearwater_riverine conda environment - Try creating a personal access token with access to the repo: https://docs.readthedocs.io/en/stable/guides/private-python-packages.html.
If we go with one of the latter two routes, I think I'd want to keep all work on a feature branch or at most merge to a develop branch so that any given user could still play around with the repo on main.
Any thoughts on the best way to proceed in the short-term ahead of this demo?
from clearwater-riverine.
@xaviernogueira, I'm having trouble using the updateable_static_parameters
parameter that you described in your PR. I'm playing around in this notebook.
Code:
my_model = EnergyBudget(
initial_state_values,
time_dim='my_time_step',
updateable_static_variables=['air_temp_c']
)
my_model
Error:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
c:\Users\sjordan\OneDrive - LimnoTech\Documents\GitHub\ClearWater-riverine\examples\dev_sandbox\43_Integrate_TSM.ipynb Cell 12 line 2
<a href='vscode-notebook-cell:/c%3A/Users/sjordan/OneDrive%20-%20LimnoTech/Documents/GitHub/ClearWater-riverine/examples/dev_sandbox/43_Integrate_TSM.ipynb#X14sZmlsZQ%3D%3D?line=0'>1</a> # updateable static variable = unexpected keyword argument
----> <a href='vscode-notebook-cell:/c%3A/Users/sjordan/OneDrive%20-%20LimnoTech/Documents/GitHub/ClearWater-riverine/examples/dev_sandbox/43_Integrate_TSM.ipynb#X14sZmlsZQ%3D%3D?line=1'>2</a> my_model = EnergyBudget(
<a href='vscode-notebook-cell:/c%3A/Users/sjordan/OneDrive%20-%20LimnoTech/Documents/GitHub/ClearWater-riverine/examples/dev_sandbox/43_Integrate_TSM.ipynb#X14sZmlsZQ%3D%3D?line=2'>3</a> initial_state_values,
<a href='vscode-notebook-cell:/c%3A/Users/sjordan/OneDrive%20-%20LimnoTech/Documents/GitHub/ClearWater-riverine/examples/dev_sandbox/43_Integrate_TSM.ipynb#X14sZmlsZQ%3D%3D?line=3'>4</a> time_dim='my_time_step',
<a href='vscode-notebook-cell:/c%3A/Users/sjordan/OneDrive%20-%20LimnoTech/Documents/GitHub/ClearWater-riverine/examples/dev_sandbox/43_Integrate_TSM.ipynb#X14sZmlsZQ%3D%3D?line=4'>5</a> updateable_static_variables=['air_temp_c']
<a href='vscode-notebook-cell:/c%3A/Users/sjordan/OneDrive%20-%20LimnoTech/Documents/GitHub/ClearWater-riverine/examples/dev_sandbox/43_Integrate_TSM.ipynb#X14sZmlsZQ%3D%3D?line=5'>6</a> )
<a href='vscode-notebook-cell:/c%3A/Users/sjordan/OneDrive%20-%20LimnoTech/Documents/GitHub/ClearWater-riverine/examples/dev_sandbox/43_Integrate_TSM.ipynb#X14sZmlsZQ%3D%3D?line=6'>7</a> my_model
TypeError: EnergyBudget.__init__() got an unexpected keyword argument 'updateable_static_variables'
Can you help me figure out what's going wrong here?
from clearwater-riverine.
@jrutyna, @aufdenkampe I was able to get a rough draft / proof of concept linkage between Clearwater-riverine and Clearwater-modules in this notebook. I used steady temperature of 20C over time and ramped some of the met parameters to very high values (e.g., 50C air temperature) just for a proof of concept over a short time window, so we'll definitely want to see how this looks once we put in more realistic values.
Here's a plot of a single cell over 60 seconds showing an increase in water temp when TSM was turned on vs when just running clearwater-riverine on its own:
Looks like TSM has the largest impact on low volume cells, which seems intuitive to me:
Should be ready to test with real met data and/or for a longer simulation horizon with temperatures varying over the course of a day or two. We are thinking that modeling a desert climate will be most interesting (cool nights and hot days).
from clearwater-riverine.
@jrutyna and @aufdenkampe, ran the coupled model for 3,600 timesteps (1 hr) with the real air temp / q solar data that @jrutyna provided. Results are promising! Here's a timeseries plot of a few points -- one upstream, one more downstream, and one in the mixing zone with the warmer inflows from a power plant (which I labeled 'estuary' for some reason in this plot).
Air temps are cooler than water temps to start, so we see water temperature decreasing. Water in the mixing zone does warm up due to the warmer water flowing in at the power plant boundary point. Interesting to see how the temperature changes from upstream to downstream.
I have not spent much time examining the results or playing with different parameters, but glad to see we can see observable differences with the data that @jrutyna picked within the first hour of simulation. Coupling the models significantly increases model run time, so my plan next week is to do some speed profiling.
from clearwater-riverine.
Related Issues (20)
- Instantiating Clearwater-Riverine with a config file HOT 5
- Speed up calculation of the `SUM_OF_COEFFICIENTS_TO_DIFFUSION_TERM` HOT 3
- Develop class to handle multiple constituents
- Improve timestep performance
- Investigate impact of increasing time step length on mass balance HOT 1
- Speed up Binary Date Parsing
- Clean up LFS HOT 5
- Comparison of `EDGE_VELOCITY` versus `FLOW_ACROSS_FACE`
- Memory management improvements HOT 2
- Add wetted surface area to mesh
- Unit Testing
- Set up pre-commit
- reduce matrix size when there are dry cells
- Test 5, 10, 15 timestep for Larger Sumwere Creek HOT 20
- Track percent error in mass balance over time
- Assess ability to run coarser timestep model from fine timestep input
- Correcting HEC-RAS Boundary Errors
- Modify `postproc_utils` module to work with multiple constituents
- Plotting functions not working
- Mass balance differences
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clearwater-riverine.