Skip to content

lojzezust/HIDRA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HIDRA 1.0: Deep Learning for Sea Level Forecasting

[paper] [pdf] [predictions] [BibTeX]

HIDRA logo

⭐️ New: HIDRA2 has been released. Check out the code and live predictions.

HIDRA is a state-of-the-art deep-learning model for sea level forecasting based on temporal atmospheric and sea level data.

Example sea level predictions (compared with NEMO).

Setup

Requires: Python ≥ 3.6
Clone the repository, then use pip to install HIDRA in the active Python enviroment.

git clone https://github.com/lojzezust/HIDRA.git
pip install HIDRA/

In you want to make changes to the HIDRA codebase, install the package in develop mode.

pip install -e HIDRA/

GPU processing

To enable GPU training and inference the TensorFlow requirements for GPU support must be met, mainly:

  • a CUDA® compatible card
  • TensorFlow compatible CUDA® version (currently 10.1)

Usage

HIDRA is implemented as a Tensorflow Keras model, which enables straight-forward training and inference.

from hidra import HIDRA
model = HIDRA()

# Training
model.fit(...)

# Inference
model.predict(...)

A pretrained HIDRA model trained on Koper gauge station data is included in the repository. Please refer to the HIDRA prediction example, showing how to use HIDRA with pretrained weights for sea level forecasting on sample data.

Data preparation and training

To train a HIDRA model, prepare the training data, namely the atmospheric input, sea level input and target sea level tensors. In our setup we use HDF5 files with the following structure to store the training data.

Field name Shape Description
weather N × (Tmax + Tmin)/4 × H × W × 4 Atmospheric input tensors subsampled to a 4h temporal resolution.
ssh, tide & delta N × Tmin × 1 Sea level tensors (full, tidal component and residual component)
lbl_ssh, lbl_tide & lbl_delta N × Tmax × 1 Target (labels) sea level tensors (full, tidal component and residual component).
dates (optional) N × Tmax Timestamps corresponding to prediction times of labeled data (lbl_*)

Here N defines the number of samples in the dataset, H and W define the spatial dimensions of the atmospheric data, Tmin and Tmax define the past and future horizons for HIDRA prediction. In our setup we provide the data for the last 24 hours (Tmin = 24) and predict the values for the next 72 hours (Tmax = 72).

All the features are standardized using the feature mean and standard deviation. These statistics are stored in the summary file and are used for rescaling the predictions during test-time.

For additional information regarding the model training and data structure, please refer to the HIDRA training example, detailing how to prepare and load the training data to train your own HIDRA model.

Publication

Zust, L., Fettich, A., Kristan, M., & Licer, M. (2021). HIDRA 1.0: Deep-learning-based ensemble sea level forecasting in the northern Adriatic. Geoscientific Model Development, 14(4), 2057–2074. https://doi.org/10.5194/GMD-14-2057-2021

Cite as:

@article{Zust2021HIDRA,
    author = {Zust, Lojze and Fettich, Anja and Kristan, Matej and Licer, Matjaz},
    doi = {10.5194/GMD-14-2057-2021},
    journal = {Geoscientific Model Development},
    month = {apr},
    number = {4},
    pages = {2057--2074},
    publisher = {Copernicus GmbH},
    title = {{HIDRA 1.0: Deep-learning-based ensemble sea level forecasting in the northern Adriatic}},
    volume = {14},
    year = {2021}
}