Metadata-Version: 2.4
Name: veris
Version: 0.2.0
Summary: Differentiable sea-ice model in JAX
Home-page: https://veris.readthedocs.io
Author: Jan Gärtner (AWI Bremen)
Author-email: jph.gaertner@gmail.com
Maintainer: Roman Nuterman, Niels Bohr Institute, University of Copenhagen
Maintainer-email: nuterman@nbi.ku.dk
License: MIT
Keywords: geophysics oceanography ice-model python numpy jax CPU/GPU parallel computing
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.1
Requires-Dist: jax>=0.11.2
Requires-Dist: numpy>=2.0
Requires-Dist: h5netcdf>=1.8.1
Requires-Dist: h5py>=3.7
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: maintainer
Dynamic: maintainer-email
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Veris

Veris models how sea ice moves, grows and melts without an external ocean model.
It uses JAX, a Python library for calculations with arrays (tables of numbers).
The model is differentiable: it can calculate how changes in inputs affect its
results. Define an experiment (its inputs and settings), prepare its initial
values, advance it in timesteps (intervals of simulated time) and save the
results. The same workflow covers dynamics (ice motion), thermodynamic growth
(growth and melting through heat exchange) and coupled experiments (both
together). It runs on computer processors (CPU), graphics processors (GPU) and
explicitly configured JAX meshes (groups of devices).

Install the [latest release](https://github.com/team-ocean/veris/releases/latest)
with Python 3.12 or newer:

```sh
python -m pip install --upgrade veris
```

Start with [Getting started](https://veris.readthedocs.io/en/stable/introduction/get-started.html)
for installation, a first command-line simulation and reading its output.
The [stable documentation](https://veris.readthedocs.io/en/stable/) describes the
latest published release.
The [command line reference](docs/cli.rst) explains how to list and copy setups,
run them and override their settings.

This coupled example supplies the ocean's shape and size, masks (arrays marking
land and ocean) and atmospheric fields (weather values across the grid, the
cells dividing the modeled area). These prescribed inputs come from the setup,
without an external ocean model:

```python
from veris import Execution, Experiment, Grid, Simulation

experiment = Experiment.builtin(
    "island", grid=Grid(6, 8), steps=3,
    settings={"dtype": "float32", "nEVPsteps": 2},
    execution=Execution(backend="cpu"),
)
with Simulation.initialize(experiment) as simulation:
    result = simulation.run()
    simulation.snapshot("final.nc", variables=("hIceMean", "Area"))
    simulation.save_restart("checkpoint.nc")
```

Use new output destinations when repeating this example. Its two EVP subcycles
(repeated calculations in the elastic-viscous-plastic ice-motion solver) demonstrate the programming
interface; they do not show that the solver has converged to a solution.

- [Python lifecycle tutorial](docs/quickstart/user-guide.rst): successive runs,
  output saved on a schedule, observations and exact restart.
- [Custom ocean](docs/quickstart/custom-ocean.rst) and
  [setup blueprint](docs/quickstart/setup-blueprint.rst): prescribed geometry,
  fields and reusable functions that create experiments.
- [Pure integration](docs/reference/integration.rst) and
  [automatic differentiation](docs/reference/automatic-differentiation.rst):
  runs over several timesteps, sensitivity to supplied inputs and rules for
  calculating derivatives.
- [Model setups](docs/reference/setup-gallery.rst): physical assumptions and
  serial (single-device), GPU and distributed (multiple-process) examples.
- [Python API](docs/api/index.rst) and
  [package hierarchy](docs/reference/package-hierarchy.rst): interface rules and
  each part of the package's responsibilities.
- [Development](docs/development.rst): checks, documentation builds and contribution
  workflow. [DESIGN.md](DESIGN.md) and [CHANGELOG.md](CHANGELOG.md) record
  the model's design and verified progress.
