Skip to content

Fix GSI B matrix templates to use analysis resolution instead of guess resolution#2044

Merged
RussTreadon-NOAA merged 6 commits intodevelopfrom
copilot/update-gsi-b-matrix-resolution
Jan 29, 2026
Merged

Fix GSI B matrix templates to use analysis resolution instead of guess resolution#2044
RussTreadon-NOAA merged 6 commits intodevelopfrom
copilot/update-gsi-b-matrix-resolution

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

Fix GSI B matrix YAML templates to use _anl resolution instead of _ges resolution

  • Update atmosphere_background_error_static_gsibec.yaml.j2 to use atmosphere_npx_anl and atmosphere_npy_anl
  • Update atmosphere_background_error_hybrid_gsibec_bump.yaml.j2 to use atmosphere_npx_anl and atmosphere_npy_anl
  • Update GSI B matrix formulas to use correct linear Gaussian grid dimensions
  • Replace CASE_GSIBEC with CASE_ANL in atm_det_stage_berror_gsibec.yaml.j2
  • Replace atms_n20 with radiance_atms_n20 in atm_obs_list.yaml.j2
  • Validate templates render correctly with JCB integration tests
  • Request code review and security scan (passed)

Summary:
Successfully updated GSI B matrix YAML template files with corrected mathematical formulas:

  • lats = ((atmosphere_npy_anl - 1) * 2) + 2 (accounts for both poles)
  • lons = (atmosphere_npx_anl - 1) * 4 (wraps around 360° circumference)

All validation tests passed successfully.

Original prompt

This section details on the original issue you should resolve

<issue_title>GSI B matrix YAML templates should use _anl resolution not _ges resolution</issue_title>
<issue_description>

lats: {{ atmosphere_npy_ges + 1 }}
{% set atmosphere_lons = (atmosphere_npx_ges - 1) * 2 %}
lons: {{ atmosphere_lons }}

and
lats: {{ atmosphere_npy_ges + 1 }}
{% set atmosphere_lons = (atmosphere_npx_ges - 1) * 2 %}
lons: {{ atmosphere_lons }}

The above need changed from, for example, atmosphere_npx_ges to atmosphere_npx_anl (and for npy too)</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: CoryMartin-NOAA <6354668+CoryMartin-NOAA@users.noreply.github.com>
Copilot AI changed the title [WIP] Update GSI B matrix YAML templates to use _anl resolution Fix GSI B matrix templates to use analysis resolution instead of guess resolution Jan 22, 2026
Copilot AI requested a review from CoryMartin-NOAA January 22, 2026 17:05
@CoryMartin-NOAA CoryMartin-NOAA added hera-RT Queue for automated testing on Hera hera-GW-RT Queue for automated testing with global-workflow on Hera labels Jan 22, 2026
@CoryMartin-NOAA CoryMartin-NOAA marked this pull request as ready for review January 22, 2026 17:08
DavidNew-NOAA
DavidNew-NOAA previously approved these changes Jan 22, 2026
@emcbot emcbot added hera-RT-Running Automated testing running on Hera hera-GW-RT-Running Automated testing with global-workflow running on Hera and removed hera-RT Queue for automated testing on Hera hera-GW-RT Queue for automated testing with global-workflow on Hera labels Jan 22, 2026
@RussTreadon-NOAA RussTreadon-NOAA added hera-GW-RT Queue for automated testing with global-workflow on Hera orion-GW-RT Queue for automated testing with global-workflow on Orion hercules-GW-RT Queue for automated testing with global-workflow on Hercules ursa-GW-RT gaeac6-GW-RT and removed hera-GW-RT-Running Automated testing with global-workflow running on Hera hera-RT-Running Automated testing running on Hera labels Jan 27, 2026
@emcbot emcbot added hercules-GW-RT-Running Automated testing with global-workflow running on Hercules and removed hercules-GW-RT Queue for automated testing with global-workflow on Hercules labels Jan 27, 2026
- Replace CASE_GSIBEC with CASE_ANL in atm_det_stage_berror_gsibec.yaml.j2
- Replace atms_n20 with radiance_atms_n20 in atm_obs_list.yaml.j2
- Update lats formula to ((atmosphere_npy_anl - 1) * 2) + 2 in both templates
- Update lons formula to (atmosphere_npx_anl - 1) * 4 in both templates

These changes implement the corrected mathematical formulas for linear Gaussian
grid dimensions as identified by @RussTreadon-NOAA.

Co-authored-by: CoryMartin-NOAA <6354668+CoryMartin-NOAA@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 28, 2026

@copilot can you make the changes @RussTreadon-NOAA suggested above, which are repeated here:
The following changes were made in NOAA-EMC/GDASApp

...

Done! All requested changes have been implemented in commit bae4ebc:

  1. ✓ Replaced CASE_GSIBEC with CASE_ANL in atm_det_stage_berror_gsibec.yaml.j2
  2. ✓ Replaced atms_n20 with radiance_atms_n20 in atm_obs_list.yaml.j2
  3. ✓ Updated formulas in both background error templates:
    • lats = ((atmosphere_npy_anl - 1) * 2) + 2
    • lons = (atmosphere_npx_anl - 1) * 4

All JCB integration tests pass successfully with the new formulas.

Copy link
Contributor

@RussTreadon-NOAA RussTreadon-NOAA left a comment

Choose a reason for hiding this comment

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

These are the changes I have in my working copy of copilot/update-gsi-b-matrix-resolution

Approve.

We should hold off on merging these changes into GDASApp develop until the g-w issues for GSIBEC directory reshuffle and g-w branch are created.

@CoryMartin-NOAA CoryMartin-NOAA added DO NOT MERGE PR is not ready to be merged yet and removed hera-GW-RT-Failed Automated testing with global-workflow failed on Hera orion-GW-RT-Failed Automated testing with global-workflow failed on Orion hercules-GW-RT-Failed Automated testing with global-workflow failed on Hera ursa-GW-RT-Failed gaeac6-GW-RT-Failed labels Jan 28, 2026
@RussTreadon-NOAA
Copy link
Contributor

The GSIBEC files in g-w issue #4484 replace the .nc4 suffix with .nc. The following files in GDASApp need to replace gsi-coeffs-gfs-global.nc4 with gsi-coeffs-gfs-global.nc in order to work with g-w issue #4484:

parm/atm/atm_det_stage_berror_gsibec.yaml.j2
parm/jcb-gdas/model/atmosphere/atmosphere_background_error_hybrid_gsibec_bump.yaml.j2
parm/jcb-gdas/model/atmosphere/atmosphere_background_error_static_gsibec.yaml.j2

@RussTreadon-NOAA
Copy link
Contributor

RussTreadon-NOAA commented Jan 29, 2026

20260129 update

Updated GSIBEC files have been staged on WCOSS2 and g-w supported machines. Seee g-w issue #4484 for details.

g-w PR #4488 remains in draft mode because it requires the GDASApp updates in this PR.

Will manually install g-w PR #4488 along with this PR on WCOSS2 and various machines, run GDASApp CI, and report results in this PR. Assuming successful runs on various machines, this PR can be merged into develop. Once this is done, the sorc/gdas.cd hash in g-w PR #4488 can be updated and g-w CI run.

@RussTreadon-NOAA
Copy link
Contributor

MSU ctests

Multiple g-w CI cases stage data in /work/noaa/global/glopara/data/ICSDIR. As per MSU sysadmin messages the work/ fileset is offline while the storage vendor troubleshoots problems. Thus, GDASApp ctests which run g-w CI will fail on MSU (Hercules and Orion) until /work is returned to service.

@RussTreadon-NOAA
Copy link
Contributor

GDASApp CI

Install copilot/update-gsi-b-matrix-resolution at ecb65c6 inside g-w RussTreadon-NOAA:feature/update_gsibec at 4f4d1c7 on Dogwood, Hera, and Gaea C6. Run GDASApp CI including select g-w CI with the following results:

Dogwood

Test project /lfs/h2/emc/da/noscrub/russ.treadon/git/global-workflow/pr4488/sorc/gdas.cd/build
        Start 221: test_gdasapp_C96C48_ufsgsi_hybatmDA
        Start 179: test_gdasapp_C96C48_hybatmDA
        Start 198: test_gdasapp_C96C48_ufs_hybatmDA
        Start 243: test_gdasapp_C96_gcafs_cycled
        Start 259: test_gdasapp_C96C48_hybatmsnowDA
        Start 280: test_gdasapp_C48mx500_3DVarAOWCDA
        Start 291: test_gdasapp_C48mx500_hybAOWCDA
        Start 306: test_gdasapp_setup_atm_jjob_cycled_exp
        Start 175: test_gdasapp_check_python_norms
        Start 176: test_gdasapp_check_yaml_keys
        Start 177: test_gdasapp_jcb_installation
        Start 178: test_gdasapp_snow_create_ens
  1/144 Test #176: test_gdasapp_check_yaml_keys .............................................   Passed    1.36 sec
        Start 305: test_gdasapp_convert_gsi_satbias
  2/144 Test #177: test_gdasapp_jcb_installation ............................................   Passed    2.24 sec
...
143/144 Test #197: test_gdasapp_C96C48_hybatmDA_enkfgdas_fcst_202112210000 ..................   Passed  278.22 sec
144/144 Test #272: test_gdasapp_C96C48_hybatmsnowDA_gdas_fcst_202112201800 ..................   Passed  470.51 sec

100% tests passed, 0 tests failed out of 144

Label Time Summary:
gdasapp    = 24526.16 sec*proc (138 tests)
script     = 24526.16 sec*proc (138 tests)

Total Test time (real) = 2550.71 sec

Gaea C6

Test project /gpfs/f6/ira-sti/scratch/Russ.Treadon/git/global-workflow/pr4488/sorc/gdas.cd/build
        Start 271: test_gdasapp_C96C48_ufsgsi_hybatmDA
        Start 229: test_gdasapp_C96C48_hybatmDA
        Start 248: test_gdasapp_C96C48_ufs_hybatmDA
        Start 293: test_gdasapp_C96_gcafs_cycled
        Start 309: test_gdasapp_C96C48_hybatmsnowDA
        Start 330: test_gdasapp_C48mx500_3DVarAOWCDA
        Start 341: test_gdasapp_C48mx500_hybAOWCDA
        Start 356: test_gdasapp_setup_atm_jjob_cycled_exp
        Start 225: test_gdasapp_check_python_norms
        Start 226: test_gdasapp_check_yaml_keys
        Start 227: test_gdasapp_jcb_installation
        Start 228: test_gdasapp_snow_create_ens
  1/144 Test #226: test_gdasapp_check_yaml_keys .............................................   Passed    0.19 sec
        Start 355: test_gdasapp_convert_gsi_satbias
  2/144 Test #356: test_gdasapp_setup_atm_jjob_cycled_exp ...................................   Passed    0.60 sec
...
143/144 Test #247: test_gdasapp_C96C48_hybatmDA_enkfgdas_fcst_202112210000 ..................   Passed  181.39 sec
144/144 Test #329: test_gdasapp_C96C48_hybatmsnowDA_enkfgdas_fcst_202112201800 ..............   Passed  326.81 sec

100% tests passed, 0 tests failed out of 144

Label Time Summary:
gdasapp    = 19729.58 sec*proc (138 tests)
script     = 19729.58 sec*proc (138 tests)

Total Test time (real) = 2218.56 sec

Hera

Test project /scratch3/NCEPDEV/da/Russ.Treadon/git/global-workflow/pr4488/sorc/gdas.cd/build
        Start 221: test_gdasapp_C96C48_ufsgsi_hybatmDA
        Start 179: test_gdasapp_C96C48_hybatmDA
        Start 198: test_gdasapp_C96C48_ufs_hybatmDA
        Start 243: test_gdasapp_C96_gcafs_cycled
        Start 259: test_gdasapp_C96C48_hybatmsnowDA
        Start 280: test_gdasapp_C48mx500_3DVarAOWCDA
        Start 291: test_gdasapp_C48mx500_hybAOWCDA
        Start 306: test_gdasapp_setup_atm_jjob_cycled_exp
        Start 175: test_gdasapp_check_python_norms
        Start 176: test_gdasapp_check_yaml_keys
        Start 177: test_gdasapp_jcb_installation
        Start 178: test_gdasapp_snow_create_ens
  1/144 Test #176: test_gdasapp_check_yaml_keys .............................................   Passed    0.13 sec
        Start 305: test_gdasapp_convert_gsi_satbias
  2/144 Test #177: test_gdasapp_jcb_installation ............................................   Passed    1.12 sec
...
143/144 Test #197: test_gdasapp_C96C48_hybatmDA_enkfgdas_fcst_202112210000 ..................   Passed  279.97 sec
144/144 Test #191: test_gdasapp_C96C48_hybatmDA_gdas_fcst_202112210000 ......................   Passed  474.48 sec

100% tests passed, 0 tests failed out of 144

Label Time Summary:
gdasapp    = 28714.98 sec*proc (138 tests)
script     = 28714.98 sec*proc (138 tests)

Total Test time (real) = 3167.51 sec

All tests Passed on each machine.

@RussTreadon-NOAA RussTreadon-NOAA self-requested a review January 29, 2026 16:34
Copy link
Contributor

@RussTreadon-NOAA RussTreadon-NOAA left a comment

Choose a reason for hiding this comment

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

GDASapp ctests with select g-w CI included Passed on Dogwood, Gaea C6, and Hera.

g-w PR #4488 has been opened in draft mode to work with the changes in this PR. Once this GDASApp PR is merged into develop, the sorc/gdas.cd hash in #4488 will be updated and g-w CI will commence for the g-w PR.

Approve.

@RussTreadon-NOAA
Copy link
Contributor

@CoryMartin-NOAA and @DavidNew-NOAA : I'm ready to merge this PR into develop if this works for you.

Copy link
Collaborator

@DavidNew-NOAA DavidNew-NOAA left a comment

Choose a reason for hiding this comment

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

@RussTreadon-NOAA
Copy link
Contributor

Thank you @DavidNew-NOAA . Merging now.

@RussTreadon-NOAA RussTreadon-NOAA merged commit 8fa33c8 into develop Jan 29, 2026
6 of 8 checks passed
@RussTreadon-NOAA RussTreadon-NOAA deleted the copilot/update-gsi-b-matrix-resolution branch January 29, 2026 17:14
@RussTreadon-NOAA RussTreadon-NOAA removed the DO NOT MERGE PR is not ready to be merged yet label Jan 29, 2026
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.

GSI B matrix YAML templates should use _anl resolution not _ges resolution

5 participants