Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@ Python tools for processing moored oceanographic array observations from raw ins
pip install oceanarray
```

`seasenselib` is required for reading raw instrument files (available on PyPI but needs `--no-deps`):

```bash
pip install pyrsktools pycnv
pip install seasenselib --no-deps
```
This pulls in `seasenselib` (used to read raw instrument files in stage 1) automatically.

Python 3.9–3.12 is supported.

Expand Down
22 changes: 9 additions & 13 deletions docs/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ write Python code.
Prerequisites
-------------

**Python 3.10 or later** is required. First create an isolated environment,
then clone and install from source.
**Python 3.10 or later** is required. Install ``oceanarray`` from PyPI, ideally
into an isolated environment.

**Option A — conda**

.. code-block:: bash

conda create -n oceanarray python=3.11
conda activate oceanarray
pip install oceanarray

**Option B — venv**

Expand All @@ -37,8 +38,9 @@ then clone and install from source.
python -m venv venv
source venv/bin/activate # macOS / Linux
# venv\Scripts\activate # Windows
pip install oceanarray

**Clone and install** (after activating either environment):
For development, install from source instead:

.. code-block:: bash

Expand All @@ -47,23 +49,17 @@ then clone and install from source.
pip install -e .

``oceanarray`` reads raw instrument files via the ``seasenselib`` library,
which is also not on PyPI. Install it following the instructions provided
with your copy of the library.
which is on PyPI and installed automatically with ``oceanarray``.

.. note::

Without ``seasenselib``, stage 1 processing (raw file ingestion) cannot
run. Stages 2–3, stack, grid, and report generation work on existing
NetCDF files without it.

If you need to process RDI WorkHorse ADCP files (``file_type: rdi-raw``),
install the optional ``dolfyn`` dependency:

.. code-block:: bash

pip install "mhkit[dolfyn]"

You do not need ``dolfyn`` for SeaBird, RBR, or Nortek Aquadopp files.
RDI WorkHorse ADCP files (``file_type: rdi-raw``) need no extra install:
``seasenselib`` reads them via ``mhkit[dolfyn]``, pulled in automatically with
``oceanarray``.

----

Expand Down
4 changes: 2 additions & 2 deletions docs/source/roadmap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ Dependencies
============

- ``scipy``: Welch PSD for spectral figures in the grid report
- ``dolfyn`` (via ``mhkit[dolfyn]``): RDI raw ADCP file reader (``rdi-raw`` file type)
- ``ioos_qc``: QARTOD gross-range and spike tests
- ``gsw`` (TEOS-10): seawater property calculations
- ``xarray`` / ``netCDF4``: core data handling
- ``jinja2``: HTML report generation
- ``matplotlib``: all figures
- ``ppigrf``: IGRF magnetic declination for BEAM→ENU rotation
- ``seasenselib``: raw instrument format readers (sbe-cnv, sbe-ascii, nortek-ascii,
nortek-csv, rbr-rsk, rbr-dat, rbr-hex)
nortek-csv, rbr-rsk, rbr-dat, rbr-hex, rdi-raw); pulls in ``mhkit[dolfyn]`` for
the RDI reader
53 changes: 25 additions & 28 deletions docs/source/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,35 @@ dependencies and is not recommended for production use.

## Install oceanarray

`oceanarray` is not distributed on PyPI. Create an isolated Python
environment first, then clone and install from source.
`oceanarray` is on PyPI:

### Option A — conda
```bash
pip install oceanarray
```

This pulls in its dependencies, including `seasenselib` — the reader
`oceanarray` uses for raw instrument files in stage 1.

### In an isolated environment (recommended)

#### Option A — conda

```bash
conda create -n oceanarray python=3.11
conda activate oceanarray
pip install oceanarray
```

### Option B — venv
#### Option B — venv

```bash
python -m venv venv
source venv/bin/activate # macOS / Linux
# venv\Scripts\activate # Windows
pip install oceanarray
```

### Clone and install (after activating either environment)
### Development install (from source)

```bash
git clone https://github.com/ocean-uhh/oceanarray
Expand All @@ -34,35 +44,22 @@ pip install -e .
```

The `-e` flag installs in editable mode so that any local changes take effect
immediately without reinstalling.

## Install seasenselib
immediately without reinstalling. See [Troubleshooting](troubleshooting.rst)
if a dependency fails to build.

`oceanarray` reads raw instrument files via `seasenselib`, which is available
on PyPI but declares version constraints on some of its dependencies
(`pyrsktools`, `pycnv`, `pyproj`) that can conflict with the rest of the
oceanarray environment. Install those packages first — letting pip satisfy
them against oceanarray's own requirements — then install `seasenselib` without
its dependency resolver:
## Stage 1 and seasenselib

```bash
pip install pyrsktools pycnv
pip install seasenselib --no-deps
```

Without `seasenselib`, stage 1 processing cannot run. Stages 2–3 and
Stage 1 (reading raw instrument files) needs `seasenselib`, which is installed
automatically with `oceanarray` (above). Without `seasenselib`, stage 1
processing cannot run. Stages 2–3 and
mooring-level processing (stack, grid, reports) can still run on existing
NetCDF files. See [Troubleshooting](troubleshooting.rst) if the install fails.

## Optional: RDI ADCP support

Processing RDI WorkHorse ADCP files (`file_type: rdi-raw`) requires `dolfyn`:

```bash
pip install "mhkit[dolfyn]"
```
## RDI ADCP support

This dependency is not needed for SeaBird, RBR, or Nortek Aquadopp files.
Processing RDI WorkHorse ADCP files (`file_type: rdi-raw`) needs no extra
install: `seasenselib` reads them via `mhkit[dolfyn]`, which is pulled in
automatically with `oceanarray`.

## Verify the installation

Expand Down
28 changes: 8 additions & 20 deletions docs/source/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,15 @@ It was assembled from real installation notes on macOS (Python 3.11, Homebrew).
Installation problems
---------------------

seasenselib dependency conflicts (pyrsktools, pycnv, pyproj)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

``seasenselib`` is on PyPI but declares version constraints on several packages
(``pyrsktools``, ``pycnv``, ``pyproj``) that can conflict with the rest of the
oceanarray environment when pip tries to resolve everything at once.

The fix is to install those packages first — letting pip satisfy them against
oceanarray's own requirements — then install ``seasenselib`` without its
dependency resolver:

.. code-block:: bash

pip install pyrsktools pycnv
pip install seasenselib --no-deps
seasenselib / pyproj build failures
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is safe because oceanarray already provides compatible versions of the
packages that ``seasenselib`` needs at runtime.
``seasenselib`` (the raw-file reader, installed automatically with
``oceanarray``) and its dependency ``pyproj`` occasionally fail to build from
source on some platforms or pip versions.

**If pyproj still fails to install** (some pip versions fail to build it from
source), force a pre-built binary wheel before the step above:
**If pyproj fails to install**, force a pre-built binary wheel, then re-run the
install:

.. code-block:: bash

Expand All @@ -43,7 +31,7 @@ source), force a pre-built binary wheel before the step above:
--only-binary=:all: \
"pyproj>=3.7.0"

Then re-run the ``pyrsktools``/``pycnv``/``seasenselib`` steps.
pip install oceanarray

If all else fails, recreate the virtual environment with Python 3.11 exactly
(``python3.11 -m venv venv``) and start from scratch.
Expand Down
3 changes: 1 addition & 2 deletions docs/source/yaml_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,7 @@ Valid ``file_type`` values
* - ``rdi-raw``
- RDI raw binary
- WorkHorse ADCP
- Requires the ``dolfyn`` package:
``pip install "mhkit[dolfyn]"``
- Read via ``seasenselib`` (``mhkit[dolfyn]``); no extra install needed.
* - ``adcp-matlab``
- ADCP MATLAB export
- RDI WorkHorse
Expand Down
10 changes: 6 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ ppigrf # IGRF magnetic declination (used in stage3 for Nortek BEAM→ENU correc
# QC
ioos_qc


# RDI ADCP reader (rdi-raw file type) requires dolfyn via mhkit
dolfyn # or: pip install "mhkit[dolfyn]"
# RDI ADCP reading (rdi-raw file type) is handled by seasenselib, which pulls in
# mhkit[dolfyn]; oceanarray does not import dolfyn directly.

# Wavelet analysis (grid report temperature scalogram)
pycwt # Torrence & Compo 1998 CWT; Morlet and Mexican hat wavelets

# seasenselib is installed separately: pip install -e seasenselib
# Raw instrument-file readers (stage 1). On PyPI; its runtime deps resolve
# against the stack above, so the old `--no-deps` workaround is obsolete.
# (Local development can override with an editable checkout: pip install -e ../seasenselib.)
seasenselib

# Logsheets (oceanarray logsheet subcommand)
jinja2>=3.0 # LaTeX template rendering
Expand Down
Loading