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

Add chgres_cube capability to read data on WMO rotated lat-lon grid (template 1) #901

Closed
LarissaReames-NOAA opened this issue Feb 22, 2024 · 17 comments · Fixed by #902
Closed
Assignees
Labels
enhancement New feature or request

Comments

@LarissaReames-NOAA
Copy link
Collaborator

The RRFS fire weather nest will be implemented operationally alongside RRFSv1, and is designed to replicate the current capabilities of the NAM fire weather nest. RRFSFW will be initialized off of RRFS grib2 data, specifically the rotated lat-lon grib2 files. Those files are on grid template 1 (WMO rotated lat-lon) and chgres_cube needs to be updated to process those files correctly.

Full completion of this capability will also depend on addressing #850 . For now, we can test with a sample subset provided by
@BenjaminBlake-NOAA who requested this feature.

@LarissaReames-NOAA LarissaReames-NOAA added the enhancement New feature or request label Feb 22, 2024
@LarissaReames-NOAA LarissaReames-NOAA self-assigned this Feb 22, 2024
@LarissaReames-NOAA
Copy link
Collaborator Author

LarissaReames-NOAA commented Feb 22, 2024

EDIT: Nevermind, there was a miscommunication. I've been pointed to the modified model_grid.F90 in @GeorgeGayno-NOAA 's chgres_rrfs branch.

@GeorgeGayno-NOAA I've already begun working on this, but I need some support with the g2 grib2 grid template conversion to grib1 grid definition in model_grid.F90. Could you provide some information about how you found the right values for the various gds sections?

@GeorgeGayno-NOAA
Copy link
Collaborator

EDIT: Nevermind, there was a miscommunication. I've been pointed to the modified model_grid.F90 in @GeorgeGayno-NOAA 's chgres_rrfs branch.

@GeorgeGayno-NOAA I've already begun working on this, but I need some support with the g2 grib2 grid template conversion to grib1 grid definition in model_grid.F90. Could you provide some information about how you found the right values for the various gds sections?

From the GRIB1 and GRIB2 grid definitions.

The GRIB2 definition of rotated lat/lon is:
https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_temp3-1.shtml

The table entries correspond to the igdstmpl array. Example: the 8th entry in the table (NI) corresponds to the igdstmpl(8).

The GRIB1 definition is:
https://www.nco.ncep.noaa.gov/pmb/docs/on388/tabled.html (scroll down to rotated lat/lon non-E stagger)

The table entries correspond (roughly) to the kgds array. kgds(1) is octet 6 (the data representation type. '205' for rot lat/lon). kgds(2) is the first entry in the table (NI). So kgds(2) in GRIB1 is igdstmp(8) in GRIB2.

The G2 library has a conversion routine you can use as a guide:
https://github.com/NOAA-EMC/NCEPLIBS-g2/blob/develop/src/gdt2gds.F90

I may have better references. But that should get you started. I believe I have already done this conversion in my chgres_rrfs branch, no?

@LarissaReames-NOAA
Copy link
Collaborator Author

@GeorgeGayno-NOAA Yes, you're correct about your modifications. Shortly after I posted that comment Ben pointed me to your file with those modifications. I edited my previous comment after that, but it might not have shown up for you. We're working on this now that I have that code from your branch.

@GeorgeGayno-NOAA
Copy link
Collaborator

Will these updates also need to be added to our most recent tag?
https://github.com/ufs-community/UFS_UTILS/releases/tag/ufs_utils_1_12_0

@LarissaReames-NOAA
Copy link
Collaborator Author

That's what @BenjaminBlake-NOAA has requested.

@BenjaminBlake-NOAA
Copy link

@GeorgeGayno-NOAA Yes we will need these updates to be included in the tag for RRFSv1, thanks.

GeorgeGayno-NOAA pushed a commit that referenced this issue Feb 27, 2024
…pability (#902)

Add ability to read GRIB2 data that uses the WMO-standard rotated lat-lon grid
template (GRIB2 grid template 1). Update 'readthedocs'.

Fixes #901.
GeorgeGayno-NOAA added a commit that referenced this issue Feb 27, 2024
@GeorgeGayno-NOAA
Copy link
Collaborator

@BenjaminBlake-NOAA and @LarissaReames-NOAA - I added these changes to the release branch at 33cc663. I ran the regression tests and they passed. Can you test with the RRFS?

@BenjaminBlake-NOAA
Copy link

@GeorgeGayno-NOAA Thank you. I should be able to test this with RRFS early next week.

@BenjaminBlake-NOAA
Copy link

@GeorgeGayno-NOAA @LarissaReames-NOAA I completed a successful test with these changes

@GeorgeGayno-NOAA
Copy link
Collaborator

@GeorgeGayno-NOAA @LarissaReames-NOAA I completed a successful test with these changes

Great. Is there anything else you need to add to the release branch?

@BenjaminBlake-NOAA
Copy link

Not that I'm aware of. @MatthewPyle-NOAA do you know of any more changes needed to UFS_UTILS for RRFS besides the changes needed for RRFSFW?

@GeorgeGayno-NOAA
Copy link
Collaborator

Not that I'm aware of. @MatthewPyle-NOAA do you know of any more changes needed to UFS_UTILS for RRFS besides the changes needed for RRFSFW?

What about the 2GB file limitation fix?

@BenjaminBlake-NOAA
Copy link

Yes, we will eventually want those code changes too. But in the meantime we have code working to subset the large files into smaller ones.

@MatthewPyle-NOAA
Copy link
Collaborator

I think using wgrib2 to subset gets away from the 2 GB issue for the RRFSFW. I don't think we have more expected changes, but @GeorgeGayno-NOAA if you're willing to create a release branch post the merge of PR902 that would be great.

@BenjaminBlake-NOAA
Copy link

@MatthewPyle-NOAA PR902 was merged so we do have a release branch ready thanks to George/Larissa. I'll point to it in my PR to rrfs-workflow.
https://github.com/ufs-community/UFS_UTILS/tree/release/1_12_0

@GeorgeGayno-NOAA
Copy link
Collaborator

@MatthewPyle-NOAA PR902 was merged so we do have a release branch ready thanks to George/Larissa. I'll point to it in my PR to rrfs-workflow. https://github.com/ufs-community/UFS_UTILS/tree/release/1_12_0

I am going to create a tag for you.

@GeorgeGayno-NOAA
Copy link
Collaborator

Tag created to support RRFSv1: https://github.com/ufs-community/UFS_UTILS/releases/tag/ufs_utils_1_12_2

Closing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
4 participants