Open nickrsan opened 1 year ago
And then once we get the question above settled, I can make a few more recommendations and we can talk about workflows to build it into the code and how to edit it, etc.
Thanks starting this issue thread, @nickrsan. For snowmelt driven systems, the FFC is supposed to take the flow magnitude 4 days prior to the spring timing to ensure that a storm event peak (blip) that occurred during the spring recession isn't getting picked up. For non-snowmelt systems, the FFC should take the magnitude at spring timing but the FFC takes the magnitude 4 days prior in all cases.
So what we want to do is for non-snowmelt systems, we want to take the spring timing each water year and find the flow magnitude corresponding to that day. So we essentially need to pull the data from the flow timeseries with water year column appended. For every water year, find the water year day of the spring timing and get the associated magnitude. That will be our new spring mag value.
Another thing to update would be the percentiles for the revised spring mag calculations and potentially the alteration assessment (if this is easily done) but priority would be on updating percentiles. Thanks, @nickrsan!
The way the FFC API calculates spring magnitude finds a date by behavior and then moves the date by four days (I don't recall why). Some of the team members want the ability to disable the date move, but not impact existing calculations from the API. A good option for this is to have the FFC API Client handle the adjustment since it can be turned on and off and doesn't involve deploying an update to a wider audience on the server side.
This involves a few pieces of work:
perform_spring_magnitude_adjustment = FALSE,
- I'd recommend this go somewhere near line 357 (https://github.com/ceff-tech/ffc_api_client/blob/release/ffcAPIClient/R/ffc_api_client.R#L357)ffc_results_pre_spring_fix = NA,
@kristaniguchi it'd be worth knowing a verbal description of what's required to adjust the magnitude value. Is it that once we know the day of year, we go look at input timeseries (of which there can be many years), or do we look at the DOH data and pull the magnitude values for the new day of the year we want to use? Can you describe what data has the values we want to pull data from?