Repository navigation
Stop early when run times are not calendar years - #8
Closed
eliotmcintire wants to merge 2 commits into
Closed
eliotmcintire wants to merge 2 commits into
eliotmcintire wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
eliotmcintire
added a commit
that referenced
this pull request
Oct 16, 2026
Conflicts resolved by hand: reqdPkgs: union (sf + climateData floor); init keeps md5 line and calendar-year check. NEWS: both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
Contributor
Author
|
Closing: this change is carried on |
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.
When a project is set up without
times, the run is in model years 0 to 10 and this module quietly drew random climate years instead of matching the simulation years. It now stops at the start and says what to set. Separately, a multi-year run with no rasters supplied no longer errors in.inputObjects.Affects: With supplied climate rasters and no
samplingRange, a run whose start is not a year from 1901 to 2100 now stops at init; a run withsamplingRangeor calendar-year times is unchanged. Multi-year runs without supplied rasters now start.Technical details
Depends-on: PredictiveEcology/climateData#32
sampleYear()(climateYear.R) falls back tosample(Range, 1)whenever the simulation year is not in the available years, so model-year times never matched and the draw was silent.Init()now callsclimateData::checkCalendarYears()(replacing the copy in this module) when the user supplied climate rasters andsamplingRangeis unset; the message says to settimesorsamplingRange. The placeholder in.inputObjectsusedterra::rast(nlyrs = start(sim):end(sim)), which errors ("the condition has length > 1") for any run longer than one year;nlyrsis nowlength(Range).reqdPkgsgains climateData with floor 2.2.3.9009, today's development version; raise it after climateData#32 merges. Tests (test-calendarYears.R, including a multi-year run with no rasters) fail on development and pass here. Suite via convertToPackage + test_local: development 5 pass; branch 10 pass, 0 failures.🤖 Generated with Claude Code