bird-house / finch

A Web Processing Service for Climate Indicators
https://finch.readthedocs.io/en/latest/
Apache License 2.0
13 stars 5 forks source link

Update finch to string based parameters in xclim master #13

Closed huard closed 5 years ago

huard commented 5 years ago

Description

Indicator functions in xclim now require units to be explicit. Finch processes need to account for that.

davidcaron commented 5 years ago

@huard , I think this is the problem I get in the test test_heat_wave_index in the development branch. I think this is related to the change in xclim about the units for the thresholds. I saw a Todo saying remove backwards compatibility of int/float thresholds after v1.0 release and that's pretty much what I'm trying to do, except that pywps sends a stringified integer.

My question is mainly: should the user running the process on pywps include the units for the threshold field? Should finch check that the literalinput ends with degC and if not append it?

Here is the error I get when I send a string to the process: https://travis-ci.org/bird-house/finch/builds/526573759?utm_source=github_status&utm_medium=notification

huard commented 5 years ago

Yes. We reached the conclusion that having data in K and thresholds defaults in C would cause confusion unless units were explicit. If you want to maintain backward compatibility, you may assume temperature units for thresholds are in Celsius and append degC. With xclim 1.0, we'll require units to be explicitly provided by users.

davidcaron commented 5 years ago

Ok, I'll require users to include it, thanks. There is pretty much no backwards compatibility required at this point. Maybe we'll decide later that finch should assume some default units, but I don't think that should be the case.