ArgoCanada / medsrtqc

An experimental container for Argo Canada realtime quality control code
https://argocanada.github.io/medsrtqc/
MIT License
0 stars 1 forks source link

Updating `PRES` doesn't always work for VMS? #1

Open paleolimbot opened 3 years ago

paleolimbot commented 3 years ago

See here:

from medsrtqc.vms import read_vms_profiles
from medsrtqc.resources import resource_path
from medsrtqc.interactive import plot
from medsrtqc.qc.flag import Flag
from medsrtqc.qc.named_tests import PressureIncreasingTest

profs = read_vms_profiles(resource_path('BINARY_VMS.DAT'))
test = PressureIncreasingTest()
prof = profs[0]
test.run(prof)

import matplotlib.pyplot as plt
fig, axs = plot(prof, vars=('PRES', 'TEMP', 'PSAL'))
for i, var in enumerate(('PRES', 'TEMP', 'PSAL')):
    t = prof[var]
    bad = t.qc == Flag.BAD
    plt.subplot(2, 2, i + 1).scatter(t.value[bad], t.pres[bad])

plt