FlowWest/cvpiaData

write functions for setting habitat values

Opened this issue · 0 comments

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:

  • spawning habitat wet [25, 20]
  • spawning habitat dry [25, 20]
  • instream habitat wet [31, 8, 20]
  • instream habitat dry [31, 8, 20]
  • floodplain habitat wet [31, 8, 20]
  • floodplain habitat dry [31, 8, 20]

31 watersheds (25 with spawning)
8 months
20 years