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

Non-Photochemical Quenching (NPQ) #6

Closed cgrdn closed 2 years ago

cgrdn commented 2 years ago

Only perform NPQ correction if FLAG_MLD is FALSE. The test is not defined in the manual though??

Using RES calculated in #5, check where residual is greater than 2 times the 90th percentile of RES:

[1] RES > 2*percentile(RES, 90)

Next, calculate the NPQ depth, which is the depth at the maximum of the 5-pt median filtered. Ignore any depths where [1] is TRUE. This depth should be relatively near the surface, we check this by verifying that NPQ depth is within 90% of the MLD:

[2] depthNPQ < 0.9MLD

If [2] is TRUE, CHLA_ADJUSTED[0:depthNPQ] = CHLA_ADJUSTED[depthNPQ], CHLA_QC[0:depthNPQ] = 3, CHLA_ADJUSTED[0:depthNPQ] = 5.

cgrdn commented 2 years ago

Working on this under the assumption that FLAG_MLD just indicates whether or not you found a mixed layer depth at all.