roms_tools.BoundaryForcing.save#
- BoundaryForcing.save(filepath: str | Path, group: bool = True, format: Literal['NETCDF4', 'NETCDF3_CLASSIC', 'NETCDF3_64BIT_OFFSET', 'NETCDF3_64BIT_DATA'] = 'NETCDF4') None#
Save the boundary forcing fields to one or more NetCDF files.
This method saves the dataset to disk as either a single NetCDF file or multiple files, depending on the group parameter. If group is True, the dataset is divided into subsets (e.g., monthly or yearly) based on the temporal frequency of the data, and each subset is saved to a separate file.
- Parameters:
filepath (Union[str, Path]) – The base path and filename for the output file(s). If group is True, the filenames will include additional time-based information (e.g., year or month) to distinguish the subsets.
group (bool, optional) – Whether to divide the dataset into multiple files based on temporal frequency. Defaults to True.
format ({"NETCDF4", "NETCDF3_CLASSIC", "NETCDF3_64BIT_OFFSET", "NETCDF3_64BIT_DATA"}, optional) – NetCDF file format. Defaults to
"NETCDF4".
- Returns:
List[Path] – A list of Path objects for the filenames that were saved.