<commit_before>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][1] of a forecast:

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

[1]: http://www.nco.ncep.noaa.gov/pmb/products/gfs/gfs_upgrade/gfs.t06z.pgrb2.0p25.f006.shtml


License
-------

Copyright (C) 2015 <NAME>. Released under MIT.<commit_msg>Update README to GitHub Flavored Markdown<commit_after>Forecaster
==========

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


Installation
------------

    $ gem install forecaster


Usage
-----

```ruby
require "forecaster"
```

Configure the gem:

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

Fetch a forecast:

```ruby
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][1] of a forecast:

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

[1]: http://www.nco.ncep.noaa.gov/pmb/products/gfs/gfs_upgrade/gfs.t06z.pgrb2.0p25.f006.shtml


License
-------

Copyright (C) 2015 <NAME>. Released under MIT.
{'fraction_non_alphanumeric': 0.15191256830601094, 'fraction_numerical': 0.046994535519125684, 'mean_word_length': 2.8792372881355934, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '390013', 'n_tokens_mistral': 762, 'n_tokens_neox': 651, 'n_words': 204}