You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here you see that the output of frequency_analysis is a discharge (var name q, units m³/s). However, the input variable has a generic name da and no prescribed dimensionality. This would mean that if you pass anything else then a discharge, the unit check will not fail, but the indicator will fail when attempting to convert the output units.
Indeed, the next example fails. But even weirder, is that we have a special CF check that looks for the "water_volume_transport_in_river_channel" standard name. Thus, we already are expecting a discharge.
Adding to this issue, I think a discharge variable should be added to VARIABLES if we want to add and support more and more discharge-related indicators (which I think is the case?).
As for the name, I'd argue that q is not good, since this is already used for "specific discharge" in hydrology, with units in m3 s-1 km-2. Q is used for discharge in m3 s-1, but I don't think that we want a capital letter?
Setup Information
Description
xclim/xclim/indicators/land/_streamflow.py
Lines 69 to 78 in 1505aac
Here you see that the output of
frequency_analysis
is a discharge (var nameq
, units m³/s). However, the input variable has a generic nameda
and no prescribed dimensionality. This would mean that if you pass anything else then a discharge, the unit check will not fail, but the indicator will fail when attempting to convert the output units.Indeed, the next example fails. But even weirder, is that we have a special CF check that looks for the "water_volume_transport_in_river_channel" standard name. Thus, we already are expecting a discharge.
Steps To Reproduce
warns:
and fails:
The expect error would be:
Additional context
@RondeauG
Contribution
Code of Conduct
The text was updated successfully, but these errors were encountered: