Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
b537b3b
psuedo code
j-atkins Nov 25, 2025
a53b61d
remove notes
j-atkins Nov 25, 2025
51ab308
fill some problems
ammedd Nov 26, 2025
a55e6f7
nicks changes
ammedd Nov 26, 2025
d81efeb
still pseudo-code
ammedd Dec 2, 2025
ddbf288
Merge branch 'main' into problems
j-atkins Jan 9, 2026
07df269
prepare for problem handling logic
j-atkins Jan 9, 2026
2c41f28
work in progress...
j-atkins Jan 9, 2026
1647893
moving logic to _run
j-atkins Jan 12, 2026
4b6f125
separate problem classes and separation logic
j-atkins Jan 12, 2026
d68738d
re-structure
j-atkins Jan 13, 2026
d27bbc5
progressing changes across simuate_schedule and _run
j-atkins Jan 14, 2026
b1c28c9
Merge branch 'main' into problems
j-atkins Jan 14, 2026
49e506f
checkpoint and reverification logic
j-atkins Jan 14, 2026
5e7889f
tidy up some logging etc
j-atkins Jan 15, 2026
3c7e975
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 15, 2026
c04246c
propagating general pre-departure problem
j-atkins Jan 16, 2026
d722bbc
Merge branch 'problems' of github.com:OceanParcels/virtualship into p…
j-atkins Jan 20, 2026
3f8aecc
Merge branch 'main' into problems
j-atkins Jan 20, 2026
9adec58
propagate general problem during expedition
j-atkins Jan 20, 2026
221179a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 20, 2026
790c509
fix waypoint index selection for problem waypoint vs waypoint where s…
j-atkins Jan 21, 2026
5e5c211
Merge branch 'problems' of github.com:OceanParcels/virtualship into p…
j-atkins Jan 21, 2026
54713a5
work towards propagating instrument problems
j-atkins Jan 23, 2026
93dc089
fix contingency time checker, finish propagating instrument problem
j-atkins Jan 23, 2026
2dc6298
refactor
j-atkins Jan 23, 2026
3c08981
propagating multiple problems per expedition, bugs still to fix
j-atkins Jan 23, 2026
25899d1
Merge branch 'main' into problems
j-atkins Jan 26, 2026
854ba49
propagate multiple problems across a single expedition
j-atkins Jan 26, 2026
edb8195
start moving towards per waypoint contingency checker
j-atkins Jan 27, 2026
00a85cd
progress towards individual waypoint contingency checking
j-atkins Jan 27, 2026
1244697
revert to simpler next waypoint contingency checks
j-atkins Jan 27, 2026
f2693a2
waypoint congtingency checking and clearer output logging
j-atkins Jan 28, 2026
dcbc201
account for instrument deployment timings
j-atkins Jan 28, 2026
148de47
tidy up TODOs and delete checkpoint file at end of successful expedition
j-atkins Jan 28, 2026
7f73687
working towards problem selection logic
j-atkins Jan 28, 2026
08ad6e6
define problem selection logic and build system for caching selected …
j-atkins Jan 29, 2026
3b1da68
parse prob_level argument through `run` CLI command
j-atkins Jan 29, 2026
2153a43
update class structure
j-atkins Jan 29, 2026
3c4808e
add info to repo README and tidy up
j-atkins Jan 29, 2026
eff65ce
re-organise utils.py, improve instrument config register and downstre…
j-atkins Jan 30, 2026
f3bad07
improve problems dir structures and giving unique identifiers, plus i…
j-atkins Jan 30, 2026
650cb21
updating tests and better unexpected error handling
j-atkins Jan 30, 2026
b21463d
better handling of old problems/checkpoint files if simulation fails …
j-atkins Jan 30, 2026
c258a51
update test with new log output
j-atkins Jan 30, 2026
19b2c2a
tidy up
j-atkins Jan 30, 2026
dae03ea
handle single waypoint expeditions and tidy up
j-atkins Jan 30, 2026
9b29724
remove duplication
j-atkins Jan 30, 2026
b40ba73
re-structure dir
j-atkins Feb 2, 2026
dc80617
scenario class tests
j-atkins Feb 2, 2026
7cf9e63
tests for problems simulator class
j-atkins Feb 2, 2026
ab0489e
add test for calc_wp_stationkeeping_time
j-atkins Feb 2, 2026
c000515
add test for _calc_sail_time
j-atkins Feb 2, 2026
e46acd0
tests for checkpoint class
j-atkins Feb 2, 2026
28ef9b7
move back test zarr files
j-atkins Feb 2, 2026
baaf1b9
reinstate original structure
j-atkins Feb 2, 2026
c025781
refactor, move methods to static
j-atkins Feb 3, 2026
2ee5f15
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 3, 2026
c092562
Enhance problems terminal output styling (#276)
j-atkins Feb 5, 2026
164064d
post review edits
j-atkins Feb 5, 2026
ea580a9
Update quickstart and assignment docs (#280)
j-atkins Feb 6, 2026
0317127
Generate post-expedition problems report (#279)
j-atkins Feb 6, 2026
82c8594
hash based on instrument deployments only
j-atkins Feb 9, 2026
468cc04
only one problem per waypoint (plus test)
j-atkins Feb 9, 2026
53ac9b5
add todo for future
j-atkins Feb 9, 2026
1f6ed19
tidy up
j-atkins Feb 9, 2026
809acaa
remove patching
j-atkins Feb 9, 2026
326ae4f
remove unnecessary assertions
j-atkins Feb 9, 2026
1b61d06
restructure scenario class definition and deployment
j-atkins Feb 9, 2026
dbf5c51
remove "around" ambiguity
j-atkins Feb 9, 2026
39b5ede
fix expedition strategy and re-arrange output dir structure
j-atkins Feb 9, 2026
96ce129
shorten variable naming
j-atkins Feb 9, 2026
6bf94f8
tidy up comment
j-atkins Feb 9, 2026
49f63a2
update test to updated problem class organisation
j-atkins Feb 9, 2026
158b676
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 9, 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ VirtualShip is a command line simulator allowing students to plan and conduct a
- Surface drifters
- Argo float deployments

<!-- TODO: future. Along the way students will encounter difficulties such as: -->
Along the way, students will encounter realistic problems that may occur during an oceanographic expedition, requiring them to make decisions to adapt their plans accordingly. For example, delays due to equipment failures, pre-depature logistical issues or safety drills.

## Installation

Expand Down
30 changes: 17 additions & 13 deletions docs/user-guide/assignments/Sail_the_ship.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"**Follow the instructions [here](https://virtualship.readthedocs.io/en/latest/user-guide/tutorials/surf_research_cloud_setup.html) to set up your SURF RC environment for VirtualShip.**\n",
"\n",
"<div class=\"alert alert-block alert-info\"> \n",
"**NOTE**: If you have Anaconda installed on your local machine and would like to run VirtualShip locally instead of on SURF RC, please see [VirtualShip - Installation](https://virtualship.readthedocs.io/en/latest/#installation) for instructions.\n",
"**Note**: If you have Anaconda installed on your local machine and would like to run VirtualShip locally instead of on SURF RC, please see [VirtualShip - Installation](https://virtualship.readthedocs.io/en/latest/#installation) for instructions.\n",
"</div>"
]
},
Expand All @@ -113,7 +113,7 @@
"### Upload the coordinates to your virtual machine\n",
"\n",
"<div class=\"alert alert-block alert-warning\"> \n",
"**IMPORTANT**: _If you have not done so already_, make sure you create a folder for your group's expedition data in the persistent storage on SURF RC (i.e. the `data/storage/` folder). You can do so by running `mkdir /data/storage/{your-group-name}` in Terminal, replacing `{your-group-name}` with your actual group name, or by using the \"New Folder\" button in the JupyterLab file explorer panel.\n",
"**Important**: _If you have not done so already_, make sure you create a folder for your group's expedition data in the persistent storage on SURF RC (i.e. the `data/storage/` folder). You can do so by running `mkdir /data/storage/{your-group-name}` in Terminal, replacing `{your-group-name}` with your actual group name, or by using the \"New Folder\" button in the JupyterLab file explorer panel.\n",
"</div>\n",
"\n",
"Back in the SURF RC JupyterLab interface, use the **file explorer** on the left hand side to navigate to the directory where your group will be running your expedition (i.e. `data/storage/{your-group-name}`). \n",
Expand All @@ -130,15 +130,15 @@
"Open a Terminal window if you do not already have one open. Remember, this can be done from the Launcher tab by clicking on \"Terminal\" button under the \"Other\" section, or by going to the \"File\" menu --> \"New\" --> \"Terminal\".\n",
"\n",
"<div class=\"alert alert-block alert-warning\"> \n",
"**IMPORTANT**: Once in Terminal, navigate to where you would like your expedition to be run on your (virtual) machine. You can do so by `cd /data/storage/{your-group-name}`, replacing `{your-group-name}` with your actual group name. This is where you will be working from for the rest of the session.\n",
"**Important**: Once in Terminal, navigate to where you would like your expedition to be run on your (virtual) machine. You can do so by `cd /data/storage/{your-group-name}`, replacing `{your-group-name}` with your actual group name. This is where you will be working from for the rest of the session.\n",
"</div>\n",
"\n",
"Now enter the following command in the Terminal (changing `EXPEDITION_NAME` to something more meaningful for your group's expedition):\n",
"\n",
"`virtualship init EXPEDITION_NAME --from-mfp {CoordinatesExport}.xlsx`\n",
"\n",
"<div class=\"alert alert-block alert-success\"> \n",
"**TIP**: The `{CoordinatesExport}.xlsx` in the command above refers to the .xlsx file exported from MFP and uploaded to your virtual machine earlier. Replace the filename with the name of your .xlsx file.\n",
"**Tip**: The `{CoordinatesExport}.xlsx` in the command above refers to the .xlsx file exported from MFP and uploaded to your virtual machine earlier. Replace the filename with the name of your .xlsx file.\n",
"</div>\n",
"\n",
"This will create a folder/directory called `EXPEDITION_NAME` (or what you have changed this to) with a single file: `expedition.yaml`. This file contains details on the ship and instrument configurations, as well as the expedition schedule based on the sampling site coordinates that you specified in your MFP export. The `--from-mfp` flag indicates that the exported coordinates should be used."
Expand All @@ -151,7 +151,7 @@
"## 5) Expedition scheduling & ship configuration\n",
"\n",
"<div class=\"alert alert-block alert-success\"> \n",
"**TIP**: From here, you should replace any references to `EXPEDITION_NAME` with the actual name you used for your expedition when running any `virtualship` commands.\n",
"**Tip**: From here, you should replace any references to `EXPEDITION_NAME` with the actual name you used for your expedition when running any `virtualship` commands.\n",
"</div>\n",
"\n",
"The next step is to finalise the expedition schedule plan, including setting times and instrument selection choices for each waypoint, as well as configuring the ship (including any underway measurement instruments). \n",
Expand All @@ -172,27 +172,27 @@
"### Waypoint datetimes\n",
"\n",
"<div class=\"alert alert-block alert-info\"> \n",
"**NOTE**: VirtualShip supports running experiments in the years 1993 through to the present day by leveraging the suite of products available on the Copernicus Marine Data Store.\n",
"**Note**: VirtualShip supports running experiments in the years 1993 through to the present day by leveraging the suite of products available on the Copernicus Marine Data Store.\n",
"</div>\n",
"\n",
"You will need to enter dates and times for each of the sampling stations/waypoints selected in the MFP route planning stage. This can be done under _Schedule Editor_ > _Waypoints & Instrument Selection_ in the planning tool.\n",
"\n",
"Each waypoint has its own sub-panel for parameter inputs (click on it to expand the selection options). Here, the time for each waypoint can be inputted. There is also an option to adjust the latitude/longitude coordinates and you can add or remove waypoints.\n",
"\n",
"<div class=\"alert alert-block alert-info\"> \n",
"**NOTE**: It is important to ensure that the timings for each station are realistic. There must be enough time for the ship to travel to each site at the prescribed speed (10 knots). The expedition schedule will be automatically verified when you press _Save Changes_ in the planning tool.\n",
"**Note**: It is important to ensure that the timings for each station are realistic. There must be enough time for the ship to travel to each site at the prescribed speed (10 knots). The expedition schedule will be automatically verified when you press _Save Changes_ in the planning tool.\n",
"</div>\n",
"\n",
"<div class=\"alert alert-block alert-success\"> \n",
"**TIP**: The MFP route planning tool will give estimated durations of sailing between sites at the 10 knots sailing speed. This can be useful to refer back to when planning the expedition timings and entering these into the `virtualship plan` tool.\n",
"**Tip**: The MFP route planning tool will give estimated durations of sailing between sites at the 10 knots sailing speed. This can be useful to refer back to when planning the expedition timings and entering these into the `virtualship plan` tool.\n",
"</div>\n",
"\n",
"### Instrument selection\n",
"\n",
"You should now consider which measurements are to be taken at each sampling site (think about those required for your chosen research question), and therefore which instruments need to be selected in the planning tool at each waypoint.\n",
"\n",
"<div class=\"alert alert-block alert-success\"> \n",
"**TIP**: Click [here](https://virtualship.readthedocs.io/en/latest/user-guide/assignments/Research_proposal_intro.html#Measurement-Options) for more information on what measurement options are available, and a brief introduction to each instrument.\n",
"**Tip**: Click [here](https://virtualship.readthedocs.io/en/latest/user-guide/assignments/Research_proposal_intro.html#Measurement-Options) for more information on what measurement options are available, and a brief introduction to each instrument.\n",
"</div>\n",
"\n",
"You can make instrument selections for each waypoint in the same sub-panels as the [waypoint time](#waypoint-datetimes) selection by simply switching each on or off. Multiple instruments are allowed at each waypoint.\n",
Expand All @@ -203,11 +203,11 @@
"When you are happy with your ship configuration and schedule plan, press _Save Changes_ at the bottom of the planning tool.\n",
"\n",
"<div class=\"alert alert-block alert-info\"> \n",
"**NOTE**: On pressing _Save Changes_ the tool will check the selections are valid (for example that the ship will be able to reach each waypoint in time). If they are, the changes will be saved to the `expedition.yaml` file, ready for the next steps. If your selections are invalid you should be provided with information on how to fix them.\n",
"**Note**: On pressing _Save Changes_ the tool will check the selections are valid (for example that the ship will be able to reach each waypoint in time). If they are, the changes will be saved to the `expedition.yaml` file, ready for the next steps. If your selections are invalid you should be provided with information on how to fix them.\n",
"</div>\n",
"\n",
"<div class=\"alert alert-block alert-warning\"> \n",
"**CAUTION**: The `virtualship plan` tool will check that the ship can reach each waypoint according to the prescribed ship speed (10 knots). However, before the ultimate simulation step (i.e. step 6 below) there will be a final, automated check that the schedule also accounts for the time taken to conduct the measurements at each site (e.g. a CTD cast in deeper waters will take longer). Therefore, we recommend to take this extra time into account at this stage of the planning by estimating how long each measurement will take and adding this time on.\n",
"**Caution**: The `virtualship plan` tool will check that the ship can reach each waypoint according to the prescribed ship speed (10 knots). However, before the ultimate simulation step (i.e. step 6 below) there will be a final, automated check that the schedule also accounts for the time taken to conduct the measurements at each site (e.g. a CTD cast in deeper waters will take longer). Therefore, we recommend to take this extra time into account at this stage of the planning by estimating how long each measurement will take and adding this time on.\n",
"</div>"
]
},
Expand All @@ -220,7 +220,7 @@
"You are now ready to run your virtual expedition! This stage will take all the measurements for each of instruments you selected at each waypoint in your expedition schedule, using input data sourced from the [Copernicus Marine Data Store](https://data.marine.copernicus.eu/products).\n",
"\n",
"<div class=\"alert alert-block alert-info\"> \n",
"**NOTE**: You will need to register for a Copernicus Marine Service account (you can do so [here](https://data.marine.copernicus.eu/register)), if you have not done so already.\n",
"**Note**: You will need to register for a Copernicus Marine Service account (you can do so [here](https://data.marine.copernicus.eu/register)), if you have not done so already.\n",
"</div>\n",
"\n",
"You can run your expedition simulation using the command: \n",
Expand All @@ -232,7 +232,11 @@
"Small simulations (e.g. small space-time domains and fewer instrument deployments) will be relatively fast. For large, complex expeditions, it _could_ take up to an hour to simulate the measurements depending on your choices. Waiting for simulation is a great time to practice your level of patience. A skill much needed in oceanographic fieldwork ;-)\n",
"\n",
"<div class=\"alert alert-block alert-success\"> \n",
"**TIP**: Not using underway instruments will speed up the simulation time considerably. So, if you do not plan to use underway temperature/salinity or ADCP measurements, make sure to switch these off in the planning tool before running the expedition.\n",
"**Tip**: Not using underway instruments will speed up the simulation time considerably. So, if you do not plan to use underway temperature/salinity or ADCP measurements, make sure to switch these off in the planning tool before running the expedition.\n",
"</div>\n",
"\n",
"<div class=\"alert alert-block alert-warning\"> \n",
"**Important**: VirtualShip will encounter 'problems' during the expedition, which simulate the various challenges and unexpected events that can occur during real-life oceanographic expeditions (e.g. instrument and/or equipment failure, logistical challenges etc.). These may require your intervention to ensure your expedition schedule can continue!\n",
"</div>"
]
},
Expand Down
12 changes: 11 additions & 1 deletion docs/user-guide/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Welcome to this Quickstart to using VirtualShip. In this guide we will conduct a

This Quickstart is available as an instructional video below, or you can continue with the step-by-step guide.

```{warning}
```{caution}
Please note the video below may show output from an earlier version of VirtualShip, as the codebase is in active development. The instructions in the video are still generally applicable for the current version. However, for the most up-to-date instructions, please follow the text in this Quickstart guide.
```

Expand Down Expand Up @@ -150,6 +150,16 @@ Small simulations (e.g. small space-time domains and fewer instrument deployment

Why not browse through previous real-life [blogs and expedition reports](https://virtualship.readthedocs.io/en/latest/user-guide/assignments/Sail_the_ship.html#Reporting) in the meantime?!

#### Encountering 'problems' during the expediton (configurable)

By default, VirtualShip will encounter 'problems' during the expedition, which simulate the various challenges and unexpected events that can occur during real-life oceanographic expeditions (e.g. instrument and/or equipment failure, logistical challenges etc.) and may require your intervention to ensure your expedition schedule can continue.

The 'problems' add authenticity to the simulation. However, if you require a 'problem'-free expedition, you can run the simulation with the "problem level" (`prob-level`) set to 0 (i.e. `virtualship run EXPEDITION_NAME --prob-level 0`).

```{tip}
For maximum authenticity, you can set `--prob-level 2`, which will scale the number of problems encountered by the complexity of your expedition (longer duration, more waypoints, more instruments will lead to more problems). By default, the `prob-level` = 1, which limits the number of problems to a maximum of 2, regardless of the expedition complexity.
```

#### Using pre-downloaded data (optional)

By default, VirtualShip will stream data 'on-the-fly' from the Copernicus Marine Data Store, meaning no prior data download is necessary. However, if you prefer to use pre-downloaded data instead (e.g. due to limited internet connection or wanting to use different input data) you can do so by running `virtualship run EXPEDITION_NAME --from-data <PATH_TO_DATA_DIR>`.
Expand Down
Loading