Git Product home page Git Product logo

weather-routing's Introduction

Sailing Weather Routing

Fetch weather data from DWD (ICON weather model) and calculate the optimal route for a sailing boat using diferent algorithms.

Requirements

  • Netcdf
  • Proj + pyproj (tested on 3.4.1)
  • CDO (tested on 1.9.9)
  • numpy (tested on 1.23.4)
  • matplotlib (tested on 3.8.0)
  • cartopy (tested on 0.22.0)
  • shapely (tested on 2.0.2)

How to use

We first need to install the dependencies. On our test machine running fedora, we needed compile and install CDO from source.

After installing all dependencies, we need to create a temporary directory to store the weather data.

mkdir tmp

Afterwards, we can fetch the weather grib files:

python -m grib_loader

And finally, we can run the router

python -m routers.router

The resulting plot will by default show the great circle route (i.e. shortest path), the fastest route using the dynamic programming algorithm and the shortest path using the isochrone algorithm. Each leg is currently colored to show the speed at which it can be sailed (black < 2 m/s, blue 2-3 m/s, green 3-4 m/s, red > 4 m/s).

Example routing

Currently, it's more of a playground and there are a lot of hard-coded values and no CLI args. Processing the grib files is currently also partly done through external tools (bzip, cdo). And it's a bit of a mess. Lots of to dos. :)

  • Add CLI args
  • Avoid land
  • Is it possible to call cdo and bzip from python?
  • Slider to show the route over time incl. weather data
  • add requirements.txt and setup.py
  • Optimize algorithms
  • Only load area of weather data that is needed

Similar Repos

Free Tools

Resources

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.