ye = ZP[2:4] ## Read GPM Data ## ------------- pfad2 = ('/home/velibor/shkgpm/data/' + str(year) + str(m) + str(d) + '/dpr/*.HDF5') pfad_gpm = glob.glob(pfad2) pfad_gpm_g = pfad_gpm[0] # GPM Lage und Zeit gpmdpr = h5py.File(pfad_gpm_g, 'r') gprof_lat = np.array(gpmdpr['NS']['Latitude']) gprof_lon = np.array(gpmdpr['NS']['Longitude']) gpm_time = gpmdpr['NS']['ScanTime'] gpm_zeit = get_time_of_gpm(gprof_lon, gprof_lat, gpm_time) print 'GPM Datum: ', gpm_zeit ff = 15 cc = 0.4 # ----------------------------------------------------------------------------- fig = plt.figure(figsize=(12, 12)) #GPM Parameter gpm_para = [ 'zFactorCorrectedNearSurface', 'zFactorCorrectedESurface', 'precipRateNearSurface', 'piaFinal' ] gl = len(gpm_para) for iii in range(gl): gprof_pp = np.array(gpmdpr['NS']['SLV'][gpm_para[iii]])
pfad_gpm_g = pfad_gpm[i] try: gpmdpr = h5py.File(pfad_gpm_g, 'r') lat = np.array(gpmdpr['NS']['Latitude']) lon = np.array(gpmdpr['NS']['Longitude']) gprof_pp = np.array(gpmdpr['NS']['SLV']['zFactorCorrectedNearSurface']) gprof_pp[gprof_pp <= 0] = np.nan gpm_time = gpmdpr['NS']['ScanTime'] try: gpm_zeit = get_time_of_gpm(lon, lat, gpm_time) except ValueError: gpm_zeit = ' ' gprof_phase = np.array(gpmdpr['NS']['SLV']['phaseNearSurface'], dtype=int) #gprof_wi=np.array(gpmdpr['NS']['CSF']['flagShallowRain'],dtype=float) gprof_wi = np.array(gpmdpr['NS']['PRE']['heightStormTop']) gprof_bb = np.array(gpmdpr['NS']['CSF']['heightBB']) gprof_bb[gprof_bb == -1111.1] = np.nan gprof_wi[gprof_wi == -9999.9] = np.nan #gprof_wi[gprof_wi==-1111.] = np.nan #Phase 0-solid, 1-mixed, 2-liquid, 255-missing #gprof_phase[gprof_phase==255.]= np.nan
## Read GPM Data ## ------------- pfad2 = ('/home/velibor/shkgpm/data/'+str(year)+str(m)+str(d)+'/gprof/*.HDF5') pfad_gprof = glob.glob(pfad2) pfad_gprof_g = pfad_gprof[0] gpmdprs = h5py.File(pfad_gprof_g, 'r') gprof_lat=np.array(gpmdprs['S1']['Latitude']) gprof_lon=np.array(gpmdprs['S1']['Longitude']) gprof_pp=np.array(gpmdprs['S1']['surfacePrecipitation']) gpm_time = gpmdprs['S1']['ScanTime'] gpm_zeit = get_time_of_gpm(gprof_lon, gprof_lat, gpm_time) print gpm_zeit gprof_pp[gprof_pp==-9999.9]= np.nan ht, mt = gpm_zeit[14:16], str(int(round(float(gpm_zeit[17:19])/5.0)*5.0)) if mt == '0': mt = '00' elif mt == '5': mt = '05' print mt ## Read RADOLAN Data ## ----------------- r_pro = 'rx' #rz oder rx###############
try: gpmdpr = h5py.File(pfad_gpm_g, 'r') lat=np.array(gpmdpr['NS']['Latitude']) lon=np.array(gpmdpr['NS']['Longitude']) gprof_pp=np.array(gpmdpr['NS']['SLV']['zFactorCorrectedNearSurface']) gprof_pp[gprof_pp<=0]= np.nan gpm_time = gpmdpr['NS']['ScanTime'] try: gpm_zeit = get_time_of_gpm(lon, lat, gpm_time) except ValueError: gpm_zeit = ' ' gprof_phase=np.array(gpmdpr['NS']['SLV']['phaseNearSurface'],dtype=int) #gprof_wi=np.array(gpmdpr['NS']['CSF']['flagShallowRain'],dtype=float) gprof_wi=np.array(gpmdpr['NS']['PRE']['heightStormTop']) gprof_bb=np.array(gpmdpr['NS']['CSF']['heightBB']) gprof_bb[gprof_bb==-1111.1] = np.nan gprof_wi[gprof_wi==-9999.9] = np.nan #gprof_wi[gprof_wi==-1111.] = np.nan #Phase 0-solid, 1-mixed, 2-liquid, 255-missing #gprof_phase[gprof_phase==255.]= np.nan