grib2 data files in plot-data-plane #2888
-
Hi, I'm currently trying to use a grib2 data file with plot-data-plane. The variable that I would like to read is an Aerosol Optical Thickness field, which is vertically-integrated, so does not have a level associated with it. When I run plot-data-plane with the grib2 file, how do I set the level information? I've tried level=0, level="", level="(,)" without any luck. I get a" ERROR : VarInfo::set_level_info_grib() - failed to parse level string '(,*)'" error. Any help on this would be greatly appreciated. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
Hi @jir245. Thank you for your question. For specifying the level information for a GRIB2 file, please take a look at this section of our documentation searching for "File-format specific settings for the “field” entry" to take you to the correct place. I'll also paste in the information below for easy reference and will bold the “level” entry starting point. Please let us know if this answers your question or if you have any other questions. GRIB1 and GRIB2:
|
Beta Was this translation helpful? Give feedback.
-
@jir245 thanks for sending your sample data file. I ran it through the
And if wgrib2 doesn't have a record for this combination of identifiers, it's very likely that the MET GRIB2 tables don't either. First, the quick and dirty, but definitely not recommended longterm, you can tell
As long as the name Second, the preferred solution is to define a new GRIB2 table entry for this unknown dataset. Look in the Let's create a simple one to define metadata for this single variable.
Here's the file to create:
Then set the MET_GRIB_TABLES environment variable to point to this file.
And then run
And that works to create this image: The best longterm solution would be updating the contents of this USAF GRIB2 table file directly in the MET repository to reflect the conventions the USAF uses when creating GRIB2 files. That would prevent the need for creating a custom GRIB2 table and guessing about the metadata. If you're in touch with anyone with the USAF, please encourage them to share updated GRIB2 tables with the METplus development team. Hope that does the trick! |
Beta Was this translation helpful? Give feedback.
@jir245 thanks for sending your sample data file.
I ran it through the
wgrib2
utility and see that it doesn't know about the metadata for this file:And if wgrib2 doesn't have a record for this combination of identifiers, it's very likely that the MET GRIB2 tables don't either.
First, the quick and dirty, but definitely not recommended longterm, you can tell
plot_data_plane
to just plot the first record it finds in the file: