-
Notifications
You must be signed in to change notification settings - Fork 1
add frequency and duration summaries to idf available #193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
f82cef6 to
a23999c
Compare
|
Why do we need this? It's not like you can select only specific durations/frequencies? |
|
That's exactly what you should be able to do. The set of available durations and frequencues can generally vary between stations, and front-end code can make use of this to construct GUIs. |
|
Or maybe I'm wrong ... |
|
Maybe the available sets of durations and frequencies are the same for all stations in practice. But even with that assumption, it is a problem that those sets aren't provided by the availability endpoint at all (/reports/idf/station). That's a showstopper, since how can Frost then even tell what values to choose from? |
|
Providing those sets per station at least allows us to easily (i.e. automatically!) support varying sets in the future even if they in practice don't vary currently (and thus constitute redundancy in the response). Maybe check with Ketil? |
|
https://frost.met.no/api.html#!/frequencies_(DEPRECATED)/getRainfallIDF |
|
I think specifying a subset of both durations and frequencies for a given station has been a requirement to Frost all along. Note that it is ok if the back-end returns intensity values for all available dur/freq combinations, as Frost is just skipping the ones you don't ask for in the final response. The default is to not filter, i.e. return for all available values. |
|
As far as I know it's always the same set and it's only 128 duration/frequency pairs per station, but I guess it could increase in the future? If filtering of duration/frequency is desired anyway, I feel like it should be implemented here as well? |
|
Waiting to see if the front end actually needs this. |
{
"stationId": 18165,
"numberOfSeasons": 11,
"fromTime": "2013-02-23",
"toTime": "2024-12-31",
"qualityClass": 3,
"seedParameter": 1,
"updatedAt": "2025-01-01",
"durations": [10, 20, 30, 100, ...],
"frequencies": [2, 5, 10, 20, 50, ...],
},
...
instead of just
{
"stationId": 18165,
"numberOfSeasons": 11,
"fromTime": "2013-02-23",
"toTime": "2024-12-31",
"qualityClass": 3,
"seedParameter": 1,
"updatedAt": "2025-01-01"
},