changliao1025 / pyhexwatershed Goto Github PK
View Code? Open in Web Editor NEWThe Python interface to HexWatershed a mesh independent flow direction model for hydrologic models
License: Other
The Python interface to HexWatershed a mesh independent flow direction model for hydrologic models
License: Other
This bug is due to a reversed slope assignment.
The simplification is required, however this can be done in either Python or in C++.
There are both pros and cons.
Reason to pick Python:
Easy to test and implement
Should be fast enough because information is limited
There are some existing C++ to Python conversion tools.
Reason to not pick Python:
Not sure about the STL alternative.
Global scale high resolution computational demand.
Reason to pick C++:
There are existing algorithm built;
performance;
natural C++ STL library
Reason not to pick C++:
Not ideal in long run.
The configuration file will be updated after the pyflowline simulation.
changliao1025/pyflowline#31
However, should this be done by the main program or the sub-program is not decided.
The main configuration is passed to pyflowline, so there are essentially the same.
It is more straightforward to let pyflowline hand this because the basin config is within pyflowline.
There is a dependency relationship, but we need a better way to setup both models.
Option 1: connect all steps into one single python script and let the python script run the hexwatershed.
Option 2: separate different steps and run them in a sequence.
To create mesh from scratch, the program needs to know the extent (up, top, left, right).
This information can be retrieved from spatial extend of both DEM and flowline.
To have consistent design, we will use the DEM as primary information source, and also use flowline as secondary information.
Map projection is another issue.
#step 1: convert it to json format
#step 2: merge all as one single feature
#step 3: split into segment
#step 4: remove loops
#step 5: remove small headwater segment
#step 6: intersect with mesh and simplify
#step 7: rebuild index and order
#step 8: calculate properties
Running a simulation with all the steps or features may be computationally expensive, adding a checkpoint feature may speed up some process.
The backend will now output a json file which contains all the stream segments for each watershed.
The model will support the PyFlowline to be topology-based while the stream burning is non-topology-based.
Create a slurm job file through the Python API.
Allow the bash script to run the Python script and run the C++ component within Python.
Image processing was used in hexwatershed global scale simulation:
globe_hexagon_erossion ();
globe_hexagon_dilation ();
The reason for these two operations is to ensure each boundary cell ONLY has two neighboring boundary cells.
In the latest development, they will be removed because the requirement will be dropped. We will a different approach to build the queue.
I will add additional optionally arguments in the read function to make it easier to set up a case without modifying the configuration JSON file.
Currently, the existing modules within the HexWatershed can have different names in different settings.
I will update each component so they will be more consistent.
Since MPAS mesh provides elevation, it will be used in global scale.
Elevation profile requires fine scale DEM, which is not available yet in MPAS netcdf file.
This requires that the depression filling to be updated.
Drainage area
TWI
Travel length
River slope profile
Add DEM resample back to structured meshes.
This threshold should consider ocean's impacts on delta.
Currently, if the mesh was generated "well", then the outlet location may not be on the edge, which causes the program to crash in other meshes.
In the next development, we will add a function to auto-generate mesh that will match with outlet location and DEM.
While it is desirable to have vertex location, it will incur additional storage and file I/O burden.
The vtk function can be supported in both C++ and Python.
The other visualization can be designed within Python.
Following the other repos, the main repo now uses a new folder structure for different domain under the example folder.
The spatial reference is used for mesh generation. Currently, the DEM has the spatial reference already, so is it necessary to use an additional vector file?
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.