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.
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
- Clone this repository into your private workspace:
git clone https://github.com/juannat7/metaflux.git
- Install dependencies using
pip
orconda
pip install -r requirements.txt
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:
01a_non_temporal_pipeline
: for non-temporal dataset and model (eg. MLP)01b_temporal_pipeline
: for temporal dataset and model (eg. LSTM, BiLSTM)
- (experimental)
01c_with_encoder_pipeline
: adding context encoder to current classic metalearning model