Skip to content

Add Changes Related to HAFS TDR SuperOb#1007

Merged
ShunLiu-NOAA merged 7 commits into
NOAA-EMC:developfrom
JingCheng-NOAA:feature/hafs_tdr
May 27, 2026
Merged

Add Changes Related to HAFS TDR SuperOb#1007
ShunLiu-NOAA merged 7 commits into
NOAA-EMC:developfrom
JingCheng-NOAA:feature/hafs_tdr

Conversation

@JingCheng-NOAA
Copy link
Copy Markdown
Contributor

Description
The upcoming HAFSv2.2 will assimilate super-obbed TDR observations. To support this, the existing along-the-beam thinning function will be bypassed if the input TDR BUFR data is already super-obbed. This PR introduces a new namelist option, l_tdr_thin_alongbeam, allowing users to explicityly toggle along-the-beam thinning on or off.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • [x ] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist

  • 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
  • New and existing tests pass with my changes
  • Any dependent changes have been merged and published

@JingCheng-NOAA
Copy link
Copy Markdown
Contributor Author

Regression Test performed on Hera:
1/6 Test #1: global_4denvar ................... Passed 1964.67 sec
2/6 Test #2: rtma ............................. Passed 1092.61 sec
3/6 Test #3: rrfs_3denvar_rdasens ............. Passed 670.17 sec
4/6 Test #4: hafs_4denvar_glbens .............. Passed 1155.10 sec
5/6 Test #5: hafs_3denvar_hybens .............. Passed 1156.24 sec
6/6 Test #6: global_enkf ...................... Passed 1159.08 sec

100% tests passed, 0 tests failed out of 6

Total Test time (real) = 7197.93 sec

@ShunLiu-NOAA
Copy link
Copy Markdown
Contributor

@JingCheng-NOAA could you start a ctest on WCOSS?

@JingCheng-NOAA
Copy link
Copy Markdown
Contributor Author

JingCheng-NOAA commented May 19, 2026

@JingCheng-NOAA could you start a ctest on WCOSS?

I tried many times on WCOSS2 but seems like I don't have right permission to all the files related to regression tests.
For all the 6 test cases, only hafs related ctest cases passed without issue.
This is what I found in one of the failed test cases (global_enkf) :

 running on           32  processors ...


* . * . * . * . * . * . * . * . * . * . * . * . * . * . * . * . * . * . * . * .
     PROGRAM ENKF_ANL HAS BEGUN. COMPILED 2011319.55     ORG: NP25
     STARTING DATE-TIME  MAY 19,2026  16:17:35.316  139  TUE   2461180


 number of satellite radiance files used          81
 number of satellite ozone files used          16
 error: vlocal_eig.dat does not exist
 ****STOP2****  ABORTING EXECUTION w/code=          19

@ShunLiu-NOAA
Copy link
Copy Markdown
Contributor

@yonghuiweng or @XuLu-NOAA could you help run a ctest on WCOSS2?

@RussTreadon-NOAA
Copy link
Copy Markdown
Contributor

WCOSS2 Ctests

Install JingCheng-NOAA:feature/hafs_tdr at e157e33 and develop at 55faa5e on Cactus. Run ctests with following results

Test project /lfs/h2/emc/da/noscrub/russ.treadon/git/gsi/pr1007/build
    Start 1: global_4denvar
    Start 2: rtma
    Start 3: rrfs_3denvar_rdasens
    Start 4: hafs_4denvar_glbens
    Start 5: hafs_3denvar_hybens
    Start 6: global_enkf
1/6 Test #3: rrfs_3denvar_rdasens .............   Passed  731.62 sec
2/6 Test #6: global_enkf ......................   Passed  860.05 sec
3/6 Test #2: rtma .............................   Passed  1155.54 sec
4/6 Test #5: hafs_3denvar_hybens ..............   Passed  1223.75 sec
5/6 Test #4: hafs_4denvar_glbens ..............   Passed  1343.08 sec
6/6 Test #1: global_4denvar ...................   Passed  1925.83 sec

100% tests passed, 0 tests failed out of 6

Total Test time (real) = 1926.16 sec

All tests Passed on Cactus.

Question: Do either of the HAFS tests exercise the code modified by this PR? We need confirmation that the changes in the PR function as intended.

Recommendation: Echo the contents of namelist obs_input to stdout. Currently only select elements of namelist obs_input are written to stdout. Variable l_tdr_thin_alongbeam is not written to stdout. The GSI log file (e.g., stdout) should capture the full GSI configuration. This both documents how the GSI was configured as well as provides useful information in case we need to debug a GSI run.

@XuLu-NOAA
Copy link
Copy Markdown
Contributor

Regression performed on WCOSS2:
/lfs/h2/emc/hur/noscrub/xu.lu/save/develop/build]$ ctest
Test project /lfs/h2/emc/hur/noscrub/xu.lu/save/develop/build
Start 1: global_4denvar
1/6 Test #1: global_4denvar ................... Passed 2109.08 sec
Start 2: rtma
2/6 Test #2: rtma ............................. Passed 1157.54 sec
Start 3: rrfs_3denvar_rdasens
3/6 Test #3: rrfs_3denvar_rdasens ............. Passed 915.69 sec
Start 4: hafs_4denvar_glbens
4/6 Test #4: hafs_4denvar_glbens .............. Passed 1465.61 sec
Start 5: hafs_3denvar_hybens
5/6 Test #5: hafs_3denvar_hybens .............. Passed 1225.12 sec
Start 6: global_enkf
6/6 Test #6: global_enkf ...................... Passed 865.98 sec

100% tests passed, 0 tests failed out of 6

Total Test time (real) = 7739.26 sec

Comment thread src/gsi/read_radar.f90 Outdated
@JingCheng-NOAA
Copy link
Copy Markdown
Contributor Author

Thank you Russ and Xu.
And to Russ, for now the regression test cases for HAFS does not contain this change. I can modify the regression test settings to reflect it. But it will also require the observation dataset update, because the input TDR data will be superobed.
This may require another PR to update the HAFS regression test.

Comment thread src/gsi/read_radar.f90 Outdated
Comment thread src/gsi/read_radar.f90 Outdated
Copy link
Copy Markdown
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.

Minor comments.

@ShunLiu-NOAA
Copy link
Copy Markdown
Contributor

@RussTreadon-NOAA and @XuLu-NOAA Thank you for completing ctest on WCOSS2.

Copy link
Copy Markdown

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 adds a configurable switch to control whether Tail Doppler Radar (TDR) radial-velocity observations are thinned along the radar beam, enabling users to bypass the existing hard-coded along-beam thinning when ingesting already super-obbed TDR BUFR input (as expected for HAFSv2.2).

Changes:

  • Introduces a new obs_input namelist option l_tdr_thin_alongbeam (default .true.) to toggle along-the-beam thinning.
  • Updates TDR processing in read_radar to conditionally apply the 3 km along-beam thinning logic based on l_tdr_thin_alongbeam.
  • Wires the new flag through obsmod and gsimod so it can be set via the existing namelist path.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/gsi/read_radar.f90 Applies conditional logic to bypass hard-coded along-beam thinning for TDR Vr when configured.
src/gsi/obsmod.F90 Adds the new public module logical and default initialization for l_tdr_thin_alongbeam.
src/gsi/gsimod.F90 Exposes l_tdr_thin_alongbeam via the obs_input namelist and updates inline namelist documentation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/gsi/read_radar.f90 Outdated
Comment on lines +2803 to +2822
if(l_tdr_thin_alongbeam) then
! Select data every 3 km along each beam
if(MOD(INT(tdr_obs(1,k)-tdr_obs(1,1)),3000) < 100)then
if(tdr_obs(3,k) >= 800.) then
nmissing=nmissing+1 !xx
else
ii=ii+1
dopbin(ii)=tdr_obs(3,k)
thisrange=tdr_obs(1,k)

call getvrlocalinfo(thisrange,thisazimuth,this_stahgt,aactual,a43,selev0,celev0, &
rlon0,clat0,slat0,r8,r89_5,nsubzero,ii,z(ii),elev(ii),elat8(ii), &
elon8(ii),glob_azimuth8(ii))
end if
else
ntdrvr_thin1=ntdrvr_thin1+1
endif
else
if(tdr_obs(3,k) >= 800.) nmissing=nmissing+1 !xx
if(tdr_obs(3,k) < 800.) then
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.

@JingCheng-NOAA : What do you think about this comment from Copilot? The intent of the suggested change is to improve readability of the run time log.

Comment thread src/gsi/gsimod.F90
Comment on lines 1092 to +1105
@@ -1101,7 +1102,7 @@ module gsimod
! allows use of archived prepbufr files)

namelist/obs_input/dmesh,time_window_max,time_window_rad, &
ext_sonde,l_foreaft_thin,hofx_2m_sfcfile, ignore_2mQM
ext_sonde,l_foreaft_thin,l_tdr_thin_alongbeam,hofx_2m_sfcfile, ignore_2mQM
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.

@JingCheng-NOAA : Another Copilot suggestion to improve readability. What do you think?

@RussTreadon-NOAA
Copy link
Copy Markdown
Contributor

@JingCheng-NOAA : Agreed. We do not need to change the HAFS GSI ctests ith this PR. A separate issue and PR is sufficient. Failure to keep GSI ctests in sync with added or modified GSI functionality runs the risk of these changes being unknowingly broken by other PRs.

@RussTreadon-NOAA
Copy link
Copy Markdown
Contributor

@JingCheng-NOAA : Good suggestions from copilot. Please consider making the suggested changes.

@JingCheng-NOAA
Copy link
Copy Markdown
Contributor Author

JingCheng-NOAA commented May 21, 2026 via email

…statement related to along the beam thinning. Rephrase the namelist documentation for l_tdr_thin_alongbeam
@RussTreadon-NOAA RussTreadon-NOAA requested a review from Copilot May 22, 2026 17:31
Copy link
Copy Markdown

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread src/gsi/read_radar.f90 Outdated
if(l_tdr_thin_alongbeam) then
write(6,*)'READ_RADAR: # data removed by thinning along the beam ntdrvr_thin1=', ntdrvr_thin1
else
write(6,*) 'READ_RADAR: # offline superob applied on TDR, thinning along the beam is disabled'
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.

@JingCheng-NOAA : Another improve readability suggestion from Copilot. What do you think?

Comment thread src/gsi/gsimod.F90 Outdated
RussTreadon-NOAA and others added 2 commits May 22, 2026 13:44
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@RussTreadon-NOAA
Copy link
Copy Markdown
Contributor

@JingCheng-NOAA : 8ac349a adds my recommended change (i.e., echo obs_input to the run time log).

As expected, WCOSS2 (Cactus) ctests still pass after making change 8ac349a

Test project /lfs/h2/emc/da/noscrub/russ.treadon/git/gsi/pr1007/build
    Start 1: global_4denvar
    Start 2: rtma
    Start 3: rrfs_3denvar_rdasens
    Start 4: hafs_4denvar_glbens
    Start 5: hafs_3denvar_hybens
    Start 6: global_enkf
1/6 Test #3: rrfs_3denvar_rdasens .............   Passed  733.34 sec
2/6 Test #6: global_enkf ......................   Passed  855.98 sec
3/6 Test #2: rtma .............................   Passed  1100.31 sec
4/6 Test #5: hafs_3denvar_hybens ..............   Passed  1234.52 sec
5/6 Test #4: hafs_4denvar_glbens ..............   Passed  1344.58 sec
6/6 Test #1: global_4denvar ...................   Passed  1924.50 sec

100% tests passed, 0 tests failed out of 6

@JingCheng-NOAA
Copy link
Copy Markdown
Contributor Author

Accepted, and the corresponding change has been made

@ShunLiu-NOAA
Copy link
Copy Markdown
Contributor

@JingCheng-NOAA could you run a ctest for a quick sanity check? otherwise I think the PR is in good shape to merge.

@RussTreadon-NOAA
Copy link
Copy Markdown
Contributor

GSI ctests

Install JingCheng-NOAA:feature/hafs_tdr at f50ab69 as updat and NOAA-EMC:develop at 55faa5e as contrl on Gaea C6, Ursa, and WCOSS2 (Dogwood). Run GSI ctests with the following results

Gaea C6

Test project /gpfs/f6/ira-sti/scratch/Russ.Treadon/git/gsi/pr1007/build
    Start 1: global_4denvar
    Start 2: rtma
    Start 3: rrfs_3denvar_rdasens
    Start 4: hafs_4denvar_glbens
    Start 5: hafs_3denvar_hybens
    Start 6: global_enkf
1/6 Test #3: rrfs_3denvar_rdasens .............   Passed  482.07 sec
2/6 Test #6: global_enkf ......................   Passed  482.11 sec
3/6 Test #2: rtma .............................   Passed  722.54 sec
4/6 Test #5: hafs_3denvar_hybens ..............   Passed  903.47 sec
5/6 Test #4: hafs_4denvar_glbens ..............   Passed  963.50 sec
6/6 Test #1: global_4denvar ...................   Passed  1321.37 sec

100% tests passed, 0 tests failed out of 6

Total Test time (real) = 1321.37 sec

Ursa

Test project /scratch3/NCEPDEV/da/Russ.Treadon/git/gsi/ursa/pr1007/build
    Start 1: global_4denvar
    Start 2: rtma
    Start 3: rrfs_3denvar_rdasens
    Start 4: hafs_4denvar_glbens
    Start 5: hafs_3denvar_hybens
    Start 6: global_enkf
1/6 Test #3: rrfs_3denvar_rdasens .............   Passed  1028.58 sec
2/6 Test #6: global_enkf ......................   Passed  1032.57 sec
3/6 Test #2: rtma .............................   Passed  1269.33 sec
4/6 Test #5: hafs_3denvar_hybens ..............   Passed  1273.24 sec
5/6 Test #4: hafs_4denvar_glbens ..............   Passed  1393.14 sec
6/6 Test #1: global_4denvar ...................   Passed  1744.21 sec

100% tests passed, 0 tests failed out of 6

Total Test time (real) = 1744.23 sec

WCOSS2 (Dogwood)

Test project /lfs/h2/emc/da/noscrub/russ.treadon/git/gsi/pr1007/build
    Start 1: global_4denvar
    Start 2: rtma
    Start 3: rrfs_3denvar_rdasens
    Start 4: hafs_4denvar_glbens
    Start 5: hafs_3denvar_hybens
    Start 6: global_enkf
1/6 Test #3: rrfs_3denvar_rdasens .............   Passed  730.20 sec
2/6 Test #6: global_enkf ......................   Passed  854.87 sec
3/6 Test #2: rtma .............................   Passed  1033.75 sec
4/6 Test #5: hafs_3denvar_hybens ..............   Passed  1220.57 sec
5/6 Test #4: hafs_4denvar_glbens ..............   Passed  1221.04 sec
6/6 Test #1: global_4denvar ...................   Passed  1923.34 sec

100% tests passed, 0 tests failed out of 6

Total Test time (real) = 1923.35 sec

All tests Passed on Gaea C6, Ursa, and WCOSS2 (Dogwood)

@ShunLiu-NOAA
Copy link
Copy Markdown
Contributor

@RussTreadon-NOAA Thank you for the ctest.

@JingCheng-NOAA
Copy link
Copy Markdown
Contributor Author

Ctests passed on Hera

Test project /scratch4/NCEPDEV/hwrf/save/Jing.Cheng/GSIversions/GSI_TDRupdate/build
    Start 1: global_4denvar
    Start 2: rtma
    Start 3: rrfs_3denvar_rdasens
    Start 4: hafs_4denvar_glbens
    Start 5: hafs_3denvar_hybens
    Start 6: global_enkf
1/6 Test #3: rrfs_3denvar_rdasens .............   Passed  487.27 sec
2/6 Test #2: rtma .............................   Passed  1028.56 sec
3/6 Test #6: global_enkf ......................   Passed  1087.83 sec
4/6 Test #5: hafs_3denvar_hybens ..............   Passed  1091.26 sec
5/6 Test #4: hafs_4denvar_glbens ..............   Passed  1211.16 sec
6/6 Test #1: global_4denvar ...................   Passed  1841.87 sec

100% tests passed, 0 tests failed out of 6

Total Test time (real) = 1841.88 sec

@ShunLiu-NOAA ShunLiu-NOAA merged commit 860d137 into NOAA-EMC:develop May 27, 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.

6 participants