pyrad.io#

Description

Input and output (pyrad.io)#

Functions to read and write data and configuration files.

Reading configuration files#

read_config(fname[, cfg, defaults])

Read a pyrad config file.

Reading radar data#

get_data(voltime, datatypesdescr, cfg)

Reads pyrad input data.

Reading icon data#

icon2radar_data(radar, icon_coord, icon_data)

get the icon value corresponding to each radar gate using nearest neighbour interpolation

icon2radar_coord(radar, icon_coord[, ...])

Given the radar coordinates find the nearest icon model pixel

hzt2radar_data(radar, hzt_coord, hzt_data[, ...])

get the HZT value corresponding to each radar gate using nearest neighbour interpolation

hzt2radar_coord(radar, hzt_coord[, ...])

Given the radar coordinates find the nearest HZT pixel

get_icon_fields(icon_data, icon_ind[, ...])

Get the icon data corresponding to each radar gate using a precomputed look up table of the nearest neighbour

get_iso0_field(hzt_data, hzt_ind, z_radar[, ...])

Get the height over iso0 data corresponding to each radar gate using a precomputed look up table of the nearest neighbour

read_icon_data(fname[, field_names, celsius])

Reads icon data from a netcdf file

read_icon_coord(fname[, zmin])

Reads icon coordinates from a netcdf file

read_hzt_data(fname[, chy0, chx0, read_lib])

Reads iso-0 degree data from an HZT file

read_iso0_mf_data(fname)

Reads iso-0 degree data from a MF NWP in text format

read_iso0_grib_data(fname)

Reads a 2D field of iso-0 degree data from a MF NWP in GRIB format

iso2radar_data(radar, iso0_data, time_info)

get the iso0 value corresponding to each radar gate

grib2radar_data(radar, iso0_data, time_info)

get the iso0 value corresponding to each radar gate

get_iso0_ref(radar, iso0_data, time_index[, ...])

gets the is0 that has to be taken as reference.

Reading DEM data#

dem2radar_data(radar, dem_data[, slice_xy, ...])

get the DEM value corresponding to each radar gate using nearest neighbour interpolation

read_idrisi_data(fname[, fill_value])

Reads DEM data from an IDRISI .rst file

read_idrisi_metadata(fname)

Reads DEM metadata from a IDRISI .rdc file

Reading other data#

read_centroids_npz(fname)

Reads an npz file containing data used in centroid computation

read_centroids(fname)

Reads a file containing the centroids for the semi-supervised classification

read_proc_periods(fname)

Reads a file containing the start and stop times of periods to process

read_last_state(fname)

Reads a file containing the date of acquisition of the last volume processed

read_status(voltime, cfg[, ind_rad])

Reads rad4alp xml status file.

read_rad4alp_icon(fname, datatype[, ngates])

Reads rad4alp ICON data binary file.

read_rad4alp_vis(fname, datatype)

Reads rad4alp visibility data binary file.

read_excess_gates(fname)

Reads a csv files containing the position of gates exceeding a given percentile of frequency of occurrence

read_colocated_gates(fname)

Reads a csv files containing the position of colocated gates

read_colocated_data(fname)

Reads a csv files containing colocated data

read_timeseries(fname)

Reads a time series contained in a csv file

read_ts_cum(fname)

Reads a time series of precipitation accumulation contained in a csv file

read_monitoring_ts(fname[, sort_by_date])

Reads a monitoring time series contained in a csv file

read_intercomp_scores_ts(fname[, sort_by_date])

Reads a radar intercomparison scores csv file

get_sensor_data(date, datatype, cfg)

Gets data from a point measurement sensor (rain gauge or disdrometer)

read_smn(fname)

Reads SwissMetNet data contained in a csv file

read_smn2(fname)

Reads SwissMetNet data contained in a csv file with format station,time,value

read_coord_sensors(fname)

Reads a file containing the coordinates of multiple sensors.

read_disdro_scattering(fname)

Reads scattering parameters computed from disdrometer data contained in a text file

read_disdro_parsivel(fname)

Reads data collected by a parsivel disdrometer and stored in a csv file

read_knmi(fname[, col_names])

Reads a file containing precipitation data from sensors retrieved from the KNMI archive.

read_sun_hits(fname)

Reads sun hits data contained in a csv file

read_sun_hits_multiple_days(cfg, time_ref[, ...])

Reads sun hits data from multiple file sources

read_sun_retrieval(fname)

Reads sun retrieval data contained in a csv file

read_solar_flux(fname)

Reads solar flux data from the DRAO observatory in Canada

read_selfconsistency(fname)

Reads a self-consistency table with Zdr, Kdp/Zh columns

read_antenna_pattern(fname[, linear, twoway])

Read antenna pattern from file

read_meteorage(fname)

Reads METEORAGE lightning data contained in a text file. The file has the following fields: date: date + time + time zone lon: longitude [degree] lat: latitude [degree] intens: amplitude [kilo amperes] ns: number of strokes of the flash mode: kind of localization [0,15] intra: 1 = intra-cloud , 0 = cloud-to-ground ax: length of the semi-major axis of the ellipse [km] ki2: standard deviation on the localization computation (Ki^2) ecc: eccentricity (major-axis / minor-axis) incl: ellipse inclination (angle with respect to the North, +90° is East) [degrees] sind: stroke index within the flash.

read_lightning(fname[, filter_data])

Reads lightning data contained in a text file. The file has the following fields: flashnr: (0 is for noise) UTC seconds of the day Time within flash (in seconds) Latitude (decimal degrees) Longitude (decimal degrees) Altitude (m MSL) Power (dBm).

read_lightning_traj(fname)

Reads lightning trajectory data contained in a csv file. The file has the following fields: Date UTC [seconds since midnight] # Flash Flash Power (dBm) Value at flash Mean value in a 3x3x3 polar box Min value in a 3x3x3 polar box Max value in a 3x3x3 polar box # valid values in the polar box.

read_lightning_all(fname[, labels])

Reads a file containing lightning data and co-located polarimetric data. fields: flashnr time data Time within flash (in seconds) Latitude (decimal degrees) Longitude (decimal degrees) Altitude (m MSL) Power (dBm) Polarimetric values at flash position.

read_trt_scores(fname)

Reads the TRT scores contained in a text file. The file has the following fields: traj ID max flash density time max flash density rank max flash density max rank time max rank.

read_trt_data(fname)

Reads the TRT data contained in a text file. The file has the following fields: traj_ID yyyymmddHHMM.

read_trt_traj_data(fname)

Reads the TRT cell data contained in a text file. The file has the following fields: traj_ID yyyymmddHHMM.

read_trt_thundertracking_traj_data(fname)

Reads the TRT cell data contained in a text file. The file has the following fields: traj_ID scan_ordered_time scan_time azi rng yyyymmddHHMM.

read_trt_cell_lightning(fname)

Reads the lightning data of a TRT cell. The file has the following fields: traj_ID yyyymmddHHMM lon lat area RANKr nflashes flash_dens.

read_trt_info_all(info_path)

Reads all the TRT info files

read_trt_info_all2(info_path)

Reads all the TRT info files

read_trt_info(fname)

Reads the TRT info used for thundertracking and contained in a text file.

read_trt_info2(fname)

Reads the TRT info used for thundertracking and contained in a text file.

read_thundertracking_info(fname)

Reads the TRT info used for thundertracking

read_rhi_profile(fname[, labels])

Reads a monitoring time series contained in a csv file

read_vpr_theo_parameters(fname)

Reads the parameters defining a theoretical VPR profile from a csv file

read_histogram(fname)

Reads a histogram contained in a csv file

read_quantiles(fname)

Reads quantiles contained in a csv file

read_profile_ts(fname_list, labels[, hres, ...])

Reads a colection of profile data file and creates a time series

read_histogram_ts(fname_list, datatype[, t_res])

Reads a colection of histogram data file and creates a time series

read_quantiles_ts(fname_list[, step, qmin, ...])

Reads a colection of quantiles data file and creates a time series

read_ml_ts(fname)

Reads a melting layer time series contained in a csv file

read_windmills_data(fname)

Read the wind mills data csv file

read_radiosounding_wyoming(station, dtime)

Download radiosounding data from the University of Wyoming website.

read_radiosounding_igra(station, dtime)

Download radiosounding data from from the Integrated Global Radiosonde Archive (IGRA)

read_fzl_igra(station, dtime)

Get an estimation of the freezing level height from the Integrated Global Radiosonde Archive (IGRA)

Writing data#

write_vol_csv(fname, radar, field_name[, ...])

Creates a kml file with the radar volume data

write_vol_kml(fname, radar, field_name[, ...])

Creates a kml file with the radar volume data

write_centroids(fname, centroids_dict, var_names)

writes the centroids of a semi-supervised hydrometeor classification

write_proc_periods(start_times, end_times, fname)

writes an output file containing start and stop times of periods to process

write_ts_lightning(flashnr, time_data, ...)

writes the LMA sources data and the value of the colocated polarimetric variables

send_msg(sender, receiver_list, subject, fname)

sends the content of a text file by email

write_alarm_msg(radar_name, param_name_unit, ...)

writes an alarm file

write_last_state(datetime_last, fname)

writes SwissMetNet data in format datetime,avg_value, std_value

write_smn(datetime_vec, value_avg_vec, ...)

writes SwissMetNet data in format datetime,avg_value, std_value

write_trt_info(ids, max_rank, nscans, ...)

writes TRT info of the thundertracking

write_trt_thundertracking_data(traj_ID, ...)

writes TRT cell data of the thundertracking scan

write_trt_cell_data(traj_ID, yyyymmddHHMM, ...)

writes TRT cell data

write_trt_cell_scores(traj_ID, ...)

writes TRT cells scores

write_trt_cell_lightning(cell_ID, cell_time, ...)

writes the lightning data for each TRT cell

write_trt_rpc(cell_ID, cell_time, lon, lat, ...)

writes the rimed particles column data for a TRT cell

write_vpr_theo_params(vpr_theo_dict, fname)

writes the parameters defining a theoretical VPR profile into a csv file

write_vpr_info(vpr_info_dict, fname)

Writes a dictionary containing relevant parameters of the VPR profile retrieval into a text file

write_rhi_profile(hvec, data, nvalid_vec, ...)

writes the values of an RHI profile in a text file

write_field_coverage(quantiles, values, ...)

writes the quantiles of the coverage on a particular sector

write_cdf(quantiles, values, ntot, nnan, ...)

writes a cumulative distribution function

write_histogram(bin_edges, values, fname[, ...])

writes a histogram

write_quantiles(quantiles, values, fname[, ...])

writes quantiles

write_multiple_points(dataset, fname)

write radar data obtained at multiple points

write_multiple_points_grid(dataset, fname)

write data obtained at multiple points from a grid

write_ts_polar_data(dataset, fname)

writes time series of data

write_ts_grid_data(dataset, fname[, sensorid])

writes time series of data

write_ts_cum(dataset, fname)

writes time series accumulation of data

write_ts_stats(dt, value, fname[, stat])

writes time series of statistics

write_monitoring_ts(start_time, np_t, ...[, ...])

writes time series of data

write_excess_gates(excess_dict, fname)

Writes the position and values of gates that have a frequency of occurrence higher than a particular threshold

write_intercomp_scores_ts(start_time, stats, ...)

writes time series of radar intercomparison scores

write_colocated_gates(coloc_gates, fname)

Writes the position of gates colocated with two radars

write_colocated_data(coloc_data, fname)

Writes the data of gates colocated with two radars

write_colocated_data_time_avg(coloc_data, fname)

Writes the time averaged data of gates colocated with two radars

write_sun_hits(sun_hits, fname)

Writes sun hits data.

write_sun_retrieval(sun_retrieval, fname)

Writes sun retrieval data.

write_fixed_angle(time_data, fixed_angle, ...)

writes an output file with the fixed angle data

Auxiliary functions#

get_rad4alp_prod_fname(datatype)

Given a datatype find the corresponding start and termination of the METRANET product file name

get_datatype_skyecho(datatype)

maps de config file radar data type name into the corresponding SKYECHO data type name and Py-ART field name

map_hydro(hydro_data_op)

maps the operational hydrometeor classification identifiers to the ones used by Py-ART

map_Doppler(Doppler_data_bin, Nyquist_vel)

maps the binary METRANET Doppler data to actual Doppler velocity

get_save_dir(basepath, procname, dsname, prdname)

obtains the path to a product directory and eventually creates it

make_filename(prdtype, dstype, dsname, ext_list)

creates a product file name

generate_field_name_str(datatype)

Generates a field name in a nice to read format.

get_fieldname_pyart(datatype)

maps the config file radar data type name into the corresponding rainbow Py-ART field name

get_fieldname_icon(field_name)

maps the Py-ART field name into the corresponding ICON variable name

get_field_unit(datatype)

Return unit of datatype.

get_file_list(datadescriptor, starttimes, ...)

gets the list of files with a time period

get_rad4alp_dir(basepath, voltime[, ...])

gets the directory where rad4alp data is stored

get_rad4alp_grid_dir(basepath, voltime, ...)

gets the directory where rad4alp grid data is stored

get_trtfile_list(basepath, starttime, endtime)

gets the list of TRT files with a time period

get_new_rainbow_file_name(master_fname, ...)

get the rainbow file name containing datatype from a master file name and data type

get_datatype_fields(datadescriptor)

splits the data type descriptor and provides each individual member

get_dataset_fields(datasetdescr)

splits the dataset type descriptor and provides each individual member

get_datetime(fname, datadescriptor)

Given a data descriptor gets date and time from file name

find_raw_icon_file(voltime, datatype, cfg[, ...])

Search a ICON file in netcdf format

find_hzt_file(voltime, cfg[, ind_rad])

Search an ISO-0 degree file in HZT format

find_iso0_file(voltime, cfg[, ind_rad])

Search an ISO-0 degree file in text format

find_iso0_grib_file(voltime, cfg[, ind_rad])

Search an ISO-0 degree file in text format

find_date_in_file_name(filename[, date_format])

Find a date with date format defined in date_format in a file name.

_get_datetime(fname, datagroup[, ftime_format])

Given a data group gets date and time from file name

Trajectory#

Trajectory(filename[, starttime, endtime, ...])

A class for reading and handling trajectory data from a file. :ivar filename: Path and name of the trajectory definition file :vartype filename: str :ivar starttime: Start time of trajectory processing. :vartype starttime: datetime :ivar endtime: End time of trajectory processing. :vartype endtime: datetime :ivar trajtype: :vartype trajtype: str :ivar Type of trajectory. Can be 'plane' or 'lightning': :ivar time_vector: Array containing the trajectory time samples :vartype time_vector: Array of datetime objects :ivar wgs84_lat_deg: WGS84 latitude samples in deg :vartype wgs84_lat_deg: Array of floats :ivar wgs84_lon_deg: WGS84 longitude samples in deg :vartype wgs84_lon_deg: Array of floats :ivar wgs84_alt_m: WGS84 altitude samples in m :vartype wgs84_alt_m: Array of floats :ivar nsamples: :vartype nsamples: int :ivar Number of samples in the trajectory: :ivar _swiss_grid_done: Indicates that convertion to Swiss coordinates has been performed :vartype _swiss_grid_done: Bool :ivar swiss_chy, swiss_chx, swiss_chh: Swiss coordinates in m :vartype swiss_chy, swiss_chx, swiss_chh: Array of floats :ivar radar_list: List of radars for which trajectories are going to be computed :vartype radar_list: list :ivar flashnr: For 'lightning' only. Number of flash for which trajectory data is going to be computed. If 0 all all flashes are going to be considered. :vartype flashnr: int :ivar time_in_flash: For 'lightning' only. Time within flash (sec) :vartype time_in_flash: array of floats :ivar flashnr_vec: For 'lightning' only. Flash number of each data sample :vartype flashnr_vec: array of ints :ivar dBm: For 'lightning' only. Lightning power (dBm) :vartype dBm: array of floats :ivar Methods: :ivar --------: :ivar add_radar: :vartype add_radar: Add a radar :ivar calculate_velocities: :vartype calculate_velocities: Computes velocities :ivar get_start_time: :vartype get_start_time: Return time of first trajectory sample :ivar get_end_time: :vartype get_end_time: Return time of last trajectory sample :ivar get_samples_in_period: :vartype get_samples_in_period: Get indices of samples within period :ivar _convert_traj_to_swissgrid: :vartype _convert_traj_to_swissgrid: convert data from WGS84 to Swiss coordinates :ivar _read_traj: :vartype _read_traj: Read plane trajectory from file :ivar _read_traj_flores: :vartype _read_traj_flores: Read FLORAKO plane trajectory from file :ivar _read_traj_trt: :vartype _read_traj_trt: Read TRT trajectory from file :ivar _read_traj_lightning: :vartype _read_traj_lightning: Read lightning trajectory from file :ivar _get_total_seconds: :vartype _get_total_seconds: Get the total time of the trajectory in seconds.

TimeSeries#

TimeSeries(desc[, timevec, timeformat, ...])

Holding timeseries data and metadata.

Classes

TimeSeries(desc[, timevec, timeformat, ...])

Holding timeseries data and metadata.

Trajectory(filename[, starttime, endtime, ...])

A class for reading and handling trajectory data from a file. :ivar filename: Path and name of the trajectory definition file :vartype filename: str :ivar starttime: Start time of trajectory processing. :vartype starttime: datetime :ivar endtime: End time of trajectory processing. :vartype endtime: datetime :ivar trajtype: :vartype trajtype: str :ivar Type of trajectory. Can be 'plane' or 'lightning': :ivar time_vector: Array containing the trajectory time samples :vartype time_vector: Array of datetime objects :ivar wgs84_lat_deg: WGS84 latitude samples in deg :vartype wgs84_lat_deg: Array of floats :ivar wgs84_lon_deg: WGS84 longitude samples in deg :vartype wgs84_lon_deg: Array of floats :ivar wgs84_alt_m: WGS84 altitude samples in m :vartype wgs84_alt_m: Array of floats :ivar nsamples: :vartype nsamples: int :ivar Number of samples in the trajectory: :ivar _swiss_grid_done: Indicates that convertion to Swiss coordinates has been performed :vartype _swiss_grid_done: Bool :ivar swiss_chy, swiss_chx, swiss_chh: Swiss coordinates in m :vartype swiss_chy, swiss_chx, swiss_chh: Array of floats :ivar radar_list: List of radars for which trajectories are going to be computed :vartype radar_list: list :ivar flashnr: For 'lightning' only. Number of flash for which trajectory data is going to be computed. If 0 all all flashes are going to be considered. :vartype flashnr: int :ivar time_in_flash: For 'lightning' only. Time within flash (sec) :vartype time_in_flash: array of floats :ivar flashnr_vec: For 'lightning' only. Flash number of each data sample :vartype flashnr_vec: array of ints :ivar dBm: For 'lightning' only. Lightning power (dBm) :vartype dBm: array of floats :ivar Methods: :ivar --------: :ivar add_radar: :vartype add_radar: Add a radar :ivar calculate_velocities: :vartype calculate_velocities: Computes velocities :ivar get_start_time: :vartype get_start_time: Return time of first trajectory sample :ivar get_end_time: :vartype get_end_time: Return time of last trajectory sample :ivar get_samples_in_period: :vartype get_samples_in_period: Get indices of samples within period :ivar _convert_traj_to_swissgrid: :vartype _convert_traj_to_swissgrid: convert data from WGS84 to Swiss coordinates :ivar _read_traj: :vartype _read_traj: Read plane trajectory from file :ivar _read_traj_flores: :vartype _read_traj_flores: Read FLORAKO plane trajectory from file :ivar _read_traj_trt: :vartype _read_traj_trt: Read TRT trajectory from file :ivar _read_traj_lightning: :vartype _read_traj_lightning: Read lightning trajectory from file :ivar _get_total_seconds: :vartype _get_total_seconds: Get the total time of the trajectory in seconds.

Functions

add_field(radar_dest, radar_orig)

adds the fields from orig radar into dest radar.

dem2radar_data(radar, dem_data[, slice_xy, ...])

get the DEM value corresponding to each radar gate using nearest neighbour interpolation

find_date_in_file_name(filename[, date_format])

Find a date with date format defined in date_format in a file name.

find_hzt_file(voltime, cfg[, ind_rad])

Search an ISO-0 degree file in HZT format

find_iso0_file(voltime, cfg[, ind_rad])

Search an ISO-0 degree file in text format

find_iso0_grib_file(voltime, cfg[, ind_rad])

Search an ISO-0 degree file in text format

find_raw_icon_file(voltime, datatype, cfg[, ...])

Search a ICON file in netcdf format

generate_field_name_str(datatype)

Generates a field name in a nice to read format.

get_data(voltime, datatypesdescr, cfg)

Reads pyrad input data.

get_dataset_fields(datasetdescr)

splits the dataset type descriptor and provides each individual member

get_datatype_fields(datadescriptor)

splits the data type descriptor and provides each individual member

get_datatype_skyecho(datatype)

maps de config file radar data type name into the corresponding SKYECHO data type name and Py-ART field name

get_datetime(fname, datadescriptor)

Given a data descriptor gets date and time from file name

get_field_unit(datatype)

Return unit of datatype.

get_fieldname_icon(field_name)

maps the Py-ART field name into the corresponding ICON variable name

get_fieldname_pyart(datatype)

maps the config file radar data type name into the corresponding rainbow Py-ART field name

get_file_list(datadescriptor, starttimes, ...)

gets the list of files with a time period

get_icon_fields(icon_data, icon_ind[, ...])

Get the icon data corresponding to each radar gate using a precomputed look up table of the nearest neighbour

get_iso0_field(hzt_data, hzt_ind, z_radar[, ...])

Get the height over iso0 data corresponding to each radar gate using a precomputed look up table of the nearest neighbour

get_iso0_ref(radar, iso0_data, time_index[, ...])

gets the is0 that has to be taken as reference.

get_new_rainbow_file_name(master_fname, ...)

get the rainbow file name containing datatype from a master file name and data type

get_rad4alp_dir(basepath, voltime[, ...])

gets the directory where rad4alp data is stored

get_rad4alp_grid_dir(basepath, voltime, ...)

gets the directory where rad4alp grid data is stored

get_rad4alp_prod_fname(datatype)

Given a datatype find the corresponding start and termination of the METRANET product file name

get_save_dir(basepath, procname, dsname, prdname)

obtains the path to a product directory and eventually creates it

get_sensor_data(date, datatype, cfg)

Gets data from a point measurement sensor (rain gauge or disdrometer)

get_trtfile_list(basepath, starttime, endtime)

gets the list of TRT files with a time period

grib2radar_data(radar, iso0_data, time_info)

get the iso0 value corresponding to each radar gate

hzt2radar_coord(radar, hzt_coord[, ...])

Given the radar coordinates find the nearest HZT pixel

hzt2radar_data(radar, hzt_coord, hzt_data[, ...])

get the HZT value corresponding to each radar gate using nearest neighbour interpolation

icon2radar_coord(radar, icon_coord[, ...])

Given the radar coordinates find the nearest icon model pixel

icon2radar_data(radar, icon_coord, icon_data)

get the icon value corresponding to each radar gate using nearest neighbour interpolation

interpol_field(radar_dest, radar_orig, ...)

interpolates field field_name contained in radar_orig to the grid in radar_dest

iso2radar_data(radar, iso0_data, time_info)

get the iso0 value corresponding to each radar gate

make_filename(prdtype, dstype, dsname, ext_list)

creates a product file name

map_Doppler(Doppler_data_bin, Nyquist_vel)

maps the binary METRANET Doppler data to actual Doppler velocity

map_hydro(hydro_data_op)

maps the operational hydrometeor classification identifiers to the ones used by Py-ART

read_antenna_pattern(fname[, linear, twoway])

Read antenna pattern from file

read_centroids(fname)

Reads a file containing the centroids for the semi-supervised classification

read_centroids_npz(fname)

Reads an npz file containing data used in centroid computation

read_colocated_data(fname)

Reads a csv files containing colocated data

read_colocated_gates(fname)

Reads a csv files containing the position of colocated gates

read_config(fname[, cfg, defaults])

Read a pyrad config file.

read_coord_sensors(fname)

Reads a file containing the coordinates of multiple sensors.

read_disdro_parsivel(fname)

Reads data collected by a parsivel disdrometer and stored in a csv file

read_disdro_scattering(fname)

Reads scattering parameters computed from disdrometer data contained in a text file

read_excess_gates(fname)

Reads a csv files containing the position of gates exceeding a given percentile of frequency of occurrence

read_fzl_igra(station, dtime)

Get an estimation of the freezing level height from the Integrated Global Radiosonde Archive (IGRA)

read_histogram(fname)

Reads a histogram contained in a csv file

read_histogram_ts(fname_list, datatype[, t_res])

Reads a colection of histogram data file and creates a time series

read_hzt_data(fname[, chy0, chx0, read_lib])

Reads iso-0 degree data from an HZT file

read_icon_coord(fname[, zmin])

Reads icon coordinates from a netcdf file

read_icon_data(fname[, field_names, celsius])

Reads icon data from a netcdf file

read_idrisi_data(fname[, fill_value])

Reads DEM data from an IDRISI .rst file

read_idrisi_metadata(fname)

Reads DEM metadata from a IDRISI .rdc file

read_intercomp_scores_ts(fname[, sort_by_date])

Reads a radar intercomparison scores csv file

read_iso0_grib_data(fname)

Reads a 2D field of iso-0 degree data from a MF NWP in GRIB format

read_iso0_mf_data(fname)

Reads iso-0 degree data from a MF NWP in text format

read_knmi(fname[, col_names])

Reads a file containing precipitation data from sensors retrieved from the KNMI archive.

read_last_state(fname)

Reads a file containing the date of acquisition of the last volume processed

read_lightning(fname[, filter_data])

Reads lightning data contained in a text file. The file has the following fields: flashnr: (0 is for noise) UTC seconds of the day Time within flash (in seconds) Latitude (decimal degrees) Longitude (decimal degrees) Altitude (m MSL) Power (dBm).

read_lightning_all(fname[, labels])

Reads a file containing lightning data and co-located polarimetric data. fields: flashnr time data Time within flash (in seconds) Latitude (decimal degrees) Longitude (decimal degrees) Altitude (m MSL) Power (dBm) Polarimetric values at flash position.

read_lightning_traj(fname)

Reads lightning trajectory data contained in a csv file. The file has the following fields: Date UTC [seconds since midnight] # Flash Flash Power (dBm) Value at flash Mean value in a 3x3x3 polar box Min value in a 3x3x3 polar box Max value in a 3x3x3 polar box # valid values in the polar box.

read_mch_xml_vad(voltime, cfg[, ind_rad])

Reads a MeteoSwiss VAD file (VAx xml files)

read_meteorage(fname)

Reads METEORAGE lightning data contained in a text file. The file has the following fields: date: date + time + time zone lon: longitude [degree] lat: latitude [degree] intens: amplitude [kilo amperes] ns: number of strokes of the flash mode: kind of localization [0,15] intra: 1 = intra-cloud , 0 = cloud-to-ground ax: length of the semi-major axis of the ellipse [km] ki2: standard deviation on the localization computation (Ki^2) ecc: eccentricity (major-axis / minor-axis) incl: ellipse inclination (angle with respect to the North, +90° is East) [degrees] sind: stroke index within the flash.

read_mf_vis(fname, datatype)

Reads Météo-France visibility data binary file.

read_ml_ts(fname)

Reads a melting layer time series contained in a csv file

read_monitoring_ts(fname[, sort_by_date])

Reads a monitoring time series contained in a csv file

read_proc_periods(fname)

Reads a file containing the start and stop times of periods to process

read_profile_ts(fname_list, labels[, hres, ...])

Reads a colection of profile data file and creates a time series

read_quantiles(fname)

Reads quantiles contained in a csv file

read_quantiles_ts(fname_list[, step, qmin, ...])

Reads a colection of quantiles data file and creates a time series

read_rad4alp_icon(fname, datatype[, ngates])

Reads rad4alp ICON data binary file.

read_rad4alp_vis(fname, datatype)

Reads rad4alp visibility data binary file.

read_radiosounding_igra(station, dtime)

Download radiosounding data from from the Integrated Global Radiosonde Archive (IGRA)

read_radiosounding_wyoming(station, dtime)

Download radiosounding data from the University of Wyoming website.

read_rhi_profile(fname[, labels])

Reads a monitoring time series contained in a csv file

read_selfconsistency(fname)

Reads a self-consistency table with Zdr, Kdp/Zh columns

read_smn(fname)

Reads SwissMetNet data contained in a csv file

read_smn2(fname)

Reads SwissMetNet data contained in a csv file with format station,time,value

read_solar_flux(fname)

Reads solar flux data from the DRAO observatory in Canada

read_status(voltime, cfg[, ind_rad])

Reads rad4alp xml status file.

read_sun_hits(fname)

Reads sun hits data contained in a csv file

read_sun_hits_multiple_days(cfg, time_ref[, ...])

Reads sun hits data from multiple file sources

read_sun_retrieval(fname)

Reads sun retrieval data contained in a csv file

read_thundertracking_info(fname)

Reads the TRT info used for thundertracking

read_timeseries(fname)

Reads a time series contained in a csv file

read_trt_cell_lightning(fname)

Reads the lightning data of a TRT cell. The file has the following fields: traj_ID yyyymmddHHMM lon lat area RANKr nflashes flash_dens.

read_trt_data(fname)

Reads the TRT data contained in a text file. The file has the following fields: traj_ID yyyymmddHHMM.

read_trt_info(fname)

Reads the TRT info used for thundertracking and contained in a text file.

read_trt_info2(fname)

Reads the TRT info used for thundertracking and contained in a text file.

read_trt_info_all(info_path)

Reads all the TRT info files

read_trt_info_all2(info_path)

Reads all the TRT info files

read_trt_scores(fname)

Reads the TRT scores contained in a text file. The file has the following fields: traj ID max flash density time max flash density rank max flash density max rank time max rank.

read_trt_thundertracking_traj_data(fname)

Reads the TRT cell data contained in a text file. The file has the following fields: traj_ID scan_ordered_time scan_time azi rng yyyymmddHHMM.

read_trt_traj_data(fname)

Reads the TRT cell data contained in a text file. The file has the following fields: traj_ID yyyymmddHHMM.

read_ts_cum(fname)

Reads a time series of precipitation accumulation contained in a csv file

read_vpr_theo_parameters(fname)

Reads the parameters defining a theoretical VPR profile from a csv file

read_windmills_data(fname)

Read the wind mills data csv file

send_msg(sender, receiver_list, subject, fname)

sends the content of a text file by email

write_alarm_msg(radar_name, param_name_unit, ...)

writes an alarm file

write_cdf(quantiles, values, ntot, nnan, ...)

writes a cumulative distribution function

write_centroids(fname, centroids_dict, var_names)

writes the centroids of a semi-supervised hydrometeor classification

write_colocated_data(coloc_data, fname)

Writes the data of gates colocated with two radars

write_colocated_data_time_avg(coloc_data, fname)

Writes the time averaged data of gates colocated with two radars

write_colocated_gates(coloc_gates, fname)

Writes the position of gates colocated with two radars

write_excess_gates(excess_dict, fname)

Writes the position and values of gates that have a frequency of occurrence higher than a particular threshold

write_field_coverage(quantiles, values, ...)

writes the quantiles of the coverage on a particular sector

write_fixed_angle(time_data, fixed_angle, ...)

writes an output file with the fixed angle data

write_histogram(bin_edges, values, fname[, ...])

writes a histogram

write_intercomp_scores_ts(start_time, stats, ...)

writes time series of radar intercomparison scores

write_last_state(datetime_last, fname)

writes SwissMetNet data in format datetime,avg_value, std_value

write_monitoring_ts(start_time, np_t, ...[, ...])

writes time series of data

write_multiple_points(dataset, fname)

write radar data obtained at multiple points

write_multiple_points_grid(dataset, fname)

write data obtained at multiple points from a grid

write_proc_periods(start_times, end_times, fname)

writes an output file containing start and stop times of periods to process

write_quantiles(quantiles, values, fname[, ...])

writes quantiles

write_rhi_profile(hvec, data, nvalid_vec, ...)

writes the values of an RHI profile in a text file

write_smn(datetime_vec, value_avg_vec, ...)

writes SwissMetNet data in format datetime,avg_value, std_value

write_sun_hits(sun_hits, fname)

Writes sun hits data.

write_sun_retrieval(sun_retrieval, fname)

Writes sun retrieval data.

write_trt_cell_data(traj_ID, yyyymmddHHMM, ...)

writes TRT cell data

write_trt_cell_lightning(cell_ID, cell_time, ...)

writes the lightning data for each TRT cell

write_trt_cell_scores(traj_ID, ...)

writes TRT cells scores

write_trt_info(ids, max_rank, nscans, ...)

writes TRT info of the thundertracking

write_trt_rpc(cell_ID, cell_time, lon, lat, ...)

writes the rimed particles column data for a TRT cell

write_trt_thundertracking_data(traj_ID, ...)

writes TRT cell data of the thundertracking scan

write_ts_cum(dataset, fname)

writes time series accumulation of data

write_ts_grid_data(dataset, fname[, sensorid])

writes time series of data

write_ts_lightning(flashnr, time_data, ...)

writes the LMA sources data and the value of the colocated polarimetric variables

write_ts_polar_data(dataset, fname)

writes time series of data

write_ts_stats(dt, value, fname[, stat])

writes time series of statistics

write_vol_csv(fname, radar, field_name[, ...])

Creates a kml file with the radar volume data

write_vol_kml(fname, radar, field_name[, ...])

Creates a kml file with the radar volume data

write_vpr_info(vpr_info_dict, fname)

Writes a dictionary containing relevant parameters of the VPR profile retrieval into a text file

write_vpr_theo_params(vpr_theo_dict, fname)

writes the parameters defining a theoretical VPR profile into a csv file