1.5.1.1.11.1.5. polar2grid.writers.hdf5 module¶
The HDF5 writer creates HDF5 files with groups for each gridded area.
All selected products are in one file. Products are subgrouped together under a parent HDF5 data group based on the data product projection/remapping (parent projection group). Each parent projection group contains attributes describing the projection. Product subgroups contain attributes of the data including timestamps, sensor and platform information. See the command line arguments for HDF5 compression options, the flag to include longitude and latitude data in the file, instructions for output-filename patterns, and product selection.
- class polar2grid.writers.hdf5.FakeHDF5(output_filename: str, var_name: str)[source]¶
Bases:
object
Use fake hdf class to create targets for da.store and delayed sources.
- class polar2grid.writers.hdf5.HDF5Writer(**kwargs)[source]¶
Bases:
Writer
Writer for HDF5 files.
- _save_data_arrays_and_area(area, data_arrs, filename, HDF5_fh, dtype, append, compression, add_geolocation)[source]¶
- static create_proj_group(filename: str, parent: TextIO, area_def)[source]¶
Create the top level group from projection information.
- static create_variable(hdf_fh, hdf_subgroup: str, data_arr: DataArray, dtype: dtype, compression: bool)[source]¶
Create a HDF5 data variable and attributes for the variable.
- iter_by_area(datasets: list[DataArray])[source]¶
Generate datasets grouped by Area.
- Parameters:
datasets (list[xr.DataArray]) – A list of dataArray objects stored in Scene.
- Returns:
a dictionary of {AreaDef: list[xr.DataArray]}
- Return type:
dictionary
- static open_HDF5_filehandle(output_filename: str, append: bool = True)[source]¶
Open a HDF5 file handle.