Package: veros
Versatile Ocean Simulation in Pure PythonVeros,the versatile ocean simulator, aims to be the swiss army knife of ocean modeling. It is a full-fledged primitive equation ocean model that supports anything between idealized toy models andrealistic, high-resolution, global ocean simulations. And because Veros is written in pure Python, the days of struggling with complicated model setup workflows, ancient programming environments, and obscure legacy code are finally over.In a nutshell, we want to enable high-performance ocean modelling with a clear focus on flexibility and usability.Veros supports a NumPy backend for small-scale problems, and a
high-performanceJAXbackend
with CPU and GPU support. It is fully parallelized via MPI and supports
distributed execution on any number of nodes, including multi-GPU architectures (see alsoour benchmarks).The dynamical core of Veros is based onpyOM2, an ocean model with a Fortran backend and Fortran and Python frontends.To learn more about Veros, make sure tovisit our documentation.How about a demonstration?(0.25×0.25° high-resolution model spin-up, click for better
quality)FeaturesVeros providesa fully staggered3-D grid geometry(C-grid)support for bothidealized and realistic configurationsin
Cartesian or pseudo-spherical coordinatesseveralfriction and advection schemesisoneutral mixing, eddy-kinetic energy, turbulent kinetic energy,
and internal wave energyparameterizationsseveralpre-implemented diagnosticssuch as energy fluxes,
variable time averages, and a vertical overturning stream function
(written to netCDF4 output)pre-configured idealized and realistic set-upsthat are ready to
run and easy to adaptaccessibility and extensibility- thanks to the
power of Python!Veros for the impatientA minimal example to install and run Veros:$pipinstallveros
$veroscopy-setupacc--to/tmp/acc
$verosrun/tmp/acc/acc.pyFor more detailed installation instructions, have a look atour
documentation.Basic usageTo run Veros, you need to set up a model --- i.e., specify which settings
and model domain you want to use. This is done by subclassing theVerosSetupbase class in asetup scriptthat is written in Python. You
should use theveros copy-setupcommand to copy one into your current
folder. A good place to start is theACC model:$veroscopy-setupaccAfter setting up your model, all you need to do is call thesetupandrunmethods on your setup class. The pre-implemented setups can all be
executed viaveros run:$verosrunacc.pyFor more information on using Veros, have a look atour
documentation.ContributingContributions to Veros are always welcome, no matter if you spotted an
inaccuracy inthe documentation, wrote a
new setup, fixed a bug, or even extended Veros' core mechanics. There
are 2 ways to contribute:If you want to report a bug or request a missing feature, pleaseopen an issue. If you
are reporting a bug, make sure to include all relevant information
for reproducing it (ideally through aminimalcode sample).If you want to fix the issue yourself, or wrote an extension for
Veros - great! You are welcome to submit your code for review by
committing it to a repository and opening apull
request. However,
before you do so, please checkthe contribution
guidefor some tips on testing and benchmarking, and to make sure that
your modifications adhere with our style policies. Most importantly,
please ensure that you follow thePEP8
guidelines, usemeaningfulvariable names, and document your code usingGoogle-style
docstrings.How to citeIf you use Veros in scientific work, please consider citingthe following publication:@article{hafner_veros_2018,title={Veros v0.1 – a fast and versatile ocean simulator in pure {Python}},volume={11},issn={1991-959X},url={https://gmd.copernicus.org/articles/11/3299/2018/},doi={10.5194/gmd-11-3299-2018},number={8},journal={Geoscientific Model Development},author={Häfner, Dion and Jacobsen, René Løwe and Eden, Carsten and Kristensen, Mads R. B. and Jochum, Markus and Nuterman, Roman and Vinter, Brian},month=aug,year={2018},pages={3299--3312},}Or have a look atour documentationfor more publications involving Veros.