Git Product home page Git Product logo

Comments (4)

sjordan29 avatar sjordan29 commented on June 14, 2024

@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:

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.

sjordan29 avatar sjordan29 commented on June 14, 2024

@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.

sjordan29 avatar sjordan29 commented on June 14, 2024

@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:
tsm

Looks like TSM has the largest impact on low volume cells, which seems intuitive to me:
tsm-small-volume
image

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.

sjordan29 avatar sjordan29 commented on June 14, 2024

@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.

results

from clearwater-riverine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.