Skip to content
Open
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Changed the name of the module `acoustics` to `aa`, to refect that this module is specific to active acoustic data
- Added a `paths` module for all functions involved in generating file or directory paths. Moved all such path functions from other modules into `paths`, and updated these path functions to use the new ESD prod directory structure.
- Changed `gcp` module, using Gemini to follow a "Fail-Fast" module design.
- Added a qartod module, for generating qartod flags using the `ioos_qc` package for the science dataset.

### Imagery
- Changed to extracting the date extracting EXIF metadata from the imagery files, rather than deriving image datetimes from the filenames. This included writing relevant metadata to a metadata-specific bucket, and reading the datetimes from the metadata files. Specifically:
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ dependencies:
- folium
- skyfield
- timezonefinder
- ioos_qc

- pip:
- dbdreader
Expand Down
182 changes: 182 additions & 0 deletions esdglider/data/qartod-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
contexts:
- streams:

# =====================================================
# POSITION
# =====================================================

latitude:
qartod:
gross_range_test:
suspect_span: [-90, 90]
fail_span: [-90, 90]

longitude:
qartod:
gross_range_test:
suspect_span: [-180, 180]
fail_span: [-180, 180]

lat:
qartod:
gross_range_test:
suspect_span: [-90, 90]
fail_span: [-90, 90]

lon:
qartod:
gross_range_test:
suspect_span: [-180, 180]
fail_span: [-180, 180]

profile_lat:
qartod:
gross_range_test:
suspect_span: [-90, 90]
fail_span: [-90, 90]

profile_lon:
qartod:
gross_range_test:
suspect_span: [-180, 180]
fail_span: [-180, 180]

lat_uv:
qartod:
gross_range_test:
suspect_span: [-90, 90]
fail_span: [-90, 90]

lon_uv:
qartod:
gross_range_test:
suspect_span: [-180, 180]
fail_span: [-180, 180]

# =====================================================
# PRESSURE / DEPTH
# =====================================================

pressure:
qartod:
gross_range_test:
suspect_span: [0, 300]
fail_span: [0, 2000]

spike_test:
suspect_threshold: 20
fail_threshold: 50

rate_of_change_test:
threshold: 100

depth:
qartod:
gross_range_test:
suspect_span: [0, 300]
fail_span: [0, 2000]

spike_test:
suspect_threshold: 20
fail_threshold: 50

rate_of_change_test:
threshold: 100

# =====================================================
# TEMPERATURE
# =====================================================

temperature:
qartod:
gross_range_test:
suspect_span: [7.0, 18.0]
fail_span: [-5, 40]

spike_test:
suspect_threshold: 0.5
fail_threshold: 1.0

flat_line_test:
suspect_threshold: 1800
fail_threshold: 3600
tolerance: 0.002

rate_of_change_test:
threshold: 1.0

# =====================================================
# CONDUCTIVITY
# =====================================================

conductivity:
qartod:
gross_range_test:
suspect_span: [3.4, 4.5]
fail_span: [0, 10]

spike_test:
suspect_threshold: 0.25
fail_threshold: 0.5

flat_line_test:
suspect_threshold: 1800
fail_threshold: 3600
tolerance: 0.0005

# =====================================================
# SALINITY
# =====================================================

salinity:
qartod:
gross_range_test:
suspect_span: [28, 37]
fail_span: [0, 45]

spike_test:
suspect_threshold: 1
fail_threshold: 2

flat_line_test:
suspect_threshold: 1800
fail_threshold: 3600
tolerance: 0.01

# =====================================================
# DENSITY
# =====================================================

density:
qartod:
gross_range_test:
suspect_span: [1015, 1035]
fail_span: [900, 1100]

spike_test:
suspect_threshold: 1
fail_threshold: 2

# =====================================================
# VELOCITY
# =====================================================

u:
qartod:
gross_range_test:
suspect_span: [-3, 3]
fail_span: [-10, 10]

spike_test:
suspect_threshold: 0.5
fail_threshold: 1.0

v:
qartod:
gross_range_test:
suspect_span: [-3, 3]
fail_span: [-10, 10]

spike_test:
suspect_threshold: 0.5
fail_threshold: 1.0
16 changes: 16 additions & 0 deletions esdglider/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,22 @@ def get_path_yaml_deployment_vars(yaml_type: str) -> str:
with resources.as_file(ref) as path:
return str(path)

def get_path_qartod_config() -> str:
"""
Get the path to the packaged QARTOD configuration file.
The configuration file is distributed with the package and
contains the default IOOS QARTOD test configuration used when
generating quality-control flags.

Returns
-------
str
Path to the packaged ``qartod-config.yml`` file.
"""
ref = resources.files("esdglider.data") / "qartod-config.yml"

with resources.as_file(ref) as path:
return str(path)

def get_path_glider_data_out(
deployment_name: str,
Expand Down
Loading