hydromt.model.components.GridComponent.write#
- GridComponent.write(filename: str | None = None, *, gdal_compliant: bool = False, rename_dims: bool = False, force_sn: bool = False, region_options: Dict[str, Any] | None = None, **kwargs) DeferedFileClose | None [source]#
Write model grid data to netcdf file at <root>/<fn>.
key-word arguments are passed to
write_nc()
- Parameters:
filename (
str
, optional) – filename relative to model root, by default ‘grid/grid.nc’gdal_compliant (
bool
, optional) – If True, write grid data in a way that is compatible with GDAL, by default Falserename_dims (
bool
, optional) – If True and gdal_compliant, rename x_dim and y_dim to standard names depending on the CRS (x/y for projected and lat/lon for geographic).force_sn (
bool
, optional) – If True and gdal_compliant, forces the dataset to have South -> North orientation.region_options (
dict
, optional) – Options to pass to the write_region method. Can contain filename, to_wgs84, and anything that will be passed to GeoDataFrame.to_file. If filename is not provided, self.region_filename will be used.**kwargs (
dict
) – Additional keyword arguments to be passed to the write_nc method.