From 75a3d40fb65af95e50dd8f999614b894ac2f91ca Mon Sep 17 00:00:00 2001 From: ro Date: Fri, 28 May 2021 09:53:58 +0200 Subject: [PATCH 1/2] doc: closes some gh issues related to documentation closes: - #1293 - #990 - #1120 --- doc/source/quickstart.rst | 2 +- satpy/resample.py | 12 ++++++------ satpy/writers/cf_writer.py | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/source/quickstart.rst b/doc/source/quickstart.rst index afe46ac3e0..1313a77930 100644 --- a/doc/source/quickstart.rst +++ b/doc/source/quickstart.rst @@ -154,7 +154,7 @@ To visualize loaded data in a pop-up window: >>> global_scene.show(0.6) Alternatively if working in a Jupyter notebook the scene can be converted to -a `geoviews `_ object using the +a `geoviews `_ object using the :meth:`~satpy.scene.Scene.to_geoviews` method. The geoviews package is not a requirement of the base satpy install so in order to use this feature the user needs to install the geoviews package himself. diff --git a/satpy/resample.py b/satpy/resample.py index 6c4881ed94..21d4003c57 100644 --- a/satpy/resample.py +++ b/satpy/resample.py @@ -119,13 +119,13 @@ Store area definitions ---------------------- -Area definitions can be added to a custom YAML file (see -`pyresample's documentation `_ -for more information) -and loaded using pyresample's utility methods:: +Area definitions can be saved to a custom YAML file (see +`pyresample's writing to disk `_) +and loaded using pyresample's utility methods +(`pyresample's loading from disk `_):: - >>> from pyresample.utils import parse_area_file - >>> my_area = parse_area_file('my_areas.yaml', 'my_area')[0] + >>> from pyresample import load_area + >>> my_area = load_area('my_areas.yaml', 'my_area') Examples coming soon... diff --git a/satpy/writers/cf_writer.py b/satpy/writers/cf_writer.py index 8d388ae91c..ee648758d6 100644 --- a/satpy/writers/cf_writer.py +++ b/satpy/writers/cf_writer.py @@ -35,7 +35,7 @@ * For datasets with area definition you can exclude lat/lon coordinates by setting ``include_lonlats=False``. * By default the dataset name is prepended to non-dimensional coordinates such as scanline timestamps. This ensures maximum consistency, i.e. the netCDF variable names are independent of the number/set of datasets to be written. - If a non-dimensional coordinate is identical for + If a non-dimensional coordinate is unique among all datasets and ``pretty=True``, its name will not be modified. * Some dataset names start with a digit, like AVHRR channels 1, 2, 3a, 3b, 4 and 5. This doesn't comply with CF https://cfconventions.org/Data/cf-conventions/cf-conventions-1.7/build/ch02s03.html. These channels are prefixed with `CHANNEL_` by default. This can be controlled with the variable `numeric_name_prefix` to `save_datasets`. From cf4d6561dff0b4a41060de526fa376805d1a5852 Mon Sep 17 00:00:00 2001 From: ro Date: Fri, 28 May 2021 14:26:56 +0200 Subject: [PATCH 2/2] doc: fix cf writer default engine --- satpy/writers/cf_writer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/satpy/writers/cf_writer.py b/satpy/writers/cf_writer.py index ee648758d6..286330808e 100644 --- a/satpy/writers/cf_writer.py +++ b/satpy/writers/cf_writer.py @@ -31,7 +31,8 @@ >>> scn.save_datasets(writer='cf', datasets=['VIS006', 'IR_108'], filename='seviri_test.nc', exclude_attrs=['raw_metadata']) -* You can select the netCDF backend using the ``engine`` keyword argument. Default is ``h5netcdf``. +* You can select the netCDF backend using the ``engine`` keyword argument. If `None` if follows + :meth:`~xarray.Dataset.to_netcdf` engine choices with a preference for 'netcdf4'. * For datasets with area definition you can exclude lat/lon coordinates by setting ``include_lonlats=False``. * By default the dataset name is prepended to non-dimensional coordinates such as scanline timestamps. This ensures maximum consistency, i.e. the netCDF variable names are independent of the number/set of datasets to be written.