-
Notifications
You must be signed in to change notification settings - Fork 14
Add design document #194
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
Add design document #194
Changes from 1 commit
843b66e
1f81a48
0a33b1b
d46510d
464216e
9ca872f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,137 @@ | ||
| # Virtualship Design Document | ||
|
|
||
| > Document created as a result of [this discussion topic](https://github.com/OceanParcels/virtualship/discussions/187). | ||
|
|
||
| ## Essence of Virtualship | ||
|
|
||
| Virtualship interpolates hydrodynamical fields the way instruments would. Users can combine these observations into an expedition ("cruise"). Users can also deploy individual instruments in the flowfield, either as part of an expedition or independently, to compare against actual observations. | ||
|
VeckoTheGecko marked this conversation as resolved.
Outdated
|
||
|
|
||
| ### For Researchers | ||
|
|
||
| - Define or configure instruments to make **deployments** of virtual instruments in the flow field (passed to parcels). | ||
|
|
||
| ### For Students or Researchers Planning an Expedition | ||
|
|
||
| A layer on top allows them to: | ||
|
|
||
| - Run an **expedition** that chains together **deployments** at different **stations**. | ||
|
|
||
| --- | ||
|
|
||
| ## Key Concepts | ||
|
|
||
| ### Measurement | ||
|
|
||
| - A spacetime interpolation of a hydrodynamic or biogeochemical field. | ||
| - A set of measurements forms a timeseries output (serialised to disk as a zarr output). | ||
| - In the case of students, this would be serialized with artificial errors to simulate real-world data and also be serialized in the original binary format of the instrument. | ||
|
VeckoTheGecko marked this conversation as resolved.
Outdated
|
||
|
|
||
| ### Instrument | ||
|
|
||
| - A device that takes measurements. Two types: | ||
| - **Underway-instruments**: Measure continuously during the expedition (e.g., Thermosalinograph, shipboard ADCP, and (to be developed) meteorology). | ||
| - Conducted for the entirety of the expedition. | ||
|
VeckoTheGecko marked this conversation as resolved.
Outdated
|
||
| - **Overboard-instruments**: Deployed at specific times (e.g., CTD, drifters, Argo, XBT, and (to be developed) gliders). | ||
|
VeckoTheGecko marked this conversation as resolved.
Outdated
VeckoTheGecko marked this conversation as resolved.
Outdated
|
||
| - Deployed at stations during the expedition. | ||
|
|
||
| ### Deployment | ||
|
|
||
| - A complete set of measurements for an overboard-instrument (from deployment to retrieval). | ||
|
VeckoTheGecko marked this conversation as resolved.
Outdated
|
||
| - Each deployment is executed independently of the ship's movement. | ||
| - Components: | ||
| - An instrument. | ||
|
VeckoTheGecko marked this conversation as resolved.
|
||
| - A station. | ||
| - A start time. | ||
|
|
||
| ### Ship Track | ||
|
|
||
| - A set of line segments between stations where underway-instruments take measurements. | ||
| - **Planned ship track**: Includes arrival and departure times at stations. | ||
| - **Realised ship track**: Actual path taken. | ||
|
|
||
| ### Waypoint | ||
|
|
||
| - A horizontal location with no associated time. | ||
| - **Planned waypoint** - has no associated time | ||
| - **Realised waypoint** - has an associated time (since the timing has been calculated from the ship speed). | ||
|
|
||
| ### Station | ||
|
|
||
| - A waypoint where multiple deployments can occur. The ship does not drift horizontally while at a station. | ||
| - Features: | ||
| - One horizontal location. | ||
|
VeckoTheGecko marked this conversation as resolved.
Outdated
|
||
| - An associated time for deployment start. | ||
| - A configured time to stay at the location. | ||
|
VeckoTheGecko marked this conversation as resolved.
Outdated
|
||
| - Ships travel between stations at maximum speed; if arriving early, they wait at the station. | ||
|
|
||
| ### Port | ||
|
|
||
| - A waypoint where a ship track starts or ends, but no deployments are possible. | ||
|
|
||
| --- | ||
|
|
||
| pseudocode | ||
|
|
||
| ``` | ||
| for each station | ||
| for each overboard-instrument | ||
| do deployment | ||
| while track to next station | ||
| for each underway-instrument | ||
| do measurement | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ### Problems | ||
|
|
||
| Simulated problems that are encountered during an expedition. | ||
|
|
||
| # Technical Decisions | ||
|
|
||
| ## Running the expedition | ||
|
|
||
| Two possible approaches: | ||
|
|
||
| 1. Run a planning phase and deploy instruments after | ||
|
|
||
| - Steps: | ||
| - The planned ship track is known, validated[^1], and then iterated through (encountering problems along the way). | ||
| - Users adjust their plans based on the problems encountered. | ||
| - Once completed, the ship track is finalised (i.e., is _realized_) and then all the deployments are made and measurements are taken. | ||
| - Pros: | ||
| - Easier to implement and test (distinct phases in the running of the code). | ||
| - Instruments can be run in non-chronological order (i.e., as different particlesets with different fieldsets) - simplifying code and output. | ||
| - Cons: | ||
| - Problems become limited (can only make problems based on the planned ship track. Not possible to encounter problems based on the conditions of the Parcels simulation (e.g., currents)). | ||
| - Students cannot make decisions based on the data they have "collected" up to the point that they have to make a decision[^2] . | ||
|
|
||
| 2. Encounter problems during the expedition | ||
|
|
||
| - Steps: | ||
| - The planned ship track is known, validated[^1], and then the expedition is run. | ||
| - Expedition is paused when a problem is encountered, and users can adjust their plans. | ||
| - Pros: | ||
| - Problems can be flexible and based on the Parcels simulation (e.g., currents). | ||
| - Cons: | ||
| - More complex to implement and test (need to run the code in a single phase). | ||
| - Everything is a single particleset and fieldset, making kernels more complex, requiring splitting of the outputs into separate zarr files. | ||
| - Students can't make decisions based on the data they have "collected". | ||
|
|
||
| We have decided for approach (1) for the timebeing. Down the line we may want to explore approach (2). | ||
|
|
||
| ## Configuration Files | ||
|
|
||
| - **ship_config.yaml** and **schedule.yaml** can be updated to match the current structure. | ||
| - These can be consolidated into a single **expedition.yaml** file. | ||
|
|
||
| # FAQ | ||
|
|
||
| - How does this "Essence of Virtualship" above fit for biological oceanography? Do they also have a concept of 'instruments'? | ||
|
VeckoTheGecko marked this conversation as resolved.
Outdated
|
||
| - For now let's focus on field data that is provided through Copernicus marine (down the line we might support other data providers). | ||
|
VeckoTheGecko marked this conversation as resolved.
Outdated
|
||
|
|
||
| --- | ||
|
|
||
| [^1]: Validate -> Make sure that ship track isn't on land, make sure that the ship track isn't unrealistic for the ship speed. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to be explicit that we won't check whether a ship track crosses land between Waypoints (as that will be very difficult to implement)?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Further, is it important to be consistent with "validate" vs. "verify" phrasing? The design doc uses "validate" but the methods for running these checks in the code use "verify".
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
How so? Couldn't we (at some point in the future) just include a download of a world coastlines shapefile and then do a line intersect with the coastlines? I don't think this would be too difficult to implement. Though, separate topic entirely, we need to decide what the ship trajectory looks while travelling. I assume at the moment its just an interpolation in lon/lat space and that the ship isn't navigating via great circle distance (which I think would be more realistic).
Yes, I think its important to be consistent. I'll update |
||
|
|
||
| [^2]: If we want to support this, there will be added complexity: we will need to show the users the binary files, but the zarr files behind the scenes will still need to be cached so that the simulation can continue from where it left off. | ||
Uh oh!
There was an error while loading. Please reload this page.