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
refactor(align.met tests): apply reviewer feedback from infotroph
- Remove skip_if_not_installed() guards: ncdf4, withr, and lubridate are
required dependencies for this test; missing them should cause a hard
failure, not a silent skip.
- Simplify the verbose bug-context comment to a one-liner focused on the
deliberate choice of stamps.hr[1] == 0.5.
- Replace seed = 42 with seed = 20260602 in both tests.
- Remove custom label = "..." arguments from expect_equal() calls; labels
are documented as "for expert use only" and were redundant here.
- Shorten the single-series test by removing the implementation detail
comment about which code path is exercised.
- Update NEWS.md entry to the concise format suggested by infotroph.
Copy file name to clipboardExpand all lines: modules/data.atmosphere/NEWS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Fixed
4
4
5
-
*`align.met()`: fixed a silent data-corruption bug in the ensemble-source code path. When the source data was at a coarser time step than the training data (`align == "repeat"`), `rep(dat.tem, each = stamps.hr)` passed the full `stamps.hr` vector as the `each` argument. R silently uses only the first element in that case, producing the wrong replication count (half the training hour-step rather than the number of output sub-steps per source step). The fix matches the equivalent single-time-series path: `each = length(stamps.hr)`.
5
+
*`align.met()` now correctly calculates output timesteps in cases where the source data is at a coarser time step than the training data and `align == "repeat"` (#4012, @anshul23102).
0 commit comments