REST API to serve GRIB2 wind forecast data as JSON.
Install node dependencies
npm install
Start server
nmp start
- /latest latest data available
Currently, the HTTP server only serves a static JSON file, in order to update the file there're two ways:
- Manually download the desired GRIB2 file and convert it using grib2json
- Load vars from
.env
and set up the following cron jobs with a time of your choice (note that NCEP only updates GFS model every 6 hours):$PROJECT_PATH/start.sh
$PROJECT_PATH/converter/bin/grib2json --data --output $PROJECT_PATH/tmp/wind-global.json --names --compact $PROJECT_PATH/tmp/latest.grib2
NODE_ENV=""
PORT=""
TMP_PATH=""
Check for the environment variable JAVA_HOME
as it can differ from java versions and it can cause the grib2json converter to silently fail