Skip to content

Some Python scripts & notebooks for Delft3D4-FLOW turbidity current simulations

License

Notifications You must be signed in to change notification settings

JulesBlm/Delft3D-Python-Thesis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Delft3D-FLOW Python Tools for humans

Declarative Delft3D-FLOW file generation and visualisation

See the organized scripts and clean notebooks here: pyDelft3D-FLOW

Some sane tools for my thesis too ease the pain of having to work with Deltares' Delft3D-FLOW's insane file formats and to automate the tedious manual labor involved in setting up multiple succesive simulations. Also processes NetCDF for plotting with Holoviews and PyVista.

JulesD3D

The folder JulesD3D contains some scripts to

Notebooks

Furthermore there are some notebooks to

  • Visualize Delft3D-FLOW netCDF output

    • hvPlot for interactive plots
    • Holoviews to write cross-section animations to .mp4 files
    • PyVista for 3D plotting both hydrodynamic and underlayer properties
    • Matplotlib plus some widgets to quickly make some plots [abandoned]
  • Manually change values in a netCDF outputfile and write it to disk\

    • Reset hydrodynamic properties
    • Reset transport layer

Demo images

See the folder 'output_material' for more images and videos.

Disclaimer

This is very much a work in progress so it's all still very messy and hacky: ¯_(ツ)_/¯. I use this to visualise the results of modelling turbidity currents and their deposits in Delft3D. If you're looking for tools to visualize Delft3D ocean or river modelling I'd suggest to look at one of these libraries.

Potential To Do list

  1. Use pandas for file reading and writing D3D files
  2. Has nice display views too
  3. Finish Overarching d3d class
  4. HTML repr strings
  5. Option to use h5py instead of netCDF4
  6. Better plotting of underlayers
  7. Subtract from depth?
  8. Add time dependent, multi-dimensional coords following DP_BEDLYR for interactive plotting with hvPlot
  9. Filter early with xarray.where() for 3d PyVista (timeslider) plots, instead of opacity hack or thresholding with pyvista
  10. Clean poetry.lock and pyproject.toml of unused deps
  11. Make use of Unit-based arrays with Pint and xarray
  12. Better documentation
  13. Convert functionality in GenerateBCRecords.ipynb to a seperate .py file
  14. Script for reading and writing Morphology files (especially underlayers)
  15. Rename sediments (constituents) dimensions in dataset for labeled selection.
  16. Notebook showing overview of MDF file
  17. Use Panel for better & cleaner widgets, both for hvPlot and for PyVista
  18. Properly structure JulesD3D folder as package
  19. Use ufuncs to increase performance in process
  20. Add depth
  21. Vector sums (velocity, bottom stress, sediments etc)
  22. Move notebooks to separate folders
  23. Check location of values on staggered grid (face vs edge etc) maybe use parts of Gridded for this
  24. Improve code quality and clean notebooks. Less hardcoded variables, more functions
  • Read up on Python OOP/classes
  1. Find a way to add coordinates to the whole dataset, for vertical cross-sections.

Credits

About

Some Python scripts & notebooks for Delft3D4-FLOW turbidity current simulations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published