mao_merge_45m.weather module#
- convert(path_csv: Union[Sequence[Path], Path], path_zarr: Optional[Path] = None, *, length_per_chunk: int = 1000000, overwrite: bool = False, progress: bool = False) Path [source]#
Convert a raw CSV file(s) to a formatted Zarr file.
This function will make a one-dimensional weather log outputs with time metadata derived from the raw CSV file.
- Parameters
path_csv (Union[Sequence[Path], Path]) – Path(s) of the raw CSV file(s).
path_zarr (Optional[Path]) – Path of the formatted Zarr file (optional).
length_per_chunk (int) – Length per chunk in the Zarr file.
overwrite (bool) – Whether to overwrite the formatted Zarr file if exists.
progress (bool) – Whether to show a progress bar.
- Returns
Path of the formatted Zarr file.
- Raises
FileExistsError – Raised if the formatted Zarr file exists and overwriting is not allowed (default).
- Return type
Path
Notes
The timezone of the Zarr file is not JST but UTC.