Skip to content
forked from leap-stc/metaflux

Meta-learning for climate sciences

License

Notifications You must be signed in to change notification settings

anhp95/metaflux

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metaflux

This repository contains the code that accompanies the paper Nathaniel, J., Liu, J. & Gentine, P. MetaFlux: Meta-learning global carbon fluxes from sparse spatiotemporal observations. Sci Data 10, 440 (2023). https://doi.org/10.1038/s41597-023-02349-y.

The resulting dataset of global, high-resolution (0.25-degree), long-term (daily/monthly 2001-2021) gross primary production and ecosystem respiration are available in Zenodo at https://doi.org/10.5281/zenodo.7761881.

Introduction

Meta-learning framework for climate sciences. Currently supports the following features:

  • Takes as input timeseries data (eg. FLUXNET eddy covariance stations)
  • Customizable hyperparameters (create your own and place them under the configs directory)
  • Sample training script with sample data that can be adapted to your own use case

Quickstart

  1. Clone this repository into your private workspace:
git clone https://github.com/juannat7/metaflux.git
  1. Install dependencies using pip or conda
pip install -r requirements.txt

Sample notebooks

These sample notebooks attempt to demonstrate the applications of meta-learning for spatiotemporal domain adaptation. In particular, we tried to infer gross primary production (GPP) from key meteorological and remote sensing data points by learning key features in data-abundant regions and adapt them to fluxes in data-sparse areas. We demonstrate the use of meta-learning in non-temporal, temporal, and with spatial context situations. Feel free to apply the algorithm presented in the notebook for your specific use cases:

  1. 01a_non_temporal_pipeline: for non-temporal dataset and model (eg. MLP)
  2. 01b_temporal_pipeline: for temporal dataset and model (eg. LSTM, BiLSTM)

Meta inference

  1. (experimental) 01c_with_encoder_pipeline: adding context encoder to current classic metalearning model

Encoder workflow Meta inference with context encoder

About

Meta-learning for climate sciences

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 78.8%
  • Python 21.2%