cambecc / grib2json

converts GRIB2 files to JSON
MIT License
357 stars 154 forks source link

Cant launch Grib2Json #4

Closed swellcoud closed 10 years ago

swellcoud commented 10 years ago

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
swellcoud commented 10 years ago

I was navigating to the wrong folder in grib2json-master this now works fine

C:\Program Files (x86)\grib2json-master\target\grib2json-0.8.0-SNAPSHOT\bin>grib 2json -c -d -o current-wind-surface-level-gfs-1.0.json (name-of-grib-file).grib2