civicmapper / peak-flow-calculator

Calculate peak flow at a point on a DEM using the TR55 methodology and NOAA climate data
MIT License
7 stars 2 forks source link

Curve Number raster creation: handle null values in either landcover or soils datasets #13

Open gassc opened 3 years ago

gassc commented 3 years ago

For the tool that supports the creation of a curve number, have a way to handle null values in soils hydro classes and landcover classes. It's most likely we'll encounter soil layers without hydrologic classifications. Possible solutions:

land cover class soil hydro curve number
2 45

This could also work to handle conditions where landcover is null but soil is known, or both are null.

That last approach is probably the easiest to implement. The change would happen around this line:

https://github.com/civicmapper/peak-flow-calculator/blob/ba57c73e7005a6e086fa17ade25f1511a710d0f0/core/logic/gp.py#L215

Using the ArcPy Spatial Analyst / map algebra toolbox, an IsNull function following or proceeding that line could do the work.

Also: create docs around the Curve Number raster creation process, describing how that lookup table is made and adapted for other landcover datasets.