Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The latest version of chgres_cube does not support GEFS or any ensemble grib2 files as input #651

Closed
ZhanZhang-NOAA opened this issue May 16, 2022 · 12 comments · Fixed by #658
Assignees
Labels
bug Something isn't working

Comments

@ZhanZhang-NOAA
Copy link

@GeorgeGayno-NOAA The chgres_cube used to support reading in GEFS or any ensemble grib2 files, but the function is broken in the latest version. It doesn't support reading in GEFS or any ensemble grib2 files anymore. It looks like that the product definition template is hard-code to 0 in input_data,F90, which is only for deterministic forecast/analysis, while product definition template for ensemble product is 1, examples in input_data.F90:
jpdtn = 0 and
if (gfld%ipdtnum == 0) then

Is it possible to add an namelist parameter to switch reading deterministic and ensemble grib2 between jpdtn = 0 and 1 or through a better approach to recognize deterministic/ensemble automatically by the code? Also, it would be desirable to include a chgres_cube regression test for GEFS grib2 input.

@GeorgeGayno-NOAA
Copy link
Collaborator

@ZhanZhang-NOAA do you have a sample GRIB2 dataset that causes the failure?

@ZhanZhang-NOAA
Copy link
Author

@GeorgeGayno-NOAA Yes, here is one example on jet:
/mnt/lfs4/HFIP/hwrf-vd/Zhan.Zhang/hafstmp/H222_ensemble_bdygefs/2020082506/00L/atm_lbc001_ens/mem002/bc_f006/gep02.t06z.pgrb2abf06
I also copied the same file to WCOSS1:
/gpfs/dell2/emc/modeling/noscrub/Zhan.Zhang/UFS_UTILS_test/gep02.t06z.pgrb2abf06

@GeorgeGayno-NOAA GeorgeGayno-NOAA self-assigned this May 20, 2022
@GeorgeGayno-NOAA GeorgeGayno-NOAA added the bug Something isn't working label May 20, 2022
@GeorgeGayno-NOAA
Copy link
Collaborator

@ZhanZhang-NOAA I was able to reproduce the error. The logic can't find any vertical levels -

 - READ ATMOS DATA FROM GRIB2 FILE: .//gep02.t06z.pgrb2abf06
 - READ ATMOS DATA FROM GRIB2 FILE: .//gep02.t06z.pgrb2abf06
 - READ ATMOS DATA FROM GRIB2 FILE: .//gep02.t06z.pgrb2abf06
 cggg found this number of levels            0
 - FATAL ERROR: READING ATMOSPHERIC WATER VAPOR VARIABLE.
 - IOSTAT IS:            2

Let me work on a fix.

@GeorgeGayno-NOAA
Copy link
Collaborator

The GEFS data is identified in the ID section (section 1): https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_sect1.shtml

octets 6-7 are '7' (NCEP) https://www.nco.ncep.noaa.gov/pmb/docs/on388/table0.html
octets 8-9 are '2' (NCEP Ensemble products) https://www.nco.ncep.noaa.gov/pmb/docs/on388/tablec.html

GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue May 24, 2022
set the product template number accordingly.

Fixes ufs-community#651.
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue May 24, 2022
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue May 24, 2022
@GeorgeGayno-NOAA
Copy link
Collaborator

I think I have a fix. Test scripts/data on Mars - /gpfs/dell2/emc/modeling/noscrub/George.Gayno/ufs_utils.git/zhan

@GeorgeGayno-NOAA
Copy link
Collaborator

@ZhanZhang-NOAA Can you try my fix? Close my branch, then checkout my branch:

git clone [email protected]:GeorgeGayno-NOAA/UFS_UTILS.git
git checkout bugfix/chgres_gefs

GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue May 24, 2022
@ZhanZhang-NOAA
Copy link
Author

ZhanZhang-NOAA commented Jun 6, 2022 via email

GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 6, 2022
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 6, 2022
@ZhanZhang-NOAA
Copy link
Author

@GeorgeGayno-NOAA I tested the bugfix version of chgres, it worked fine with GEFS input.

@GeorgeGayno-NOAA
Copy link
Collaborator

@GeorgeGayno-NOAA I tested the bugfix version of chgres, it worked fine with GEFS input.

Did you test the cold start files in the forecast model?

@ZhanZhang-NOAA
Copy link
Author

ZhanZhang-NOAA commented Jun 13, 2022 via email

@GeorgeGayno-NOAA
Copy link
Collaborator

Yes, I did. I ran the end-to-end HAFS system using GEFS as input for IC/BC, the forecast job completed successfully.

That's great! I would like to turn your test into a new regression test for GEFS data. Can I get your input GEFS file, the chgres configuration namelist, and the coldstart files?

GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 13, 2022
@ZhanZhang-NOAA
Copy link
Author

My test run files are on jet:

  1. Directory to create initial condition (IC):
    1a. GEFS input file:
    /mnt/lfs4/HFIP/hwrfv3/Zhan.Zhang/hafstmp/H222_ensemble_gefs_00/2020082506/00L/atm_ic/gec00.t06z.pgrb2abf00
    1b. chgres namelist for IC:
    /mnt/lfs4/HFIP/hwrfv3/Zhan.Zhang/hafstmp/H222_ensemble_gefs_00/2020082506/00L/atm_ic/fort.41
  2. Directory to create lateral boundary condition (06h LBC):
    2a. GEFS input file:
    /mnt/lfs4/HFIP/hwrfv3/Zhan.Zhang/hafstmp/H222_ensemble_gefs_00/2020082506/00L/atm_lbc001/bc_f006/gec00.t06z.pgrb2abf06
    2b. chgres namelist for BLC
    /mnt/lfs4/HFIP/hwrfv3/Zhan.Zhang/hafstmp/H222_ensemble_gefs_00/2020082506/00L/atm_lbc001/bc_f006/fort.41
  3. output files from chgres:
    /mnt/lfs4/HFIP/hwrfv3/Zhan.Zhang/hafstmp/H222_ensemble_gefs_00/2020082506/00L/intercom/chgres
    3a. IC: gfs_data.tile7.nc;
    3b. LBC: gfs_bndy.tile7.???.nc

GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 14, 2022
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 14, 2022
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 14, 2022
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 15, 2022
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 15, 2022
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 15, 2022
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 15, 2022
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 15, 2022
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 15, 2022
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 15, 2022
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Jun 15, 2022
GeorgeGayno-NOAA added a commit that referenced this issue Jun 27, 2022
Fixes a bug that was introduced during the switch from the WGRIB2 to
the G2 library. 

Add consistency test for GEFS data.

Fixes #651.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants