roms_tools.InitialConditionsSource.save#
- InitialConditionsSource.save(filepath: str | Path, format: Literal['NETCDF4', 'NETCDF3_CLASSIC', 'NETCDF3_64BIT_OFFSET', 'NETCDF3_64BIT_DATA'] = 'NETCDF4', serialize_dask: bool | None = None) None#
Save the initial conditions information to one NetCDF file.
- Parameters:
filepath (Union[str, Path]) – The base path or filename where the dataset should be saved.
format ({"NETCDF4", "NETCDF3_CLASSIC", "NETCDF3_64BIT_OFFSET", "NETCDF3_64BIT_DATA"}, optional) – NetCDF file format. Defaults to
"NETCDF4".serialize_dask (bool, optional) – See
roms_tools.utils.save_datasets(). Defaults toNone, which resolves toFalse– the ordinary concurrent write under the ambient dask scheduler. PassTrueto force the serialized, one-task-at-a-time write instead: a manual tool for low-memory machines (it bounds peak memory to a single chunk’s footprint, which plain dask’s threaded scheduler cannot guarantee) and for troubleshooting scheduler-dependent failures.
- Returns:
Path – A Path object representing the location of the saved file.