Skip to content

Conversation

AntonMFernando-NOAA
Copy link
Contributor

@AntonMFernando-NOAA AntonMFernando-NOAA commented Aug 27, 2025

Description

  • Move Jinja logic, com, and cycle vars in stage_ic YAML into Python; simplify YAML to component includes and switches only.
  • This PR:
  1. Implements per‑member COM path computation for gfs, gefs_offline, gefs_rt, gcafs, and enkfgdas cases
  2. Move logic, member com paths and general variables to stage_ic.py

Resolves #3946

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 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 (If YES, please add a link to any PRs that are pending.)
    • EMC verif-global
    • GDAS
    • GFS-utils
    • GSI
    • GSI-monitor
    • GSI-utils
    • UFS-utils
    • UFS-weather-model
    • wxflow

How has this been tested?

  • Test cases on WCOSS2 that get affected by these changes

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

AntonMFernando-NOAA and others added 30 commits August 19, 2025 19:22
{% endif %}

{% if ENSMEM == 0 %}
{% if memdir == 0 %}
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is needed.

# assign rRUN to RUN
case_vars.rRUN = case_vars.RUN
# case specific rRUN
if case_vars.RUN in ['gfs', 'gcdas', 'enkfgdas']:
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't stage_ic also run on RUN=gdas?

Copy link
Contributor

@DavidHuber-NOAA DavidHuber-NOAA left a comment

Choose a reason for hiding this comment

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

I like this overall design a lot better than the Jinja-based logic.

if cycle_vars.previous_cycle:
cycle_vars.previous_cycle_YMD = cycle_vars.previous_cycle.strftime("%Y%m%d")
cycle_vars.previous_cycle_HH = cycle_vars.previous_cycle.strftime("%H")
cycle_vars.m_index = cycle_vars.current_cycle.hour // 6
Copy link
Contributor

Choose a reason for hiding this comment

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

Should 6 be replaced by assim_freq?

{% set imem = mem - first_mem %}
{% set COMOUT_ATMOS_ANALYSIS_MEM = COMOUT_ATMOS_ANALYSIS_MEM_list[imem] %}
{% if DO_JEDIATMVAR %}
{% for itile in range(6) %}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should probably be replaced by num_tiles.

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.

[Enabler] Refactor Stage IC Master YAMLs: Shift logic and shared variables to Python scripts

2 participants