Git Product home page Git Product logo

glacier_pinn's Introduction

Ice thickness estimates from mass conserving PINN

Mass conserving physics-informed neural network (PINN) to estimate glacier ice thickness and the code to produce the dataset to train and test it as described in Steidl et al.: 'Physics-aware Machine Learning for Glacier Ice Thickness Estimation: A Case Study for Svalbard'

Preprocessing

The preprocessing of the data is done using a conda environment with oggm (environment_oggm.yaml). The data used for the preprocessing is:

  1. linking_glathida_RGI.ipynb: Ice thickness data from GlaThiDa (Version 3.1.0) are linked to the corresponding RGI IDs.
  2. create_dataset.ipynb: Then the dataset including any auxiliary data to train and test the PINN is created using OGGM (Version 1.6).

Model training and cross validation

Cross validation procedure including the training of the model happens in LOGO_CV.py. To execute the CV procedure you need to provied a config.yaml file that provides information on how to set up the experiment, the model architecture and hyperparameters, loss weights, data loading and where to find the data. model_config.yaml is the configuration that created the results reported in the manuscript.

The results of the cross validation, including the train and test datasets as .csv files for every training fold, are saved to the folder specified in the config file. The environment to run the PINN model can be created from the environment.yml.

To try the PINN LOGO_CV just run LOGO_CV.py --config_path path/to/config_file

The processed training data and CV results can be found at 10.5281/zenodo.11474955.

Creating Figures

The figures in the manuscript were created by running

  1. plot_dataset.ipynb: plots the study area with acquisition lines of ice thickness measurements and the LOGO test glaciers. The coastline of Svalbard in the figures showing the whole study area is taken from Moholdt, G., Maton, J., Majerska, M., Kohler, J. (2021). Annual coastlines for Svalbard [Data set]. Norwegian Polar Institute. https://doi.org/10.21334/npolar.2021.21565514 (Last accessed: 24.04.2024), licensed under the Creative Commons Attribution 4.0 International License.

  2. make_CV_predictions.py: loads every model from the LOGO_CV, makes predictions of ice thicknesses for the whole study area, and stores the result in a new .csv file.

  3. make_PINN_pred_figures.py: loads the predictions we just made and generates a mean over the predictions of the 7 LOGO model's predictions. The mean is saved to two separate .csv files, one for all the unlabbeld grid points and one for the labelled grid points. The scatter plots comparing the mean predicted ice thickness and other ice thickness estimates, and the plots of mean and coefficient of variation for every grid point in the study area are created.

  4. make_LOGO_figures.py: loads every model from the LOGO_CV, makes predictions of ice thicknesses only for the LOGO test glaciers, and stores the result in a new .csv file. Then the ice thickness estimates for each of the glacier is plotted in a single figure. Depending on the command line instructions, either only the residuals to the measured ice thicknesses are plotted or only the predicted ice thickness, or both are are plotted together.

glacier_pinn's People

Contributors

viola1593 avatar

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.