DIFFICE_jax documentation
Introduction
DIFFICE_jax is a Python package that solves the depth-integrated Stokes equation for ice shelves, and can be adopted for ice sheets by modifying the partial differential equations (PDE) in the neural network loss function. It uses PDEs to interpolate descretized remote-sensing data into meshless and differentible functions, and infer ice shelves’ viscosity structure via back-propagation and automatic differentiation (AD). The algorithm is based on physics-informed neural networks (PINNs) and implemented in JAX. The DIFFICE_jax package involves several advanced features in addition to vanilla PINNs algorithms, including collocation points resampling, non-dimensionalization of the data adnd equations, extended-PINNs (XPINNs) (see figure below), viscosity exponential scaling function, which are essential for accurate inversion. The package is designed to be user-friendly and accessible for beginners. The Github respository also provides Colab Notebooks for both the synthetic and real ice-shelf examples in the tutorial and examples folders, respectively.
Statement of Needs
This package provides a neural network-based approach for solving inverse problems in glaciology, specifically for estimating effective ice viscosity from high-resolution remote sensing data. Ice viscosity is a key parameter for predicting ice-shelf dynamics, but direct in-situ measurements of viscosity across Antarctica are impractical. Traditional adjoint methods require deriving additional equations and applying regularization techniques to handle noisy data. In contrast, neural networks can inherently de-noise while solving the inverse problem without explicit regularization. Finally, this solver is fully differentiable using automatic differentiation (AD), eliminating the need for manual adjoint derivations and enabling efficient exploration of complex PDEs, including anisotropic ice flow models. This neural network-based method offers a flexible framework for solving inverse problems in glaciology.
Installation
The build of the code is tesed on Python version (3.9, 3.10 and 3.11) and JAX version (0.4.20, 0.4.23, 0.4.26)
You can install the package using pip as follows:
python -m pip install DIFFICE_jax
Contributors
This package is written by Yongji Wang and maintained by Yongji Wang (yongjiw@stanford.edu) and Ching-Yao Lai (cyaolai@stanford.edu). If you have questions about this code and documentation, or are interested in contributing the development of the DIFFICE_jax package, please see the contributing guidelines for information on submitting issues and pull requests.
License
DIFFICE_jax is an open-source software. All code within the project is licensed under the MIT License. For more details, please refer to the LICENSE file.
Citation
Wang, Y. and Lai, C.Y., 2025. DIFFICE-jax: Differentiable neural-network solver for data assimilation of ice shelves in JAX. Journal of Open Source Software, 10(109), p.7254.
@article{wang2025diffice,
title={DIFFICE-jax: Differentiable neural-network solver for data assimilation of ice shelves in JAX},
author={Wang, Yongji and Lai, Ching-Yao},
journal={Journal of Open Source Software},
volume={10},
number={109},
pages={7254},
year={2025}
}
Wang, Y., Lai, C.Y., Prior, D.J. and Cowen-Breen, C., 2025. Deep learning the flow law of Antarctic ice shelves. Science, 387(6739), pp.1219-1224.
@article{wang2025deep,
title={Deep learning the flow law of Antarctic ice shelves},
author={Wang, Yongji and Lai, Ching-Yao and Prior, David J and Cowen-Breen, Charlie},
journal={Science},
volume={387},
number={6739},
pages={1219--1224},
year={2025},
publisher={American Association for the Advancement of Science}
}
Inverse Problems:
Extended-PINNs:
Training Data:
Real-data Examples: