3 releases
Uses new Rust 2024
| new 0.5.0-alpha.6 | Feb 9, 2026 |
|---|---|
| 0.5.0-alpha.5 | Feb 8, 2026 |
#4 in #grib
19KB
233 lines
GRIB2Sail
Grib files downloader for sailing purposes
Currently the supported models are:
- AROME (001 and 0025)
- AROME ANTILLE
- AROME GUYANE
- AROME INDIEN
- AROME NOUVELLE CALEDONIE
- AROME POLYNESIE
- GFS (0025)
Installation
To install GRIB2Sail simply run:
pip install grib2sail
To download GRIB from meteofrance's models (Aome), you must create a free account on meteofrance.fr. The procedure is as follow:
- Create an account on the Météo-France API portal
- Subscribe to the desired service (Arome)
- Go to "My API" then, from your subscribed model: "Generate Token"
- Checkout the curl field at the bottom, it looks like :
curl -k -X POST https://portal-api.meteofrance.fr/token -d "grant_type=client_credentials" -H "Authorization: Basic ABCDEF1234abcdef"
- The string that comes after Basic is your application ID (ABCDEF1234abcdef in this example)
- Copy/paste this application ID to GRIB2Sail when prompted (you will only be prompted the first time you use GRIB2Sail)
Usage
To get the GRIB file containing the wind, the wind_gust, the atmospheric pressure and the cloud coverage for the area between latitude 11.5N - 12.5N and longitude 62.5W - 61.5W with a 3 hour step from the AROME ANTILLE model run:
python -m grib2sail --lat 11.5,12.5 --lon -62.5,-61.5 --step 3h --data wind,wind_gust,cloud,pressure
The first time you will be prompted to enter your application ID. It will be stored in your keyring for subsequent run.
The downloaded grib file will be present in the working directory named arome_antille_1970-01-01T00.00.00Z_3h.grib2.
It can now be imported in a navigation software such as OpenCPN
Roadmap
This is still the early stage of the development the main upcoming features are:
- adding more supported models (arpege, ecmwf...)
- adding more supported variables (rain, sea state)
- adding a GUI
Dependencies
~17–40MB
~586K SLoC