nwc-cuahsi-summer-institute / lgar-py Goto Github PK
View Code? Open in Web Editor NEWLGAR in python/torch
License: MIT License
LGAR in python/torch
License: MIT License
We have to do the following to tune parameters
It looks like the layer homogeneity is causing a problem when inserting water. When trying this code with another basin, it was found that this bug occurs when the wetting_front_free_drainage
, or the deepest front effected by wetting, is the last layer.
When this happens, the code dies since you can't calculate a d_theta. This code wasn't built for a homogeneous soil column.
The fix is super sneaky...
This implies there is some model blow up at this timestep
(hydroRouting) tkb5476@e5-ce-csr-s2002:/mnt/sdb1/tkb5476/dpLGAR$ python -m dpLGAR ++save_name=small_top
[2023-07-13 22:40:13,793][models.dpLGAR][INFO] - Top Soil_depth = 15.0
[2023-07-13 22:40:13,811][agents.DifferentiableLGAR][INFO] - Running epoch: 0
[2023-07-13 22:40:13,811][agents.DifferentiableLGAR][INFO] - -----Current Params-----
[2023-07-13 22:40:13,811][models.dpLGAR][INFO] - Alpha for soil 1: 0.0100
[2023-07-13 22:40:13,811][models.dpLGAR][INFO] - Alpha for soil 2: 0.0100
[2023-07-13 22:40:13,811][models.dpLGAR][INFO] - n for soil 1: 1.6600
[2023-07-13 22:40:13,811][models.dpLGAR][INFO] - n for soil 2: 1.6600
[2023-07-13 22:40:13,811][models.dpLGAR][INFO] - Ksat for soil 1: 0.7560
[2023-07-13 22:40:13,811][models.dpLGAR][INFO] - Ksat for soil 2: 0.7560
[2023-07-13 22:40:13,811][models.dpLGAR][INFO] - Max Ponded Depth: 0.0000
Epoch 1 Training: 96%|████████████████████████████████████████████████████████████████▏ | 8393/8760 [22:36<00:59, 6.19it/s]
Error executing job with overrides: ['++save_name=small_top']
Traceback (most recent call last):
File "/mnt/sdb1/tkb5476/dpLGAR/dpLGAR/__main__.py", line 15, in main
agent.run()
File "/mnt/sdb1/tkb5476/dpLGAR/dpLGAR/agents/DifferentiableLGAR.py", line 90, in run
self.train()
File "/mnt/sdb1/tkb5476/dpLGAR/dpLGAR/agents/DifferentiableLGAR.py", line 106, in train
self.train_one_epoch()
File "/mnt/sdb1/tkb5476/dpLGAR/dpLGAR/agents/DifferentiableLGAR.py", line 125, in train_one_epoch
runoff, percolation = self.model(i, x.squeeze())
File "/home/tkb5476/anaconda3/envs/hydroRouting/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/mnt/sdb1/tkb5476/dpLGAR/dpLGAR/models/dpLGAR.py", line 266, in forward
infiltration_sub, AET_sub = self.move_wetting_front(
File "/mnt/sdb1/tkb5476/dpLGAR/dpLGAR/models/dpLGAR.py", line 380, in move_wetting_front
self.top_layer.wetting_fronts_cross_layer_boundary()
File "/mnt/sdb1/tkb5476/dpLGAR/dpLGAR/models/physics/layers/Layer.py", line 934, in wetting_fronts_cross_layer_boundary
self.next_layer.wetting_fronts_cross_layer_boundary()
File "/mnt/sdb1/tkb5476/dpLGAR/dpLGAR/models/physics/layers/Layer.py", line 927, in wetting_fronts_cross_layer_boundary
) = self.recalibrate(
File "/mnt/sdb1/tkb5476/dpLGAR/dpLGAR/models/physics/layers/Layer.py", line 980, in recalibrate
next_theta_r = self.next_layer.attributes[
AttributeError: 'NoneType' object has no attribute 'attributes'
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
01031500
TODO 6/23/23:
verify wetting_fronts_cross_layer_boundary() works
Make sure that the for loop in line 328 of Wetting front is correct
test lgar_fix_dry_over_wet_fronts()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.