sys.path.append('./src/fortran') import numpy as np import matplotlib.pyplot as plt import pyart import netCDF4 import radar_qc_module as rqc import os import conf #======================================= conf.options['toporawdatapath']="/home/jruiz/Dropbox/DATA/radar_qc/data/terrain_data/raw/" conf.options['toporadardatapath']="/home/jruiz/Dropbox/DATA/radar_qc/data/terrain_data/radar/" # read in the file, create a RadarMapDisplay object filename = './cfrad.20091117_174348.000_to_20091117_174737.000_PAR_SUR.nc' #Performs QC operations based on options [radar , qc_output] = rqc.main_qc( filename , conf.options ) print('End of QC') plt.figure() plt.pcolor(qc_output['x'][:,:,0],qc_output['y'][:,:,0],qc_output['smooth_rho'][:,:,0]) plt.colorbar() plt.show()
#Obtenemos la lista de objetos radares. radar_list = ot.read_multiple_files( file_list , instrument_list ) my_updated_dirs = [] my_updated_tars = [] for radar in radar_list : print('=============================================================================') print(' QC') print('=============================================================================') print('') #Call QC routine [ radar , qc_output ] = rqc.main_qc( options , radar ) #Save data in cfradial format if write_cfradial : print('=============================================================================') print(' WRITING QC OUTPUT IN CFRADIAL FORMAT') print('=============================================================================') print('') ot.save_cfradial( datapath_out + '/cfradial/' , radar ) print('') print('=============================================================================')
#Attenuation parameters options['attfiltertr']=20.0 #Attenuation threshold in dBZ options['attcalerror']=1.0 #Calibration error options['attfilter_save']=True #Save filter fields #Blocking parameters #Detect missing parameters #======================================= # read in the file, create a RadarMapDisplay object filename = '/home/jruiz/share/DATA/OBS/OBS_REAL_PARANA_20091117_CFRADIAL/cfrad.20091117_200345.000_to_20091117_200734.001_PAR_SUR.nc3' #Performs QC operations based on options [radar , qc_output] = rqc.main_qc( filename , options ) print('End of QC') qc_output['echo_top'][ qc_output['echo_top'] == options['undef'] ] = 0.0 plt.figure() plt.pcolor(qc_output['echo_top'][:,:,1]) plt.show()