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

该文详细介绍了几种气象参数的质控方法,包括东向风、垂直速度、风速/风向、经度、纬度和海拔高度的质控检查,主要涉及异常值检测和极值检验,用于确保数据的准确性和可靠性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

接上。

4.8东向风质控

东向风质控包括东向风速离群值检查。

vector<qcFlag> espQC(vector<float> esp,int length,int outside,int inside){
    qcFlag temp;
    QCMethod qcm;
    vector<int> code;
    vector<qcFlag> result;
    int m2;
    qcm.N = length;
    code = qcm.ESPD_Double_weighted_outlier_check(esp);
    for (int i=0;i<length;i++){
        
        m2 = code[i];
        if (m2 > 1)
            temp.code = "2";
        else if (m2 == 1)
            temp.code = "1";
        else
            temp.code = "0";
        //cout<<m2<<" ";
        
        switch (m2)
        {
        case 0:{
            temp.label = "";
            break;
        }
        case 1:{
            if (i<outside)
                temp.label += "A16_ESPD_1,";
            if (i>=outside && i< inside)
                temp.label += "B16_ESPD_1,";
            if (i>inside)
                temp.label += "C16_ESPD_1,";
            break;
            }
        case 2:{
            if (i<outside)
                temp.label += "A16_ESPD_2,";
            if (i>=outside && i< inside)
                temp.label += "B16_ESPD_2,";
            if (i>inside)
                temp.label += "C16_ESPD_2,";
            break;
            }
        }
        result.push_back(temp);  
    }
    return result;
}

4.9垂直速度检查

垂直速度检查主要包括双权重离群值检查

vector<qcFlag> vspQC(vector<float> vsp,int length,int outside,int inside){
    qcFlag temp;
    QCMethod qcm;
    vector<int> code;
    vector<qcFlag> result;
    int m2;
    qcm.N = length;
    code = qcm.Vsp_Double_weighted_outlier_check(vsp);
    for (int i=0;i<length;i++){
        
        m2 = code[i];
        if (m2 > 1)
            temp.code = "2";
        else if (m2 == 1)
            temp.code = "1";
        else
            temp.code = "0";
        //cout<<m2<<" ";
        
        switch (m2)
        {
        case 0:{
            temp.label = "";
            break;
        }
        case 1:{
            if (i<outside)
                temp.label += "A23_VSPD_1,";
            if (i>=outside && i< inside)
                temp.label += "B23_VSPD_1,";
            if (i>inside)
                temp.label += "C23_VSPD_1,";
            break;
            }
        case 2:{
            if (i<outside)
                temp.label += "A23_VSPD_2,";
            if (i>=outside && i< inside)
                temp.label += "B23_VSPD_2,";
            if (i>inside)
                temp.label += "C23_VSPD_2,";
            break;
            }
        }
        result.push_back(temp);  
    }
    return result;
}

4.10风速/风向质控

风速/风向质控包括风速极值检查、风速风向一致性检查、风切变检查等。

vector<qcFlag> windSpeedQC(vector<float> wsd,vector<float> wd,vector<float> pre,int length,int outside,int inside){
    qcFlag temp;
    QCMethod qcm;
    vector<int> code;
    vector<qcFlag> result;
    int m1,m2,m3;
    qcm.N = length;
    
    for (int i=0;i<length-1;i++){
        m1 = qcm.WindSpeed_extreme_check(wsd[i],pre[i]);
        m2 = qcm.Windspeed_WindDirection_consistency(wsd[i],wd[i]);
        m3 = qcm.WindSheer(wsd[i],wsd[i+1],wd[i]);
        
        if (m1+m2+m3 > 1)
            temp.code = "22";
        else if (m1+m2+m3 == 1)
            temp.code = "11";
        else
            temp.code = "00";
        //cout<<m2<<" ";
        if (m1==0){
            temp.label = "";
            }
        if (m1==1){
            if (i<outside)
                temp.label = "A7_SPD_1,A7_DIR_1,";
            if (i>=outside && i< inside)
                temp.label = "B7_SPD_1,B7_DIR_1,";
            if (i>inside)
                temp.label = "C7_SPD_1,C7_DIR_1,";
            }
        if(m1==2){
            if (i<outside)
                temp.label = "A7_SPD_2,A7_DIR_2,";
            if (i>=outside && i< inside)
                temp.label = "B7_SPD_2,B7_DIR_2,";
            if (i>inside)
                temp.label = "C7_SPD_2,C7_DIR_2,";
            
            }
        switch (m2)
        {
        case 0:{
            temp.label += "";
            break;
        }
        case 1:{
            if (i<outside)
                temp.label += "A10_SPD_1,A10_DIR_1,";
            if (i>=outside && i< inside)
                temp.label += "B10_SPD_1,B10_DIR_1,";
            if (i>inside)
                temp.label += "C10_SPD_1,C10_DIR_1,";
            break;
            }
        case 2:{
            if (i<outside)
                temp.label += "A10_SPD_2,A10_DIR_2,";
            if (i>=outside && i< inside)
                temp.label += "B10_SPD_2,B10_DIR_2,";
            if (i>inside)
                temp.label += "C10_SPD_2,C10_DIR_2,";
            break;
            }
        }
        switch (m3)
        {
        case 0:{
            temp.label += "";
            break;
        }
        case 1:{
            if (i<outside)
                temp.label += "A12_SPD_1,A12_DIR_1,";
            if (i>=outside && i< inside)
                temp.label += "B12_SPD_1,B12_DIR_1,";
            if (i>inside)
                temp.label += "C12_SPD_1,C12_DIR_1,";
            break;
            }
        case 2:{
            if (i<outside)
                temp.label += "A12_SPD_2,A12_DIR_2,";
            if (i>=outside && i< inside)
                temp.label += "B12_SPD_2,B12_DIR_2,";
            if (i>inside)
                temp.label += "C12_SPD_2,C12_DIR_2,";
            break;
            }
        }
        result.push_back(temp);  
    }
    temp.label = "";
    temp.code = "00";
    result.push_back(temp);
    return result;
}

4.11经度质控

经度质控包括经度极值检查。

vector<qcFlag> lonQC(vector<float> lon,float sta_lon,int length,int outside,int inside){
    qcFlag temp;
    QCMethod qcm;
    vector<int> code;
    vector<qcFlag> result;
    int m1;
    qcm.N = length;
    
    for (int i=0;i<length;i++){
        m1 = qcm.Lon_extreme_check(lon[i],sta_lon);
        
        if (m1 > 1)
            temp.code = "2";
        else if (m1 == 1)
            temp.code = "1";
        else
            temp.code = "0";
        //cout<<m2<<" ";
        if (m1==0){
            temp.label = "";
            }
        if (m1==1){
            if (i<outside)
                temp.label = "A4_LNG_1,";
            if (i>=outside && i< inside)
                temp.label = "B4_LNG_1,";
            if (i>inside)
                temp.label = "C4_LNG_1";
            }
        if(m1==2){
            if (i<outside)
                temp.label = "A4_LNG_2,";
            if (i>=outside && i< inside)
                temp.label = "B4_LNG_2,";
            if (i>inside)
                temp.label = "C4_LNG_2,";
            
            }
        
        result.push_back(temp);  
    }
    return result;
}

4.12纬度质控

纬度质控主要是包括纬度的极值检查

vector<qcFlag> latQC(vector<float> lat,float sta_lat,int length,int outside,int inside){
    qcFlag temp;
    QCMethod qcm;
    vector<int> code;
    vector<qcFlag> result;
    int m1;
    qcm.N = length;
    
    for (int i=0;i<length;i++){
        m1 = qcm.Lat_extreme_check(lat[i],sta_lat);
        
        if (m1 > 1)
            temp.code = "2";
        else if (m1 == 1)
            temp.code = "1";
        else
            temp.code = "0";
        //cout<<m2<<" ";
        if (m1==0){
            temp.label = "";
            }
        if (m1==1){
            if (i<outside)
                temp.label = "A5_LAT_1,";
            if (i>=outside && i< inside)
                temp.label = "B5_LAT_1,";
            if (i>inside)
                temp.label = "C5_LAT_1";
            }
        if(m1==2){
            if (i<outside)
                temp.label = "A5_LAT_2,";
            if (i>=outside && i< inside)
                temp.label = "B5_LAT_2,";
            if (i>inside)
                temp.label = "C5_LAT_2,";
            
            }
        
        result.push_back(temp);  
    }
    return result;
}

4.13海拔高度质控

海拔高度质控主要是包括海拔极值检查等。

vector<qcFlag> altQC(vector<float> alt,float sta_alt,int length,int outside,int inside){
    qcFlag temp;
    QCMethod qcm;
    vector<int> code;
    vector<qcFlag> result;
    int m1;
    qcm.N = length;
    
    for (int i=0;i<length;i++){
        m1 = qcm.Height_extreme_check(alt[i],sta_alt);
        
        if (m1 > 1)
            temp.code = "2";
        else if (m1 == 1)
            temp.code = "1";
        else
            temp.code = "0";
        //cout<<m2<<" ";
        if (m1==0){
            temp.label = "";
            }
        if (m1==1){
            if (i<outside)
                temp.label = "A6_ALT_1,";
            if (i>=outside && i< inside)
                temp.label = "B6_ALT_1,";
            if (i>inside)
                temp.label = "C6_ALT_1";
            }
        if(m1==2){
            if (i<outside)
                temp.label = "A6_ALT_2,";
            if (i>=outside && i< inside)
                temp.label = "B6_ALT_2,";
            if (i>inside)
                temp.label = "C6_ALT_2,";
            
            }
        
        result.push_back(temp);  
    }
    return result;
}

基本要素质控方法以及参考实现就到这里了,可以留言或者私信讨论问题。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

nobrody

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

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

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

打赏作者

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

抵扣说明:

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

余额充值