|
1 | | -# Quickstart |
| 1 | +# VirtualShip Quickstart Guide 🚢 |
| 2 | + |
| 3 | +Welcome to this Quickstart to using VirtualShip. In this guide we will conduct a virtual expedition in the North Sea. Note, however, that you can plan your own expedition anywhere in the global ocean and conduct whatever set of measurements you wish! |
| 4 | + |
| 5 | +This guide is intended to give a basic overview of how to plan, initialise and execute a virtual expedition. Data post-processing, analysis and visualisation advice is provided in other sections of the documentation (see [Results](#results) section). |
| 6 | + |
| 7 | +## Expedition route planning |
| 8 | + |
| 9 | +```{note} |
| 10 | +This section describes the _custom_ expedition route planning procedure. There is also an option to proceed without your own route and you can instead use an example route, schedule and selection of measurements (see [Expedition initialisation](#expedition-initialisation) for more details). |
| 11 | +``` |
| 12 | + |
| 13 | +### NIOZ MFP tool |
| 14 | + |
| 15 | +The first step is to plan the expedition route. This can be created with the online [ NIOZ MFP tool](https://nioz.marinefacilitiesplanning.com/cruiselocationplanning#). Documentation on how to use the website can be found [here](https://surfdrive.surf.nl/files/index.php/s/84TFmsAAzcSD56F). Alternatively, you can watch this [video](https://www.youtube.com/watch?v=yIpYX2xCvsM&list=PLE-LzO7kk1gLM74U4PLDh8RywYXmZcloz&ab_channel=VirtualShipClassroom), which runs through how to use the MFP tool. |
| 16 | + |
| 17 | +Below is a screenshot of a North Sea expedition. This example expedition departs from Southampton, UK; conducts measurements at one sampling site in the southern North Sea, three in the Dogger Bank region and a further three around the Norwegian Trench before ending in Bergen, Norway. |
| 18 | + |
| 19 | +Feel free to design your expedition as you wish! There is no need to copy these sampling sites in your own expeditions. |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | +### Export the coordinates |
| 24 | + |
| 25 | +Once you have finalised your MFP expedition route, select "Export" on the right hand side of the window --> "Export Coordinates" --> "DD". This will download your coordinates as an .xlsx (Excel) file, which we will later feed into the VirtualShip protocol to initialise the expedition. |
| 26 | + |
| 27 | +## Expedition initialisation |
| 28 | + |
| 29 | +```{note} |
| 30 | +VirtualShip is a command line interface (CLI) based tool. From this point on in the Quickstart we will be working predominantly via the command line in the Terminal. If you are unfamiliar with what a CLI is, see [here](https://www.w3schools.com/whatis/whatis_cli.asp) for more information. |
| 31 | +``` |
| 32 | + |
| 33 | +You should now navigate to where you would like your expedition to be run on your (virtual) machine (i.e. `cd path/to/expedition/dir/`). Then run the following command in your CLI: |
| 34 | + |
| 35 | +``` |
| 36 | +virtualship init EXPEDITION_NAME --from-mfp CoordinatesExport.xlsx |
| 37 | +``` |
| 38 | + |
| 39 | +```{tip} |
| 40 | +The `CoordinatesExport.xlsx` in the `virtualship init` command refers to the .xlsx file exported from MFP. Replace the filename with the name of your exported .xlsx file (and make sure to move it from the Downloads to the folder/directory in which you are running the expedition). |
| 41 | +``` |
| 42 | + |
| 43 | +This will create a folder/directory called `EXPEDITION_NAME` with two files: `schedule.yaml` and `ship_config.yaml` based on the sampling site coordinates that you specified in your MFP export. The `--from-mfp` flag indictates that the exported coordinates will be used. |
2 | 44 |
|
3 | 45 | ```{note} |
4 | | -We don't yet have a quickstart guide. Please refer to the tutorials. If you would like to work on a quickstart guide, please [open an Issue](https://github.com/OceanParcels/virtualship/issues/new) to discuss. |
| 46 | +For advanced users: it is also possible to run the expedition initialisation step without an MFP .xlsx export file. In this case you should simply run `virtualship init EXPEDITION_NAME` in the CLI. This will write example `schedule.yaml` and `ship_config.yaml` files in the `EXPEDITION_NAME` folder/directory. These files contain example waypoints, timings and instrument selections, but can be edited or propagated through the rest of the workflow unedited to run a sample expedition. |
| 47 | +``` |
| 48 | + |
| 49 | +## Expedition scheduling & ship configuration |
| 50 | + |
| 51 | +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 (such as its speed and underway measurement instruments). The easiest way to do so is to use the bespoke VirtualShip planning tool via the following command: |
| 52 | + |
| 53 | +``` |
| 54 | +virtualship plan EXPEDITION_NAME |
| 55 | +``` |
| 56 | + |
| 57 | +```{tip} |
| 58 | +Using the `virtualship plan` tool is optional. Advanced users can also edit the `schedule.yaml` and `ship_config.yaml` files directly if preferred. |
5 | 59 | ``` |
| 60 | + |
| 61 | +The planning tool should look something like this and offers an intuitive way to make your selections: |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | +### Ship speed |
| 66 | + |
| 67 | +In the planning tool, under _Ship Config Editor_ > _Ship Speed & Onboard Measurements_, there is an option to change the ship speed. In most cases it is best to leave this as the default 10 knots value. |
| 68 | + |
| 69 | +### Underway measurements |
| 70 | + |
| 71 | +VirtualShip is capable of taking underway temperature and salinity measurements, as well as onboard ADCP measurements, as the ship sails across the length of the expedition (see [here](https://virtualship.readthedocs.io/en/latest/user-guide/assignments/Research_proposal_intro.html#Underway-Data) for more detail). These underway measurements can be switched on/off under _Ship Config Editor_ > _Ship Speed & Onboard Measurements_ as well. |
| 72 | + |
| 73 | +For the underway ADCP, there is a choice of using the 38 kHz OceanObserver or the 300 kHz SeaSeven version (see [here](https://virtualship.readthedocs.io/en/latest/user-guide/assignments/Research_proposal_intro.html#ADCP) for more detail on the two ADCP types). |
| 74 | + |
| 75 | +### Waypoint datetimes |
| 76 | + |
| 77 | +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. |
| 78 | + |
| 79 | +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. |
| 80 | + |
| 81 | +```{note} |
| 82 | +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 a realistic speed (~ 10 knots). The expedition schedule (and the ship's configuration) will be automatically verified when you press _Save Changes_ in the planning tool. |
| 83 | +``` |
| 84 | + |
| 85 | +```{tip} |
| 86 | +The MFP route planning tool will give estimated durations of sailing between sites, usually at an assumed 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. |
| 87 | +``` |
| 88 | + |
| 89 | +### Instrument selection |
| 90 | + |
| 91 | +You should now consider which measurements are to be taken at each sampling site, and therefore which instruments need to be selected in the planning tool. |
| 92 | + |
| 93 | +```{tip} |
| 94 | +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. |
| 95 | +``` |
| 96 | + |
| 97 | +Instrument selections can be made 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. |
| 98 | + |
| 99 | +```{note} |
| 100 | +For advanced users: you can also make further customisations to behaviours of all instruments under _Ship Config Editor_ > _Instrument Configurations_. |
| 101 | +``` |
| 102 | + |
| 103 | +### Save changes |
| 104 | + |
| 105 | +When you are happy with your ship configuration and schedule plan, press _Save Changes_. |
| 106 | + |
| 107 | +```{note} |
| 108 | +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 `ship_config.yaml` and `schedule.yaml` files, ready for the next steps. If your selections are invalid you should be provided with information on how to fix them. |
| 109 | +``` |
| 110 | + |
| 111 | +## Fetch the data |
| 112 | + |
| 113 | +You are now ready to retrieve the input data required for simulating your virtual expedition from the [Copernicus Marine Data Store](https://data.marine.copernicus.eu/products). You will need to register for an account via https://data.marine.copernicus.eu/register. |
| 114 | + |
| 115 | +To retrieve the data, run the following command in your CLI: |
| 116 | + |
| 117 | +``` |
| 118 | +virtualship fetch EXPEDITION_NAME --username <USERNAME> --password <PASSWORD> |
| 119 | +``` |
| 120 | + |
| 121 | +Replace `<USERNAME>` and `<PASSWORD>` with your own Copernicus Marine Data Store credentials. Alternatively, you can simply run `virtualship fetch EXPEDITION_NAME` and you will be prompted for your credentials instead. |
| 122 | + |
| 123 | +Waiting for your data download is a great time to practice your level of patience. A skill much needed in oceanographic fieldwork ;-) |
| 124 | + |
| 125 | +## Run the expedition |
| 126 | + |
| 127 | +Once your input data has finished downloading you can run your expedition using the command: |
| 128 | + |
| 129 | +``` |
| 130 | +virtualship run EXPEDITION_NAME |
| 131 | +``` |
| 132 | + |
| 133 | +Your command line output should look something like this... |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | +It might take up to an hour to simulate the measurements depending on your choices. 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?! |
| 138 | + |
| 139 | +## Results |
| 140 | + |
| 141 | +Upon successfully completing the simulation, results from the expedition will be stored in the `EXPEDITION_NAME/results` directory, written as [Zarr](https://zarr.dev/) files. |
| 142 | + |
| 143 | +From here you can carry on your analysis (offline). We encourage you to explore and analyse these data using [Xarray](https://docs.xarray.dev/en/stable/). We also provide various further [VirtualShip tutorials](https://virtualship.readthedocs.io/en/latest/user-guide/tutorials/index.html) which provide examples of how to visualise data recorded by the VirtualShip instruments. |
| 144 | + |
| 145 | +<!-- TODO: Add a link to visualisation tool as an alternate option to own visualisation when/if this feature is implemented?! --> |
0 commit comments