GithubHelp home page GithubHelp logo

jgribx's Introduction

JGribX

Introduction

JGribX is a GRIB decoder written in Java. It is essentially a fork of JGrib, which as far as I know is now no longer being actively developed. JGribX currently supports both GRIB-1 and GRIB-2 files.

The main objective of JGribX is to create an easy-to-use interface to extract data from GRIB files.

Improvements on JGrib

Here is a shortlist of the major changes made since JGrib (version 7 beta):

  • supports GRIB-2 files
  • supports grid definition values given as south latitude and west longitude
  • looks up parameter information from locally stored Grib Parameter Tables (GPT) (instead of a single hardcoded GPT)
  • validates each GRIB record
  • skips invalid/unsupported GRIB records (showing the appropriate errors/warnings)

Important Notes

JGribX is still under active development and therefore contains a large amount of unsupported features and operations. These will be implemented gradually over time. If you would like certain features to be implemented, please open an issue containing all the relevant information.

Parameter Codes

To uniquely identify and represent different parameters, each parameter has been given its own code. A list of parameter codes can be viewed here.

Level Codes and LTVIDs

Similar to parameter codes, level codes are used to uniquely identify each level type and value(s). For example, an isobaric level is represented by the code ISBL. In addition, an isobaric level of 200 hPa is represented by the level type-value ID (LTVID) ISBL:200. A list of level codes can be viewed here.

Usage

JGribX was originally designed to be a Java library, meaning that it did not have any useful functionality when run as a standalone app. However, a command-line interface is currently being developed which would allow JGribX to be used as a standalone app via command-line.

Building a Library

Ensure that you have a copy of Gradle

Run the following command at the terminal

gradle clean build

Library Interface

The simplistic library interface can be observed from the following code snippet (omitting extra stuff such as try-catches):

/* Get the temperature at an isobaric level of 200 hPa above Valletta, Malta at 6th November 2017 14:00:00 */

GribFile gribFile = new GribFile("filename.grb");   // typically .grb or .grb2 extension

Calendar forecastDate = new GregorianCalendar(2017, 10, 6, 14, 0, 0);   // 6th November 2017 14:00:00
String parameterCode = "TMP";    // parameter code for temperature
String ltvid = "ISBL:200";       // LTVID (level type-value ID)
double latitude = 35.8985;       // latitude at point of interest
double longitude = 14.5133;      // longitude at point of interest

GribRecord record = gribFile.getRecord(forecastDate, parameterCode, ltvid);
double value = record.getValue(latitude, longitude);

Further examples on how to use JGribX can be found here.

Command-Line Interface

Coming soon.

Downloads

Binary builds (currently as JAR files), together with the source, can be found in the Releases page. These JAR files are meant to be used as a library in another program. Current versions do not have useful functionality when run as a standalone app.

jgribx's People

Contributors

spidru avatar reymalahay avatar

Watchers

James Cloos avatar Joryan avatar

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.