Coder Social home page Coder Social logo

iamiqbal / deep-learning-for-short-range-weather-forecasts Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 2.0 9.8 MB

Deep Learning for land, oceanic and atmospheric climate variable forecasts

convlstm deep-learning ecmwf-api ecmwf-reanalysis-data era5 google-earth-engine precipitation temperature tensorflow transformer weather-forecast

deep-learning-for-short-range-weather-forecasts's Introduction

DeepLearning for Short-Range Weather Forecasts

Weather forecasting is a long-studied field. Numerical Weather Prediction (NWP) models have been around since revolution in high performance computing. NWP, refers to forecasting the future state of the weather through large computer simulations that take into account the current states of variables. This method uses Partial Differential Equations to predict the temperature, wind, precipitation, and clouds.

The motivation behind this project is to propose a different Deep Learning model to not only forecast precipitation, but also temperature as well as additional land, oceanic and atmospheric climate variables, so that less computing power is used, and the predictions are more accurate.


Dataset Construction

To train our model, we went ahead and created our own dataset. We used the Google Earth Engine (GEE) to get the precipitation and temperature hourly aggregates as images, in which each pixel covers ~11KM on ground. Following are some samples of temperature and precipitation dataset:

Region Coordinates

  • 23.155933,59.545898,37.439499,79.541016

Preprocessing

We have resized the dataset images into two resolutions for different models

  1. 74 x 104
  2. 54 x 74

Our GEE script downloads the images with a matplotlib axis padding, So we have written a script to crop the images as well.

Lastly, We have concatenated the images into numpy arrays such that 24 hours correspond to 24 images. For example, a sample of one month will have a 4 dimensional tensor of 30 x 24 x width x height. If we were to concatenate daily aggregates of precipitation and temperature, then our samples would like the following gifs:


Architecture

Inspired by Xingjian Shi et al., 2015, We have used ConvLSTMs for our model.

Michael R Lin, Predicting Fist Movement with Convolutional LSTMs. Available online: https://m-lin-dm.github.io/ConvLSTM_Fish_1/ (accessed on June 11, 2021)

Dependencies

  • tensorflow
  • ee
  • geemap
  • numpy
  • matplotlib
  • opencv
  • moviepy
  • imageio
  • pandas


Training - Loss


PSNR, SSIM and MS-SSIM metrics over lead times


Results

We have implemented our models in TensorFlow. We have trained four different models and on different configurations, using Adam optimizer with the loss suggested from paper.

Model Type Ground Truth Predictions Comments
1. Precipitation Model 1 captures the dynamics of the motion but the amount of prediction precipitation is high.
2. Temperature Model 2 is trained on the temperature data, and it captures both the motion and predictions are aligned with the ground truth.
3. Precipitation Model 3 improves over Model 1 and performs better.
4. Precipitation Model 4 has successfully captured the motion as well as the amount of precipitation occuring in different regions.

Wind Speed

For the wind speed we have made some changes to the model by adding dropout and l2 regularization, as the model was overfitting. These changes improved model's performance. We trained our model on U and V components of the Wind, and also on hourly data as well as daily averages since 1940. We have kept the region coordinates same as above.

Results for the Wind Speed and Direction


Predictions - Autoregressive

Precipitation

Temperature 2m

U component of Wind

V component of Wind


Results on Folium Map for Precipitation & Temperature

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.