pysteps icon indicating copy to clipboard operation
pysteps copied to clipboard

Fix: make sure that precip_models variable has the correct length

Open RubenImhoff opened this issue 1 year ago • 1 comments

Fix to ensure that the _check_inputs function in /blending/steps.py looks for the correct precip_models length when a list of timesteps instead of an integer is provided.

RubenImhoff avatar Jul 03 '24 13:07 RubenImhoff

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 83.82%. Comparing base (3121cbf) to head (64c8250). Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #368      +/-   ##
==========================================
+ Coverage   83.50%   83.82%   +0.31%     
==========================================
  Files         159      160       +1     
  Lines       12564    12788     +224     
==========================================
+ Hits        10492    10719     +227     
+ Misses       2072     2069       -3     
Flag Coverage Δ
unit_tests 83.82% <100.00%> (+0.31%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jul 03 '24 13:07 codecov[bot]

Thanks! I haven't used custom timesteps so far, so just to check -I thought it was allowed to have non-integer timesteps if you specify custom ones, so what happens in that case? (maybe requires a ceil?)

ladc avatar Jul 09 '24 21:07 ladc

That is a good point, @ladc! I have not tested that (yet), but I can imagine that a ceil would solve that potential issue. Should we make sure that the number gets rounded up in that case to ensure that the non-integer timestep always falls within the total forecast length?

RubenImhoff avatar Jul 11 '24 07:07 RubenImhoff

should this be added to the hackathon?

dnerini avatar Jul 18 '24 09:07 dnerini