Skip to content

Feature/gdas phase1 mhs metop c configure#2116

Open
jianjunj wants to merge 16 commits intodevelopfrom
feature/gdas_phase1_MHS_Metop-C_configure
Open

Feature/gdas phase1 mhs metop c configure#2116
jianjunj wants to merge 16 commits intodevelopfrom
feature/gdas_phase1_MHS_Metop-C_configure

Conversation

@jianjunj
Copy link
Copy Markdown
Contributor

@jianjunj jianjunj commented Apr 8, 2026

Description

Adds UFO/JCB YAML configurations for MHS on Metop-B, Metop-C, and NOAA-19, reproducing GSI clear-sky observational errors and QC. Obs error counts and data passing QC are verified to match GSI output (tested at 00z, Feb 19, 2024).

Fix (this commit): Step H1 computed inflationFactor1 = inflationFactor0**(-0.5) with tpwc_index maxvalue: 1.0. At tpwc_index == 1.0, inflationFactor0 = 1 - 1² = 0, causing a division-by-zero before Step H2 could overwrite. Changed the H1 where bound to maxvalue: 0.9999999 (exclusive) so tpwc_index == 1.0 is handled solely by Step H2 (inflationFactor1 = 1.0). Applied to all three MHS templates.

# Before (division-by-zero at tpwc_index == 1.0)
  where:
  - variable:
      name: DerivedMetaData/tpwc_index
    maxvalue: 1.0

# After (exclusive upper bound; tpwc_index == 1.0 falls through to Step H2)
  where:
  - variable:
      name: DerivedMetaData/tpwc_index
    maxvalue: 0.9999999

Companion PRs

Issues

Automated CI tests to run in Global Workflow

  • atm_jjob
  • C96C48_ufs_hybatmDA
  • C96C48_hybatmsnowDA
  • C96_gcafs_cycled
  • C48mx500_3DVarAOWCDA
  • C48mx500_hybAOWCDA
  • C96C48_ufsgsi_hybatmDA
  • C48_ufsenkf_atmDA
  • C96C48_hybatmDA

@jianjunj jianjunj requested a review from Copilot April 8, 2026 20:50
@jianjunj jianjunj self-assigned this Apr 8, 2026
@jianjunj jianjunj requested a review from ADCollard April 8, 2026 20:51
@jianjunj
Copy link
Copy Markdown
Contributor Author

jianjunj commented Apr 8, 2026

MHS_Metop-C
QCCount_Diff_Used_2024021900_radiance_mhs_metop-b
MHS_Meto-c
ObsErr_Difference_2024021900_radiance_mhs_metop-b

MHS_Meto-b.
QCCount_Diff_Used_2024021900_radiance_mhs_metop-c
MHS_Meto-b
ObsErr_Difference_2024021900_radiance_mhs_metop-c

MHS_N19 (channel 3 is passive in GSI)
QCCount_Diff_Used_2024021900_radiance_mhs_n19

MHS_N19(channel 3 is passive in GSI)
ObsErr_Difference_2024021900_radiance_mhs_n19

MHS observational errors and number of data passed QC in GSI are identical as those in UFO. Tested are done with GSI output at 00z, Feb 19, 2024.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the JCB-GDAS observation configuration catalog by adding clear-sky CRTM/UFO YAML templates and corresponding observation-chronicle metadata for MHS radiance instruments (Metop-B, Metop-C, and NOAA-19), aiming to reproduce GSI-like observation errors and QC behavior.

Changes:

  • Added new MHS radiance observation templates (radiance_mhs_metop-b, radiance_mhs_metop-c, radiance_mhs_n19) with detailed QC/error inflation logic.
  • Added/updated MHS observation-chronicle metadata files to provide channel configuration values used by the templates.
  • Updated the atmosphere obs list to include the new radiance types (currently commented out).

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
parm/jcb-gdas/observations/atmosphere/radiance_mhs_n19.yaml.j2 New clear-sky MHS(N19) CRTM/UFO obs config with QC + error modeling.
parm/jcb-gdas/observations/atmosphere/radiance_mhs_metop-c.yaml.j2 New clear-sky MHS(Metop-C) CRTM/UFO obs config with QC + error modeling.
parm/jcb-gdas/observations/atmosphere/radiance_mhs_metop-b.yaml.j2 New clear-sky MHS(Metop-B) CRTM/UFO obs config with QC + error modeling.
parm/jcb-gdas/observation_chronicle/atmosphere/radiance_mhs_n19.yaml New MHS(N19) channel metadata (sim/active/bias/error/etc.).
parm/jcb-gdas/observation_chronicle/atmosphere/radiance_mhs_n18.yaml New MHS(N18) channel metadata.
parm/jcb-gdas/observation_chronicle/atmosphere/radiance_mhs_metop-c.yaml New MHS(Metop-C) channel metadata.
parm/jcb-gdas/observation_chronicle/atmosphere/radiance_mhs_metop-b.yaml New MHS(Metop-B) channel metadata.
parm/jcb-gdas/observation_chronicle/atmosphere/radiance_mhs_metop-a.yaml New MHS(Metop-A) channel metadata.
parm/atm/atm_obs_list.yaml.j2 Lists the new radiance types (commented out).

Comment on lines +311 to +315
exponents: [-0.5]
where:
- variable:
name: DerivedMetaData/tpwc_index
maxvalue: 1.0
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

inflationFactor1 is computed as inflationFactor0**(-0.5) while the preceding step allows tpwc_index up to (and including) 1.0, which makes inflationFactor0 = 1 - tpwc_index^2 equal to 0 at exactly 1.0. That yields 0**(-0.5) (division by zero / inf) before the later assignment overwrites it. Consider making the tpwc_index upper bound exclusive for the inflationFactor0/1 computations (or clamp with a small epsilon) and align the Step H2 comment/threshold accordingly.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed in commit 07e63cc. Changed Step H1's where condition from maxvalue: 1.0 to maxvalue: 0.9999999 in all three MHS templates (metop-b, metop-c, n19). This makes the upper bound exclusive so that when tpwc_index == 1.0 exactly (where inflationFactor0 = 0), only Step H2 runs and assigns inflationFactor1 = 1.0, avoiding the 0**(-0.5) division-by-zero. Also updated the Step H2 comment to accurately read tpwc_index >= 1.0.

Comment on lines +311 to +315
exponents: [-0.5]
where:
- variable:
name: DerivedMetaData/tpwc_index
maxvalue: 1.0
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

inflationFactor1 is computed as inflationFactor0**(-0.5) while the preceding step allows tpwc_index up to (and including) 1.0, which makes inflationFactor0 = 1 - tpwc_index^2 equal to 0 at exactly 1.0. That yields 0**(-0.5) (division by zero / inf) before the later assignment overwrites it. Consider making the tpwc_index upper bound exclusive for the inflationFactor0/1 computations (or clamp with a small epsilon) and align the Step H2 comment/threshold accordingly.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

Comment on lines +311 to +315
exponents: [-0.5]
where:
- variable:
name: DerivedMetaData/tpwc_index
maxvalue: 1.0
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

inflationFactor1 is computed as inflationFactor0**(-0.5) while the preceding step allows tpwc_index up to (and including) 1.0, which makes inflationFactor0 = 1 - tpwc_index^2 equal to 0 at exactly 1.0. That yields 0**(-0.5) (division by zero / inf) before the later assignment overwrites it. Consider making the tpwc_index upper bound exclusive for the inflationFactor0/1 computations (or clamp with a small epsilon) and align the Step H2 comment/threshold accordingly.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

Comment on lines +430 to +434
- filter: BlackList
where:
- variable:
name: DerivedMetaData/tpwc_index
minvalue: 1.0
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

This BlackList filter rejects entire observations when tpwc_index >= 1.0, but the preceding comment describes only tossing channels 3–5 based on O–F > 2K. If the intent is to only reject specific channels (or only for tpwc_index > 1.0), add filter variables/action (and/or make the 1.0 bound exclusive) so the behavior matches the comment and avoids the current overlap with the subsequent tpwc_index maxvalue: 1.0 check.

Suggested change
- filter: BlackList
where:
- variable:
name: DerivedMetaData/tpwc_index
minvalue: 1.0
- filter: BlackList
filter variables:
- name: brightnessTemperature
channels: 3-5
where:
- variable:
name: DerivedMetaData/tpwc_index
minvalue: 1.0
action:
name: reject

Copilot uses AI. Check for mistakes.
Comment on lines +431 to +434
where:
- variable:
name: DerivedMetaData/tpwc_index
minvalue: 1.0
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

This BlackList filter rejects entire observations when tpwc_index >= 1.0, but the preceding comment describes only tossing channels 3–5 based on O–F > 2K. If the intent is to only reject specific channels (or only for tpwc_index > 1.0), add filter variables/action (and/or make the 1.0 bound exclusive) so the behavior matches the comment and avoids the current overlap with the subsequent tpwc_index maxvalue: 1.0 check.

Suggested change
where:
- variable:
name: DerivedMetaData/tpwc_index
minvalue: 1.0
filter variables:
- name: brightnessTemperature
channels: 3-5
action:
name: reject
where:
- variable:
name: DerivedMetaData/tpwc_index
minvalue: 1.000001

Copilot uses AI. Check for mistakes.
Comment on lines +429 to +443
# Step K2: Toss channel 3-5 data with O-F > 2K
- filter: BlackList
where:
- variable:
name: DerivedMetaData/tpwc_index
minvalue: 1.0
- filter: Background Check
filter variables:
- name: brightnessTemperature
channels: 3-5
absolute threshold: 2.0
where:
- variable:
name: DerivedMetaData/tpwc_index
maxvalue: 1.0
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

This BlackList filter rejects entire observations when tpwc_index >= 1.0, but the preceding comment describes only tossing channels 3–5 based on O–F > 2K. If the intent is to only reject specific channels (or only for tpwc_index > 1.0), add filter variables/action (and/or make the 1.0 bound exclusive) so the behavior matches the comment and avoids the current overlap with the subsequent tpwc_index maxvalue: 1.0 check.

Suggested change
# Step K2: Toss channel 3-5 data with O-F > 2K
- filter: BlackList
where:
- variable:
name: DerivedMetaData/tpwc_index
minvalue: 1.0
- filter: Background Check
filter variables:
- name: brightnessTemperature
channels: 3-5
absolute threshold: 2.0
where:
- variable:
name: DerivedMetaData/tpwc_index
maxvalue: 1.0
# Step K2: Toss channel 3-5 data with O-F > 2K
- filter: Background Check
filter variables:
- name: brightnessTemperature
channels: 3-5
absolute threshold: 2.0

Copilot uses AI. Check for mistakes.
…n MHS templates

Agent-Logs-Url: https://github.com/NOAA-EMC/GDASApp/sessions/499257a3-8036-47ab-8c43-8b7bc6e3dfab

Co-authored-by: jianjunj <183659102+jianjunj@users.noreply.github.com>
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.

3 participants