Repository navigation
Stop early when run times are not calendar years - #22
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 15, 2026
Stop early when run times are not calendar years Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
Collaborator
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.
The climate data are by calendar year, but a project set up without
timesruns in model years 0 to 10, and the module only failed later in an obscure way. It now stops at the start, only when the run's start is outside the climate years it was asked for, and says what to set.Affects: A run whose start is outside
historicalClimateYearsandprojectedClimateYears(1991 to 2100 by default) now stops at init with an explanatory message; runs inside them are unchanged.Technical details
Depends-on: PredictiveEcology/climateData#32
Init()(canClimateData.R) never looked atstart(sim), so model-year times went straight into climate preparation.Init()now callsclimateData::checkCalendarYears()(replacing the copy in this module). When this module buildsclimateVariablesfrom its parameters, the span isrange(c(historicalClimateYears, projectedClimateYears)), so a start of 1950 stops with the years named and the parameters to change. WhenclimateVariablesis supplied, its years cannot be read here, so the check keeps the 1901 to 2100 span and the message says to settimesto calendar years.endis never limited. ThereqdPkgsfloor is climateData 2.2.3.9009, today's development version; it must be raised to the version after climateData#32 merges. Tests (test-calendarYears.R) fail on development and pass here. Suite via convertToPackage + test_local: development 12 pass; branch 14 pass, 0 failures.🤖 Generated with Claude Code