Repository navigation
fix(core): interpolate time-varying data layers forwards, past 24 h too (#232) - #235
Merged
Merged
Conversation
…oo (forefireAPI#232) A data layer with several time slices weighted them the wrong way round: just after slice k it returned slice k+1. It also ignored startTime in the weight, read one slice past the array at the last slice, and left dt at 0 when the timespan was 24 h or more, so multi-day layers returned NaN. Weight slices by their distance from t, measured from startTime, and hold the first or last slice outside the time axis. New "data layers" unit suite.
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.
Fixes #232. A
datalayer with several time slices (e.g. hourlywindU/windV) now returns the right value:kthe layer returned slicek+1. They also ignoredstartTime.dtstayed 0 when the timespan was 24 h or more, so the layer returned NaN. The 24 h limit is gone.East spread after 300 s from
repro_time_layer.pyin #232 (calm 87 m, constant 8 m/s 152 m):windUlayerdevTested: new
data layersunit suite (3 of its 4 cases fail ondev),ctest11/11, Python runner and ensemble tests pass.WeatherDataLayer.hhas the same code but nothing includes it, so I left it alone.Was the 24 h limit there on purpose?
Drafted with Claude Opus 5.5.