Converting netCDF to GRIB2 #1015
-
Has anyone converted a netCDF file produced by MET back to a GRIB2 file? I'm currently testing grids that have been created by series analysis. I've tried using iris and cdo to convert back to GRIB2, but both seem to have issues with the lat/lon dimensions. dimensions: The error cdo gives is Error (gribapiDefGrid): Unsupported grid type: generic Even using cdo -chName will not change "lon" to "longitude". If anyone knows of another utility to convert these grids to GRIB2, please let me know. If you know of any other utilities that can be used to force the netCDF variables to change, that would also be appreciated. The series analysis output grids can be found in my Google Drive folder here: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
@johnlwagner, I wanted to let you know that no one within the DTC, to my knowledge, has converted MET NetCDF output into GRIB2 files... although we've never really been motivated to do so. What is the motivation for this work? Do you need GRIB2 output for display on AWIPS? I see that you're trying to use the CDO for this conversion but are having trouble renaming the 'lon' variable to 'longitude'. I typically use the 'nco' utility named 'ncrename' for this sort thing.
However that produced an error:
One option, just for testing, is running ncdump followed by ncgen:
And that'll do the trick. However, the real tricky part with writing GRIB2 files is getting the metadata and grid definition correct. If your data is on a lat/lon grid, that'd be relatively simple. But if it's projected on Lambert Conformal, Polar Stereographic, or Mercator that that'd be trickier. If I were try to do this, I'd explore options in python. The pygrib, pynio, and grib2io packages sound somewhat promising. |
Beta Was this translation helpful? Give feedback.
-
Sounds good. Thanks John.
We're still testing this when we have time. If we do find a solution,
we'll let you know.
…On Mon, Aug 9, 2021 at 1:31 PM johnhg ***@***.***> wrote:
@johnlwagner <https://github.com/johnlwagner> I'm marking this discussion
as "answered" to move it out of the support "inbox". But please feel free
to add more comments in the futre.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1015 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGZ7TYMAXRGHCW4S422TK6LT4AGHDANCNFSM5AX2D2AQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
--
John Wagner
Verification Task Lead
NOAA/National Weather Service
Meteorological Development Laboratory
Digital Forecast Services Division
SSMC2 Room 10106
Silver Spring, MD 20910
(301) 427-9471 (office)
(908) 902-4155 (cell/text)
|
Beta Was this translation helpful? Give feedback.
@johnlwagner, I wanted to let you know that no one within the DTC, to my knowledge, has converted MET NetCDF output into GRIB2 files... although we've never really been motivated to do so. What is the motivation for this work? Do you need GRIB2 output for display on AWIPS?
I see that you're trying to use the CDO for this conversion but are having trouble renaming the 'lon' variable to 'longitude'. I typically use the 'nco' utility named 'ncrename' for this sort thing.
However that produced an error:
One option, jus…