Giter Site home page Giter Site logo

grib2json's Introduction

grib2json

A command line utility that decodes GRIB2 files as JSON.

This utility uses the netCDF-Java GRIB decoder, part of the 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,
            ...
        ]
    }
]

grib2json's People

Contributors

cambecc avatar jacobtomlinson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grib2json's Issues

Hello, may I ask what the reason is?

Usage: grib2json [options] FILE
Option only takes one value; cannot use [out.txt, true]: [FILE]
[--compact -c] : enable compact Json formatting
[--data -d] : print GRIB record data
[--filter.category --fc value] : select records with this numeric category
[--filter.discipline --fd value] : select records with this discipline
[--filter.parameter --fp value] : select records with this numeric parameter, or the string "wind" for both u,v components
[--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)
[--recipe -r value] : a file containing a batch of filter options: fd, fc, fp, fs, fv, and o
[--verbose -v] : enable logging to stdout

Order of data values

Supposing there is a data set (small sub-region) as shown below:

{
  "header": {
    "numberPoints": 25,
    "nx": 5,
    "ny": 5,
    "lo1": 20.0,
    "la1": 52.0,
    "lo2": 21.0,
    "la2": 53.0,
    "dx": 0.25,
    "dy": 0.25
  },
  "data": [
    1,    2,    3,    4,    5,    60,    70,    80,    90,    100,    
45,    46,    47,    48,    49,    50,    70,    70,    70,    
70,    70,    70,    70,    70,    70  ]
}

Am I getting right the order of values presented on the attached figure? That is from West to East and from North to South?

grib2json-grid

can't find direction of the wind

Thanks for the great app. Everything works great. I do not have enough understanding of the grib file itself. How can I get the wind direction from this json?

Error trying to write the data in the output file.

When I trying to extract the element data from my gfs file the following error occurs

grib2json -d -o ~/path/fieldsAndValues.json ~/path/gfs.t18z.sfluxgrbf00.grib2

javax.json.JsonException: I/O error while closing JsonGenerator
at org.glassfish.json.JsonGeneratorImpl.flushBuffer(JsonGeneratorImpl.java:705)
at org.glassfish.json.JsonGeneratorImpl.writeChar(JsonGeneratorImpl.java:669)
at org.glassfish.json.JsonPrettyGeneratorImpl.writeComma(JsonPrettyGeneratorImpl.java:121)
at org.glassfish.json.JsonGeneratorImpl.writeValue(JsonGeneratorImpl.java:537)
at org.glassfish.json.JsonGeneratorImpl.write(JsonGeneratorImpl.java:327)
at org.glassfish.json.JsonPrettyGeneratorImpl.write(JsonPrettyGeneratorImpl.java:55)
at net.nullschool.grib2json.GribRecordWriter.writeData(GribRecordWriter.java:271)
at net.nullschool.grib2json.Grib2Json.write(Grib2Json.java:70)
at net.nullschool.grib2json.Grib2Json.write(Grib2Json.java:106)

Values truncated

I've been using another grib api and need to switch. Comparing results from the previous api with what grib2json offers, I'm getting less decimal precision. I was getting 14 digits to the right of the decimal. Now I'm getting 7. Is there a parameter with which I can change this or am I going to need to dig deeper?

Retrieve Lat/Lon Records

I am attempting to geo-reference my data values with the corresponding lat/lon values contained in the grib2 file. When I view the lat/lon grid values in Panoply, I get the expected precision; however, when I output the JSON data, I only see %3f values. Am I doing something wrong? Any help would be greatly appreciated. Thank you in advance.

Non scalar variable error

java.lang.UnsupportedOperationException: not a scalar variable =int time(time=97);
  :units = "Hour since 2020-07-10T18:00:00Z";
  :standard_name = "time";
  :long_name = "product valid at RT + P1";

        at ucar.nc2.Variable.getScalarData(Variable.java:796)
        at ucar.nc2.Variable.readScalarInt(Variable.java:731)
        at net.nullschool.grib2json.Grib2Json.write(Grib2Json.java:84)
        at net.nullschool.grib2json.Grib2Json.write(Grib2Json.java:117)
        at net.nullschool.grib2json.Launcher.main(Launcher.java:75)

Client side running?

Hi,

I'm currently trying to do a grib webview. Is it possible to run your tool on webserver or something similar?

Thanks,

Phil/

Json file

Hello,

First, thanks a lot for your great job ( earth project is amazing :) ...)
I need to know how i have to read the data array ?
For example,

    "data":[
        -2.12,
        -2.27,
        -2.41,
        ...
    ]

-2.12 refers to which latitude/longitude ? -2.41 ?

Actually, i extract U and V components in order to find the speed and direction of wind ...
So, i'd like to get the both data on the same point.

Best regards,

Anthony

Compiling grib2json in Ubuntu 12.04

  • Install latest java and jdk
  • Install latest maven
wget http://archive.apache.org/dist/maven/binaries/apache-maven-3.0.4-bin.tar.gz 
tar -zxf apache-maven-3.0.4-bin.tar.gz 
sudo cp -R apache-maven-3.0.4 /usr/local 
sudo ln -s /usr/local/apache-maven-3.0.4/bin/mvn /usr/bin/mvn 
  • then edit .bashrc file and add this line
nano .bashrc >>>JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
  • check installation with mvn version and mvn package
  • if mvn package gives error of
Error: JAVA_HOME is not defined correctly.   We cannot execute
”/usr/lib/jvm/jdk1.7.0”/bin/java

OSCAR netcdf to JSON conversion?

The utility tool is really helpful and saves a lot of time, Many Thanks for this.

The grib2json instruction is very clear:
grib2json --names --data --fp 2 --fs 103 --fv 10.0 gfs.t18z.pgrbf00.2p5deg.grib2

However, the instruction for converting OSCAR nc files to JSON is kind of missing. How can one specify OSCAR netcdf files available from https://podaac.jpl.nasa.gov/dataset/OSCAR_L4_OC_third-deg as input to the CLI?
grib2json --names --data --fp 2 --fs 103 --fv 10.0 <input_oscar_file.nc> ?

Thanks

java.io.IOException: Negative seek offset

> ./grib2json %HOMEPATH%\Documents\SHI\MRMS_SHI_00.50_20200725-210240.grib2
java.io.IOException: Negative seek offset
        at ucar.unidata.io.RandomAccessFile.seek(RandomAccessFile.java:402)
        at ucar.grib.grib2.Grib2BitMapSection.<init>(Grib2BitMapSection.java:127)
        at ucar.grib.grib2.Grib2Input.scan(Grib2Input.java:227)
        at net.nullschool.grib2json.Grib2Json.write(Grib2Json.java:104)
        at net.nullschool.grib2json.Launcher.main(Launcher.java:75)

[

data set used: https://mrms.ncep.noaa.gov/data/2D/SHI/

grib2json: command not found

Hi, I have a problem running grib2json. When i trying to run grib2json -d -n -o grib.json grib.grb2 or just grib2json --help i am getting grib2json: command not found. I have installed grib2json accordingly. Java path is in /usr/lib/jvm/java-8-openjdk-amd64/bin and grib2json path /home/grib2json/target/grib2json-0.8.0-SNAPSHOT/bin. Thanks

--fc, --fp, --fs and --fv Numeric Value Definitions

Is there a list of numeric value definitions that can be passed to --fc, --fp, --fs and --fv:
[--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

i.e. looking at the full list of possible options in a grib2 file here http://www.nco.ncep.noaa.gov/pmb/products/gfs/gfs.t00z.pgrbf00.grib2.shtml

How does one call different weather variables? For example if i wanted the 850mb temperature (or any other variable in the file), what would i need to pass to the options listed above?

Along the same lines, can grib2json be used to request multiple parameters at the same time or do I have to run a separate command for each parameter i need?

Thanks.

Can't seem to run it

I ran mvn successfully, but the launch script fails. Both the launch script and this manual execution fail with the same exception:

#/bin/java -classpath "/root/grib2json/target/classes/net/nullschool/grib2json/" -Xmx256M -jar grib2json-0.8.0-SNAPSHOT.jar !4544
Exception in thread "main" java.lang.NoClassDefFoundError: com/lexicalscope/jewel/JewelRuntimeException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
at java.lang.Class.getMethod0(Class.java:2774)
at java.lang.Class.getMethod(Class.java:1663)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: com.lexicalscope.jewel.JewelRuntimeException
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 6 more

grib2json open and close immediatly

grib2json open command prompt and close immediatly

image

image
image

i added my PATH variable and MVN
image
image

image

Extra question: i would like to use this package to read the file from the CMC at Montreal: https://dd.weather.gc.ca/
i want to create a website with angular/nodeJS and mongoDB to give weather data and weather alert with the canadian model.

What would be the best option: exporting the file on my database daily with a script from my home and let communicate my server with the database OR using grib2json from my nodejs server online (AWS) for every query /request?

grib2json: line 5: /bin/java: No such file or directory

I am using a python script that goes to ./grib2json/target/grib2json-0.8.0-SNAPSHOT/bin folder and runs the grib2json command. When I run the python script, my script works. But whenever my script is being run by the crontab, I get the /bin/java error and I cannot figure out how to fix this issue.

Correct installation of grib2json library

The following steps were run successfully through Ubuntu 14.04 for installing grib2json library.

Step 1:
git clone https://github.com/cambecc/grib2json.git

Step 2:
cd grib2json/src/bin/

Step 3:
change the java path if necessary, that is, if your system java path is different from the one in grib2json file. Provide the correct path in "grib2json" file, save and close the file.

Ste4:
Change to grib2json directory by typing "cd grib2json" on terminal.

Step 5:
Build by typing "mvn package" on terminal. In order to run this command you need maven installed. I installed it using: sudo apt-get install maven2

Step 6:
After building with mvn package, you need to unzip and untar target\grib2json-0.8.0-SNAPSHOT.tar.gz. When you do this, it will create a bin subdirectory, which will contain grib2json and grib2json.cmd.

The following command convert "gfs_4_20160717_0000_000.grb2" to "gfs_4_20160717_0000_000.json":
sh grib2json --names --data --fp 2 --fs 103 --fv 10.0 --output gfs_4_20160717_0000_000.json ~/Downloads/gfs_4_20160717_0000_000.grb2. This command must be executed from where "grib2json" is located.

Hope this saved your precious time.

Specs for JSON content

I am writing a netCDF to JSON for our own weather model data to be used with your earth project. I can just look at the test json file you provided with the earth project but need to know what is actually needed in the header for earth to work. So could you please provide the specs for the JSON file coming out of the grib2json. Thanks for your help.

Not a valid CDM file

I downloaded the following gfs.t00z.pgrb2.1p00.f000 config file shown in github.

But when executing the following command:
sh grib2json -d -n -o current-wind-surface-level-gfs-1.0.json gfs.t00z.pgrb2.1p00.f000

And presenting the following error:

java.io.IOException: java.io.IOException: Cant read gfs.t00z.pgrb2.1p00.f000: not a valid CDM file.
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:425)
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:392)
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:379)
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:367)
at net.nullschool.grib2json.Grib2Json.write(Grib2Json.java:114)
at net.nullschool.grib2json.Launcher.main(Launcher.java:75)
Caused by: java.io.IOException: Cant read gfs.t00z.pgrb2.1p00.f000: not a valid CDM file.
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:803)
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:422)
... 5 more

I noticed that the file I downloaded according to the github tutorial does not have the extension .grb2

How do I download a file with this extension for possible conversion to json?

Sources:
https://github.com/cambecc/earth
https://github.com/cambecc/grib2json

Can't convert data from NOMADS

I was following the instructions on earth, and downloaded the data, but when i try to convert it with grib2json, the following error appears:

Harbinger@DESKTOP-E7RODMP:~/datos$ grib2json -d -n -o current-wind-surface-level-gfs-1.0.json gfs.t00z.pgrb2.1p00.f000
java.io.IOException: java.io.IOException: Cant read gfs.t00z.pgrb2.1p00.f000: not a valid CDM file.
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:425)
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:392)
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:379)
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:367)
at net.nullschool.grib2json.Grib2Json.write(Grib2Json.java:114)
at net.nullschool.grib2json.Launcher.main(Launcher.java:75)
Caused by: java.io.IOException: Cant read gfs.t00z.pgrb2.1p00.f000: not a valid CDM file.
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:803)
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:422)
... 5 more

how can i fix it?
Thank You

How compile grib2json

Good morning to all. I've tried the earth project but I need to convert grib2json GRIB2 json data to test the earth on my pc locally. I downloaded grib2json but I have a windows 7 pc. How can I compile the project?. Best regards lester

grid Definition values

Would it be possible to have grib2json write out the Grid definition parameters? I've got grids from Canada (https://weather.gc.ca/grib/grib2_HRDPS_HR_e.html) that use "gridDefinitionTemplate":20 and I need the parameters to project the data for display.

For example, gdalinfo on the grid data shows:
PROJCS["unnamed",
GEOGCS["Coordinate System imported from GRIB file",
DATUM["unknown",
SPHEROID["Sphere",6371229,0]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Polar_Stereographic"],
PARAMETER["latitude_of_origin",60],
PARAMETER["central_meridian",280],
PARAMETER["scale_factor",1],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["Metre",1]]
Origin = (-2536345.337090836837888,-3246619.427676008082926)
Pixel Size = (2500.000000000000000,-2500.000000000000000)
Corner Coordinates:
Upper Left (-2536345.337,-3246619.428) (117d59'52.43"W, 51d46'26.78"N)
Lower Left (-2536345.337,-4671619.428) (108d29'55.33"W, 41d49' 9.75"N)
Upper Right ( -898845.337,-3246619.428) ( 95d28'30.20"W, 58d21'34.32"N)
Lower Right ( -898845.337,-4671619.428) ( 90d53'27.35"W, 46d22'57.36"N)
Center (-1717595.337,-3959119.428) (103d27' 9.99"W, 50d 5'54.16"N)

Cant launch Grib2Json

Hi im having problems launching grib2json on windows 7, i have installed maven jdk1.7.0_51 and changed env. paths but im getting below errors....any ideas?

C:\Program Files (x86)\grib2json-master\src\main\java\net\nullschool\grib2js
avac Grib2Json.java
Grib2Json.java:3: error: package ucar.grib.grib2 does not exist
import ucar.grib.grib2.*;
^
Grib2Json.java:4: error: package ucar.unidata.io does not exist
import ucar.unidata.io.RandomAccessFile;
                      ^
Grib2Json.java:6: error: package javax.json does not exist
import javax.json.Json;
                 ^
Grib2Json.java:7: error: package javax.json.stream does not exist
import javax.json.stream.JsonGenerator;
                        ^
Grib2Json.java:8: error: package javax.json.stream does not exist
import javax.json.stream.JsonGeneratorFactory;
                        ^
Grib2Json.java:27: error: cannot find symbol
    private final List<Options> optionGroups;
                       ^
  symbol:   class Options
  location: class Grib2Json
Grib2Json.java:29: error: cannot find symbol
    public Grib2Json(File gribFile, List<Options> optionGroups) {
                                         ^
  symbol:   class Options
  location: class Grib2Json
Grib2Json.java:37: error: cannot find symbol
    private void write(RandomAccessFile raf, Grib2Input input, Options optio
throws IOException {
                                             ^
  symbol:   class Grib2Input
  location: class Grib2Json
Grib2Json.java:37: error: cannot find symbol
    private void write(RandomAccessFile raf, Grib2Input input, Options optio
throws IOException {
                                                               ^
  symbol:   class Options
  location: class Grib2Json
Grib2Json.java:38: error: cannot find symbol
        JsonGeneratorFactory jgf =
        ^
  symbol:   class JsonGeneratorFactory
  location: class Grib2Json
Grib2Json.java:42: error: cannot find symbol
                    singletonMap(JsonGenerator.PRETTY_PRINTING, true));
                                 ^
  symbol:   variable JsonGenerator
  location: class Grib2Json
Grib2Json.java:39: error: cannot find symbol
            Json.createGeneratorFactory(
            ^
  symbol:   variable Json
  location: class Grib2Json
Grib2Json.java:48: error: cannot find symbol
        JsonGenerator jg = jgf.createGenerator(output);
        ^
  symbol:   class JsonGenerator
  location: class Grib2Json
Grib2Json.java:52: error: cannot find symbol
        List<Grib2Record> records = input.getRecords();
             ^
  symbol:   class Grib2Record
  location: class Grib2Json
Grib2Json.java:53: error: cannot find symbol
        for (Grib2Record record : records) {
             ^
  symbol:   class Grib2Record
  location: class Grib2Json
Grib2Json.java:54: error: cannot find symbol
            RecordWriter rw = new RecordWriter(jg, record, options);
            ^
  symbol:   class RecordWriter
  location: class Grib2Json
Grib2Json.java:54: error: cannot find symbol
            RecordWriter rw = new RecordWriter(jg, record, options);
                                  ^
  symbol:   class RecordWriter
  location: class Grib2Json
Grib2Json.java:59: error: cannot find symbol
                    rw.writeData(new Grib2Data(raf));
                                     ^
  symbol:   class Grib2Data
  location: class Grib2Json
Grib2Json.java:75: error: cannot find symbol
        raf.order(RandomAccessFile.BIG_ENDIAN);
                                  ^
  symbol:   variable BIG_ENDIAN
  location: class RandomAccessFile
Grib2Json.java:76: error: cannot find symbol
        Grib2Input input = new Grib2Input(raf);
        ^
  symbol:   class Grib2Input
  location: class Grib2Json
Grib2Json.java:76: error: cannot find symbol
        Grib2Input input = new Grib2Input(raf);
                               ^
  symbol:   class Grib2Input
  location: class Grib2Json
Grib2Json.java:81: error: cannot find symbol
        for (Options options : optionGroups) {
             ^
  symbol:   class Options
  location: class Grib2Json
22 errors

How about JSON to Grib? Advice please?

Well, this software is working just great! Now, having manipulated the resulting JSON, I'd like to write the file back as a JSON. Any suggestions as to a tool for that?

I'd love it if it were an option for this program, but something as simple would suit.

Thanks.

Error when utility is run

Hi Cameron,

When I try and run the utility I get the following error:

$ ./grib2json --help
./grib2json: 5: ./grib2json: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java/bin/java: not found

, where the long java path is the value in my JAVA_HOME variable. When $JAVA_HOME is run standalone it runs java ok.

Any suggestions on what to try next?

A.

Problems with grib2json.cmd on Mac OSX

Hi, I have got to the point where I am trying to launch the grib2json.cmd file.
However I am getting this error.

/Users/matteveritt/Google Drive/grib2json-0.8.0-SNAPSHOT/bin/grib2json.cmd: line 1: @echo: command not found
/Users/matteveritt/Google Drive/grib2json-0.8.0-SNAPSHOT/bin/grib2json.cmd: line 3: syntax error near unexpected token `"delims=X"'
/Users/matteveritt/Google Drive/grib2json-0.8.0-SNAPSHOT/bin/grib2json.cmd: line 3: `for /f "delims=X" %%i in ('dir /b %LIB_DIR%\grib2json-*.jar') do set LAUNCH_JAR=%LIB_DIR%\%%i'

I am running OSX El Capitan.

What if I want to deploy it for a server

It works pretty good on local
I want to deploy it as a server, so that I can get recent data as I want
What are the steps to do that?
mvn, java environment variables and so on

Filtering by values

When trying to filter a grib file by numeric value, if the value is a negative number, the grib2json command fires off "Unexpected options" errors.

As an example, the "Potential Vorticity" surface is positive in the Northern Hemisphere and negative in the Southern Hemisphere. This means that if you want to filter by value, you would do the following for the northern hemisphere:
grib2json -n --fp 5 -fs 109 --fv 2.0000000000000003E-6 2018112500.gfs.t00z.pgrb2.1p00.f000

and the following for the southern hemisphere:
grib2json -n --fp 5 -fs 109 --fv -2.0000000000000003E-6 2018112500.gfs.t00z.pgrb2.1p00.f000

but this second command fails after the minus sign. I have tried wrapping the value in "", '', and escaping the - with a . None of these worked.

Do you have an option in grib2json that makes this work for negative numbers?

Thanks for any response.

TypeError: vars is undefined

Please help in creating json file for relative humidity , code is looking for some file variables in header like Relative_humidity_isobaric etc.

grib2 json

Hello!
And can you describe step by step how to run grib2json. I have files grib2.
file names here in this format:
HEYB98 EGRR 200000
HEYC98 EGRR 200000
HEYD98 EGRR 200000
.....
a lot of them.

whether it is possible to do so, he appealed to these files?

Java NoClassDefFoundError

I have a problem, probably the same of issue #2.
These are the commands I used:

git clone https://github.com/cambecc/grib2json.git
cd grib2json/
mvn package
export JAVA_HOME=/usr

now I have two directory: src/ and target/.
If I run the command bash src/bin/grib2json (why you not chmod +x grib2json in the repository?) it give me Error: Unable to access jarfile src/bin/../lib/grib2json-*.jar.

I need to:

mv src/bin/ ./
mv target/ lib/

Now I can run bash bin/grib2json but the output is:

Exception in thread "main" java.lang.NoClassDefFoundError: com/lexicalscope/jewel/JewelRuntimeException
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2625)
        at java.lang.Class.getMethod0(Class.java:2866)
        at java.lang.Class.getMethod(Class.java:1676)
        at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: com.lexicalscope.jewel.JewelRuntimeException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        ... 6 more

[Error] - bin/java: not found

I hate to open this issue because I know it has something to do with JAVA_HOME that I cannot figure out.

Trying to install on Ubuntu 14.04.

mvn build was successful

Out put of echo $JAVA_HOME is /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java

Really hope you can point me in the right direction.

How print the data for all the time forecast ?

Is it possible to print the data not only for the first forecast but for all the forecast contained in the grib file.
I have a grib file containing 7 days forecast every 3h.

Is there a way to extract them ?

Thanks and you did a great job.

Proposal for a contribution

Dear all, I've started an effort to create a generic Open Source platform on the weather forecast data topic (https://github.com/weacast) and discovered your work. Weacast is a work in progress but I start having a running base, you have some information here https://weacast.gitbooks.io/weacast-docs/.

I already use your project for integrating NOAA data and forked it https://github.com/weacast/weacast-grib2json to let me improve/publish easily, I wonder if any of you is interested in collaborating to keep it alive ?

Sorry using the issue tracker for this but didn't know how to contact the community, let me know any other prefered way.

Thanks in advance for your return.

grib2json

For Linux? Windows also uses it possible?

In what ways do you use?

Decode ocean current data

Hello author, can you give me an example of decoding ocean current file? The same as your readme example, or tell me about NOAA data manipulation documentation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.