Skip to content

Simplify JEDI shared bias input staging - #1

Draft
ADCollard with Copilot wants to merge 2 commits into
developfrom
copilot/remove-redundant-bias-files-dict
Draft

ADCollard with Copilot wants to merge 2 commits into
developfrom
copilot/remove-redundant-bias-files-dict

Conversation

Copilot AI commented Sep 9, 2026 •

Copy link
Copy Markdown

Description

Bias input staging in ush/python/pygfs/jedi/jedi.py was still routing through bias_files_dict even though every supported observation resolved to the same archive, varbc_params.tar. This change makes the shared-archive behavior explicit in stage_obsbiasin() and leaves save_obsbiasout() unchanged.

  • Bias input staging

    • Stage a single shared archive, varbc_params.tar, when observations is non-empty.
    • Stop using per-observation bias_files_dict lookups in this module.
    • Preserve current skip behavior when the archive is missing by warning and continuing.
  • Behavior preserved

    • Duplicate observations no longer affect staging; the shared archive is copied and extracted once.
    • Bias output archival still tars whatever bias files already exist.
  • Regression coverage

    • Add focused unit coverage for:
      • staging the shared archive once with duplicate observations
      • warning and skipping cleanly when the shared archive is absent
bias_tarball = self.jcb_config[f'{self.component}_obsbiasin_prefix'] + 'varbc_params.tar'
if self.jcb_config['observations']:
    bias_src = os.path.join(comin, bias_tarball)

Type of change

  • Bug fix (fixes something broken)
  • New feature (adds functionality)
  • Maintenance (code refactor, clean-up, new CI test, etc.)

Change characteristics

  • Is this change expected to change outputs (e.g. value changes to existing outputs, new files stored in COM, files removed from COM, filename changes, additions/subtractions to archives)? NO
    • GFS
    • GEFS
    • SFS
    • GCAFS
  • Is this a breaking change (a change in existing functionality)? NO
  • Does this change require a documentation update? NO
  • Does this change require an update to any of the following submodules? NO
    • EMC verif-global
    • GDAS
    • GFS-utils
    • GSI
    • GSI-monitor
    • GSI-utils
    • UFS-utils
    • UFS-weather-model
    • wxflow

How has this been tested?

  • Added targeted unit coverage in dev/ci/scripts/unittests/test_jedi_bias_staging.py for shared-archive staging, duplicate observations, and missing-archive warnings.

Checklist

  • Any dependent changes have been merged and published
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have documented my code, including function, input, and output descriptions
  • My changes generate no new warnings
  • New and existing tests pass with my changes
  • This change is covered by an existing CI test or a new one has been added
  • Any new scripts have been added to the .github/CODEOWNERS file with owners
  • I have made corresponding changes to the system documentation if necessary

Co-authored-by: ADCollard <40322596+ADCollard@users.noreply.github.com>
Copilot AI changed the title [WIP] Simplify bias staging logic by removing bias_files_dict usage Simplify JEDI shared bias input staging Sep 9, 2026
Copilot AI requested a review from ADCollard September 9, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants