paint.preprocessing.juelich_weather_converter

Classes

JuelichWeatherConverter

Initialize the weather converter.

Module Contents

class paint.preprocessing.juelich_weather_converter.JuelichWeatherConverter(input_root_dir: str, output_path: str, compression_method: str = 'gzip', compression_level: int = 5)

Initialize the weather converter.

Parameters

input_root_dirstr

The root directory to search for weather files.

output_pathstr

The output path to save the HDF5 file.

compression_methodstr

The method used to compress the HDF5 file.

compression_levelint

The compression level.

input_root_dir
output_path
files_list
compression_opts
find_weather_files() list[str]

Recursively find all weather.txt files in the directory.

Returns

list[str]

The list of weather.txt files to be concatenated.

concatenate_weather() pandas.DataFrame

Load all weather.txt files as a dataframe and return the concatenated dataframe.

Returns

pd.DataFrame

The concatenated dataframe.

merge_and_save_to_hdf5() pandas.DataFrame

Merge the weather files and save the merged data to HDF5.

Returns

pd.Dataframe

The metadata for the merged dataframe to be used for STAC creation.