0
$\begingroup$

I'm trying to extract the APCP variable from a GFS file, with this code:

wgrib2 gfst.grb2 -match ":(APCP):"  - grib gfst.grb2.small

I get a

FATAL ERROR: too many grib files .. 1st=gfst.grb2 2nd=-

What am I doing wrong?

$\endgroup$
1
$\begingroup$

Just to expand upon my comments:

This page from CPC suggests that the error message is likely due to wgrib2 thinking subsequent arguments are actually additional grib files because they aren't properly given the - prefix. That lead me to realize that you have a space between your last dash and grib which appears to cause the error:

wgrib2 gfst.grb2 -match ":(APCP):" - grib gfst.grb2.small

should be

wgrib2 gfst.grb2 -match ":(APCP):" -grib gfst.grb2.small

Hopefully that helps if anyone else comes across the issue at a later date! You might also have forgotten a dash somewhere... or tried using too many arguments in an option?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.