Skip to content
Open
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
f14ee31
partial first draft
j-atkins Dec 5, 2025
d209dd6
simulations for sample plots
j-atkins Dec 5, 2025
350a772
next set of revisions to paper + new plotting
j-atkins Dec 5, 2025
985abdf
enhance figure 1
j-atkins Dec 8, 2025
155ed5c
edit manuscript
j-atkins Dec 8, 2025
a302408
clean up some todos
j-atkins Dec 8, 2025
6444ffe
remove temporary debugging measures
j-atkins Dec 8, 2025
45b3277
Merge branch 'main' into joss-paper
j-atkins Dec 9, 2025
4a0cb0c
update draft
j-atkins Dec 9, 2025
cb38330
Merge branch 'delete-spacetime' into joss-paper
j-atkins Dec 10, 2025
fd40691
Merge branch 'delete-spacetime' into joss-paper
j-atkins Dec 10, 2025
54fb025
new argo plot for example figure?
j-atkins Dec 10, 2025
9ffb809
reference to VirtualFleet
j-atkins Dec 10, 2025
c22889f
edits to text
j-atkins Dec 10, 2025
ce1f01f
small edits to text, todos
j-atkins Dec 10, 2025
142b7a0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 10, 2025
2a76df8
small edits to the manuscript
j-atkins Dec 10, 2025
dafc288
Merge branch 'joss-paper' of github.com:OceanParcels/virtualship into…
j-atkins Dec 11, 2025
efd2198
fix names and affiliations
ammedd Dec 15, 2025
fd1425f
Merge branch 'main' into joss-paper
j-atkins Dec 17, 2025
d5d1858
Apply suggestions from code review
j-atkins Dec 17, 2025
a83d918
Merge branch 'joss-paper' of github.com:OceanParcels/virtualship into…
j-atkins Dec 17, 2025
2092dc0
incorporate suggestions
j-atkins Dec 18, 2025
e2663fc
incorporating further suggested edits
j-atkins Dec 18, 2025
09d845c
clean up
j-atkins Dec 18, 2025
7ee4dd9
update figure + small text edits
j-atkins Dec 18, 2025
6f5426c
Merge branch 'delete-spacetime' into joss-paper
j-atkins Dec 18, 2025
4a8bd9e
Apply suggestions from code review
j-atkins Dec 19, 2025
53337c5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 19, 2025
308fd5c
update to just MFP
j-atkins Dec 19, 2025
1f8a5b4
tidy up sample_expedition dir
j-atkins Dec 19, 2025
e707f9b
remove broken links
j-atkins Dec 19, 2025
fa4cd5f
Refactor plotting functions: add title helper, update labels for clar…
iuryt Dec 23, 2025
ced6cc3
Update figures: replace figure1.png and expedition_overview.png with …
iuryt Dec 23, 2025
cb16792
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 23, 2025
9906ea0
remove fraction and pad from cmap adding
j-atkins Dec 23, 2025
483a993
rename function to _add_cbar
j-atkins Dec 23, 2025
c4c3d2b
re-compile sample pdf
j-atkins Dec 23, 2025
c13ae47
fix typo
j-atkins Dec 23, 2025
aef558a
Merge branch 'delete-spacetime' into joss-paper
j-atkins Dec 23, 2025
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,7 @@ src/virtualship/_version_setup.py

.vscode/
.DS_Store


# some files created during paper (JOSS) writing
docs/paper/**/*.txt
2 changes: 2 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@
"user-guide/assignments/Sail_the_ship": "user-guide/_images/freepik_research_vessel.jpg",
"user-guide/assignments/Code_of_conduct": "user-guide/_images/freepik_code_of_conduct.jpg",
"user-guide/teacher-content/ILOs": "user-guide/_images/ILOs.jpg",
"user-guide/teacher-content/UU-ocean-of-future/Tutorial1": "user-guide/_images/freepik_assignment.png",
"user-guide/teacher-content/UU-ocean-of-future/Tutorial2": "user-guide/_images/freepik_assignment.png",
}

sphinx_gallery_conf = {"default_thumb_file": "_static/virtual_ship_logo.png"}
Expand Down
Binary file added docs/paper/figure1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
112 changes: 112 additions & 0 deletions docs/paper/figure1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# %%

import cartopy.crs as ccrs
import matplotlib.gridspec as gridspec
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
import numpy as np
import xarray as xr
from plotting_functions import (
_ctd_distance_along_expedition,
plot_adcp,
plot_ctd,
plot_drifters,
)

SAMPLE_DIR = "sample_expedition/"
CONFIG = "expedition.yaml"
EXPEDITION = "MY_EXPEDITION"

# %%

# VirtualShip output
ctd_ds = xr.open_dataset(f"{SAMPLE_DIR}{EXPEDITION}/results/ctd.zarr")
ctd_bgc_ds = xr.open_dataset(f"{SAMPLE_DIR}{EXPEDITION}/results/ctd_bgc.zarr")
drifter_ds = xr.open_dataset(f"{SAMPLE_DIR}{EXPEDITION}/results/drifter.zarr")
adcp_ds = xr.open_dataset(f"{SAMPLE_DIR}{EXPEDITION}/results/adcp.zarr")


# %%

# plot

PROJ = ccrs.PlateCarree()

waypoint_distances = np.unique(_ctd_distance_along_expedition(ctd_ds)["distance"])


def add_waypoint_markers(ax, distances, offset=15, marker_size=70):
ax.scatter(
(distances / 1000),
np.zeros_like(distances) - offset,
marker="v",
color="black",
edgecolors="white",
s=marker_size,
clip_on=False,
)


# fig
fig = plt.figure(figsize=(12, 13), dpi=300)

# custom layout
gs = gridspec.GridSpec(3, 2, height_ratios=[1.5, 1, 1])
ax0 = fig.add_subplot(gs[0, :])
ax1 = fig.add_subplot(gs[1, 0])
ax2 = fig.add_subplot(gs[1, 1], projection=PROJ)
ax3 = fig.add_subplot(gs[2, 0])
ax4 = fig.add_subplot(gs[2, 1])

# overview image
ax0.set_title(r"$\bf{a}$" + ") MFP expedition overview", loc="left")
img = mpimg.imread(f"{SAMPLE_DIR}expedition_overview.png")
ax0.imshow(img)
ax0.axis("off")

# adcp
ax1.set_title(r"$\bf{b}$" + ") ADCP (flow speed)", loc="left")
ax1.set_ylabel("Depth (m)")
ax1.set_xlabel("Distance (km)")
plot_adcp(adcp_ds, ax1)
add_waypoint_markers(ax1, waypoint_distances)

# drifters
ax2.set_title(r"$\bf{c}$" + ") Surface drifters", loc="left")
plot_drifters(
drifter_ds,
ax2,
vmin=drifter_ds.temperature.min(),
vmax=drifter_ds.temperature.max(),
)

# CTD (temperature)
ax3.set_title(r"$\bf{d}$" + ") CTD (temperature)", loc="left")
ax3.set_ylabel("Depth (m)")
ax3.set_xlabel("Distance (km)")
_, _distances_regular, _var_masked = plot_ctd(
ctd_ds,
ax3,
plot_variable="temperature",
vmin=ctd_ds.temperature.min(),
vmax=ctd_ds.temperature.max(),
)

ctd_wp_distances = _distances_regular[np.nansum(_var_masked, axis=1) > 0]
add_waypoint_markers(ax3, ctd_wp_distances, offset=45, marker_size=60)

# CTD (oxygen)
ax4.set_title(r"$\bf{e}$" + ") CTD (oxygen)", loc="left")
ax4.set_xlabel("Distance (km)")
plot_ctd(
ctd_bgc_ds, ax4, plot_variable="oxygen", vmin=0, vmax=ctd_bgc_ds.o2.max()
) # vmin tailored to mark red as approximate oxygen minimum zone (~ 45 mmol/m-3)
add_waypoint_markers(ax4, ctd_wp_distances, offset=45, marker_size=60)


plt.tight_layout()
plt.show()

fig.savefig("figure1.png", dpi=300)

# %%
Binary file added docs/paper/jats/figure1.png
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a couple of suggestions for this figure. This is a version with some of my suggestions, but I could work on the .py directly, but I couldn't make virtualship run MY_EXPEDITION work. Do we have a tutorial on how to setup the environment using pixi? The current pyproject.toml does not have [tool.pixi.workspace].

If you send the output files by email, I would be happy to directly add my suggestions to figure1.py.

What I changed in this figure:

  • Enlarged all text in panel a) as well as the waypoints and their arrows.
  • left-aligned the titles
  • If I understand correctly, panel b) is the speed, not the velocity
Image

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading