From 83f92ac3d6356731e99bdc50261ce3f515d64130 Mon Sep 17 00:00:00 2001 From: dcherian Date: Thu, 7 Mar 2019 14:04:23 -0800 Subject: [PATCH] Note open_dataset, mfdataset open files as read-only (closes #2345). --- xarray/backends/api.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xarray/backends/api.py b/xarray/backends/api.py index 61efcfdedf2..36baa9071c0 100644 --- a/xarray/backends/api.py +++ b/xarray/backends/api.py @@ -247,6 +247,13 @@ def open_dataset(filename_or_obj, group=None, decode_cf=True, dataset : Dataset The newly created dataset. + Notes + ----- + ``open_dataset`` opens the file with read-only access. When you modify + values of a Dataset, even one linked to files on disk, only the in-memory + copy you are manipulating in xarray is modified: the original file on disk + is never touched. + See Also -------- open_mfdataset @@ -597,6 +604,13 @@ def open_mfdataset(paths, chunks=None, concat_dim=_CONCAT_DIM_DEFAULT, ------- xarray.Dataset + Notes + ----- + ``open_mfdataset`` opens files with read-only access. When you modify values + of a Dataset, even one linked to files on disk, only the in-memory copy you + are manipulating in xarray is modified: the original file on disk is never + touched. + See Also -------- auto_combine