disdrodb package#
Subpackages#
- disdrodb.api package
- Submodules
- disdrodb.api.checks module
check_campaign_name()check_campaign_names()check_data_archive_dir()check_data_availability()check_data_source()check_data_sources()check_directories_inside()check_folder_partitioning()check_invalid_fields_policy()check_issue_dir()check_issue_file()check_measurement_interval()check_measurement_intervals()check_metadata_archive_dir()check_metadata_file()check_path()check_path_is_a_directory()check_product()check_product_kwargs()check_rolling()check_sample_interval()check_sensor_name()check_station_names()check_url()check_valid_fields()has_available_data()select_required_product_kwargs()
- disdrodb.api.configs module
- disdrodb.api.create_directories module
- disdrodb.api.info module
check_groups()get_campaign_name_from_filepaths()get_end_time_from_filepaths()get_info_from_filepath()get_key_from_filepath()get_key_from_filepaths()get_product_from_filepaths()get_sample_interval_from_filepaths()get_season()get_start_end_time_from_filepaths()get_start_time_from_filepaths()get_station_name_from_filepaths()get_time_component()get_version_from_filepaths()group_filepaths()infer_archive_dir_from_path()infer_campaign_name_from_path()infer_data_source_from_path()infer_disdrodb_tree_path()infer_disdrodb_tree_path_components()infer_path_info_dict()infer_path_info_tuple()
- disdrodb.api.io module
- disdrodb.api.path module
define_accumulation_acronym()define_campaign_dir()define_config_dir()define_data_dir()define_data_source_dir()define_disdrodb_path()define_file_folder_path()define_filename()define_issue_dir()define_issue_filepath()define_l0a_filename()define_l0b_filename()define_l0c_filename()define_l1_filename()define_l2e_filename()define_l2m_filename()define_logs_dir()define_metadata_dir()define_metadata_filepath()define_product_dir_tree()define_station_dir()
- disdrodb.api.search module
available_campaigns()available_data_sources()available_stations()get_required_product()is_disdrodb_data_url_specified()keep_list_info_elements_with_product_data()keep_list_info_elements_with_product_directory()keep_list_info_with_disdrodb_data_url()list_campaign_names()list_data_sources()list_station_names()
- Module contents
- disdrodb.data_transfer package
- disdrodb.issue package
- disdrodb.l0 package
- Subpackages
- Submodules
- disdrodb.l0.check_configs module
L0BEncodingSchemaL0BEncodingSchema.check_chunksizes_and_zlib()L0BEncodingSchema.check_contiguous_and_fletcher32()L0BEncodingSchema.check_contiguous_and_zlib()L0BEncodingSchema.chunksizesL0BEncodingSchema.complevelL0BEncodingSchema.contiguousL0BEncodingSchema.dtypeL0BEncodingSchema.fletcher32L0BEncodingSchema.model_configL0BEncodingSchema.model_post_init()L0BEncodingSchema.shuffleL0BEncodingSchema.zlib
RawDataFormatSchemaRawDataFormatSchema.check_list_length()RawDataFormatSchema.data_rangeRawDataFormatSchema.dimension_orderRawDataFormatSchema.field_numberRawDataFormatSchema.model_configRawDataFormatSchema.n_charactersRawDataFormatSchema.n_decimalsRawDataFormatSchema.n_digitsRawDataFormatSchema.n_naturalsRawDataFormatSchema.n_valuesRawDataFormatSchema.nan_flagsRawDataFormatSchema.valid_values
SchemaValidationExceptioncheck_all_sensors_configs()check_l0a_encoding()check_l0b_encoding()check_sensor_configs()
- disdrodb.l0.check_standards module
- disdrodb.l0.l0_reader module
available_readers()check_metadata_reader()check_reader_arguments()check_reader_exists()check_reader_reference()check_software_readers()define_reader_path()define_readers_directory()get_reader()get_reader_from_metadata()get_specific_readers_path()get_specific_readers_references()get_station_reader()is_documented_by()list_readers_paths()list_readers_references()reader_generic_docstring()
- disdrodb.l0.l0a_processing module
cast_column_dtypes()check_matching_column_number()coerce_corrupted_values_to_nan()concatenate_dataframe()drop_time_periods()drop_timesteps()is_raw_array_string_not_corrupted()preprocess_reader_kwargs()read_l0a_dataframe()read_raw_text_file()read_raw_text_files()remove_corrupted_rows()remove_duplicated_timesteps()remove_issue_timesteps()remove_rows_with_missing_time()replace_nan_flags()sanitize_df()set_nan_invalid_values()set_nan_outside_data_range()strip_delimiter()strip_delimiter_from_raw_arrays()strip_string_spaces()write_l0a()
- disdrodb.l0.l0b_nc_processing module
- disdrodb.l0.l0b_processing module
- disdrodb.l0.l0c_processing module
- disdrodb.l0.routines module
- disdrodb.l0.standards module
allowed_l0_variables()get_bin_coords_dict()get_data_format_dict()get_data_range_dict()get_diameter_bin_center()get_diameter_bin_lower()get_diameter_bin_upper()get_diameter_bin_width()get_diameter_bins_dict()get_dims_size_dict()get_field_nchar_dict()get_field_ndigits_decimals_dict()get_field_ndigits_dict()get_field_ndigits_natural_dict()get_l0a_dtype()get_l0a_encodings_dict()get_l0b_cf_attrs_dict()get_l0b_encodings_dict()get_n_diameter_bins()get_n_velocity_bins()get_nan_flags_dict()get_raw_array_dims_order()get_raw_array_nvalues()get_sensor_logged_variables()get_valid_coordinates_names()get_valid_dimension_names()get_valid_names()get_valid_values_dict()get_valid_variable_names()get_variables_dimension()get_velocity_bin_center()get_velocity_bin_lower()get_velocity_bin_upper()get_velocity_bin_width()get_velocity_bins_dict()
- disdrodb.l0.template_tools module
check_column_names()get_decimal_ndigits()get_df_columns_unique_values_dict()get_natural_ndigits()get_nchar()get_ndigits()get_unique_sorted_values()infer_column_names()print_allowed_column_names()print_df_column_names()print_df_columns_unique_values()print_df_first_n_rows()print_df_random_n_rows()print_df_summary_stats()print_df_with_any_nan_rows()str_has_decimal_digits()str_is_integer()str_is_number()
- Module contents
- disdrodb.l1 package
- Submodules
- disdrodb.l1.beard_model module
get_air_density()get_air_dynamic_viscosity()get_air_pressure_at_height()get_air_temperature_at_height()get_drag_coefficient()get_fall_velocity_beard_1976()get_gravitational_acceleration()get_pure_water_compressibility()get_pure_water_density()get_pure_water_surface_tension()get_raindrop_reynolds_number()get_vapor_actual_pressure()get_vapor_actual_pressure_at_height()get_vapor_saturation_pressure()get_water_density()retrieve_fall_velocity()
- disdrodb.l1.encoding_attrs module
- disdrodb.l1.fall_velocity module
- disdrodb.l1.filters module
- disdrodb.l1.processing module
- disdrodb.l1.resampling module
- disdrodb.l1.routines module
- Module contents
- disdrodb.l1_env package
- disdrodb.l2 package
- Submodules
- disdrodb.l2.empirical_dsd module
compute_integral_parameters()compute_spectrum_parameters()count_bins_with_drops()get_bin_dimensions()get_drop_average_velocity()get_drop_number_concentration()get_drop_volume()get_effective_sampling_area()get_equivalent_reflectivity_factor()get_equivalent_reflectivity_spectrum()get_kinetic_energy_spectrum()get_kinetic_energy_variables()get_kinetic_energy_variables_from_drop_number()get_liquid_water_content()get_liquid_water_content_from_moments()get_liquid_water_spectrum()get_mean_volume_drop_diameter()get_median_volume_drop_diameter()get_min_max_diameter()get_mode_diameter()get_moment()get_normalized_intercept_parameter()get_normalized_intercept_parameter_from_moments()get_quantile_volume_drop_diameter()get_rain_accumulation()get_rain_rate()get_rain_rate_contribution()get_rain_rate_from_drop_number()get_rain_rate_spectrum()get_std_volume_drop_diameter()get_total_number_concentration()
- disdrodb.l2.event module
- disdrodb.l2.processing module
- disdrodb.l2.processing_options module
- disdrodb.l2.routines module
- Module contents
- disdrodb.metadata package
- Submodules
- disdrodb.metadata.checks module
check_metadata_archive()check_metadata_archive_campaign_name()check_metadata_archive_data_source()check_metadata_archive_geolocation()check_metadata_archive_keys()check_metadata_archive_reader()check_metadata_archive_sensor_name()check_metadata_archive_station_name()check_station_metadata()check_station_metadata_geolocation()get_metadata_invalid_keys()get_metadata_missing_keys()identify_empty_metadata_keys()identify_missing_metadata_coords()
- disdrodb.metadata.download module
- disdrodb.metadata.geolocation module
- disdrodb.metadata.info module
- disdrodb.metadata.manipulation module
- disdrodb.metadata.reader module
- disdrodb.metadata.search module
- disdrodb.metadata.standards module
- disdrodb.metadata.writer module
- Module contents
- disdrodb.psd package
- Submodules
- disdrodb.psd.fitting module
apply_exponential_gs()apply_gamma_gs()apply_lognormal_gs()apply_normalized_gamma_gs()available_mom_methods()available_optimization()check_likelihood()check_mom_methods()check_optimization()check_optimization_kwargs()check_optimizer()check_probability_method()check_psd_model()check_target()check_transformation()check_truncated_likelihood()compute_gof_stats()compute_negative_log_likelihood()estimate_exponential_parameters()estimate_gamma_parameters()estimate_lognormal_parameters()estimate_model_parameters()get_adjusted_nt()get_expected_probabilities()get_exponential_parameters()get_exponential_parameters_M34()get_exponential_parameters_Zhang2008()get_exponential_parameters_gs()get_gamma_parameters()get_gamma_parameters_M012()get_gamma_parameters_M234()get_gamma_parameters_M246()get_gamma_parameters_M346()get_gamma_parameters_M456()get_gamma_parameters_gs()get_gamma_parameters_johnson2014()get_gs_parameters()get_lognormal_parameters()get_lognormal_parameters_M346()get_lognormal_parameters_gs()get_ml_parameters()get_mom_parameters()get_normalized_gamma_parameters_gs()
- disdrodb.psd.models module
BinnedPSDExponentialPSDGammaPSDLognormalPSDNormalizedGammaPSDPSDXarrayPSDavailable_psd_models()check_diameter_inputs()check_input_parameters()check_psd_model()create_psd()define_interpolator()get_exponential_moment()get_gamma_moment_v1()get_gamma_moment_v2()get_lognormal_moment()get_psd_model()get_psd_model_formula()get_required_parameters()is_scalar()
- Module contents
- disdrodb.scattering package
- disdrodb.utils package
- Submodules
- disdrodb.utils.attrs module
- disdrodb.utils.cli module
- disdrodb.utils.compression module
- disdrodb.utils.dask module
- disdrodb.utils.decorators module
- disdrodb.utils.directories module
check_directory_exists()check_glob_pattern()check_glob_patterns()contains_files()contains_netcdf_or_parquet_files()copy_file()count_directories()count_files()create_directory()create_required_directory()ensure_string_path()is_empty_directory()list_directories()list_files()list_paths()remove_if_exists()remove_path_trailing_slash()
- disdrodb.utils.encoding module
- disdrodb.utils.list module
- disdrodb.utils.logger module
- disdrodb.utils.time module
acronym_to_seconds()ensure_sample_interval_in_seconds()ensure_sorted_by_time()get_dataframe_start_end_time()get_dataset_start_end_time()get_file_start_end_time()get_problematic_timestep_indices()get_resampling_information()infer_sample_interval()regularize_dataset()regularize_timesteps()seconds_to_acronym()
- disdrodb.utils.warnings module
- disdrodb.utils.writer module
- disdrodb.utils.xarray module
- disdrodb.utils.yaml module
- Module contents
- disdrodb.viz package
Submodules#
disdrodb.configs module#
DISDRODB Configuration File functions.
- disdrodb.configs.define_disdrodb_configs(data_archive_dir: str | None = None, metadata_archive_dir: str | None = None, folder_partitioning: str | None = None, zenodo_token: str | None = None, zenodo_sandbox_token: str | None = None)[source][source]#
Defines the DISDRODB configuration file with the given credentials and base directory.
- Parameters:
data_archive_dir (str) – The directory path where the DISDRODB Data Archive is located.
metadata_archive_dir (str) – The directory path where the DISDRODB Metadata Archive is located.
folder_partitioning (str) – The folder partitioning scheme used in the DISDRODB Data Archive. Allowed values are: - “”: No additional subdirectories, files are saved directly in <station_dir>. - “year”: Files are stored under a subdirectory for the year (<station_dir>/2025). - “year/month”: Files are stored under subdirectories by year and month (<station_dir>/2025/04). - “year/month/day”: Files are stored under subdirectories by year, month and day (<station_dir>/2025/04/01). - “year/month_name”: Files are stored under subdirectories by year and month name (<station_dir>/2025/April). - “year/quarter”: Files are stored under subdirectories by year and quarter (<station_dir>/2025/Q2).
zenodo__token (str) – Zenodo Access Token. It is required to upload stations data to Zenodo.
zenodo_sandbox_token (str) – Zenodo Sandbox Access Token. It is required to upload stations data to Zenodo Sandbox.
Notes
This function write or update the DISDRODB config YAML file. The DISDRODB config YAML file is located in the user’s home directory at
~/.config_disdrodb.yml. The configuration file is used to run the various DISDRODB operations.
- disdrodb.configs.get_data_archive_dir(data_archive_dir=None)[source][source]#
Return the DISDRODB base directory.
- disdrodb.configs.get_metadata_archive_dir(metadata_archive_dir=None)[source][source]#
Return the DISDRODB Metadata Archive Directory.
- disdrodb.configs.read_disdrodb_configs() dict[str, str][source][source]#
Reads the DISDRODB configuration file and returns a dictionary with the configuration settings.
- Returns:
A dictionary containing the configuration settings for the DISDRODB.
- Return type:
- Raises:
ValueError – If the configuration file has not been defined yet. Use
disdrodb.define_configs()to specify the configuration file path and settings.
Notes
This function reads the YAML configuration file located at
~/.config_disdrodb.yml.
disdrodb.docs module#
Open the documentation for the relevant sensor.
disdrodb.routines module#
DISDRODB CLI routine wrappers.
- disdrodb.routines.run_l0(data_sources=None, campaign_names=None, station_names=None, l0a_processing: bool = True, l0b_processing: bool = True, l0c_processing: bool = True, remove_l0a: bool = False, remove_l0b: bool = False, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L0 processing of DISDRODB stations.
This function allows to launch the processing of many DISDRODB stations with a single command. From the list of all available DISDRODB stations, it runs the processing of the stations matching the provided data_sources, campaign_names and station_names.
- Parameters:
data_sources (list) – Name of data source(s) to process. The name(s) must be UPPER CASE. If campaign_names and station are not specified, process all stations. The default value is
None.campaign_names (list) – Name of the campaign(s) to process. The name(s) must be UPPER CASE. The default value is
None.station_names (list) – Station names to process. The default value is
None.l0a_processing (bool) – Whether to launch processing to generate L0A Apache Parquet file(s) from raw data. The default value is
True.l0b_processing (bool) – Whether to launch processing to generate L0B netCDF4 file(s) from L0A data. The default value is
True.l0c_processing (bool) – Whether to launch processing to generate L0C netCDF4 file(s) from L0B data. The default value is
True.remove_l0a (bool) – Whether to keep the L0A files after having generated the L0B netCDF products. The default value is
False.remove_l0b (bool) – Whether to remove the L0B files after having produced all L0C netCDF files. The default value is
False.force (bool) – If
True, overwrite existing data into destination directories. IfFalse, raise an error if there are already data into destination directories. The default value isFalse.verbose (bool) – Whether to print detailed processing information into terminal. The default value is
False.parallel (bool) – If
True, the files are processed simultaneously in multiple processes. Each process will use a single thread to avoid issues with the HDF/netCDF library. By default, the number of process is defined withos.cpu_count(). IfFalse, the files are processed sequentially in a single process. IfFalse, multi-threading is automatically exploited to speed up I/0 tasks.debugging_mode (bool) – If
True, it reduces the amount of data to process. For L0A, it processes just the first 3 raw data files. For L0B, it processes just the first 100 rows of 3 L0A files. The default value isFalse.data_archive_dir (str (optional)) – The directory path where the DISDRODB Data Archive is located. The directory path must end with
<...>/DISDRODB. IfNone, it uses thedata_archive_dirpath specified in the DISDRODB active configuration.
- disdrodb.routines.run_l0_station(data_source, campaign_name, station_name, l0a_processing: bool = True, l0b_processing: bool = True, l0c_processing: bool = True, remove_l0a: bool = False, remove_l0b: bool = False, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L0 processing of a specific DISDRODB station from the terminal.
- Parameters:
data_source (str) – Institution name (when campaign data spans more than 1 country), or country (when all campaigns (or sensor networks) are inside a given country). Must be UPPER CASE.
campaign_name (str) – Campaign name. Must be UPPER CASE.
station_name (str) – Station name
l0a_processing (bool) – Whether to launch processing to generate L0A Apache Parquet file(s) from raw data. The default value is
True.l0b_processing (bool) – Whether to launch processing to generate L0B netCDF4 file(s) from L0A data. The default value is
True.l0b_processing – Whether to launch processing to generate L0C netCDF4 file(s) from L0B data. The default value is
True.l0c_processing (bool) – Whether to launch processing to generate L0C netCDF4 file(s) from L0C data. The default is True.
remove_l0a (bool) – Whether to keep the L0A files after having generated the L0B netCDF products. The default value is
False.remove_l0b (bool) – Whether to remove the L0B files after having produced L0C netCDF files. The default is False.
force (bool) – If
True, overwrite existing data into destination directories. IfFalse, raise an error if there are already data into destination directories. The default value isFalse.verbose (bool) – Whether to print detailed processing information into terminal. The default value is
True.parallel (bool) – If
True, the files are processed simultaneously in multiple processes. Each process will use a single thread to avoid issues with the HDF/netCDF library. By default, the number of process is defined withos.cpu_count(). IfFalse, the files are processed sequentially in a single process. IfFalse, multi-threading is automatically exploited to speed up I/0 tasks.debugging_mode (bool) – If
True, it reduces the amount of data to process. For L0A, it processes just the first 3 raw data files for each station. For L0B, it processes just the first 100 rows of 3 L0A files for each station. The default value isFalse.data_archive_dir (str (optional)) – The directory path where the DISDRODB Data Archive is located. The directory path must end with
<...>/DISDRODB. IfNone, it uses thedata_archive_dirpath specified in the DISDRODB active configuration.
- disdrodb.routines.run_l0a(data_sources=None, campaign_names=None, station_names=None, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L0A processing of DISDRODB stations.
This function allows to launch the processing of many DISDRODB stations with a single command. From the list of all available DISDRODB stations, it runs the processing of the stations matching the provided data_sources, campaign_names and station_names.
- Parameters:
data_sources (list) – Name of data source(s) to process. The name(s) must be UPPER CASE. If campaign_names and station are not specified, process all stations. The default value is
None.campaign_names (list) – Name of the campaign(s) to process. The name(s) must be UPPER CASE. The default value is
None.station_names (list) – Station names to process. The default value is
None.force (bool) – If
True, overwrite existing data into destination directories. IfFalse, raise an error if there are already data into destination directories. The default value isFalse.verbose (bool) – Whether to print detailed processing information into terminal. The default value is
True.parallel (bool) – If
True, the files are processed simultaneously in multiple processes. By default, the number of process is defined withos.cpu_count(). IfFalse, the files are processed sequentially in a single process.debugging_mode (bool) – If
True, it reduces the amount of data to process. For L0A, it processes just the first 3 raw data files. The default value isFalse.data_archive_dir (str (optional)) – The directory path where the DISDRODB Data Archive is located. The directory path must end with
<...>/DISDRODB. IfNone, it uses thedata_archive_dirpath specified in the DISDRODB active configuration.
- disdrodb.routines.run_l0a_station(data_source, campaign_name, station_name, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L0A processing of a station calling the disdrodb_l0a_station in the terminal.
- disdrodb.routines.run_l0b(data_sources=None, campaign_names=None, station_names=None, remove_l0a: bool = False, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L0B processing of DISDRODB stations.
This function allows to launch the processing of many DISDRODB stations with a single command. From the list of all available DISDRODB L0A stations, it runs the processing of the stations matching the provided data_sources, campaign_names and station_names.
- Parameters:
data_sources (list) – Name of data source(s) to process. The name(s) must be UPPER CASE. If campaign_names and station are not specified, process all stations. The default value is
None.campaign_names (list) – Name of the campaign(s) to process. The name(s) must be UPPER CASE. The default value is
None.station_names (list) – Station names to process. The default value is
None.remove_l0a (bool) – Whether to keep the L0A files after having generated the L0B netCDF products. The default value is
False.force (bool) – If
True, overwrite existing data into destination directories. IfFalse, raise an error if there are already data into destination directories. The default value isFalse.verbose (bool) – Whether to print detailed processing information into terminal. The default value is
True.parallel (bool) – If
True, the files are processed simultaneously in multiple processes. By default, the number of process is defined withos.cpu_count(). IfFalse, the files are processed sequentially in a single process.debugging_mode (bool) – If
True, it reduces the amount of data to process. For L0B, it processes just the first 100 rows of 3 L0A files. The default value isFalse.data_archive_dir (str (optional)) – The directory path where the DISDRODB Data Archive is located. The directory path must end with
<...>/DISDRODB. IfNone, it uses thedata_archive_dirpath specified in the DISDRODB active configuration.
- disdrodb.routines.run_l0b_station(data_source, campaign_name, station_name, remove_l0a: bool = False, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L0B processing of a station calling disdrodb_run_l0b_station in the terminal.
- disdrodb.routines.run_l0c(data_sources=None, campaign_names=None, station_names=None, remove_l0b: bool = False, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L0C processing of DISDRODB stations.
This function allows to launch the processing of many DISDRODB stations with a single command. From the list of all available DISDRODB stations, it runs the processing of the stations matching the provided data_sources, campaign_names and station_names.
- Parameters:
data_sources (list) – Name of data source(s) to process. The name(s) must be UPPER CASE. If campaign_names and station are not specified, process all stations. The default value is
None.campaign_names (list) – Name of the campaign(s) to process. The name(s) must be UPPER CASE. The default value is
None.station_names (list) – Station names to process. The default value is
None.remove_l0b (bool) – Whether to remove the L0B files after having produced L0C netCDF files. The default is False.
force (bool) – If
True, overwrite existing data into destination directories. IfFalse, raise an error if there are already data into destination directories. The default value isFalse.verbose (bool) – Whether to print detailed processing information into terminal. The default value is
False.parallel (bool) – If
True, the files are processed simultaneously in multiple processes. Each process will use a single thread to avoid issues with the HDF/netCDF library. By default, the number of process is defined withos.cpu_count(). IfFalse, the files are processed sequentially in a single process. IfFalse, multi-threading is automatically exploited to speed up I/0 tasks.debugging_mode (bool) – If
True, it reduces the amount of data to process. For L1B, it processes just 3 L0B files. The default value isFalse.data_archive_dir (str (optional)) – The directory path where the DISDRODB Data Archive is located. The directory path must end with
<...>/DISDRODB. IfNone, it uses thedata_archive_dirpath specified in the DISDRODB active configuration.
- disdrodb.routines.run_l0c_station(data_source, campaign_name, station_name, remove_l0b: bool = False, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L0C processing of a station calling the disdrodb_l0c_station in the terminal.
- disdrodb.routines.run_l1(data_sources=None, campaign_names=None, station_names=None, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L1 processing of DISDRODB stations.
This function allows to launch the processing of many DISDRODB stations with a single command. From the list of all available DISDRODB stations, it runs the processing of the stations matching the provided data_sources, campaign_names and station_names.
- Parameters:
data_sources (list) – Name of data source(s) to process. The name(s) must be UPPER CASE. If campaign_names and station are not specified, process all stations. The default value is
None.campaign_names (list) – Name of the campaign(s) to process. The name(s) must be UPPER CASE. The default value is
None.station_names (list) – Station names to process. The default value is
None.force (bool) – If
True, overwrite existing data into destination directories. IfFalse, raise an error if there are already data into destination directories. The default value isFalse.verbose (bool) – Whether to print detailed processing information into terminal. The default value is
False.parallel (bool) – If
True, the files are processed simultaneously in multiple processes. Each process will use a single thread to avoid issues with the HDF/netCDF library. By default, the number of process is defined withos.cpu_count(). IfFalse, the files are processed sequentially in a single process. IfFalse, multi-threading is automatically exploited to speed up I/0 tasks.debugging_mode (bool) – If
True, it reduces the amount of data to process. For L1B, it processes just 3 L0B files. The default value isFalse.data_archive_dir (str (optional)) – The directory path where the DISDRODB Data Archive is located. The directory path must end with
<...>/DISDRODB. IfNone, it uses thedata_archive_dirpath specified in the DISDRODB active configuration.
- disdrodb.routines.run_l1_station(data_source, campaign_name, station_name, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L1 processing of a station calling the disdrodb_l1_station in the terminal.
- disdrodb.routines.run_l2e(data_sources=None, campaign_names=None, station_names=None, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L2E processing of DISDRODB stations.
This function allows to launch the processing of many DISDRODB stations with a single command. From the list of all available DISDRODB stations, it runs the processing of the stations matching the provided data_sources, campaign_names and station_names.
- Parameters:
data_sources (list) – Name of data source(s) to process. The name(s) must be UPPER CASE. If campaign_names and station are not specified, process all stations. The default value is
None.campaign_names (list) – Name of the campaign(s) to process. The name(s) must be UPPER CASE. The default value is
None.station_names (list) – Station names to process. The default value is
None.force (bool) – If
True, overwrite existing data into destination directories. IfFalse, raise an error if there are already data into destination directories. The default value isFalse.verbose (bool) – Whether to print detailed processing information into terminal. The default value is
False.parallel (bool) – If
True, the files are processed simultaneously in multiple processes. Each process will use a single thread to avoid issues with the HDF/netCDF library. By default, the number of process is defined withos.cpu_count(). IfFalse, the files are processed sequentially in a single process. IfFalse, multi-threading is automatically exploited to speed up I/0 tasks.debugging_mode (bool) – If
True, it reduces the amount of data to process. For L2E, it processes just 3 L1 files. The default value isFalse.data_archive_dir (str (optional)) – The directory path where the DISDRODB Data Archive is located. The directory path must end with
<...>/DISDRODB. IfNone, it uses thedata_archive_dirpath specified in the DISDRODB active configuration.
- disdrodb.routines.run_l2e_station(data_source, campaign_name, station_name, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L2E processing of a station calling the disdrodb_l1_station in the terminal.
- disdrodb.routines.run_l2m(data_sources=None, campaign_names=None, station_names=None, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L2M processing of DISDRODB stations.
This function allows to launch the processing of many DISDRODB stations with a single command. From the list of all available DISDRODB stations, it runs the processing of the stations matching the provided data_sources, campaign_names and station_names.
- Parameters:
data_sources (list) – Name of data source(s) to process. The name(s) must be UPPER CASE. If campaign_names and station are not specified, process all stations. The default value is
None.campaign_names (list) – Name of the campaign(s) to process. The name(s) must be UPPER CASE. The default value is
None.station_names (list) – Station names to process. The default value is
None.force (bool) – If
True, overwrite existing data into destination directories. IfFalse, raise an error if there are already data into destination directories. The default value isFalse.verbose (bool) – Whether to print detailed processing information into terminal. The default value is
False.parallel (bool) – If
True, the files are processed simultaneously in multiple processes. Each process will use a single thread to avoid issues with the HDF/netCDF library. By default, the number of process is defined withos.cpu_count(). IfFalse, the files are processed sequentially in a single process. IfFalse, multi-threading is automatically exploited to speed up I/0 tasks.debugging_mode (bool) – If
True, it reduces the amount of data to process. For L2MB, it processes just 3 L0B files. The default value isFalse.data_archive_dir (str (optional)) – The directory path where the DISDRODB Data Archive is located. The directory path must end with
<...>/DISDRODB. IfNone, it uses thedata_archive_dirpath specified in the DISDRODB active configuration.
- disdrodb.routines.run_l2m_station(data_source, campaign_name, station_name, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L2M processing of a station calling the disdrodb_l2m_station in the terminal.
Module contents#
DISDRODB software.
- disdrodb.available_campaigns(product=None, data_sources=None, station_names=None, available_data=False, raise_error_if_empty=False, invalid_fields_policy='raise', data_archive_dir=None, metadata_archive_dir=None, **product_kwargs)[source][source]#
Return campaigns names for which stations are available.
- disdrodb.available_data_sources(product=None, campaign_names=None, station_names=None, available_data=False, raise_error_if_empty=False, invalid_fields_policy='raise', data_archive_dir=None, metadata_archive_dir=None, **product_kwargs)[source][source]#
Return data sources for which stations are available.
- disdrodb.available_readers(sensor_name, data_sources=None, return_path=False)[source][source]#
Retrieve available readers information.
- disdrodb.available_sensor_names() list[source][source]#
Get available names of sensors.
- Returns:
sensor_names – Sorted list of the available sensors
- Return type:
- disdrodb.available_stations(product=None, data_sources=None, campaign_names=None, station_names=None, return_tuple=True, available_data=False, raise_error_if_empty=False, invalid_fields_policy='raise', data_archive_dir=None, metadata_archive_dir=None, **product_kwargs)[source][source]#
Return stations information for which metadata or product data are available on disk.
This function queries the DISDRODB Metadata Archive and, optionally, the local DISDRODB Data Archive to identify stations that satisfy the specified filters.
If the DISDRODB product is not specified, it lists the stations present in the DISDRODB Metadata Archive given the specified filtering criteria. If the DISDRODB product is specified, it lists the stations present in the local DISDRODB Data Archive given the specified filtering criteria.
- Parameters:
product (str or None, optional) –
Name of the product to filter on (e.g., “RAW”, “L0A”, “L1”).
If the DISDRODB product is not specified (default), it lists the stations present in the DISDRODB Metadata Archive given the specified filtering criteria.
If the DISDRODB product is specified, it lists the stations present in the local DISDRODB Data Archive given the specified filtering criteria. The default is is None.
data_sources (str or sequence of str, optional) – One or more data source identifiers to filter stations by. The name(s) must be UPPER CASE. If None, no filtering on data source is applied. The default is is
None.campaign_names (str or sequence of str, optional) – One or more campaign names to filter stations by. The name(s) must be UPPER CASE. If None, no filtering on campaign is applied. The default is is
None.station_names (str or sequence of str, optional) – One or more station names to include. If None, all stations matching other filters are considered. The default is is
None.available_data (bool, optional) –
If
productis not specified:if available_data is False, return stations present in the DISDRODB Metadata Archive
if available_data is True, return stations with data available on the
online DISDRODB Decentralized Data Archive (i.e., stations with the disdrodb_data_url in the metadata).
If
productis specified:if available_data is False, return stations where the product directory exists in the in the local DISDRODB Data Archive
if available_data is True, return stations where product data exists in the in the local DISDRODB Data Archive.
The default is is False.
return_tuple (bool, optional) – If True, return a list of tuples
(data_source, campaign_name, station_name). If False, return only a list of station names The default is True.raise_error_if_empty (bool, optional) – If True and no stations satisfy the criteria, raise a
ValueError. If False, return an empty list/tuple. The default is False.invalid_fields_policy ({'raise', 'warn', 'ignore'}, optional) –
How to handle invalid filter values for
data_sources,campaign_names, orstation_namesthat are not present in the metadata archive:’raise’ : raise a
ValueError(default)’warn’ : emit a warning, then ignore invalid entries
’ignore’: silently drop invalid entries
data_archive_dir (str or Path-like, optional) – Path to the root of the local DISDRODB Data Archive. Required only if ``product``is specified. If None, the default data archive base directory is used. Default is None.
metadata_archive_dir (str or Path-like, optional) – Path to the root of the DISDRODB Metadata Archive. If None, the default metadata base directory is used. Default is None.
**product_kwargs (dict, optional) – Additional arguments required for some products. For example, for the “L2E” product, you need to specify
rollingandsample_interval. For the “L2M” product, you need to specify also themodel_name.
- Returns:
If
return_tuple=True, return a list of tuples(data_source, campaign_name, station_name). Ifreturn_tuple=True,, return a list of station names.- Return type:
Examples
>>> # List all stations present in the DISDRODB Metadata Archive >>> stations = available_stations() >>> # List all stations present in the online DISDRODB Data Archive >>> stations = available_stations(available_data=True) >>> # List stations with raw data available in the local DISDRODB Data Archive >>> raw_stations = available_stations(product="RAW", available_data=True) >>> # List stations of specific data sources >>> stations = available_stations(data_sources=["GPM", "EPFL"])
- disdrodb.check_metadata_archive(metadata_archive_dir: str | None = None, raise_error=False)[source][source]#
Check the archive metadata compliance.
- Parameters:
metadata_archive_dir (str (optional)) – The directory path where the DISDRODB Metadata Archive is located. The directory path must end with
<...>/DISDRODB. IfNone, it uses themetadata_archive_dirpath specified in the DISDRODB active configuration.raise_error (bool (optional)) – Whether to raise an error and interrupt the archive check if a metadata is not compliant. The default value is
False.
- Returns:
If the check succeeds, the result is
True, otherwiseFalse.- Return type:
- disdrodb.check_metadata_archive_geolocation(metadata_archive_dir: str | None = None)[source][source]#
Check the metadata files have missing or wrong geolocation..
- Parameters:
metadata_archive_dir (str (optional)) – The directory path where the DISDRODB Metadata Archive is located. The directory path must end with
<...>/DISDRODB. IfNone, it uses themetadata_archive_dirpath specified in the DISDRODB active configuration.- Returns:
If the check succeeds, the result is
True, otherwiseFalse.- Return type:
- disdrodb.check_station_metadata(data_source, campaign_name, station_name, metadata_archive_dir=None)[source][source]#
Check DISDRODB metadata compliance.
- disdrodb.define_configs(data_archive_dir: str | None = None, metadata_archive_dir: str | None = None, folder_partitioning: str | None = None, zenodo_token: str | None = None, zenodo_sandbox_token: str | None = None)[source]#
Defines the DISDRODB configuration file with the given credentials and base directory.
- Parameters:
data_archive_dir (str) – The directory path where the DISDRODB Data Archive is located.
metadata_archive_dir (str) – The directory path where the DISDRODB Metadata Archive is located.
folder_partitioning (str) – The folder partitioning scheme used in the DISDRODB Data Archive. Allowed values are: - “”: No additional subdirectories, files are saved directly in <station_dir>. - “year”: Files are stored under a subdirectory for the year (<station_dir>/2025). - “year/month”: Files are stored under subdirectories by year and month (<station_dir>/2025/04). - “year/month/day”: Files are stored under subdirectories by year, month and day (<station_dir>/2025/04/01). - “year/month_name”: Files are stored under subdirectories by year and month name (<station_dir>/2025/April). - “year/quarter”: Files are stored under subdirectories by year and quarter (<station_dir>/2025/Q2).
zenodo__token (str) – Zenodo Access Token. It is required to upload stations data to Zenodo.
zenodo_sandbox_token (str) – Zenodo Sandbox Access Token. It is required to upload stations data to Zenodo Sandbox.
Notes
This function write or update the DISDRODB config YAML file. The DISDRODB config YAML file is located in the user’s home directory at
~/.config_disdrodb.yml. The configuration file is used to run the various DISDRODB operations.
- disdrodb.download_archive(data_sources: str | list[str] | None = None, campaign_names: str | list[str] | None = None, station_names: str | list[str] | None = None, force: bool = False, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Download DISDRODB stations with the
disdrodb_data_urlin the metadata.- Parameters:
data_sources (str or list of str, optional) – Data source name (eg : EPFL). If not provided (
None), all data sources will be downloaded. The default value isdata_source=None.campaign_names (str or list of str, optional) – Campaign name (eg : EPFL_ROOF_2012). If not provided (
None), all campaigns will be downloaded. The default value iscampaign_name=None.station_names (str or list of str, optional) – Station name. If not provided (
None), all stations will be downloaded. The default value isstation_name=None.force (bool, optional) – If
True, overwrite the already existing raw data file. The default value isFalse.data_archive_dir (str (optional)) – DISDRODB Data Archive directory. Format:
<...>/DISDRODB. IfNone(the default), the disdrodb config variabledata_archive_diris used.
- disdrodb.download_metadata_archive(directory_path, force=False)[source][source]#
Download the DISDRODB Metadata Archive to the specified directory.
- Parameters:
- Returns:
The DISDRODB Metadata Archive directory path.
- Return type:
metadata_archive_dir
- disdrodb.download_station(data_source: str, campaign_name: str, station_name: str, force: bool = False, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None) None[source][source]#
Download data of a single DISDRODB station from the DISDRODB remote repository.
- Parameters:
data_source (str) – The name of the institution (for campaigns spanning multiple countries) or the name of the country (for campaigns or sensor networks within a single country). Must be provided in UPPER CASE.
campaign_name (str) – The name of the campaign. Must be provided in UPPER CASE.
station_name (str) – The name of the station.
data_archive_dir (str (optional)) – The base directory of DISDRODB, expected in the format
<...>/DISDRODB. If not specified, the path specified in the DISDRODB active configuration will be used.force (bool, optional) – If
True, overwrite the already existing raw data file. The default value isFalse.data_archive_dir – DISDRODB Data Archive directory. Format:
<...>/DISDRODB. IfNone(the default), the disdrodb config variabledata_archive_diris used.
- disdrodb.find_files(data_source, campaign_name, station_name, product, debugging_mode: bool = False, data_archive_dir: str | None = None, glob_pattern='*', **product_kwargs)[source][source]#
Retrieve DISDRODB product files for a give station.
- Parameters:
data_source (str) – The name of the institution (for campaigns spanning multiple countries) or the name of the country (for campaigns or sensor networks within a single country). Must be provided in UPPER CASE.
campaign_name (str) – The name of the campaign. Must be provided in UPPER CASE.
station_name (str) – The name of the station.
product (str) – The name DISDRODB product.
debugging_mode (bool, optional) – If
True, it select maximum 3 files for debugging purposes. The default value isFalse.data_archive_dir (str, optional) – The base directory of DISDRODB, expected in the format
<...>/DISDRODB. If not specified, the path specified in the DISDRODB active configuration will be used.glob_pattern (str, optional) – Glob pattern to search for raw data files. The default is “*”. The argument is used only if product=”RAW”.
sample_interval (int, optional) – The sampling interval in seconds of the product. It must be specified only for product L2E and L2M !
rolling (bool, optional) – Whether the dataset has been resampled by aggregating or rolling. It must be specified only for product L2E and L2M !
model_name (str) – The model name of the statistical distribution for the DSD. It must be specified only for product L2M !
- Returns:
filepaths – List of file paths.
- Return type:
- disdrodb.get_data_archive_dir(data_archive_dir=None)[source][source]#
Return the DISDRODB base directory.
- disdrodb.get_metadata_archive_dir(metadata_archive_dir=None)[source][source]#
Return the DISDRODB Metadata Archive Directory.
- disdrodb.get_reader(reader_reference, sensor_name)[source][source]#
Retrieve the reader function.
- Parameters:
- Returns:
The
reader()function.- Return type:
callable
- disdrodb.get_station_reader(data_source, campaign_name, station_name, metadata_archive_dir=None)[source][source]#
Retrieve the reader function of a specific DISDRODB station.
- disdrodb.open_dataset(data_source, campaign_name, station_name, product, product_kwargs=None, debugging_mode: bool = False, data_archive_dir: str | None = None, **open_kwargs)[source][source]#
Retrieve DISDRODB product files for a give station.
- Parameters:
data_source (str) – The name of the institution (for campaigns spanning multiple countries) or the name of the country (for campaigns or sensor networks within a single country). Must be provided in UPPER CASE.
campaign_name (str) – The name of the campaign. Must be provided in UPPER CASE.
station_name (str) – The name of the station.
product (str) – The name DISDRODB product.
sample_interval (int, optional) – The sampling interval in seconds of the product. It must be specified only for product L2E and L2M !
rolling (bool, optional) – Whether the dataset has been resampled by aggregating or rolling. It must be specified only for product L2E and L2M !
model_name (str) – The model name of the statistical distribution for the DSD. It must be specified only for product L2M !
debugging_mode (bool, optional) – If
True, it select maximum 3 files for debugging purposes. The default value isFalse.data_archive_dir (str, optional) – The base directory of DISDRODB, expected in the format
<...>/DISDRODB. If not specified, the path specified in the DISDRODB active configuration will be used.
- Return type:
- disdrodb.open_logs_directory(data_source, campaign_name, station_name=None, data_archive_dir=None)[source][source]#
Open the DISDRODB Data Archive logs directory of a station.
- disdrodb.open_metadata_directory(data_source, campaign_name, station_name=None, metadata_archive_dir=None)[source][source]#
Open the DISDRODB Metadata Archive station(s) metadata directory.
- disdrodb.open_product_directory(product, data_source, campaign_name, station_name, data_archive_dir=None)[source][source]#
Open the DISDRODB Data Archive station product directory.
- disdrodb.open_sensor_documentation(sensor_name)[source][source]#
Open the sensor documentation PDF in the browser.
- disdrodb.read_metadata_archive(metadata_archive_dir=None, data_sources=None, campaign_names=None, station_names=None, available_data=False)[source][source]#
Read the DISDRODB Metadata Archive Database.
- Parameters:
metadata_archive_dir (str or Path-like, optional) – Path to the root of the DISDRODB Metadata Archive. If None, the default metadata base directory is used. Default is None.
data_sources (str or sequence of str, optional) – One or more data source identifiers to filter stations by. If None, no filtering on data source is applied. The default is is None.
campaign_names (str or sequence of str, optional) – One or more campaign names to filter stations by. If None, no filtering on campaign is applied. The default is is None.
station_names (str or sequence of str, optional) – One or more station names to include. If None, all stations matching other filters are considered. The default is is None.
available_data (bool, optional) – If True, only information of stations with data available in the online DISDRODB Decentralized Data Archive are returned. If False (the default), all stations present in the DISDRODB Metadata Archive matching the filtering criteria are returned,
- Return type:
- disdrodb.read_station_metadata(data_source, campaign_name, station_name, metadata_archive_dir=None)[source][source]#
Open the station metadata YAML file into a dictionary.
- Parameters:
data_source (str) – The name of the institution (for campaigns spanning multiple countries) or the name of the country (for campaigns or sensor networks within a single country). Must be provided in UPPER CASE.
campaign_name (str) – The name of the campaign. Must be provided in UPPER CASE.
station_name (str) – The name of the station.
metadata_archive_dir (str, optional) – The directory path where the DISDRODB Metadata Archive is located. If not specified, the path specified in the DISDRODB active configuration will be used. Expected path format:
<...>/DISDRODB.
- Returns:
metadata – The station metadata dictionary
- Return type:
dictionary
- disdrodb.run_l0(data_sources=None, campaign_names=None, station_names=None, l0a_processing: bool = True, l0b_processing: bool = True, l0c_processing: bool = True, remove_l0a: bool = False, remove_l0b: bool = False, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L0 processing of DISDRODB stations.
This function allows to launch the processing of many DISDRODB stations with a single command. From the list of all available DISDRODB stations, it runs the processing of the stations matching the provided data_sources, campaign_names and station_names.
- Parameters:
data_sources (list) – Name of data source(s) to process. The name(s) must be UPPER CASE. If campaign_names and station are not specified, process all stations. The default value is
None.campaign_names (list) – Name of the campaign(s) to process. The name(s) must be UPPER CASE. The default value is
None.station_names (list) – Station names to process. The default value is
None.l0a_processing (bool) – Whether to launch processing to generate L0A Apache Parquet file(s) from raw data. The default value is
True.l0b_processing (bool) – Whether to launch processing to generate L0B netCDF4 file(s) from L0A data. The default value is
True.l0c_processing (bool) – Whether to launch processing to generate L0C netCDF4 file(s) from L0B data. The default value is
True.remove_l0a (bool) – Whether to keep the L0A files after having generated the L0B netCDF products. The default value is
False.remove_l0b (bool) – Whether to remove the L0B files after having produced all L0C netCDF files. The default value is
False.force (bool) – If
True, overwrite existing data into destination directories. IfFalse, raise an error if there are already data into destination directories. The default value isFalse.verbose (bool) – Whether to print detailed processing information into terminal. The default value is
False.parallel (bool) – If
True, the files are processed simultaneously in multiple processes. Each process will use a single thread to avoid issues with the HDF/netCDF library. By default, the number of process is defined withos.cpu_count(). IfFalse, the files are processed sequentially in a single process. IfFalse, multi-threading is automatically exploited to speed up I/0 tasks.debugging_mode (bool) – If
True, it reduces the amount of data to process. For L0A, it processes just the first 3 raw data files. For L0B, it processes just the first 100 rows of 3 L0A files. The default value isFalse.data_archive_dir (str (optional)) – The directory path where the DISDRODB Data Archive is located. The directory path must end with
<...>/DISDRODB. IfNone, it uses thedata_archive_dirpath specified in the DISDRODB active configuration.
- disdrodb.run_l0_station(data_source, campaign_name, station_name, l0a_processing: bool = True, l0b_processing: bool = True, l0c_processing: bool = True, remove_l0a: bool = False, remove_l0b: bool = False, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L0 processing of a specific DISDRODB station from the terminal.
- Parameters:
data_source (str) – Institution name (when campaign data spans more than 1 country), or country (when all campaigns (or sensor networks) are inside a given country). Must be UPPER CASE.
campaign_name (str) – Campaign name. Must be UPPER CASE.
station_name (str) – Station name
l0a_processing (bool) – Whether to launch processing to generate L0A Apache Parquet file(s) from raw data. The default value is
True.l0b_processing (bool) – Whether to launch processing to generate L0B netCDF4 file(s) from L0A data. The default value is
True.l0b_processing – Whether to launch processing to generate L0C netCDF4 file(s) from L0B data. The default value is
True.l0c_processing (bool) – Whether to launch processing to generate L0C netCDF4 file(s) from L0C data. The default is True.
remove_l0a (bool) – Whether to keep the L0A files after having generated the L0B netCDF products. The default value is
False.remove_l0b (bool) – Whether to remove the L0B files after having produced L0C netCDF files. The default is False.
force (bool) – If
True, overwrite existing data into destination directories. IfFalse, raise an error if there are already data into destination directories. The default value isFalse.verbose (bool) – Whether to print detailed processing information into terminal. The default value is
True.parallel (bool) – If
True, the files are processed simultaneously in multiple processes. Each process will use a single thread to avoid issues with the HDF/netCDF library. By default, the number of process is defined withos.cpu_count(). IfFalse, the files are processed sequentially in a single process. IfFalse, multi-threading is automatically exploited to speed up I/0 tasks.debugging_mode (bool) – If
True, it reduces the amount of data to process. For L0A, it processes just the first 3 raw data files for each station. For L0B, it processes just the first 100 rows of 3 L0A files for each station. The default value isFalse.data_archive_dir (str (optional)) – The directory path where the DISDRODB Data Archive is located. The directory path must end with
<...>/DISDRODB. IfNone, it uses thedata_archive_dirpath specified in the DISDRODB active configuration.
- disdrodb.run_l0a(data_sources=None, campaign_names=None, station_names=None, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L0A processing of DISDRODB stations.
This function allows to launch the processing of many DISDRODB stations with a single command. From the list of all available DISDRODB stations, it runs the processing of the stations matching the provided data_sources, campaign_names and station_names.
- Parameters:
data_sources (list) – Name of data source(s) to process. The name(s) must be UPPER CASE. If campaign_names and station are not specified, process all stations. The default value is
None.campaign_names (list) – Name of the campaign(s) to process. The name(s) must be UPPER CASE. The default value is
None.station_names (list) – Station names to process. The default value is
None.force (bool) – If
True, overwrite existing data into destination directories. IfFalse, raise an error if there are already data into destination directories. The default value isFalse.verbose (bool) – Whether to print detailed processing information into terminal. The default value is
True.parallel (bool) – If
True, the files are processed simultaneously in multiple processes. By default, the number of process is defined withos.cpu_count(). IfFalse, the files are processed sequentially in a single process.debugging_mode (bool) – If
True, it reduces the amount of data to process. For L0A, it processes just the first 3 raw data files. The default value isFalse.data_archive_dir (str (optional)) – The directory path where the DISDRODB Data Archive is located. The directory path must end with
<...>/DISDRODB. IfNone, it uses thedata_archive_dirpath specified in the DISDRODB active configuration.
- disdrodb.run_l0a_station(data_source, campaign_name, station_name, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L0A processing of a station calling the disdrodb_l0a_station in the terminal.
- disdrodb.run_l0b(data_sources=None, campaign_names=None, station_names=None, remove_l0a: bool = False, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L0B processing of DISDRODB stations.
This function allows to launch the processing of many DISDRODB stations with a single command. From the list of all available DISDRODB L0A stations, it runs the processing of the stations matching the provided data_sources, campaign_names and station_names.
- Parameters:
data_sources (list) – Name of data source(s) to process. The name(s) must be UPPER CASE. If campaign_names and station are not specified, process all stations. The default value is
None.campaign_names (list) – Name of the campaign(s) to process. The name(s) must be UPPER CASE. The default value is
None.station_names (list) – Station names to process. The default value is
None.remove_l0a (bool) – Whether to keep the L0A files after having generated the L0B netCDF products. The default value is
False.force (bool) – If
True, overwrite existing data into destination directories. IfFalse, raise an error if there are already data into destination directories. The default value isFalse.verbose (bool) – Whether to print detailed processing information into terminal. The default value is
True.parallel (bool) – If
True, the files are processed simultaneously in multiple processes. By default, the number of process is defined withos.cpu_count(). IfFalse, the files are processed sequentially in a single process.debugging_mode (bool) – If
True, it reduces the amount of data to process. For L0B, it processes just the first 100 rows of 3 L0A files. The default value isFalse.data_archive_dir (str (optional)) – The directory path where the DISDRODB Data Archive is located. The directory path must end with
<...>/DISDRODB. IfNone, it uses thedata_archive_dirpath specified in the DISDRODB active configuration.
- disdrodb.run_l0b_station(data_source, campaign_name, station_name, remove_l0a: bool = False, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L0B processing of a station calling disdrodb_run_l0b_station in the terminal.
- disdrodb.run_l0c(data_sources=None, campaign_names=None, station_names=None, remove_l0b: bool = False, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L0C processing of DISDRODB stations.
This function allows to launch the processing of many DISDRODB stations with a single command. From the list of all available DISDRODB stations, it runs the processing of the stations matching the provided data_sources, campaign_names and station_names.
- Parameters:
data_sources (list) – Name of data source(s) to process. The name(s) must be UPPER CASE. If campaign_names and station are not specified, process all stations. The default value is
None.campaign_names (list) – Name of the campaign(s) to process. The name(s) must be UPPER CASE. The default value is
None.station_names (list) – Station names to process. The default value is
None.remove_l0b (bool) – Whether to remove the L0B files after having produced L0C netCDF files. The default is False.
force (bool) – If
True, overwrite existing data into destination directories. IfFalse, raise an error if there are already data into destination directories. The default value isFalse.verbose (bool) – Whether to print detailed processing information into terminal. The default value is
False.parallel (bool) – If
True, the files are processed simultaneously in multiple processes. Each process will use a single thread to avoid issues with the HDF/netCDF library. By default, the number of process is defined withos.cpu_count(). IfFalse, the files are processed sequentially in a single process. IfFalse, multi-threading is automatically exploited to speed up I/0 tasks.debugging_mode (bool) – If
True, it reduces the amount of data to process. For L1B, it processes just 3 L0B files. The default value isFalse.data_archive_dir (str (optional)) – The directory path where the DISDRODB Data Archive is located. The directory path must end with
<...>/DISDRODB. IfNone, it uses thedata_archive_dirpath specified in the DISDRODB active configuration.
- disdrodb.run_l0c_station(data_source, campaign_name, station_name, remove_l0b: bool = False, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L0C processing of a station calling the disdrodb_l0c_station in the terminal.
- disdrodb.run_l1(data_sources=None, campaign_names=None, station_names=None, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L1 processing of DISDRODB stations.
This function allows to launch the processing of many DISDRODB stations with a single command. From the list of all available DISDRODB stations, it runs the processing of the stations matching the provided data_sources, campaign_names and station_names.
- Parameters:
data_sources (list) – Name of data source(s) to process. The name(s) must be UPPER CASE. If campaign_names and station are not specified, process all stations. The default value is
None.campaign_names (list) – Name of the campaign(s) to process. The name(s) must be UPPER CASE. The default value is
None.station_names (list) – Station names to process. The default value is
None.force (bool) – If
True, overwrite existing data into destination directories. IfFalse, raise an error if there are already data into destination directories. The default value isFalse.verbose (bool) – Whether to print detailed processing information into terminal. The default value is
False.parallel (bool) – If
True, the files are processed simultaneously in multiple processes. Each process will use a single thread to avoid issues with the HDF/netCDF library. By default, the number of process is defined withos.cpu_count(). IfFalse, the files are processed sequentially in a single process. IfFalse, multi-threading is automatically exploited to speed up I/0 tasks.debugging_mode (bool) – If
True, it reduces the amount of data to process. For L1B, it processes just 3 L0B files. The default value isFalse.data_archive_dir (str (optional)) – The directory path where the DISDRODB Data Archive is located. The directory path must end with
<...>/DISDRODB. IfNone, it uses thedata_archive_dirpath specified in the DISDRODB active configuration.
- disdrodb.run_l1_station(data_source, campaign_name, station_name, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L1 processing of a station calling the disdrodb_l1_station in the terminal.
- disdrodb.run_l2e(data_sources=None, campaign_names=None, station_names=None, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L2E processing of DISDRODB stations.
This function allows to launch the processing of many DISDRODB stations with a single command. From the list of all available DISDRODB stations, it runs the processing of the stations matching the provided data_sources, campaign_names and station_names.
- Parameters:
data_sources (list) – Name of data source(s) to process. The name(s) must be UPPER CASE. If campaign_names and station are not specified, process all stations. The default value is
None.campaign_names (list) – Name of the campaign(s) to process. The name(s) must be UPPER CASE. The default value is
None.station_names (list) – Station names to process. The default value is
None.force (bool) – If
True, overwrite existing data into destination directories. IfFalse, raise an error if there are already data into destination directories. The default value isFalse.verbose (bool) – Whether to print detailed processing information into terminal. The default value is
False.parallel (bool) – If
True, the files are processed simultaneously in multiple processes. Each process will use a single thread to avoid issues with the HDF/netCDF library. By default, the number of process is defined withos.cpu_count(). IfFalse, the files are processed sequentially in a single process. IfFalse, multi-threading is automatically exploited to speed up I/0 tasks.debugging_mode (bool) – If
True, it reduces the amount of data to process. For L2E, it processes just 3 L1 files. The default value isFalse.data_archive_dir (str (optional)) – The directory path where the DISDRODB Data Archive is located. The directory path must end with
<...>/DISDRODB. IfNone, it uses thedata_archive_dirpath specified in the DISDRODB active configuration.
- disdrodb.run_l2e_station(data_source, campaign_name, station_name, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L2E processing of a station calling the disdrodb_l1_station in the terminal.
- disdrodb.run_l2m(data_sources=None, campaign_names=None, station_names=None, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L2M processing of DISDRODB stations.
This function allows to launch the processing of many DISDRODB stations with a single command. From the list of all available DISDRODB stations, it runs the processing of the stations matching the provided data_sources, campaign_names and station_names.
- Parameters:
data_sources (list) – Name of data source(s) to process. The name(s) must be UPPER CASE. If campaign_names and station are not specified, process all stations. The default value is
None.campaign_names (list) – Name of the campaign(s) to process. The name(s) must be UPPER CASE. The default value is
None.station_names (list) – Station names to process. The default value is
None.force (bool) – If
True, overwrite existing data into destination directories. IfFalse, raise an error if there are already data into destination directories. The default value isFalse.verbose (bool) – Whether to print detailed processing information into terminal. The default value is
False.parallel (bool) – If
True, the files are processed simultaneously in multiple processes. Each process will use a single thread to avoid issues with the HDF/netCDF library. By default, the number of process is defined withos.cpu_count(). IfFalse, the files are processed sequentially in a single process. IfFalse, multi-threading is automatically exploited to speed up I/0 tasks.debugging_mode (bool) – If
True, it reduces the amount of data to process. For L2MB, it processes just 3 L0B files. The default value isFalse.data_archive_dir (str (optional)) – The directory path where the DISDRODB Data Archive is located. The directory path must end with
<...>/DISDRODB. IfNone, it uses thedata_archive_dirpath specified in the DISDRODB active configuration.
- disdrodb.run_l2m_station(data_source, campaign_name, station_name, force: bool = False, verbose: bool = False, debugging_mode: bool = False, parallel: bool = True, data_archive_dir: str | None = None, metadata_archive_dir: str | None = None)[source][source]#
Run the L2M processing of a station calling the disdrodb_l2m_station in the terminal.