rainforest.qpe package¶
rainforest.qpe.evaluation
: module that deals with evaluation of QPE products
rainforest.qpe.qpe
: main module that computes RF QPE realizations
rainforest.qpe.qpe_compute
: command-line utility to compute RF QPE
rainforest.qpe.qpe_evaluation
: command-line utility to evaluate QPE products
rainforest.qpe.qpe_plot
: command-line utility to plot QPE products
rainforest.qpe.evaluation module¶
Main function to evaluate QPE runs with gauge data
Daniel Wolfensberger MeteoSwiss/EPFL daniel.wolfensberger@epfl.ch December 2019
-
rainforest.qpe.evaluation.
evaluation
(qpefolder, gaugepattern, list_models=None, outputfolder='./', t0=None, t1=None, bounds10=[0, 2, 10, 100], bounds60=[0, 1, 10, 100])¶ PErforms an evaluation of QPE products with reference gauge data
- Parameters
qpefolder (str) – Main directory where the QPE data is stored, each model corresponding to a subfolder, as given by qpe_compute.py
gaugepattern (str) – The pattern of gauge files that contain the gauge data. on CSCS: ‘/store/msrad/radar/radar_database/gauge/*.csv.gz’
t0 (datetime.datetime instance) – starting time of the time range, default is first timestep available
t1 (datetime.datetime instance) – end time of the time range, default is last timestep available
bounds10 (list of float) – list of precipitation bounds for which to compute scores separately at 10 min time resolution [0,2,10,100] will give scores in range [0-2], [2-10] and [10-100]
bounds60 (list of float) – list of precipitation bounds for which to compute scores separately at hourly time resolution [0,1,10,100] will give scores in range [0-1], [1-10] and [10-100]
list_models (list of str) – list of models to use in the evaluation, default is to use all subfolders (models) available in qpefolder
rainforest.qpe.qpe module¶
Main function to compute the randomForest QPE estimate
Daniel Wolfensberger MeteoSwiss/EPFL daniel.wolfensberger@epfl.ch December 2019
-
class
rainforest.qpe.qpe.
QPEProcessor
(config_file, models)¶ Bases:
object
Creates a QPEProcessor object which can be used to compute QPE realizations with the RandomForest Regressors
- Parameters
config (str) – A yaml file containing all necessary options for the QPE algorithm check the default_config.yml file to see which keys are required
models (dict) – A dictionary containing all RF models to use for prediction, keys in this dictionary are used to store outputs in separate folders whereas the values must be valid RF regressor instances as stored in the rf_models subfolder
-
compute
(output_folder, t0, t1, timestep=5, basename='RF%y%j%H%M')¶ Computes QPE values for a given time range and stores them in a folder, in a binary format
- Parameters
output_folder (str) – Folder where to store the computed QPE fields, note that subfolders for every model will be created in this folder
t0 (datetime) – Start time of the timerange in datetime format
t1 (datetime) – End time of the timerange in datetime format
timestep (int (optional)) – In case you don’t to generate a new product every 5 minute, you can change the time here, f.ex. 10 min, will compute the QPE only every two sets of radar scans
basename (str (optional)) – Pattern for the filenames, default is ‘RF%y%j%H%M’ which uses the same standard as other MeteoSwiss products (example RF191011055)
-
fetch_data
(t0, t1)¶ Retrieves and add new polar radar and status data to the QPEProcessor for a given time range
- Parameters
t0 (datetime) – Start time of the timerange in datetime format
t1 (datetime) – End time of the timerange in datetime format
rainforest.qpe.qpe_compute module¶
Command line script for the RandomForest QPE
see qpe_compute
-
rainforest.qpe.qpe_compute.
main
()¶
rainforest.qpe.qpe_evaluation module¶
Command line script to evaluate a set of QPE realizations using gauge data as reference
see qpe_evaluation
-
rainforest.qpe.qpe_evaluation.
main
()¶