Colorado State University



iPOLARRIS Users Manual V1.0Brenda Dolanbdolan@atmos.colostate.eduDecember 2018Overview: iPOLARRIS is an analysis and visualization package for model and radar data. iPOLARRIS is written in the python language. iPOLARRIS input is expected in gridded netCDF format. iPOLARRIS will calculate hydrometeor identification from polarimetric data (synthetic from POLARRIS-f or observational data), as well as polarimetric-derived rainfall, and create CAPPI and vertical cross-sections of individual times, as well as produce statistics over longer periods through creation of CFADs, mean profiles, and timeseries. The POLARRIS suite is described in Matsui et al. 2018.Dependencies: iPOLARRIS V1.0 is written in Python v2.7 and has not been tested with Python V3.x yet.Other required packages include:PandasnetCDF4dillXarray ()Input: The input is laid out in a text file which consists of values and flags defining the desired output of iPOLARRIS. An example is shown in the Appendix. The netCDF files to read should be listed in a separate text file (one file per line) which is defined by the radar_files variable in the configuration file. A double equals sign MUST be used between the variable name, variable, and any comment in order for iPOLARRIS to read in the data correctly.Output:In general, all iPOLARRIS output is in the form of images. All output flagged as True will be in the $image_dir, appended with the $extraAdvanced Interactive mode: iPOLARRIS can be run in an interactive mode by passing the run_exper function the keyword ‘interactive = True’, in which case the RadarData object/class will be returned, rather than the dictionary of statistics such as CFADS and vertical profiles. This is advised for advanced users, if you are running with jupyter notebooks and want to create your own plots.Running iPOLARRIS:Single input:Once a configuration file has been set up, iPOLARRIS can be run from the command line:python run_ipolarris.py my_config.txtComparisons:If two different sets of data are to be compared (such as different locations, different model runs, obs and model, etc.), two different config files should be set up and passed to run_ipolarris.py:python run_ipolarris.py my_config1.txt my_config2.txtIn this case, 3-panel CFADs can be generated where the last panel is the difference between the to dataset CFADs.Appendix:###############Set up variable names and how to read the data###############extra == 'fixfont' ==#This will be appended to all output files as an identifier.date == '201110523' ==#This is the date of the caseptype == 'png' ==#This is the type of output imagesimage_dir == r'/Users/bdolan/scratch/iPOLARRIS_images_test/MC3E_OBS/' == #Image directory (output)radar_files == r'/Users/bdolan/scratch/gitlab/iPOLARRIS/obs_mc3e_csapr_20110523.txt' ==#List of radar files to read in.wdate_format == %Y%m%d_%H%M ==# format of the date/ time in the file nametype ==obs ==#Type of data. 'obs' or 'wrf'convert_Tk_Tc == False ==#Convert Temperature in K to C (True for 'wrf')exper == 'MC3E' ==#Experiment locationsradarname == CSAPR ==# name of radarband == C ==#Radar band. Needs to be capital letter and X, C, or Sdz_name == DBZCS ==#Name of the reflectivity fielddr_name == ZDRCS ==#Name of the differential reflectivity fieldkd_name == KDPCS ==#Name of the Kdp fieldrh_name == RHOCS ==#Name of the RhoHV fieldrr_name == RR ==#Name of the Rain rate / precipitation fieldvr_name == VELCS ==#name of radial velocity fieldt_name == None ==#Name of the temperature fieldvdop_name == None ==#name of radial velocity fielduname == U ==#Name of the zonal wind fieldvname == V ==#Name of the meridional wind fieldwname == Wvar ==#Name of the vertical wind fieldxname == x ==#Name of the zonal directional variableyname == y ==#Name of the meridional directional variableszname == z ==#Name of the vertical level fieldmphys == obs ==#Type of microphysics used in modelpol_on == True ==#Calculate the pol data such as HID and RRz_resolution == 1.0 ==#Vertical resolution for CFADs. If comparing 2, they need to be the same.zthresh == -10. ==#Threshold for good datawthresh == 5. ==#Threshold for 'updraft' statistics.trange == np.arange(20,-60,-5) ==#Range of thresholds for plotting temperatures.doff == 0 ==#offset for date timestamp in radar filenamerdadd == 13 ==#number of characteric in timestamp on radar file.time_parse==[0,13] ==#more time formatting.etime == datetime.datetime(2011,5,23,1,0) ==#end of analysis time of intereststime == datetime.datetime(2011,5,24,23,0) ==#start time of analysis of interestcs_z == 2.0 ==#Level to determine Convective / stratiform designation.zconv == 40 ==#Zconv threshold in raintyping algorithm.conv_types == ['ISO_CONV_CORE','CONVECTIVE','ISO_CS_CORE'] ==#Which Powell et al. types to consider in convective CFADSstrat_types == ['WEAK_ECHO','STRATIFORM','ISO_CONV_FRINGE'] ==#Which Powell et al. types to consider in stratiform CFADSmixed_types == ['UNCERTAIN'] ==#Which types to not include in either convective or stratiform but will be considered in totals).zdr_offset == -0.4 ==#Add any Zdr offset here. Value will be SUBTRACTED from the zdr values.########Set up some variables related to the observations ###################### Dual Doppler stuffdd_on == True ==#Set this to loop through separate dual-Doppler files (e.g. for obs)dd_files == r'/Users/bdolan/scratch/gitlab/iPOLARRIS/obs_mc3e_dd_20110523.txt'==#location of dual-Doppler filesddoff == 0 ==#offset for dual-Doppler timestamp in filenameddadd == 13 ==#number of characters in the timestamprdate_format == %Y%m%d_%H%M%S ==#Format for the radar file dateddate_format == %Y%m%d_%H%M ==#FOrmate for the dual-Doppler file date### Sounding stuffsnd_on == True ==#Set this to loop through separate dual-Doppler files (e.g. for obs)sfiles == r"/Volumes/rawah/data/jib/MC3E_darwin_analysis/" ==#Sounding file directorysdate_format == %Y%m%d%H ==#Sounding file date formatsstat == LMN ==#Sounding station identificationad == '' ==#Extra characters#### lat/lon of the radarlat == 36.79616 ==#Lat of the radarlon == -97.450546 ==#Lon of the radaralt == 0.327 ==#Altitude of the radarremovediffatt == True ==#Remove differential attenuation by Zdr < -1 and dBZ < 35.#############Select the types of plots to see on the output##########################plot_int == True ==#Turn on plotting of integrated parameters over the whole time frameplot_cs == True ==#Plot seperate Convective and stratiform CFADs####The following are for EACH radar / model time specified in the radar_files list.cfad_mpanel_flag==True ==#4 panel CFADs of Dbz, Zdr, Kdp and Whid_cfad_flag==False ==# HID CFADjoint_flag==False ==#Z vs. Zdrcfad_individ_flag==False ==#Make separate images for dbz, Zdr, Kdp, W and Rhohid_prof==False ==#Profile of HID species with heightall_cappi==True ==# make a cappi cross section for all times. change parameters in plot_driver.pycappi_multi=False ==# Make multipanel CAPPIs or individualall_xsec==True ==# make RHI cross sections for all times. change parmaters in plot_driver.pyup_width==True ==# Make a plot of the vertical velocity profile with temperature.qr_cappi==False ==# Make cappi cross section of mixing ratios. change parameters in plot_driver.py (only valid for model)qr_rhi==False ==#Make rhis of the mixing ratios (only valid for model)cfadbytype==True ==# Produce CFADS for a specific HID type.ks == ['cfad_mpanel_flag','hid_cfad_flag','joint_flag','cfad_individ_flag','hid_prof','all_cappi','all_xsec','up_width','qr_cappi','qr_rhi'] ==#list of flags##############Set up some plotting configurations #########################wbins == np.arange(-25,26,0.5) ==#Histogram bins for vertical velocitydzbins == np.arange(-10,60,1) ==#Histogram bins for reflectivitydrbins == np.arange(-2,6,0.05) ==#Histogram bins for differential reflectivityrhbins == np.arange(0.5,1.05,0.05) ==#Histogram bins for differential reflectivitykdbins == np.arange(-2,6,0.05) ==#Histogram bins for specific differential phaserrbins == np.logspace(0.01,100.01,30) ==#Histogram bins for rain rates####Set up the types of hid to group together for water, graupel, hail and snow.hidwater == [1,2,10] ==#Group drizzle, rain and big dropshidgraup == [7,8] ==#Group low and high density graupelhidhail == [9] ==#Hailhidsnow ==[3,4,5,6] ==#Group ice crystals, snow, wet snow and VI######Set up some specifics for the cross-sections.####################xlim == [-100,100] ==#lat / lon zoom for CAPPISylim == [-100,100] ==# lat / lon zoom for CAPPISy==10. ==#Lat of the y cross-section for RHI#xlim == [-99,-95.5] ==#lat / lon zoom for CAPPIS#ylim == [35.0,37.5] ==# lat / lon zoom for CAPPIS#y==35.7 ==#Lat of the y cross-section for RHIz == 2.0 ==#Height of the CAPPIscvectors == [None,None,None,None,None,True] ==#Turn on vectors in the plots.rvectors == [None,None,None,None,None,True] ==#Turn on vectors in the plots.skip == 2 ==#Number of vectors to skip for the vector plots.mix_vars ==['qc','qr','qg','qi','qh',config['rr_name'],config['vr_name'],'HID'] ==#Mixing ratios from model to plot.rhi_vars ==['HID',config['dz_name'],config['dr_name'],config['kd_name'],config['rh_name'],config['wname']] == #Names of vars for RHI plotscappi_vars == ['HID',config['dz_name'],config['dr_name'],config['kd_name'],config['rh_name'],config['vr_name']] == #Names of vars for CAPPI plotscomb_vicr == True ==# Combine VI with CR for plotting.cappi_contours == ['CS',None,None,None,None,None] ==#What contours to apply to the CAPPI images.cappi_vectres == 5 ==#Defined the vector skip for cappi plots.rhi_vectres == [6,2] ==#Defines the [x,z] skip for rhi plots# ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download