Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JOSS paper #387

Merged
merged 96 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
3e4167e
Create draft-pdf.yml
milankl Sep 14, 2023
10a2701
paper template, first paragraphs, bib
milankl Sep 14, 2023
de7c467
paper.pdf and paper.jats removed
milankl Sep 14, 2023
bb4b899
github action: save pdf to repo
milankl Sep 15, 2023
9bfea3d
first paper draft finished
milankl Sep 15, 2023
c526171
Saved new PDF of paper
milankl Sep 15, 2023
fd58298
joss paper: affiliations updated
milankl Sep 16, 2023
2c59a8b
Saved new PDF of paper
milankl Sep 16, 2023
cd11fd4
JOSS paper: further comments accepted
milankl Sep 16, 2023
4049518
Saved new PDF of paper
milankl Sep 16, 2023
553bcc6
joss paper: sentence after monolithic added
milankl Sep 16, 2023
0ebc3aa
Saved new PDF of paper
milankl Sep 16, 2023
e6d56b6
joss paper: Sam's suggestions accepted
milankl Sep 18, 2023
7ef34ce
Saved new PDF of paper
milankl Sep 18, 2023
c6e659a
joss paper: Max, Navid suggestions added
milankl Sep 19, 2023
41cc8ae
Saved new PDF of paper
milankl Sep 19, 2023
e954def
joss paper: max easy running
milankl Sep 19, 2023
2f61224
Saved new PDF of paper
milankl Sep 19, 2023
e9ac229
joss paper: fix some citations
milankl Sep 19, 2023
8e27e26
Saved new PDF of paper
milankl Sep 19, 2023
ce36c82
joss paper: index 2 added for Oxford
milankl Sep 21, 2023
66b7b88
Saved new PDF of paper
milankl Sep 21, 2023
afe4feb
Add Justin's orcid
milankl Sep 25, 2023
1e636df
Saved new PDF of paper
milankl Sep 25, 2023
dc0f903
JOSS paper: Alistair's suggestions
milankl Sep 26, 2023
ba2244c
Saved new PDF of paper
milankl Sep 26, 2023
453a8c1
JOSS paper: affils updated
milankl Sep 26, 2023
78d3a46
Saved new PDF of paper
milankl Sep 26, 2023
783522b
Update docs/joss/paper.md
milankl Oct 16, 2023
8c99caf
Saved new PDF of paper
milankl Oct 16, 2023
6bf1982
JOSS paper: Alistair's and David's comments.
milankl Oct 16, 2023
9857a80
Saved new PDF of paper
milankl Oct 16, 2023
794ae95
joss paper: spaces for list
milankl Oct 16, 2023
559ca64
Saved new PDF of paper
milankl Oct 16, 2023
61f4850
JOSS paper: slight tweaks
milankl Oct 16, 2023
fc75789
Saved new PDF of paper
milankl Oct 16, 2023
02fe3a0
JOSS paper: David's paper added
milankl Oct 16, 2023
8615235
JOSS paper: citation typo
milankl Oct 16, 2023
f2b6f7d
JOSS paper: David's paper key changed
milankl Oct 16, 2023
40887ef
Saved new PDF of paper
milankl Oct 16, 2023
039d756
JOSS paper: Add Justin's citations
milankl Oct 16, 2023
9000d60
Saved new PDF of paper
milankl Oct 16, 2023
707053b
JOSS paper: Alistair's next comments
milankl Oct 17, 2023
5e57d9e
Saved new PDF of paper
milankl Oct 17, 2023
30b51ea
JOSS Paper: remove David and tweaks
milankl Oct 20, 2023
2d599b5
Saved new PDF of paper
milankl Oct 20, 2023
767b785
JOSS paper: Simone's comments
milankl Oct 25, 2023
9bde536
Saved new PDF of paper
milankl Oct 25, 2023
71a9355
JOSS paper: Alistair not MIT
milankl Oct 25, 2023
4ede4da
Saved new PDF of paper
milankl Oct 25, 2023
9fe4f94
JOSS paper: Simone's restructure suggestions
milankl Oct 25, 2023
7cb917c
Saved new PDF of paper
milankl Oct 25, 2023
4d7702f
JOSS paper: more tweaks following restructure
milankl Oct 25, 2023
f083a9a
Saved new PDF of paper
milankl Oct 25, 2023
2ef9b0f
joss paper: with new figure, incl precip
milankl Nov 30, 2023
84239c8
Saved new PDF of paper
milankl Nov 30, 2023
66cf01c
joss paper: figures moved upwards
milankl Nov 30, 2023
aedac51
Merge branch 'mk/josspaper' of https://github.com/SpeedyWeather/Speed…
milankl Nov 30, 2023
465edc7
Saved new PDF of paper
milankl Nov 30, 2023
fd03c79
josspaper: doi corrected
milankl Dec 6, 2023
a8235e1
Saved new PDF of paper
milankl Dec 6, 2023
752e001
use initials for first/middle names
navidcy Feb 22, 2024
5d9c304
Saved new PDF of paper
navidcy Feb 22, 2024
c63b33b
Navid's affiliation
milankl Feb 22, 2024
19168b6
Saved new PDF of paper
milankl Feb 22, 2024
bcb8df9
combine affiliations
navidcy Feb 22, 2024
5672dd8
Saved new PDF of paper
navidcy Feb 22, 2024
684eb5a
add simone's orcid
navidcy Feb 22, 2024
d9004fe
Merge branch 'mk/josspaper' of github.com:SpeedyWeather/SpeedyWeather…
navidcy Feb 22, 2024
5a4e5a4
Saved new PDF of paper
navidcy Feb 22, 2024
d4e5125
Merge branch 'main' into mk/josspaper
milankl Mar 3, 2024
b1c1062
Saved new PDF of paper
milankl Mar 3, 2024
e81500e
Merge branch 'main' into mk/josspaper
milankl Mar 20, 2024
f7e864e
Saved new PDF of paper
milankl Mar 20, 2024
f09bab1
First points of slayoo addressed
milankl Mar 27, 2024
aa93655
Saved new PDF of paper
milankl Mar 27, 2024
eee6555
More slayoo's review comments
milankl Mar 29, 2024
75e72ce
Merge branch 'main' into mk/josspaper
milankl Mar 29, 2024
0018b19
Merge branch 'mk/josspaper' of https://github.com/SpeedyWeather/Speed…
milankl Mar 29, 2024
67eddb7
Saved new PDF of paper
milankl Mar 29, 2024
579c490
Particle figure for barotropic vorticity equations
milankl Apr 2, 2024
04a9378
Merge branch 'mk/josspaper' of https://github.com/SpeedyWeather/Speed…
milankl Apr 2, 2024
4dc8fa9
Saved new PDF of paper
milankl Apr 2, 2024
81eedda
particles.jpg with white background
milankl Apr 2, 2024
3e863bc
Merge branch 'mk/josspaper' of https://github.com/SpeedyWeather/Speed…
milankl Apr 2, 2024
65c3259
Saved new PDF of paper
milankl Apr 2, 2024
d76df12
Higher resolution figure for primitive equation showcase
milankl Apr 2, 2024
a88f020
Merge branch 'mk/josspaper' of https://github.com/SpeedyWeather/Speed…
milankl Apr 2, 2024
58d582b
Saved new PDF of paper
milankl Apr 2, 2024
f40d6ce
Merge branch 'main' into mk/josspaper
milankl May 20, 2024
99e1e26
Saved new PDF of paper
milankl May 20, 2024
cc28a4a
Update docs/joss/paper.bib
milankl May 20, 2024
f54e7d4
Saved new PDF of paper
milankl May 20, 2024
9813e99
Capitalization in the references
milankl Jun 4, 2024
000c992
Space before reference
milankl Jun 4, 2024
a71fa34
Saved new PDF of paper
milankl Jun 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on: [push]

jobs:
paper:
runs-on: ubuntu-latest
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
# This should be the path to the paper within your repo.
paper-path: docs/joss/paper.md
- name: Upload
uses: actions/upload-artifact@v1
with:
name: paper
# This is the output path where Pandoc will write the compiled
# PDF. Note, this should be the same directory as the input
# paper.md
path: docs/joss/paper.pdf
# These lines have been added following
# https://github.com/openjournals/openjournals-draft-action/issues/15
- name: save pdf to repo
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Saved new PDF of paper
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,9 @@ run_*/
# no video outputs
*.mp4

# JOSS paper
docs/joss/media
docs/joss/paper.jats

# not sure where they are from
default.profraw
default.profraw
Binary file removed docs/img/barotropic_vorticity.jpg
Binary file not shown.
Binary file removed docs/img/frame0240_small.jpg
Binary file not shown.
Binary file removed docs/img/galewsky.jpg
Binary file not shown.
Binary file removed docs/img/galewsky_nc_12days.png
Binary file not shown.
Binary file removed docs/img/galewsky_nc_12days_mountains.png
Binary file not shown.
Binary file removed docs/img/galewsky_nc_6days.png
Binary file not shown.
606 changes: 606 additions & 0 deletions docs/joss/paper.bib

Large diffs are not rendered by default.

235 changes: 235 additions & 0 deletions docs/joss/paper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
---
title: 'SpeedyWeather.jl: Reinventing atmospheric general circulation models towards interactivity and extensibility'

tags:
- Julia
- weather
- climate
- general circulation model
- spectral
- spherical harmonic transform

authors:
- name: Milan Klöwer
orcid: 0000-0002-3920-4356
email: [email protected]
corresponding: true # (This is how to denote the corresponding author)
affiliation: "1, 2" # (Multiple affiliations must be quoted)

- name: Maximilian Gelbrecht
orcid: 0000-0002-0729-6671
affiliation: "3,4"
milankl marked this conversation as resolved.
Show resolved Hide resolved

- name: Daisuke Hotta
orcid: 0000-0003-2287-0608
affiliation: "5,6"

- name: Justin Willmert
orcid: 0000-0002-6452-4693
affiliation: 7
milankl marked this conversation as resolved.
Show resolved Hide resolved

- name: Simone Silvestri
orcid: 0000-0002-7156-946X
affiliation: 1

- name: Gregory L Wagner
milankl marked this conversation as resolved.
Show resolved Hide resolved
orcid: 0000-0001-5317-2445
affiliation: 1

- name: Alistair White
milankl marked this conversation as resolved.
Show resolved Hide resolved
orcid: 0000-0003-3377-6852
affiliation: "3,4"

- name: Sam Hatfield
orcid: 0000-0001-7235-6450
affiliation: 6
milankl marked this conversation as resolved.
Show resolved Hide resolved

- name: Tom Kimpson
orcid: 0000-0002-6542-6032
affiliation: "2,8"

- name: Navid C Constantinou
milankl marked this conversation as resolved.
Show resolved Hide resolved
orcid: 0000-0002-8149-4094
affiliation: 8

- name: Chris Hill
affiliation: 1

affiliations:
- name: Massachusetts Institute of Technology, Cambridge, MA, USA
index: 1
- name: University of Oxford, UK
milankl marked this conversation as resolved.
Show resolved Hide resolved
index: 2
- name: Technical University of Munich, Germany
index: 3
- name: Potsdam Institute for Climate Impact Research, Germany
index: 4
- name: Japan Meteorological Agency, Tsukuba, Japan
index: 5
- name: European Centre for Medium-Range Weather Forecasts, Reading, UK
index: 6
- name: University of Minnesota, Minneapolis, MN, USA
index: 7
milankl marked this conversation as resolved.
Show resolved Hide resolved
- name: The University of Melbourne, Parkville, VIC, Australia
index: 8
milankl marked this conversation as resolved.
Show resolved Hide resolved

date: 27 March 2024
bibliography: paper.bib

---


# Summary

SpeedyWeather.jl is a library to simulate and analyze the global atmospheric
circulation on the sphere. It implements several 2D and 3D
models which solve different sets of equations:

- the primitive equations with and without humidity (\autoref{fig:primitive}),
- the shallow water equations (\autoref{fig:swm}), and
- the barotropic vorticity equation (\autoref{fig:particles}).

The primitive equation model in SpeedyWeather.jl is an
atmospheric general circulation model [@Kucharski2013] with simple parameterizations
for unresolved physical processes including precipitation or boundary layer mixing.
It can be thought of as a conceptual reinvention of the Fortran SPEEDY model [@Molteni2003]
in the Julia programming language [@Bezanson2017]. However, all models here are written in a modular
way to make its components easily extensible. For example, a new parameterization can
be externally defined and passed as an argument to the model constructor.
Operators used inside SpeedyWeather.jl are exposed to the user,
facilitating analysis of the simulation data.
SpeedyWeather.jl is therefore, beyond its main purpose of simulating
atmospheric motion, also a library for the analysis of gridded data on the sphere.
Running and analyzing simulations can be interactively combined, enhancing user
experience and productivity.
milankl marked this conversation as resolved.
Show resolved Hide resolved

The user interface of SpeedyWeather.jl is heavily influenced by
the Julia ocean model Oceananigans.jl [@Ramadhan2020].
A monolithic interface [@Mazlami2017], controlling most of the model's functionality
through arguments of a single function or through parameter files (often called namelists in Fortran),
is avoided in favor of a library-style interface.
A model is constructed bottom-up by first defining the discretization
and any non-default model components with their respective parameters.
All components are then collected into a single model object which, once
initialized, returns a simulation object. A simulation contains everything,
the model with all parameters as constructed before but also all prognostic and diagnostic variables.
Such a simulation can then be run, but also accessed before and after to analyze or
visualize the current variables, or individual terms of the equations.
One can also adjust some parameters before resuming the simulation.
While these steps can be written into a script for reproducibility,
milankl marked this conversation as resolved.
Show resolved Hide resolved
the same steps can be executed and interacted with one-by-one in
Julia's read-evaluate-print loop (REPL) or in a Jupyter or Pluto notebook.
We thereby achieve an interactivity of a simulation and its various model components
far beyond the options provided in a monolithic interface.
At the same time, defaults, set to well-established test cases,
enable even inexperienced users to run simulations in just a few lines of code.

![Surface humidity, air temperature, wind speed and precipitation simulated
with the primitive equation model in SpeedyWeather.jl. Spectral resolution is
T340 (about 40km) on an octahedral Gaussian grid [@Malardel2016] with simple
physics to represent unresolved processes such as surface fluxes including
evaporation, and precipitation due to large-scale condensation and convection.
\label{fig:primitive}](primitive.jpg)

SpeedyWeather.jl relies on Julia's multiple dispatch programming paradigm [@Bezanson2017]
to be extensible with new components including parameterizations, forcing, drag,
or even the grid.
All such supported model components define an abstract type that can be
subtyped to introduce, for example, a new parameterization.
To define a new parameterization for convection in a given vertical column of the atmosphere,
one would define `MyConvection` as a new subtype of `AbstractConvection`.
One then only needs to extend the `initialize!` (executed once during model initialization)
and `convection!` (executed on every time step)
functions for this new type. Passing on `convection = MyConvection()`
to the model constructor then implements this new model component without
the need to branch off or overwrite existing model components.
Conceptually similar scientific modelling paradigms have been very successful
in the Python-based generic partial differential equation solver Dedalus [@Burns2020],
the process-oriented climate model CLIMLAB [@Rose2018],
and the Julia ocean model Oceananigans.jl [@Ramadhan2020].

The dynamical core of SpeedyWeather.jl uses established numerics
[@Bourke1972; @Hoskins1975; @Simmons1978; @Simmons1981],
widely adopted in numerical weather prediction. It is based on the spherical
harmonic transform [@reinecke2013; @stompor2011] with a leapfrog-based semi-implicit
time integration [@Hoskins1975] and a Robert-Asselin-Williams filter [@Williams2011; @Amezcua2011].
The spherical harmonic transform is grid-flexible [@Willmert2020]. Any iso-latitude ring-based
grid can be used and new grids can be externally defined and passed in
as an argument. Many grids are already implemented: the conventional
Gaussian grid, a regular longitude-latitude grid,
the octahedral Gaussian grid [@Malardel2016], the octahedral
Clenshaw-Curtis grid [@Hotta2018], and the HEALPix grid [@Gorski2005].
Both SpeedyWeather.jl and its spherical harmonic transform are also
number format-flexible. Single-precision floating-point numbers
(Float32) are the default as adopted by other modelling efforts [@Vana2017; @Nakano2018],
but Float64 and other custom number formats can be used with a single
code basis [@Klower2022; @Klower2020].
Julia will compile to the choice of number format, the grid,
and and other model components just-in-time. A simple parallelization
(across vertical layers for the dynamical core, across horizontal grid points
for the parameterizations) is supported by Julia's multithreading.
No distributed-memory parallelization is currently supported,
GPU support is planned.

SpeedyWeather.jl internally uses three sub-modules `RingGrids`,
`LowerTriangularMatrices`, and `SpeedyTransforms`. `RingGrids` is a module that discretizes
the sphere on iso-latitude rings and implements interpolations between various such grids.
`LowerTriangularMatrices` facilitates the implementation of the spherical harmonics by organizing
their coefficients in a lower triangular matrix representation.
`SpeedyTransforms` implements the spectral transform between
the grid-point space as defined by `RingGrids` and the spectral space defined in
`LowerTriangularMatrices`. These three modules are independently usable
and therefore support SpeedyWeather's library-like user interface.
Output is stored as NetCDF files using NCDatasets.jl [@NCDatasets].

![Relative vorticity simulated with the shallow water model in SpeedyWeather.jl.
The simulation used a spectral resolution of T1023 (about 20 km) and Float32
arithmetic on an octahedral Clenshaw-Curtis grid [@Hotta2018]. Relative vorticity
is visualized with Matplotlib [@Hunter2007] and Cartopy [@Cartopy] using a
transparent-to-white colormap to mimic the appearance of clouds. Underlaid is
NASA's blue marble from June 2004. \label{fig:swm}](swm.png)

# Statement of need
milankl marked this conversation as resolved.
Show resolved Hide resolved

SpeedyWeather.jl is a fresh approach to atmospheric models that have been
very influential in many areas of scientific and high-performance computing
as well as climate change mitigation and adaptation.
Most weather, ocean and climate models are written in Fortran
(e.g. ICON [@ICON], CESM [@CESM], MITgcm [@MITgcm], NEMO [@NEMO]) and have been
developed over decades. From this tradition follows a specific programming
style and associated user interface.
SpeedyWeather.jl aims to overcome the constraints of traditional Fortran-based models.
The modern trend sees simulations in Fortran and data analysis in Python
(e.g. NumPy [@Numpy], Xarray [@Xarray], Dask [@Dask], Matplotlib [@Hunter2007]),
making it virtually impossible to interact with various model components directly.
In SpeedyWeather.jl, interfaces to the model components are exposed to the user.
Furthermore, data-driven climate modelling [@Rasp2018; @Schneider2023],
which replaces existing model components with machine learning,
is more difficult in Fortran due to the lack of established machine learning
frameworks [@Meyer2022a].
In Julia, Flux.jl [@Innes2019] is available for machine learning as well as automatic
differentiation with Enzyme [@Moses2020] for gradients-based optimization.

With SpeedyWeather.jl we hope to provide a platform for data-driven
atmospheric modelling and in general an interactive model that makes difficult
problems easy to simulate. Climate models that are user-friendly, trainable,
but also easily extensible will suddenly make many complex
research ideas possible.

![Particle trajectories advected in the barotropic vorticity model. The barotropic
vorticity equations were stochastically stirred at wave numbers 8 to 40 for homogeneous
turbulence on the sphere. The simulation was computed at T340 (about 40km global resolution).
Visualized are 20,000 particles (white dots) with trajectories (colored randomly)
for the previous 6 hours. \label{fig:particles}](particles.jpg)

# Acknowledgements

We acknowledge contributions from David Meyer, Mosè Giordano, Valentin Churavy, and Pietro Monticone
who have also committed to the SpeedyWeather.jl repository, and the wider Julia community
for help and support.
MK acknowledges funding from the National Science Foundation.
MK and TK acknowledge funding from the European Research Council
under the European Union's Horizon 2020 research and innovation programme for the ITHACA grant (no. 741112).
NCC acknowledges support by the Australian Research Council DECRA Fellowship DE210100749.

# References
Binary file added docs/joss/paper.pdf
Binary file not shown.
Binary file added docs/joss/particles.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/joss/primitive.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/joss/swm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.