Skip to content

Conversation

@infotroph
Copy link
Member

@infotroph infotroph commented Oct 21, 2025

Description

This is a condensed implementation of the core ideas from #3324:

  • If site settings already contain lat and lon, use those and do not attempt to look site location up from the db
  • For met.process only, allow site id to be missing. If so, create an ID by pasting lat & lon together
  • Always treat site id as character not numeric, but continue condensing Bety IDs (1000000772 => 1-772) as before

@Sweetdevil144 please review -- if you agree this is a sufficient replacement, merging this will close #3324.

Motivation and Context

We learned a lot about DB-free runs since starting work on #3324. It's now clear that for most cases we want to require the user to provide site IDs rather than generate them ourselves, meaning much of the complexity proposed in the existing PR is unneeded. Rather than try to unwind all the changes there, I've cherry-picked out the core commits here and updated the format of the latlon-based IDs for reduced ambiguity.

Review Time Estimate

  • Immediately
  • Within one week
  • When possible

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • My name is in the list of CITATION.cff
  • I agree that PEcAn Project may distribute my contribution under any or all of
    • the same license as the existing code,
    • and/or the BSD 3-clause license.
  • I have updated the CHANGELOG.md.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Sweetdevil144 and others added 3 commits October 20, 2025 22:09
Signed-off-by: Abhinav Pandey <abhinav.pandey.met22@itbhu.ac.in>
Signed-off-by: Abhinav Pandey <abhinav.pandey.met22@itbhu.ac.in>
Copy link
Contributor

@Sweetdevil144 Sweetdevil144 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@infotroph infotroph enabled auto-merge October 22, 2025 05:58
@infotroph infotroph disabled auto-merge October 22, 2025 05:59
@infotroph infotroph merged commit 4ac0f84 into PecanProject:develop Oct 22, 2025
19 of 26 checks passed
@infotroph infotroph deleted the siteID-refactor-rebase branch October 22, 2025 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants