-
Notifications
You must be signed in to change notification settings - Fork 108
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 RRFS grib2 files to officially supported input sources of chgres_cube #850
Comments
Someone at EMC requested this capability two years ago. (See #660). I started the code updates, but then found that the RRFS GRIB2 file was too big for our G2 library. I believe that G2 limitation was fixed. |
Should we close this issue and go back to the work you did there and see if we can get a clean PR for it now that the G2 issue was fixed? |
We can close this issue and add a comment in #660 mentioning resolution of the G2 issue and explaining a goal of getting this feature functional for the v2.2.0 release of the SRW App. |
Some of the NCEPLIBS-g2 issues with 2 GB have been fixed, but not all. The issue that was fixed in g2-3.4.7 allows the (soon to be released) grib_utils utility degrib2 to read > 2 GB files. But the problem you are having is with index files. There is a fundamental limitation with the current index file format which must be overcome. (It uses a 32-bit int for file offsets, this will not work beyond the 2 GB boundary). This will be addressed in the next release of NCEPLIBS-g2. (See NOAA-EMC/NCEPLIBS-g2#550). Sorry for the long delay in GRIB library work. Our previous GRIB programmers retired/moved on and it's taken time for me to come up to speed on the code and to deal with the backlog of fixes needed. |
The operational RRFS will also need this capability in order to run the fire weather nest initialized off of RRFS rotated lat-lon grib2 data. |
@LarissaReames-NOAA and @BenjaminBlake-NOAA what are your deadlines for this capability? |
@GeorgeGayno-NOAA, there was also an interest to have this capability available for the next SRW App release so that users could initialize their own simulations with RRFS data. Therefore, while we'll miss this next SRW App release, an "ASAP" deadline is appropriate, since it's necessary for the general community, fire weather (as @BenjaminBlake-NOAA mentioned), and for the 3D-RTMA (Annette Gibbs at EMC). |
I am hearing that getting NCEPLIBS-g2 working with > 2 GB GRIB2 files is a priority, and I'll am working on it now. Unfortunately it requires some major changes in g2 and grib_utils, and that will take some time. I hope to have new releases of g2 and grib_utils which handle > 2 GB files sometime before the end of the year. |
Now that the new g2 library is working, and #901 is on its way to being resolved, I'm working on supporting the full RRFS rotated lat Lon files. I'm running in to an issue of lots of missing data around the edges due to differences between the output and computational domains. See this plot of surface pressure At these points, I'm getting divide by zero issues for some computations. And even if I wasn't we don't have any way to ensure that the user's target grid doesn't extend in to this missing data. @GeorgeGayno-NOAA @JeffBeck-NOAA Do you have any thoughts on how to handle this? Do we fill the bad points with nonsense values just to get the computations to complete but perform some sort of check to make sure the target grid falls within the original computation grid (i.e., doesn't extend in to the missing points)? Or maybe we create some sort of good-points array that constrains the computation loops to only points inside the computational domain along with some sort of check about the user's target domain? Also, how might that target domain check work? There's a lot to think about here and I'd like your thoughts. |
I seem to recall that with the right settings, the ESMF regridding routine will return an 'out of domain' code? You might want to read through the documentation or ask the ESMF team for advice. They are very responsive. |
@LarissaReames-NOAA - has this RRFS grid capability been fully added? Running into with .sfc_data.tile7.halo0.nc file prepared by chgres_cube, errors with reading this file during the forecast phase. The PR is open in SRW repo PR-1089: A tag (57bd832) of the UFS_UTILS checked out as a part of the SRW, did not allow for RRFS option. When this RRFS options was changed manually in ./UFS_UTILS/sorc/chgres_cube.fd/program_setup.F90, and other options in SRW needed for the RRFS ics/lbcs were set similar/identical to those for HRRR, the test passes successfully. When the updated UFS_UTILS tag was used (1dac855) that included options for RRFS, the error resulted during runtime. The difference appeared to be in *.sfc_data.tile7.halo0.nc that had variations in its content from the expected by the SRW forecast phase. |
chgres_cube was updated at 7addff5 for fractional grids. That required a slight format change (v2) in the surface coldstart file. At that time, the UFS was updated to read either the v2 or previous version of the surface file. What tag of UFS are you using?
|
I have a branch that's fully capable of processing RRFS data with a newer version of the g2 library. However, the g2 version in spack-stack has not been updated to a version with the new large file capabilities required to process the full RRFS grid files. Should we put in a request to have this library updated? There are a couple of official g2 releases that have the large file capability. |
The UFS tag 1c6b4d4 from May 16, 2024, was used. Also, I'm using RRFS data for 20230501 timestamp. Is more recent RRFS model data needed to be used to make it work? Is the updated version of UFS (tag??) needed to read the RRFS model data correctly? |
Thank you @LarissaReames-NOAA! Is it a branch of UFS_UTILS or UFS_WeatherModel? |
This is a branch of UFS_UTILS that should allow you to create ICs and LBCs from the full RRFS files. I haven't created a PR as I wasn't sure if the newer g2 version was available yet in any spack. In my testing I've used 3.4.7 and I believe that's the earliest release that has the large file updates needed. |
The spack-stack-1.6.0 that I use has g2/3.4.5. It seem to work OK processing RRFS files, when I use files such as Are there corresponding changes in expected format need to be done for the UFS-weather-model side for reading the RRFS data prepared by the UFS_UTILS?.. |
Yeah that's a completely different kind of file. That data has been cropped and interpolated to a CONUS Lambert conformal grid, so it could probably honestly be used just as you use HRRR data for initialization and with the current develop branch of UFS_UTILS. The files I'm talking about are nearly 10GB in size and are from the full North American RAP domain and are what the changes in my branch would target. They have the format |
Thank you, @LarissaReames-NOAA! That is important topic to converge on. I'm pulling RRFS data from an official RRFS-prototype data source mentioned in this site: This is RRFS data source that could be used to do automatic retrieval of the RRFS data. It is the source I was suggested to use by Christina Holt for RRFS - SRW integration work What is the data you are using, and where could it be found? |
@natalie-perlin That's the same place I've gotten mine from. If you dig around further there are other files without the conus_3km tag on them, including files on pressure levels as well like this one: https://noaa-rrfs-pds.s3.amazonaws.com/rrfs_a/rrfs_a.20240610/00/control/rrfs.t00z.prslev.f000.grib2 I think it's important that we have these full RRFS files working if we want to be able to initialize larger domains, including a full CONUS run, from RRFS data. |
Oh,
Thank you! Found these files. The seem to be 6GB in size. Are there any changes expected to be on the UFS-WM side to read the UFS-UTILS processed files?.. |
On the weather model side, no it shouldn't matter as the data should look to the weather model like anything else coming from UFS_UTILS. Obviously the App/workflow would need updates. @JeffBeck-NOAA Would you say that's correct or have I missed something? |
Yep, nothing should have to change in the ufs-weather-model code, just the necessary changes in UFS-UTiLS and the workflow. |
Awesome, thank you, @LarissaReames-NOAA and @JeffBeck-NOAA! Testing it with larger files. And yes, the SRW workflow is adapted to use RRFS option, find filenames, to use variable-mapping table GSDphys_var_map.txt (as is used for RAP and HRRR), and also to use 9-level soil data. |
@LarissaReames-NOAA @JeffBeck-NOAA -
Are there any suggestions on what may need attention?.. This is what config file for the ICS task look like (fort.41 in the tmp_MAKE_ICS work directory)
|
@natalie-perlin Are you using the develop branch here? You're not going to be able to use the full RRFS files with the develop branch. As I mentioned, I have a branch that has some other needed modifications (on top of the newer g2 library) in order to read the WMO grib2 template "1" that the data is on. Again, I haven't submitted it as a PR as I'm waiting for an update to the newer stack-stack version, but you're welcome to try the branch without any promises if you just need it for testing: https://github.com/LarissaReames-NOAA/UFS_UTILS/tree/feature/chgres_rrfs_RLL |
Oh, that's great, thanks, I was not sure which branch to use! |
@LarissaReames-NOAA -
Are there any changes expected for orography stage? A log file |
@natalie-perlin I'm honestly not sure what's going on. I have never made edits to the orog code in that branch or otherwise. It's up to date with develop other than the aforementioned changes to chgres_cube. Could you try using the develop (or whatever branch you were using previously) for everything but the make ICs/LBCs step? |
@LarissaReames-NOAA -
Could it be that I need another input files, i.e., surface files, as is mentioned in Not quite sure where the surface file should be located to be used by the SRW tasks/workflow though, and at which stage (task) it is needed. |
The SRW App team have requested that we officially support RRFS grib2 data from the Amazon S3 buckets as input data as part of preparation for RRFS pre-operational support. Hopefully this shouldn't be too much work, but it may involve tracking down some discrepancies in grib2 table codes.
The text was updated successfully, but these errors were encountered: