问题描述:
在使用wgrib2.exe 读取grib2文件的过程中,报错
*** FATAL ERROR: too many grib files … 1st=F:\data\预测数据 2nd=- ***
问题产生原因:
由于路径中日期作为文件夹名称存在 “-”,这个符号使得wgrib2误认为输入了两个文件产生错误
官方对于该错误的解释如下:
Every option requires a fixed number of arguments. If you have too many or too few arguments, you can get this error message. In the following example, -ij, requires two arguments. For the first -ij, the arguments are 10 and -ij. The “11” doesn’t start with a dash, so it is assumed to be a grib file. Since there was already a grib file found, error message.
译文:
每个选项都需要固定数量的参数。如果参数太多或太少,就会得到这个错误消息。在下面的例子中,-ij需要两个参数。对于第一个-ij,参数是10和-ij。“11”不是以破折号开头的,所以它被认为是一个grib文件。因为已经找到了一个grib文件,所以出现了错误消息。
bash-4.1$ wgrib2 small.grb -ij 10 -ij 11 12
官方文档链接