libera_utils.metadata_writer#
Functions
|
Entry point for the Libera metadata writer CLI |
Parse command line arguments. |
|
|
Read the input L1 or L2 data file and return its contents as an xarray Dataset |
|
Write UMM-G metadata file for a Libera data product |
- libera_utils.metadata_writer.main() None#
Entry point for the Libera metadata writer CLI
Reads a Libera NetCDF data product file, generates UMM-G metadata from its contents, and writes the metadata file to the configured processing path
- libera_utils.metadata_writer.parse_cli_args()#
Parse command line arguments.
- Returns:
Parsed command line arguments containing the data file path and options
- Return type:
- libera_utils.metadata_writer.read_input_netcdf4_data_file(data_file_path: str | Path | S3Path) Dataset#
Read the input L1 or L2 data file and return its contents as an xarray Dataset
- Parameters:
data_file_path (str | Path | S3Path) – Path to the NetCDF Libera data product file to read
- Returns:
Contents of the data file as an xarray Dataset
- Return type:
xr.Dataset
- libera_utils.metadata_writer.write_data_product_metadata_ummg(dataset: Dataset, data_product_filename: LiberaDataProductFilename | str) CloudPath | Path#
Write UMM-G metadata file for a Libera data product
- Parameters:
dataset (xr.Dataset) – The xarray Dataset for which to create UMM-G metadata
data_product_filename (str) – Filename of the data product, used to derive the UMM-G metadata filename
- Returns:
Path to the written UMM-G metadata file.
- Return type:
PathType