FlowWest / cvpiaData

https://flowwest.github.io/cvpiaData/
1 stars 2 forks source link

write functions for setting habitat values #9

Open thesadie opened 6 years ago

thesadie commented 6 years ago

set_spawning_habitat(watershed, flow, species) returns area in square meters

set_instream_habitat(watershed, flow, species) returns area in square meters

set_floodplain_habitat(watershed, flow, species) returns area in square meters

WUA (weighted usable area) as a function of flow are in units of ft^2/1000ft to get an area, create a linear interpolation function with approxfun to convert a WUA into an area, multiple the watershed's length in feet divide by 1000 with the WUA and then convert the square feet into square meters (10.7639 ft per meter)

iterate with functions to create table that can be filtered for the two periods and spread into a 'Jim' array year | month | area | watershed

wet period - 1970-1989 dry period - 1923-1942

These functions will be used to create the follow SIT model inputs:

31 watersheds (25 with spawning) 8 months 20 years