# -*- coding: utf-8 -*- """ Created on Tue Jul 30 17:09:37 2019 @author: dori """ import sys sys.path.append('..') from READ import slice_data from READ import icon150heights from READ import read_variables from statistic import hist_and_plot pamtra = read_variables( path='/work/develop/pamtraICON/comparison/data/pamtra/', hydroset='all_hydro', suffix='pamtra_icon.h5', varlist=['Hgt', 'Z10', 'Z35', 'Z94'], minhour=6.0) radar = read_variables( path='/work/develop/pamtraICON/comparison/data/radar/', hydroset='', suffix='radar.h5', varlist=['Hgt', 'Z10', 'Z35', 'Z94', 'quality_x', 'quality_w'], minhour=6.0) radarw = slice_data(radar, 'quality_w', maxvalue=8192) radarx = slice_data(radar, 'quality_x', maxvalue=8192) #radarxw = slice_data(radarw, 'quality_x', maxvalue=8192) #%% Z CFAD Height lognormrule = True
""" Created on Thu Sep 5 16:35:02 2019 @author: dori """ import sys sys.path.append('..') from READ import slice_data from READ import read_variables from statistic import hist_and_plot import matplotlib.pyplot as plt import netCDF4 pamtra = read_variables(path='/work/develop/pamtraICON/comparison/data/pamtra/', hydroset='all_hydro', suffix='pamtra_icon.h5', pamtra=True, varlist=['Z10', 'Z35', 'Z94', 'T', 'W10', 'W35', 'W94'], minhour=6.0) ice = read_variables(path='/work/develop/pamtraICON/comparison/data/pamtra/', hydroset='only_ice', suffix='pamtra_icon.h5', pamtra=True, varlist=['Z10', 'Z35', 'Z94', 'T', 'W10', 'W35', 'W94'], minhour=6.0) snow = read_variables(path='/work/develop/pamtraICON/comparison/data/pamtra/', hydroset='only_snow', suffix='pamtra_icon.h5', pamtra=True, varlist=['Z10', 'Z35', 'Z94', 'T', 'W10', 'W35', 'W94'], minhour=6.0) radar = read_variables(path='/work/develop/pamtraICON/comparison/data/radar/', hydroset='', suffix='radar_regrid.h5', minhour=6.0, varlist=['Z10', 'Z35', 'Z94', 'T',
from READ import read_variables from statistic import hist_and_plot varlist = [ 'Hgt', 'P', 'T', 'RH', 'Z10', 'Z35', 'Z94', 'N10', 'N35', 'N94', 'QI', 'QC', 'QG', 'QH', 'QR', 'QS', 'QNI', 'QNC', 'QNG', 'QNH', 'QNR', 'QNS' ] hydro = [ 'QS', 'QI', 'QC', 'QG', 'QH', 'QR', 'QNS', 'QNI', 'QNC', 'QNG', 'QNH', 'QNR' ] pamtra = read_variables( path='/work/develop/pamtraICON/comparison/data/pamtra/', hydroset='all_hydro', suffix='pamtra_icon.h5', varlist=varlist, minhour=6.0) data = pamtra.dropna(subset=['DWRxk']) data['RI'] = data['QI'] / data['QNI'] data['RS'] = data['QS'] / data['QNS'] data['RC'] = data['QC'] / data['QNC'] data['RR'] = data['QR'] / data['QNR'] data['RG'] = data['QG'] / data['QNG'] data['RH'] = data['QH'] / data['QNH'] data[hydro] = np.log10(data[hydro]) data['QNS'][data['QNS'] == -np.inf] = -302 data['QNI'][data['QNI'] == -np.inf] = -289
pam = pd.read_hdf('../data/pamStatCTTmaxDWR.h5', key='stat') pam.index = pd.to_datetime(pam.index, unit='s') pam = pam.resample('1s').nearest(limit=1) ixi = pd.date_range(start='2015-11-11', end='2016-1-4', freq='9s') icon.reindex(ixi) icon = icon.resample(freq).apply(np.nansum) ixp = pd.date_range(start='2015-11-11', end='2016-1-4', freq='1min') pluvio.reindex(ixp) pluvio = pluvio.resample(freq).apply(np.nansum) pamtra = read_variables( path='/work/develop/pamtraICON/comparison/data/pamtra/', hydroset='all_hydro', suffix='pamtra_icon.h5', pamtra=True, minhour=6.0, attHYD=True, varlist=['Z10', 'Z35', 'Z94', 'T', 'unixtime', 'H10', 'H35', 'H94']) radar = read_variables( path='/work/develop/pamtraICON/comparison/data/radar/', hydroset='', suffix='radar_regrid.h5', minhour=6.0, varlist=['Z10', 'Z35', 'Z94', 'T', 'unixtime', 'quality_x', 'quality_w']) radar = read_variables( path='/work/develop/pamtraICON/comparison/data/radar/', hydroset='', suffix='radar.h5',
mrr = pd.read_hdf(mrrfile, key='stat') mrr = mrr.resample(freq).apply(np.nansum) ixi = pd.date_range(start='2015-11-11', end='2016-1-4', freq='9s') icon.reindex(ixi) icon = icon.resample(freq).apply(np.nansum) ixp = pd.date_range(start='2015-11-11', end='2016-1-4', freq='1min') pluvio.reindex(ixp) pluvio = pluvio.resample(freq).apply(np.nansum) pamtra = read_variables( path='/work/develop/pamtraICON/comparison/data/pamtra/', hydroset='all_hydro', suffix='pamtra_icon.h5', pamtra=True, minhour=6.0, varlist=[ 'Z10', 'Z35', 'Z94', 'W10', 'W35', 'W94', 'T', 'unixtime', 'P', 'RH', 'QNR', 'QR', 'QG', 'QI', 'QS', 'QH', 'QC', 'S35', 'V10', 'V35', 'V94' ]) pamtra['Q'] = pamtra['QR'] + pamtra['QG'] + pamtra['QI'] + pamtra[ 'QS'] + pamtra['QH'] + pamtra['QC'] pamtra['R/Q'] = pamtra['QR'] / pamtra['Q'] #ice = read_variables(path='/work/develop/pamtraICON/comparison/data/pamtra/', # hydroset='only_ice', suffix='pamtra_icon.h5', pamtra=True, # varlist=['Z10', 'Z35', 'Z94', 'T', # 'V10', 'V35', 'V94', 'unixtime', # 'W10', 'W35', 'W94'], minhour=6.0) #