ioos / ioos_qc

:ballot_box_with_check: :ocean: IOOS QARTOD and other Quality Control tests implemented in Python
https://ioos.github.io/ioos_qc/
Apache License 2.0
46 stars 27 forks source link

Add Density Inversion Test #43

Closed JessyBarrette closed 3 years ago

JessyBarrette commented 3 years ago

The Hakai Institute is hoping to integrate the ioos_qc system into its workflow.

One first application is to apply multiple QARTOD tests to our Provisional CTD Profile Timeseries dataset which is a ragged array representation of time series profiles that are submitted by field technicians and automatically processed by our internal system. We hope to automatically QAQC each profile by using a series of QARTOD tests for each variable. We are currently aiming are running the tests by loading the data from our database to a pandas Dataframe which would be used to apply the diverse tests and then submitting an aggregated QARTOD flag value for each variable back to our database. Which is then served to users with the previously shown ERDDAP dataset.

One very important test regarding CTD profiles is Test 13: Density Inversion Test(p19), which is still for the moment unavailable within the ioos_qc package. QARTOD_TS_Manual_Update2_200324_final p.19

We present an implementation of this test within Pull Request #42 which can be applicable to multiple types of data like profile data and trajectory profile data. The test handles both automatically up and downcast data. The tool does not provide a way to compute potential density and expect it as an input. A computation of that density from core CTD variables could be implemented.

We then hope to spread the result of this test to the corresponding associated variables and derived variables sea_water_salinity, sea_water_temperature, sea_water_conductivity, density, and potential density.

Let me know if some changes are needed or if it corresponds to your expectations.

kwilcox commented 3 years ago

closed with https://github.com/ioos/ioos_qc/pull/42