高空探测数据处理--中心级质控(二)

这段代码详细展示了对不同气象参数(如温度、湿度、位势高度、露点温度、反算气压和北向速度)进行质量控制的多个步骤,包括异常值检测和一致性检查。每个参数的质控过程都涉及到特定的检查方法,并根据检查结果分配相应的质控码和标签。

接上

4.2温度质控

温度质控包括:温度极值检查、双权重离群值检查、超绝热递减率检查、温度露点差检查等。

vector<qcFlag> temperatureQC(vector<float> td,vector<float> tem,vector<float> pre,vector<float> lat,int length,int outside,int inside,Point sta,string season){
    qcFlag temp;
    QCMethod qcm;
    vector<int> code;
    vector<qcFlag> result;
    int m1,m2,m3,m4;

    qcm.N = length;
    code = qcm.tem_Double_weighted_outlier_check(tem);
    for (int i=0;i<length-1;i++){
        m1 = qcm.Tem_extreme_check(tem[i],sta.lat,pre[i]);
        m2 = code[i];
        m3 = qcm.Super_adiabatic_decreasing_rate(tem[i],tem[i+1],lat[i],pre[i],pre[i+1],season);
        m4 = qcm.Temperature_Dewpoint_difference(tem[i],td[i]);
        if (m1+m2+m3+m4 > 1)
            temp.code = "2";
        else if (m1+m2 == 1)
            temp.code = "1";
        else
            temp.code = "0";
        //cout<<m1<<" ";
        if (m1==0){
            temp.label = "";
            }
        
        if (m1==1){
            if (i<outside)
                temp.label = "A3_T_1,";
            if (i>=outside && i< inside)
                temp.label = "B3_T_1,";
            if (i>inside)
                temp.label = "C3_T_1,";
            }
        if(m1==2){
            if (i<outside)
                temp.label = "A3_T_2,";
            if (i>=outside && i< inside)
                temp.label = "B3_T_2,";
            if (i>inside)
                temp.label = "C3_T_2,";
            
            }
        switch (m2)
        {
        case 0:{
            temp.label += "";
            break;
        }
        case 1:{
            if (i<outside)
                temp.label += "A18_T_1,";
            if (i>=outside && i< inside)
                temp.label += "B18_T_1,";
            if (i>inside)
                temp.label += "C18_T_1,";
            break;
            }
        case 2:{
            if (i<outside)
                temp.label += "A18_T_2,";
            if (i>=outside && i< inside)
                temp.label += "B18_T_2,";
            if (i>inside)
                temp.label += "C18_T_2,";
            break;
            }
        }
        switch (m3)
        {
        case 0:{
            temp.label += "";
            break;
        }
        case 1:{
            if (i<outside)
                temp.label += "A11_T_1,";
            if (i>=outside && i< inside)
                temp.label
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

nobrody

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值