Giter VIP home page Giter VIP logo

wind-server's Introduction

Wind Server

Simple REST web service to expose GRIB2 GFS wind forecast data (0.5 or 1 degree resolution, 6 hourly from NOAA) as pre-formatted JSON. It is usually consumed by leaflet-velocity or wind-layer.

It relies on the grib2json CLI for data conversion. The 0.8 version of the converter is embedded in the project, if you want to use your own simply define the GRIB2JSON environment variable pointing to your grib2json command in the execution context.

Adapted from the wind-server fork of wind-js-server.

Build and Run

Docker

# Build docker image
$ docker build -t wind-server .

# Run container
$ docker run --name windserver -d -p 7000:7000 wind-server

Node

# Install dependencies
$ npm install

# Start
$ npm start

Launch options

The following environment variables can be used to customize behaviour:

Variable Description Default Options
PORT The port the server will listen on 7000 Port number
RESOLUTION Requested GFS data resolution 0.5 0.5, 1
WIND Enable the download of wind data true true, false
TEMP Enable the download of temperature data false true, false

Endpoints

  • /latest returns the most up to date JSON data available
  • /nearest returns JSON data nearest to requested
    • $GET params:
      • timeIso an ISO timestamp for temporal target
      • searchLimit number of days to search beyond the timeIso (will search backwards, then forwards)
  • /alive health check url, returns simple message

License

MIT License (MIT)

wind-server's People

Contributors

claustres avatar danwild avatar flowm avatar

Watchers

 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.