Preprocess
Preprocessing
Era5_pre_rh
A class to process ERA5 hourly data to compute relative humidity
Attributes:
Name | Type | Description |
---|---|---|
product_path |
str
|
Path to the product folder where the product files are located |
output_path |
str
|
Path to the output folder where the output files will be located |
product_files |
list
|
List of product files in the product folder |
processed_files |
list
|
List of processed files |
Source code in hidrocl/preprocess/__init__.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|
__init__(product_path, output_path)
Examples:
>>> from hidrocl import Era5_pre_rh
>>>
Parameters:
Name | Type | Description | Default |
---|---|---|---|
product_path |
str
|
Path to the product folder where the product files are located |
required |
output_path |
str
|
Path to the output folder where the output files will be located |
required |
Raises:
Type | Description |
---|---|
# TypeError
|
If z is not HidroCLVariable object |
Source code in hidrocl/preprocess/__init__.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
|
run_extraction()
Run the extraction of the product.
Returns:
Name | Type | Description |
---|---|---|
str |
Source code in hidrocl/preprocess/__init__.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|
HiddenPrints
Context manager to suppress stdout and stderr.
Source code in hidrocl/preprocess/__init__.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
compute_rh(file, output_file)
Compute relative humidity from ERA5 2m temperature and 2m dew point temperature
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file |
xarray.Dataset
|
required | |
output_file |
str
|
required |
Source code in hidrocl/preprocess/__init__.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
|
read_era5_files(productpath)
Read remote sensing/modeling product files
Parameters:
Name | Type | Description | Default |
---|---|---|---|
productpath |
str
|
Path to the product folder where the product files are located |
required |
Returns:
Name | Type | Description |
---|---|---|
list | List of product files in the product folder |
Source code in hidrocl/preprocess/__init__.py
25 26 27 28 29 30 31 32 33 34 35 36 |
|