Skip to content

checkCalendarYears(): shared check for model-year run times - #32

Closed
eliotmcintire wants to merge 1 commit into
developmentfrom
defaults-safe
Closed

eliotmcintire wants to merge 1 commit into
developmentfrom
defaults-safe

Conversation

@eliotmcintire

Copy link
Copy Markdown
Collaborator

Modules that use climate data by calendar year, canClimateData and climateYear, each carried a copy of the same check for runs whose times are model years such as 0 to 10. This moves the check here so both call one function.

Affects: New exported checkCalendarYears(); no change to existing functions or results.

Technical details

checkCalendarYears(start, end, module, hint, years) stops when start is outside the span of available() (1901 to 2100), or outside range(years) when a caller passes the years it will load. The run may end after the last year. Tests in tests/testthat/test-checkCalendarYears.R. Suite without test-prepClimateLayers.R (needs Google Drive credentials): 62 pass, 0 fail on this branch (51 on development, which lacks the new file); checkDocFiles and codoc are clean.

🤖 Generated with Claude Code

…imate years

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eliotmcintire eliotmcintire added enhancement New feature or request backwards compatible Existing code and results keep working unchanged labels Oct 15, 2026
eliotmcintire added a commit that referenced this pull request Oct 15, 2026
checkCalendarYears(): shared check for model-year run times

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
@eliotmcintire

Copy link
Copy Markdown
Collaborator Author

Closing: this change is carried on modsForFireSense and offered upstream together with our other FireSense fixes in #33. That PR lists it; the discussion here stays for reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backwards compatible Existing code and results keep working unchanged enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant