Skip to content

Improve ODB2 format support#2115

Draft
Scott Wales (ScottWales) wants to merge 12 commits into
MetOffice:mainfrom
ScottWales:update_bom_odb
Draft

Improve ODB2 format support#2115
Scott Wales (ScottWales) wants to merge 12 commits into
MetOffice:mainfrom
ScottWales:update_bom_odb

Conversation

@ScottWales
Copy link
Copy Markdown
Contributor

@ScottWales Scott Wales (ScottWales) commented May 12, 2026

Refactor ODB2 support

Fixes #2102

  • metplus_prep_obs opt file odb2 will read ODB2 files from an arbitrary directory set using $CUSTOM_ODB_PATTERN. This pattern can use strftime placeholders and wildcard globs, and will automatically decompress the files if it detects a matching extension.
  • Class PrepODB2 is an interface for sites to fill in their own ODB2 directory patterns, see the example for BOM data at NCI in odb2/bom.py. BOM data on internal systems will use this interface as well in a restricted repo.
  • Add support for more ODB2 observation types
  • Correct the levels of surface data, now at Z0 instead of P0, so they get picked up by verpy correctly

At NCI-Gadi site observations can now be sourced from either a BOM operational system with

METPLUS_OBS_SYSTEM = "access_g4"

or from ODB2 files on disk with

METPLUS_OBS_SYSTEM = "custom"
CUSTOM_ODB_PATTERN = "/path/%Y/%m/%Y%m%dT%H%MZ/*.odb.gz"

Contribution checklist

Aim to have all relevant checks ticked off before merging. See the developer's guide for more detail.

  • Documentation has been updated to reflect change.
  • New code has tests, and affected old tests have been updated.
  • All tests and CI checks pass.
  • Ensured the pull request title is descriptive.
  • Ensure rose-suite.conf.example has been updated if new diagnostic added.
  • Conda lock files have been updated if dependencies have changed.
  • Attributed any Generative AI, such as GitHub Copilot, used in this PR.
  • Marked the PR as ready to review.

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.

Expand observation support at NCI

1 participant