Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
2ba9073
first round, delete SpaceTimeRegion object and related classes/methods
j-atkins Dec 2, 2025
e9dbd78
remove space time region from _plan
j-atkins Dec 2, 2025
5a5e056
update base and instrument class logic to use waypoint extremes for s…
j-atkins Dec 2, 2025
b5eea49
clean up _plan methods
j-atkins Dec 2, 2025
ffe07fc
extend latlon buffer for drifters
j-atkins Dec 2, 2025
a5d692a
set time buffer from drifter lifetime config
j-atkins Dec 2, 2025
6ebb41b
shift testing to use waypoint space-times instead of space-time-regio…
j-atkins Dec 3, 2025
1f778ea
fix assert error messaging
j-atkins Dec 3, 2025
14b8833
remove spatial constraint on fieldset ingestion
j-atkins Dec 5, 2025
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
1affd50
Merge branch 'main' into delete-spacetime
j-atkins Dec 9, 2025
714b0bf
add control over whether to constrain spatial region in fieldset
j-atkins Dec 9, 2025
e820584
give argos a prescribed lifetime
j-atkins Dec 9, 2025
7369f46
add lifetime field to expedition models and _plan
j-atkins Dec 9, 2025
15848f3
update test with argo lifetime
j-atkins Dec 9, 2025
ba3793b
remove temporary debugging tools
j-atkins Dec 9, 2025
340d940
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 9, 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
7eff191
update argo endtime and give depth lim in fieldset generation
j-atkins Dec 10, 2025
fd40691
Merge branch 'delete-spacetime' into joss-paper
j-atkins Dec 10, 2025
fd6a3f6
remove depth lim on fieldset generation
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
edf8149
Merge branch 'main' into delete-spacetime
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
b00c85c
clean up comment
j-atkins 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
86fa3f6
Merge branch 'delete-spacetime' of github.com:OceanParcels/virtualshi…
j-atkins Dec 23, 2025
ff43127
change lifetime in expedition model to be in days units
j-atkins Dec 23, 2025
87de210
update _plan logic (+ more changes to expedition model) to handle lif…
j-atkins Dec 23, 2025
593e0f2
small refactor for readability
j-atkins Dec 23, 2025
6ae1317
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 23, 2025
2e8c14a
remove broken links
j-atkins Dec 19, 2025
4fd2d77
Merge branch 'delete-spacetime' of github.com:OceanParcels/virtualshi…
j-atkins Dec 23, 2025
984d441
update pre-downloaded data documentation to explain argo/drifter life…
j-atkins Dec 23, 2025
aef558a
Merge branch 'delete-spacetime' into joss-paper
j-atkins Dec 23, 2025
009f09f
fix docs build?
j-atkins Jan 5, 2026
af3ec8c
another broken link
j-atkins Jan 5, 2026
01dd1bb
Merge branch 'delete-spacetime' into joss-paper
j-atkins Jan 5, 2026
982e52e
add error messaging for unsuported time units
j-atkins Jan 5, 2026
1f4173e
Merge branch 'delete-spacetime' into joss-paper
j-atkins Jan 5, 2026
5e73a03
Merge branch 'main' into joss-paper
j-atkins Jan 5, 2026
88c9cf3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 5, 2026
99d706a
tidy up
j-atkins Jan 5, 2026
cf2c8da
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 5, 2026
2679cc7
minor changes
ammedd Jan 6, 2026
fab5e07
further small changes
j-atkins Jan 6, 2026
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
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.
125 changes: 125 additions & 0 deletions docs/paper/figure1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# %%

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,
)


def add_title(ax, title, fontsize=13, y0=1.03):
"""Add title."""
ax.text(
0,
y0,
title,
ha="left",
va="bottom",
transform=ax.transAxes,
fontsize=fontsize,
)


# fig
fig = plt.figure(figsize=(9, 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
add_title(ax0, r"$\bf{a}$" + ") MFP expedition overview", y0=1.01)
img = mpimg.imread(f"{SAMPLE_DIR}expedition_overview.png")
ax0.imshow(img)
ax0.axis("off")

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

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

# CTD (temperature)
add_title(ax3, r"$\bf{d}$" + ") CTD (temperature)")
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)
add_title(ax4, r"$\bf{e}$" + ") CTD (oxygen)")
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, bbox_inches="tight")

# %%
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