-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
This mapping should be documented in the exchange doc in "plain language". Note that this is one way CSIRO -> WHP Flags.
Code from Bernadette Sloyan:
for aa = 1:length(dt)
eval(['qc = nc.' dt{1,aa} 'Flag;'])
ii = qc >= 0 & qc <= 63; %good
ij = qc >= 64 & qc <= 79; %suspect
ip = qc >= 80 & qc <= 95; %interpolated
io = qc >= 96 & qc <= 127; %suspect
ik = qc >= 128 & qc <= 191; %bad
il = qc >= 192 & qc <= 255;%no QC
in = isnan(qc);
qcc = qc;
iqc = qcc<0;
qcc(iqc) = qcc(iqc) + 256;
state = floor(qcc./64);
op = floor((qcc-state.*64)./16);
err = qcc-state.*64-op.*16;
im = err == 13;
qc(ii) = 2; %Acceptable
qc(ij) = 3; %Questionable
qc(io) = 3; %Questionable
qc(ip) = 6; %interpolated
qc(ik) = 4; %Bad
qc(il) = 1; %not calibrated
qc(im) = 5; %not reported
qc(in) = 9; %missing Reactions are currently unavailable