Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSIRO Flag Mapping #18

Open
DocOtak opened this issue Feb 21, 2018 · 0 comments
Open

CSIRO Flag Mapping #18

DocOtak opened this issue Feb 21, 2018 · 0 comments
Labels

Comments

@DocOtak
Copy link
Member

DocOtak commented Feb 21, 2018

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 
@asdossant asdossant added the low label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants