Data in this archive is to be used in accordance with the Sofar Ocean Spotter Data Archive License.
This repository is for getting started with the Sofar Spotter data archive using Python. The S3 bucket with the files (zarr and netCDF) can be viewed here.
Example scripts are provided in the examples/
directory to get started with the data.
This archive includes two datasets - one containing bulk wave parameters and the other containing wave spectra
from the Sofar Spotter global buoy network, named spotter_data_bulk* and spotter_data_spectra*, respectively.
Two versions of each dataset are available, one as a traditional NetCDF (.nc) and one in
Zarr format (_zarr/).
Data utilizes trajectory
as a primary dimension in order to concatentate multiple records of varying length.
Dimensions of the data are index (count in full record) and trajectory (ID associated with buoy).
Data variables include latitude
, longitude
, meanDirection
, meanDirectionalSpread
, meanPeriod
, peakDirection
,
peakDirectionalSpread
, peakPeriod
, and significantWaveHeight
with coordinate index
(i.e. all observations in
record concatenated in one long array). An additional variable rowsize
has the dimension trajectory
, and describes
how many observations from a given buoy. rowsize
can then be used to slice the observations by trajectory
(buoy ID). See
examples/spotter_bulk.ipynb
for an example of how to use this variable.
Dimensions of the data are index (count in full record), frequency (Hz), and trajectory (ID associated with buoy).
Data variables include variance_density
, a1
, a2
,b1
, b2
, latitude
, longitude
, rowsize
, significantWaveHeight
, and
u10
(windspeed at 10 m). See Spotter Technical Manual
for details on wave spectra definitions from directional wave buoys like Spotter.
To get started, in your terminal,
via ssh:
git clone [email protected]:sofarocean/spotter-data-archive.git # for ssh clone
or if you prefer https:
git clone https://github.com/sofarocean/spotter-data-archive.git
# (optional, set up python environment)
python3 -m venv ./.venv
source ./.venv/bin/activate # this activates the new environment
# install dependencies that are listed in requirements.txt
pip3 install -r requirements.txt
In your terminal, with your environment activated,
jupyter notebook
This should open a directory navigator in your browser where you can navigate to examples/
and select an .ipynb notebook.
If you encounter an error when importing packages related to the Python package libproj
, install the following in your virtual environment.
brew install gdal
Make sure to restart terminal/Jupyter Notebook before attempting to rerun the scripts.
We encourage community contribution of example scripts and specific analysis done using this dataset via pull request. Contact [email protected] with any questions.