Thanks to visit codestin.com
Credit goes to github.com

Skip to content

syurchenkov/forecaster

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forecaster

Ruby wrapper around curl and wgrib2 to fetch and read data from the Global Forecast System (GFS).

Installation

$ gem install forecaster

Usage

require "forecaster"

Configure the gem:

Forecaster.configure do |config|
  config.cache_dir = "/tmp/forecaster"
end

Fetch a forecast:

y = 2015 # year of GFS run
m = 5    # month of GFS run
d = 4    # day of GFS run
c = 12   # hour of GFS run
h = 3    # hour of forecast
forecast = Forecaster.fetch(y, m, d, c, h) # Forecaster::Forecast

Read a record of a forecast:

key = :prate
value = forecast.read(key, longitude: 48.1147, latitude: -1.6794) # "0.000163"

License

Copyright (C) 2015 Vincent Ollivier. Released under MIT.

About

Ruby wrapper around curl and wgrib2 to fetch and read GFS data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%