Esempio n. 1
0
    #print i
    num = numbers[i]
    # print ("getting data : ",num ,pname[i])
    # try :
    # #if 1:
    #     a = np.where( number_cmf == number[i])[0][0]
    #     found = 1

    # except:
    #     found = 0
    #     print i, number[i]

    # condtion for observations
    #if found == 1:
    if TAG == "HydroWeb":
        hwb_data = hweb.HydroWeb_continous_WSE(pname[i], syear, 1, 1, eyear,
                                               12, 31, legm08[i], legm96[i])
    if TAG == "CGLS":
        hwb_data = cgls.cgls_continous_WSE(pname[i], syear, 1, 1, eyear, 12,
                                           31, legm08[i], legm96[i])
    if TAG == "ICESat":
        hwb_data = icesat.ICESat_continous_WSE(pname[i], syear, 1, 1, eyear,
                                               12, 31, legm08[i], legm96[i])
    if TAG == "HydroSat":
        hwb_data = hsat.HydroSat_continous_WSE(pname[i], syear, 1, 1, eyear,
                                               12, 31, legm08[i], legm96[i])
    #----
    times = len(hwb_data)
    observ = np.sum((hwb_data != -9999.0) * 1.0)
    found = np.sum((hwb_data == -9999.0) * 1.0)

    #print found
Esempio n. 2
0
m.drawmeridians(np.arange(west, east + 0.1, 5),
                labels=[0, 0, 0, 1],
                fontsize=10,
                linewidth=0,
                zorder=102)
#--
box = "%f %f %f %f" % (west, east, north, south)
os.system("./bin/txt_vector " + box + " " + pm.CaMa_dir() + " " +
          pm.mapname() + " > RMSEtmp1.txt")
#map(vec_par,np.arange(1,10+1,1))
map(vec_par, np.arange(2, 10 + 1, 1))
#--
for point in np.arange(pnum):
    # time,org=hweb.HydroWeb_WSE(pname[point],syear,eyear-1)
    org = hweb.HydroWeb_continous_WSE(pname[point], syear, smonth, sdate,
                                      eyear - 1, 12, 31, EGM08[point],
                                      EGM96[point])
    org = np.array(org) + np.array(EGM08[point]) - np.array(EGM96[point])
    # if np.sum(ma.masked_where(org!=-9999.0,org))==0.0:
    if np.sum((org != -9999.0) * 1.0) == 0.0:
        # print ("no obs", np.sum((org!=-9999.0)*1.0))
        continue
    RMSEasm = RMSE(np.mean(asm[:, :, point], axis=1), org)
    # RMSEopn=RMSE(np.mean(opn[:,:,point],axis=1),org)
    if RMSEasm == 0.0:
        # print (RMSEopn, pname[point])
        continue
    rRMSE = RMSEasm  #(RMSEasm-RMSEopn)/(RMSEopn+1.0e-20)
    #NSEAI=NSEasm
    ix = xlist[point]
    iy = ylist[point]
Esempio n. 3
0
        sat = line[10].strip()
        dist = float(line[11])
        flag = int(line[12])
        kx = int(line[13])
        ky = int(line[14])
        #======================
        if riv != rivername0:
            continue
        # if stream not in stream0:
        #     continue
        # print (num, ele_dif)

        ################
        # data available years
        ################
        org = hweb.HydroWeb_continous_WSE(station, syear=syear, eyear=eyear)
        if np.sum((org != -9999.0) * 1.0) == 0.0:
            print("no data available for ", syear, "-", eyear)
            continue

        ################
        # condtion for elevation differnce
        ################
        if abs(ele_dif) > elev_thr:
            print("elevation differnce is too large: ", ele_dif)
            continue

        ################
        # condtion for mainstream
        ################
        if uparea[iy - 1, ix - 1] < area_thr: