Skip to content
Merged
Show file tree
Hide file tree
Changes from 89 commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
a4f9deb
Unify config files to expedition.yaml (#217)
j-atkins Oct 21, 2025
2240b89
Update link to website (#215)
VeckoTheGecko Oct 8, 2025
8c08b45
Merge branch 'main' into v1-dev
j-atkins Oct 21, 2025
63cbda5
first refactoring step, parent instrument classes
j-atkins Aug 18, 2025
b4fbf2b
ignore refactoring notes in gitignore
j-atkins Aug 18, 2025
2409517
add note to remove upon completing v1 dev
j-atkins Aug 18, 2025
cfa7a0f
scratch inputdataset objects integration to _fetch
j-atkins Sep 17, 2025
851dd27
add call to download_data()
j-atkins Sep 17, 2025
a417c68
Add new instrument classes and update InputDataset to include depth p…
j-atkins Oct 6, 2025
a0c77ab
Refactor instrument handling in _fetch and update imports for consist…
j-atkins Oct 7, 2025
9bcaba2
Refactor instrument classes and re-add (temporary) simulation functio…
j-atkins Oct 7, 2025
8b5954d
improve/clarify comments and notes
j-atkins Oct 9, 2025
ff38f4f
Refactor ArgoFloat and XBT classes to include depth parameters and re…
j-atkins Oct 9, 2025
c870d1c
avoid circular import issues
j-atkins Oct 14, 2025
49b3bee
make tests for InputDataset base class
j-atkins Oct 14, 2025
c4e3196
refactor instrument handling in _fetch.py and update expedition model…
j-atkins Oct 22, 2025
2f40f7d
refactor instrument error handling in Expedition model and remove Sch…
j-atkins Oct 22, 2025
43c855d
add is_underway property to InstrumentType and filter instruments in …
j-atkins Oct 22, 2025
79c81cb
enhance CLI output for fetching
j-atkins Oct 22, 2025
efb53ca
general fixes and new error class
j-atkins Oct 22, 2025
c4ddea1
refactor test cases to use Expedition object
j-atkins Oct 22, 2025
28e369f
Merge branch 'main' into v1-dev
j-atkins Oct 27, 2025
d4e8e8d
Merge branch v1-dev into instrument-refactor
j-atkins Oct 27, 2025
66aa4a5
move instruments base classes out of models/ dir
j-atkins Oct 27, 2025
06ddf37
update base class imports
j-atkins Oct 27, 2025
5887177
make get_instruments_registry more robust with testing
j-atkins Oct 27, 2025
cc35538
update mock reanalysis period and refactor tests to use expedition fi…
j-atkins Oct 27, 2025
2fcbbd6
Merge branch 'v1-dev' into instrument-refactor
j-atkins Oct 27, 2025
8f5af04
refactor: reorganize instrument classes and update imports for clarity
j-atkins Oct 27, 2025
fdc0e6e
implement instrument registration and input dataset retrieval
j-atkins Oct 27, 2025
95e6cbd
refactor: reorganize imports in instrument test files for consistency
j-atkins Oct 27, 2025
01cee18
further refactoring: instrument classes to use a unified InputDataset…
j-atkins Oct 28, 2025
e96aa8a
evaporate simulate_measurements.py; centralise run logic
j-atkins Oct 28, 2025
3efa29b
draft up check land using bathymetry
j-atkins Oct 28, 2025
aa2d309
small bug fixes
j-atkins Oct 28, 2025
588cab4
patch copernicus product id search logic to new instrument classes, p…
j-atkins Oct 29, 2025
1081fab
adding U and V to instruments where missing
j-atkins Oct 29, 2025
a0d7d2c
enhanced error messaging for XBT in too shallow regions
j-atkins Oct 29, 2025
e5c08ce
bug fixes
j-atkins Oct 29, 2025
a4f8af0
version U and V downloaded
j-atkins Nov 3, 2025
e3c57f6
dummy U and V
j-atkins Nov 3, 2025
813a245
Neaten up logging output
j-atkins Nov 3, 2025
b94f4f0
small bug fixes
j-atkins Nov 3, 2025
a5d10e7
tidy up
j-atkins Nov 3, 2025
3753032
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 3, 2025
b7904e8
Refactor type hints and improve test coverage for instruments and utils
j-atkins Nov 3, 2025
7d1c575
Remove TODO comments and tidy up imports in test files
j-atkins Nov 3, 2025
766dab0
Merge branch 'instrument-refactor' of github.com:OceanParcels/virtual…
j-atkins Nov 3, 2025
e74a5ad
Refactor bathymetry error handling, update verification methods and r…
j-atkins Nov 3, 2025
56d8fd5
move product id selection logic to utils
j-atkins Nov 5, 2025
eaa124c
Merge branch 'main' into instrument-refactor
j-atkins Nov 5, 2025
c447dd8
update
j-atkins Nov 5, 2025
870271b
first draft direct ingestion via copernicusmarine (CTD only)
j-atkins Nov 5, 2025
701e45d
refactor bathymetry data handling and add (temporary) timing for perf…
j-atkins Nov 5, 2025
8194115
update instrument constructors for Copernicus Marine ingestion
j-atkins Nov 6, 2025
446b8d0
move expedition/do_expedition.py to cli/_run.py, rename Instrument.ru…
j-atkins Nov 6, 2025
c97d319
move checkpoint class to models, move expedition_cost() to utils.py
j-atkins Nov 6, 2025
d1acdef
update imports for expedition_cost
j-atkins Nov 6, 2025
d7531ae
working with drifters (bodge), CTD_BGC not yet working
j-atkins Nov 6, 2025
3a12ae8
Merge branch 'instrument-refactor' into ingest
j-atkins Nov 7, 2025
118e685
remove fetch and all associated logic
j-atkins Nov 7, 2025
05686f2
update docstrings/--help info
j-atkins Nov 7, 2025
10e68b3
add buffers to drifters and argos, plus depth limits for drifters
j-atkins Nov 7, 2025
43afe97
remove _creds.py
j-atkins Nov 7, 2025
e9a0c54
CTD_BGC fieldset bug fix
j-atkins Nov 7, 2025
995a6e5
fixing bugs associated with BGC data access
j-atkins Nov 10, 2025
ec33296
update dependencies
j-atkins Nov 10, 2025
c1321ba
logic for handling copernicus credentials
j-atkins Nov 10, 2025
f386f42
add support for taking local pre-downloaded data with --from-data opt…
j-atkins Nov 10, 2025
7ba83fc
update drifter to be at -1m depth, to avoid out of bounds at surface
j-atkins Nov 10, 2025
f13c836
tidy up
j-atkins Nov 10, 2025
4f533c5
bug fixes for unnecessary copernicusmarine call when using pre-downlo…
j-atkins Nov 11, 2025
d288ead
remove redundant tests
j-atkins Nov 11, 2025
dc2f4d9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 11, 2025
2a05ed4
update tests (not yet instrument subclasses)
j-atkins Nov 11, 2025
95a583d
update instrument tests
j-atkins Nov 11, 2025
411c042
test is on land tests in schedule.verify()
j-atkins Nov 11, 2025
10df8f8
Merge branch 'v1-dev' of github.com:OceanParcels/virtualship into v1-dev
j-atkins Nov 11, 2025
e364d00
Run pre-commit
j-atkins Nov 11, 2025
56d41e6
update pre-download ingestion methods to take files split by time
j-atkins Nov 12, 2025
845a8f8
fix bug
j-atkins Nov 13, 2025
1418a44
fix bug in ingesting bgc data from disk
j-atkins Nov 13, 2025
5226a02
tidy up
j-atkins Nov 13, 2025
36574b0
add test for data directory structure compliance
j-atkins Nov 13, 2025
4d9f5ed
update docs
j-atkins Nov 13, 2025
e9f3b16
edits to docs
j-atkins Nov 13, 2025
554f281
add more checks to docs compliance testing
j-atkins Nov 13, 2025
4893731
TODO in readme
j-atkins Nov 14, 2025
5a61541
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 14, 2025
00c4455
Update docs/user-guide/documentation/pre_download_data.md
j-atkins Nov 14, 2025
3cdfd1a
Apply suggestions from code review
j-atkins Nov 14, 2025
a84c8fd
Set t_min to first day of month for monthly resolution
j-atkins Nov 18, 2025
4198406
remove redundant parameters from instrument classes
j-atkins Nov 20, 2025
94d5be2
change variable name
j-atkins Nov 20, 2025
890cd94
make _find_files_in_timerange standalone from Instrument base class
j-atkins Nov 20, 2025
c0ba080
Update error docstring
j-atkins Nov 20, 2025
141530a
update plan UI logic to update space-time region dynamically
j-atkins Nov 20, 2025
9cb27a7
fix xbt bug
j-atkins Nov 20, 2025
6b6d395
add warnings to ADCP max depth config if exceeds authentic limits
j-atkins Nov 20, 2025
189f868
Merge branch 'main' of github.com:OceanParcels/virtualship into v1-dev
j-atkins Nov 20, 2025
b26636b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 20, 2025
ac02bdc
error messaging for case where measurements cause schedule to be missed
j-atkins Nov 20, 2025
89b7084
Merge branch 'v1-dev' of github.com:OceanParcels/virtualship into v1-dev
j-atkins Nov 20, 2025
7b25526
revert to using ScheduleProblem class
j-atkins Nov 21, 2025
28dbe33
add more informative messaging on ScheduleProblem
j-atkins Nov 21, 2025
9bf6446
change test to mock using data from disk to avoid copernicus calls
j-atkins Nov 21, 2025
0d5c5eb
remove accidental breakpoint
j-atkins Nov 21, 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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
</tr>
</table>

<!-- TODO: README needs updating for v1-dev! -->

<!-- Insert catchy summary -->

VirtualShipParcels is a command line simulator allowing students to plan and conduct a virtual research expedition, receiving measurements as if they were coming from actual oceanographic instruments including:
Expand Down
10 changes: 5 additions & 5 deletions docs/user-guide/documentation/copernicus_products.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

VirtualShip supports running experiments anywhere in the global ocean from 1993 through to the present day (and approximately two weeks into the future), using the suite of products available from the [Copernicus Marine Data Store](https://data.marine.copernicus.eu/products).

The data sourcing task is handled by the `virtualship fetch` command. The three products relied on by `fetch` to source data for all [VirtualShip instruments](https://virtualship.readthedocs.io/en/latest/user-guide/assignments/Research_proposal_intro.html#Measurement-Options) (both physical and biogeochemical) are:
The data sourcing task is handled by the `virtualship run` command, which in turn relies on the [copernicusmarine toolbox](https://github.com/mercator-ocean/copernicus-marine-toolbox?tab=readme-ov-file) for 'streaming' data from the Copernicus Marine Data Store. The three products relied on in `run` to source data for all [VirtualShip instruments](https://virtualship.readthedocs.io/en/latest/user-guide/assignments/Research_proposal_intro.html#Measurement-Options) (both physical and biogeochemical) are:

1. **Reanalysis** (or "hindcast" for biogeochemistry).
2. **Renalysis interim** (or "hindcast interim" for biogeochemistry).
Expand All @@ -15,7 +15,7 @@ The Copernicus Marine Service describe the differences between the three product
As a general rule of thumb the three different products span different periods across the historical period to present and are intended to allow for continuity across the previous ~ 30 years.

```{note}
The ethos for automated dataset selection in `virtualship fetch` is to prioritise the Reanalysis/Hindcast products where possible (the 'work horse'), then _interim products where possible for continuity, and finally filling the very near-present (and near-future) temporal range with the Analysis & Forecast products.
The ethos for automated dataset selection in `virtualship run` is to prioritise the Reanalysis/Hindcast products where possible (the 'work horse'), then _interim products where possible for continuity, and finally filling the very near-present (and near-future) temporal range with the Analysis & Forecast products.
```

```{warning}
Expand All @@ -24,13 +24,13 @@ In the rare situation where the start and end times of an expedition schedule sp

### Data availability

The following tables summarise which Copernicus product is selected by `virtualship fetch` per combination of time period and variable (see legend below).
The following tables summarise which Copernicus product is selected by `virtualship run` per combination of time period and variable (see legend below).

For biogeochemical variables `ph` and `phyc`, monthly products are required for hindcast and hindcast interim periods. For all other variables, daily products are available.

#### Physical products

| Period | Product ID | Temporal Resolution | Typical Years Covered | Variables |
| Period | Dataset ID | Temporal Resolution | Typical Years Covered | Variables |
| :------------------ | :--------------------------------------- | :------------------ | :---------------------------------- | :------------------------- |
| Reanalysis | `cmems_mod_glo_phy_my_0.083deg_P1D-m` | Daily | ~30 years ago to ~5 years ago | `uo`, `vo`, `so`, `thetao` |
| Reanalysis Interim | `cmems_mod_glo_phy_myint_0.083deg_P1D-m` | Daily | ~5 years ago to ~2 months ago | `uo`, `vo`, `so`, `thetao` |
Expand All @@ -40,7 +40,7 @@ For biogeochemical variables `ph` and `phyc`, monthly products are required for

#### Biogeochemical products

| Period | Product ID | Temporal Resolution | Typical Years Covered | Variables | Notes |
| Period | Dataset ID | Temporal Resolution | Typical Years Covered | Variables | Notes |
| :---------------------------- | :----------------------------------------- | :------------------ | :---------------------------------- | :-------------------------------- | :------------------------------------- |
| Hindcast | `cmems_mod_glo_bgc_my_0.25deg_P1D-m` | Daily | ~30 years ago to ~5 years ago | `o2`, `chl`, `no3`, `po4`, `nppv` | Most BGC variables except `ph`, `phyc` |
| Hindcast (monthly) | `cmems_mod_glo_bgc_my_0.25deg_P1M-m` | Monthly | ~30 years ago to ~5 years ago | `ph`, `phyc` | Only `ph`, `phyc` (monthly only) |
Expand Down
193 changes: 193 additions & 0 deletions docs/user-guide/documentation/example_copernicus_download.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "a48322c9",
"metadata": {},
"source": [
"# Example Copernicus data download \n",
"\n",
"This notebook provides a rough, non-optimised example of how to download Copernicus Marine data using the `copernicusmarine` Python package.\n",
"\n",
"This will download:\n",
"- Global bathymetry data (static)\n",
"- Global biogeochemical monthly data (0.25 degree hindcast)\n",
"- Global physical daily data (0.25 degree reanalysis)\n",
"\n",
"For a singular year (2023) and two months (June and July).\n",
"\n",
"This notebook is intended as a basic example only. Modifications will be needed to adapt this to your own use case."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7f5a7cc7",
"metadata": {},
"outputs": [],
"source": [
"import copernicusmarine\n",
"import os\n",
"from datetime import datetime"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e7279d5a",
"metadata": {},
"outputs": [],
"source": [
"YEAR = \"2023\"\n",
"MONTHS = [\"06\", \"07\"]\n",
"DAYS = [\n",
" \"01\",\n",
" \"02\",\n",
" \"03\",\n",
" \"04\",\n",
" \"05\",\n",
" \"06\",\n",
" \"07\",\n",
" \"08\",\n",
" \"09\",\n",
" \"10\",\n",
" \"11\",\n",
" \"12\",\n",
" \"13\",\n",
" \"14\",\n",
" \"15\",\n",
" \"16\",\n",
" \"17\",\n",
" \"18\",\n",
" \"19\",\n",
" \"20\",\n",
" \"21\",\n",
" \"22\",\n",
" \"23\",\n",
" \"24\",\n",
" \"25\",\n",
" \"26\",\n",
" \"27\",\n",
" \"28\",\n",
" \"29\",\n",
" \"30\",\n",
" \"31\",\n",
"]"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1a583dba",
"metadata": {},
"outputs": [],
"source": [
"### PHYSICAL DAILY FILES\n",
"\n",
"os.chdir(\"~/data/phys/\")\n",
"DATASET_ID = \"cmems_mod_glo_phy-all_my_0.25deg_P1D-m\"\n",
"\n",
"for month in MONTHS:\n",
" for day in DAYS:\n",
" # check is valid date\n",
" try:\n",
" datetime(year=int(YEAR), month=int(month), day=int(day), hour=0)\n",
" except ValueError:\n",
" continue\n",
"\n",
" filename = f\"{DATASET_ID}_global_fulldepth_{YEAR}_{month}_{day}.nc\"\n",
"\n",
" if os.path.exists(filename):\n",
" print(f\"File {filename} already exists, skipping...\")\n",
" continue\n",
"\n",
" copernicusmarine.subset(\n",
" dataset_id=DATASET_ID,\n",
" variables=[\"uo_glor\", \"vo_glor\", \"thetao_glor\", \"so_glor\"],\n",
" minimum_longitude=-180,\n",
" maximum_longitude=179.75,\n",
" minimum_latitude=-80,\n",
" maximum_latitude=90,\n",
" start_datetime=f\"{YEAR}-{month}-{day}T00:00:00\",\n",
" end_datetime=f\"{YEAR}-{month}-{day}T00:00:00\",\n",
" minimum_depth=0.5057600140571594,\n",
" maximum_depth=5902.0576171875,\n",
" output_filename=filename,\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "89921772",
"metadata": {},
"outputs": [],
"source": [
"### BIOGEOCHEMICAL MONTHLY FILES\n",
"\n",
"os.chdir(\"~/data/bgc/\")\n",
"DATASET_ID = \"cmems_mod_glo_bgc_my_0.25deg_P1M-m\"\n",
"DAY = \"01\"\n",
"\n",
"for month in MONTHS:\n",
" try:\n",
" datetime(year=int(YEAR), month=int(month), day=int(DAY), hour=0)\n",
" except ValueError:\n",
" continue\n",
"\n",
" filename = f\"{DATASET_ID}_global_fulldepth_{YEAR}_{month}_{DAY}.nc\"\n",
"\n",
" if os.path.exists(filename):\n",
" print(f\"File {filename} already exists, skipping...\")\n",
" continue\n",
"\n",
" copernicusmarine.subset(\n",
" dataset_id=\"cmems_mod_glo_bgc_my_0.25deg_P1M-m\",\n",
" variables=[\"chl\", \"no3\", \"nppv\", \"o2\", \"ph\", \"phyc\", \"po4\"],\n",
" minimum_longitude=-180,\n",
" maximum_longitude=179.75,\n",
" minimum_latitude=-80,\n",
" maximum_latitude=90,\n",
" start_datetime=f\"{YEAR}-{month}-{DAY}T00:00:00\",\n",
" end_datetime=f\"{YEAR}-{month}-{DAY}T00:00:00\",\n",
" minimum_depth=0.5057600140571594,\n",
" maximum_depth=5902.05810546875,\n",
" output_filename=filename,\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8b5495c6",
"metadata": {},
"outputs": [],
"source": [
"### BATHYMETRY FILE\n",
"os.chdir(\"~/data/bathymetry/\")\n",
"DATASET_ID = \"cmems_mod_glo_phy_anfc_0.083deg_static\"\n",
"filename = \"cmems_mod_glo_phy_anfc_0.083deg_static_bathymetry.nc\"\n",
"\n",
"copernicusmarine.subset(\n",
" dataset_id=DATASET_ID,\n",
" dataset_part=\"bathy\",\n",
" variables=[\"deptho\"],\n",
" minimum_longitude=-180,\n",
" maximum_longitude=179.91668701171875,\n",
" minimum_latitude=-80,\n",
" maximum_latitude=90,\n",
" minimum_depth=0.49402499198913574,\n",
" maximum_depth=0.49402499198913574,\n",
" output_filename=filename,\n",
")"
]
}
],
"metadata": {
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
87 changes: 87 additions & 0 deletions docs/user-guide/documentation/pre_download_data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Pre-downloading data

By default, VirtualShip will automatically 'stream' data from the Copernicus Marine Service via the [copernicusmarine toolbox](https://github.com/mercator-ocean/copernicus-marine-toolbox?tab=readme-ov-file). However, for users who wish to manage data locally, it is possible to pre-download the required datasets and feed them into VirtualShip simulations.

<!-- TODO: quickstart guide needs full update! -->
Copy link
Collaborator

Choose a reason for hiding this comment

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

Updating the Quickstart guide is a priority after this PR gets merged, as we have students who will be working with VirtualShip on November 27th again


As outlined in the [Quickstart Guide](https://virtualship.readthedocs.io/en/latest/user-guide/quickstart.html), the `virtualship run` command supports an optional `--from-data` argument, which allows users to specify a local directory containing the necessary data files.

```{tip}
See the [for example...](#for-example) section for an example data download workflow.
```

### Data requirements

When using pre-downloaded data with VirtualShip, the software supports only: daily and monthly resolution physical and biogeochemical data, along with a static bathymetry file.

In addition, all pre-downloaded data must be split into separate files per timestep (i.e. one .nc file per day or month).

```{note}
**Monthly data**: when using monthly data, ensure that your final .nc file download is for the month *after* your expedition schedule end date. This is to ensure that a Parcels FieldSet can be generated under-the-hood which fully covers the expedition period. For example, if your expedition runs from 1st May to 15th May, your final monthly data file should be in June. Daily data files only need to cover the expedition period exactly.
```

Further, VirtualShip expects pre-downloaded data to be organised in a specific directory & filename structure within the specified local data directory. The expected structure is as outlined in the subsequent sections.

#### Directory structure

Assuming the local data directory (as supplied in the `--from-data` argument) is named `data/`, the expected subdirectory structure is:

```bash
.
└── data
├── bathymetry # containing the singular bathymetry .nc file
├── bgc # containing biogeochemical .nc files
└── phys # containing physical .nc files
```

#### Filename conventions

Within these subdirectories, the expected filename conventions are:

- Physical data files (in `data/phys/`) should be named as follows:
- `<COPERNICUS_DATESET_NOMENCLATURE>_<YYYY_MM_DD>.nc`
- e.g. `cmems_mod_glo_phy-all_my_0.25deg_P1D-m_1998_05_01.nc` and so on for each timestep.
- Biogeochemical data files (in `data/bgc/`) should be named as follows:
- `<COPERNICUS_DATESET_NOMENCLATURE>_<YYYY_MM_DD>.nc`
- e.g. `cmems_mod_glo_bgc_my_0.25deg_P1M-m_1998_05_01.nc` and so on for each timestep.
- Bathymetry data file (in `data/bathymetry/`) should be named as follows:
- `cmems_mod_glo_phy_anfc_0.083deg_static_bathymetry.nc`

```{tip}
Careful to use an underscore (`_`) as the separator between date components in the filenames (i.e. `YYYY_MM_DD`).
```

```{note}
Using the `<COPERNICUS_DATESET_NOMENCLATURE>` in the filenames is vital in order to correctly identify the temporal resolution of the data (daily or monthly). The `P1D` in the example above indicates daily data, whereas `P1M` would indicate monthly data.

See [here](https://help.marine.copernicus.eu/en/articles/6820094-how-is-the-nomenclature-of-copernicus-marine-data-defined#h_34a5a6f21d) for more information on Copernicus dataset nomenclature.

See also our own [documentation](https://virtualship.readthedocs.io/en/latest/user-guide/documentation/copernicus_products.html#data-availability) on the Copernicus datasets used natively by VirtualShip when 'streaming' data if you wish to use the same datasets for pre-download.
```

```{note}
**Monthly data**: the `DD` component of the date in the filename for monthly .nc files should always be `01`, representing the first day of the month. This ensures that a Parcels FieldSet can be generated under-the-hood which fully covers the expedition period from the start.
```

#### Further assumptions

The following assumptions are also made about the data:

1. All pre-downloaded data files must be in NetCDF format (`.nc`).
2. Physical data files must contain the following variables: `uo`, `vo`, `so`, `thetao`
- Or these strings must appear as substrings within the variable names (e.g. `uo_glor` is acceptable for `uo`).
3. If using BGC instruments (e.g. `CTD_BGC`), the relevant biogeochemical data files must contain the following variables: `o2`, `chl`, `no3`, `po4`, `nppv`, `ph`, `phyc`.
- Or these strings must appear as substrings within the variable names (e.g. `o2_glor` is acceptable for `o2`).
4. Bathymetry data files must contain a variable named `deptho`.

#### Also of note

1. Whilst not mandatory to use data downloaded only from Copernicus Marine (any existing data you may hold can be re-organised accordingly), the assumptions made by VirtualShip regarding directory structure and filename conventions are motivated by alignment with the Copernicus Marine's practices.
- If you want to use pre-existing data with VirtualShip, which you may have accessed from a different source, it is possible to do so by restructuring and/or renaming your data files as necessary.
2. The whole VirtualShip pre-downloaded data workflow should support global data or subsets thereof, provided the data files contain the necessary variables and are structured as outlined above.

#### For example...

Example Python code for automating the data download from Copernicus Marine can be found in [Example Copernicus Download](example_copernicus_download.ipynb).

<!-- TODO: replace with URL? -->
2 changes: 2 additions & 0 deletions docs/user-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ assignments/index
:maxdepth: 1

documentation/copernicus_products.md
documentation/pre_download_data.md
documentation/example_copernicus_download.ipynb
```
Loading
Loading