disdrodb.l0.readers package#
Submodules#
disdrodb.l0.readers.reader_template module#
- disdrodb.l0.readers.reader_template.reader(raw_dir, processed_dir, station_name, force=False, verbose=False, parallel=False, debugging_mode=False)[source]#
Script to convert the raw data to L0A format.
- Parameters
raw_dir (str) –
The directory path where all the raw content of a specific campaign is stored. The path must have the following structure
<...>/DISDRODB/Raw/<DATA_SOURCE>/<CAMPAIGN_NAME>
. Inside theraw_dir
directory, it is required to adopt the following structure:- ``/data/<station_name>/<raw_files>`` - ``/metadata/<station_name>.yml``
Important points:
For each
<station_name>
, there must be a corresponding YAML file in the metadata subdirectory.The
<CAMPAIGN_NAME>
are expected to be UPPER CASE.The
<CAMPAIGN_NAME>
must semantically match between:the
raw_dir
andprocessed_dir
directory paths;with the key
campaign_name
within the metadata YAML files.
processed_dir (str) – The desired directory path for the processed DISDRODB L0A and L0B products. The path should have the following structure
<...>/DISDRODB/Processed/<DATA_SOURCE>/<CAMPAIGN_NAME>
For testing purposes, this function exceptionally accepts also a directory path simply ending with<CAMPAIGN_NAME>
(e.g.,/tmp/<CAMPAIGN_NAME>
).station_name (str) – The name of the station.
force (bool, optional) – If
True
, overwrite existing data in destination directories. IfFalse
, raise an error if data already exists in destination directories. Default isFalse
.verbose (bool, optional) – If
True
, print detailed processing information to the terminal. Default isTrue
.parallel (bool, optional) – If
True
, process the files simultaneously in multiple processes. The number of simultaneous processes can be customized using thedask.distributed.LocalCluster
. IfFalse
, process the files sequentially in a single process. Default isFalse
.debugging_mode (bool, optional) – If
True
, reduce the amount of data to process. Only the first 3 raw data files will be processed. Default isFalse
.