Git Product home page Git Product logo

linear-shelf-melt's Introduction

linear-shelf-melt

DOI

Small-perturbation (linearized) model for topographic response of ice shelves to localized melting. Also includes finite element code to solve the fully nonlinear problem. This code accompanies the manuscript:

Stubblefield, A.G., Wearing, M.G., & Meyer, C.R. (2023). Linear analysis of ice-shelf topography response to basal melting and freezing. https://eartharxiv.org/repository/view/5330/

Running the code

This repository contains a simple model for ice-shelves undergoing localized basal melting or freezing perturbations. The figures in the manuscript can be reproduced with the Jupyter notebooks in the "notebooks" directory. A derivation and analysis of the model is outlined in the first two notebooks. The final notebook "4_nonlinear.ipynb" relies on FEniCSx (https://fenicsproject.org) code in the "nonlinear-model" directory. This notebook can be run via Docker (https://www.docker.com) with the command: docker run --init -ti -p 8888:8888 -v $(pwd):/home/fenics/shared -w /home/fenics/shared dolfinx/lab:stable

Code organization

Linear model

The "linear-model" directory contains:

  1. params.py: sets the physical and numerical parameters
  2. kernel_fcns.py: defines the functions that appear in the solution operators
  3. operators.py: defines steady-state and time-dependent solution operators

Examples for running the code are provided in the Jupyter notebooks ("notebooks" directory).

Nonlinear model

The "nonlinear-model" directory is essentially a fork of the repo https://github.com/agstub/grounding-line-methods that has been translated into Dolfinx. The model is organized in 6 python files in the source directory as follows.

  1. params.py contains all of the model parameters and model options.

  2. stokes.py contains the Stokes system solver and related functions.

  3. mesh_routine.py contains functions that solve the surface kinematic equations, move the mesh, and some post-processing functions.

  4. bdry_conds.py contains functions that mark the mesh boundary and apply boundary conditions.

  5. smb.py contains surface mass balance functions: basal melting/freezing rate and surface accumulation/ablation rate.

  6. main.py runs the model. It contains the time-stepping loop that calls the Stokes solver and mesh-related functions at each timestep, and returns the output.

linear-shelf-melt's People

Contributors

agstub avatar

Stargazers

bwbj avatar

Watchers

 avatar

Forkers

fangheyu

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.