Repository navigation
Conversation
`_check_ti_length` lets a trailing partial year through (e.g. ERA5-Land's store, ~6 weeks behind real time), so run dates past the last published day reached the Ti slice and threw an opaque BoundsError. Check coverage right after loading -- before raster mode's resampling -- and report the last available date instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If a run's dates go past the last day a weather source has published,
solvenow fails with a message saying where the data ends, instead of aBoundsErrorfrom slicing the time axis._check_ti_lengthdeliberately lets a partly filled current year through. That's needed for near-real-time sources like SILO and for ECMWF's ERA5-Land store, which runs about six weeks behind real time. But run dates past the last published day then reached theTi(ti_start:ti_end)slice and threwBoundsError: attempt to access 1×5784 Matrix{Float64} at index [1:1, 3625:5832]. That error doesn't say the data simply isn't out yet. It came up running an ERA5-Land history up to 31 August 2026, when the store ended on the 29th.The new
_check_weather_coverscompares the loadedTilength with the run's last step. It runs right after weather loading at all three slicing sites: raster mode, points mode, and points mode via an area load. In raster mode it runs before the resample to the template, so the run fails before that expensive step. Daily sources report the last available date; monthly sources report how many steps they have.Testing:
test/weather_coverage.jl(5 tests) reproduces the ERA5-Land case, checks the passing cases, and checks the monthly message. The existingera5ecmwftests still pass.This is based on
Docs(#39), like #40, and is independent of #40.🤖 Generated with Claude Code