grib2json
=========
A command line utility that decodes [GRIB2](http://en.wikipedia.org/wiki/GRIB) files as JSON.
This utility uses the netCDF-Java GRIB decoder, part of the [THREDDS](https://github.com/Unidata/thredds) project
by University Corporation for Atmospheric Research/Unidata.
Installation
------------
```
git clone <this project>
mvn package
```
This creates a .tar.gz in the target directory. Unzip and untar the package in a location of choice.
Usage
-----
The `grib2json` launch script is located in the `bin` directory and requires the `JAVA_HOME` environment
variable to be defined.
```
> grib2json --help
Usage: grib2json [options] FILE
[--compact -c] : enable compact Json formatting
[--data -d] : print GRIB record data
[--filter.category --fc value] : select records with this numeric category
[--filter.parameter --fp value] : select records with this numeric parameter
[--filter.surface --fs value] : select records with this numeric surface type
[--filter.value --fv value] : select records with this numeric surface value
[--help -h] : display this help
[--names -n] : print names of numeric codes
[--output -o value] : write output to the specified file (default is stdout)
[--verbose -v] : enable logging to stdout
```
For example, the following command outputs to stdout the records for parameter 2 (U-component_of_wind), with
surface type 103 (Specified height level above ground), and surface value 10.0 meters from the GRIB2 file
_gfs.t18z.pgrbf00.2p5deg.grib2_. Notice the optional inclusion of human-readable _xyzName_ keys and the data array:
```
> grib2json --names --data --fp 2 --fs 103 --fv 10.0 gfs.t18z.pgrbf00.2p5deg.grib2
[
{
"header":{
"discipline":0,
"disciplineName":"Meteorological products",
"gribEdition":2,
"gribLength":27759,
"center":7,
"centerName":"US National Weather Service - NCEP(WMC)",
"parameterNumber":2,
"parameterNumberName":"U-component_of_wind",
"parameterUnit":"m.s-1",
"surface1Type":103,
"surface1TypeName":"Specified height level above ground",
"surface1Value":10.0,
...
},
"data":[
-2.12,
-2.27,
-2.41,
...
]
}
]
```
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
testGrib2.rar (41个子文件)
gfs.t00z.pgrb2.0p25.f000 98KB
说明.doc 122KB
grib2json-master
LICENSE.md 1KB
pom.xml 5KB
.gitattributes 222B
src
assembly
assembly.xml 1011B
bin
grib2json 134B
grib2json.cmd 187B
test
java
net
nullschool
grib2json
FloatValueTest.java 191B
LauncherTest.java 417B
main
java
net
nullschool
grib2json
FloatValue.java 2KB
Grib2Json.java 4KB
GribRecordWriter.java 10KB
OscarRecordWriter.java 5KB
AbstractRecordWriter.java 2KB
Launcher.java 3KB
Options.java 2KB
.idea
jarRepositories.xml 1KB
workspace.xml 6KB
misc.xml 487B
compiler.xml 720B
.gitignore 184B
encodings.xml 267B
target
classes
net
nullschool
grib2json
OscarRecordWriter.class 6KB
FloatValue.class 2KB
Grib2Json.class 6KB
GribRecordWriter.class 10KB
Options.class 2KB
Launcher.class 5KB
AbstractRecordWriter.class 3KB
test-classes
net
nullschool
grib2json
FloatValueTest.class 440B
LauncherTest.class 1013B
maven-status
maven-compiler-plugin
compile
default-compile
createdFiles.lst 311B
inputFiles.lst 612B
testCompile
default-testCompile
createdFiles.lst 90B
inputFiles.lst 176B
surefire-reports
TEST-net.nullschool.grib2json.FloatValueTest.xml 6KB
net.nullschool.grib2json.FloatValueTest.txt 287B
generated-test-sources
test-annotations
generated-sources
annotations
.gitignore 40B
README.md 2KB
gfs.t00z.pgrb2.0p25.f000.json 1.09MB
共 41 条
- 1
资源评论
卧玫幽闻花
- 粉丝: 53
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功