Skip to content
Snippets Groups Projects
Commit cd8c2a7c authored by Oriol Tintó's avatar Oriol Tintó
Browse files

Update documentation

parent c55d3660
No related branches found
No related tags found
No related merge requests found
Pipeline #17048 canceled
numpydoc
sphinx_design
\ No newline at end of file
sphinx_design
sphinx_rtd_theme
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 512 498.93"><path d="M389.76 0c33.74 0 64.31 13.69 86.42 35.8C498.31 57.92 512 88.5 512 122.24c0 33.75-13.69 64.33-35.8 86.44-22.13 22.12-52.7 35.82-86.44 35.82-33.71 0-64.27-13.68-86.4-35.82-22.19-22.2-35.86-52.76-35.86-86.44 0-33.74 13.69-64.32 35.82-86.44C325.43 13.69 356.01 0 389.76 0zM127.13 93.07 45.4 179.44h81.73V93.07zM0 195.82c0-1.15.15-2.27.41-3.35.13-3.14 1.36-6.27 3.69-8.73L128.47 52.32c2.31-4.18 6.78-7.01 11.9-7.01h113.41c-4.87 8.6-8.97 17.7-12.16 27.2h-87.3v120.52c0 7.5-6.09 13.59-13.59 13.59H27.2v265.11h392.02V275.68c9.4-1.8 18.49-4.44 27.21-7.83V471.9c0 7.39-3.05 14.15-7.93 19.05-4.96 4.94-11.72 7.98-19.11 7.98H27.04c-7.43 0-14.21-3.06-19.09-7.94C3.07 486.1 0 479.32 0 471.9V195.82zm324.89 79.39c7.53 0 13.66 6.05 13.66 13.52s-6.13 13.52-13.66 13.52H121.54c-7.54 0-13.66-6.05-13.66-13.52s6.12-13.52 13.66-13.52h203.35zm0 91.23c7.53 0 13.66 6.05 13.66 13.52s-6.13 13.52-13.66 13.52H121.54c-7.54 0-13.66-6.05-13.66-13.52s6.12-13.52 13.66-13.52h203.35zM409 61.17c7.38 7.42 4.66 18.85-3.06 25.16-7.43 6-20.91 8.91-28.57 1.83-7.77-7.21-4.68-18.8 2.76-25.16 7.14-6.03 21.3-9.34 28.87-1.83zm-43.75 97.23h6.3v-41.18h-11.97c0-16.32 29.96-5.74 52.02-11.28v52.46h8.33v17.54h-54.68V158.4z"/></svg>
\ No newline at end of file
Welcome to Enstools-Encoding's documentation! |docsbadge|
=================================================
.. attention::
This package is a building block of `enstools-compression <https://github.com/wavestoweather/enstools-compression>`_.
The recomendation is to directly use **enstools-compression**.
The only purpose of splitting the package was to provide a way of using compression filters with **xarray** without adding too much dependencies.
It might be the main sound reason to use this package separately.
**enstools-encoding** is a minimal set of interfaces to convert a string compiling with a **Compression Specification Format**
to the arguments that are actually needed to write files compressed with **hdf5 filters** from **h5py**, **h5netcdf** or **xarray**.
......@@ -21,7 +31,7 @@ It has been developed within the framework of **Waves to Weather** [1]_.
:alt: Alternative text
:align: center
.. button-ref:: quick-start
.. button-ref:: quick-start/index
:expand:
:color: secondary
:click-parent:
......@@ -31,17 +41,17 @@ It has been developed within the framework of **Waves to Weather** [1]_.
.. grid-item-card::
:columns: 5
.. image:: ./images/icons/user_guide.svg
.. image:: ./images/icons/format.svg
:width: 50%
:alt: Alternative text
:align: center
.. button-ref:: user-guide
.. button-ref:: CompressionSpecificationFormat
:expand:
:color: secondary
:click-parent:
To the User Guide
Compression Specification Format
.. grid-item-card::
:columns: 5
......@@ -79,8 +89,8 @@ It has been developed within the framework of **Waves to Weather** [1]_.
:maxdepth: 1
:hidden:
quick-start.rst
user-guide.rst
quick-start/index.rst
CompressionSpecificationFormat.rst
api.rst
contribute.rst
......
Quickstart
==========
Basic Examples
==============
Using **lossy compression** with xarray can be as easy as adding a **single line** and an argument in the call to **.to_netcdf()** :
......@@ -12,18 +12,6 @@ Using **lossy compression** with xarray can be as easy as adding a **single line
dataset.to_netcdf(dummy_output_file, encoding=encoding, engine="h5netcdf")
...
Check below for more details on how to do it.
Installation using pip
----------------------
`pip` is the easiest way to install `enstools-encoding` along with all dependencies:
>>> pip install enstools-encoding
Examples
--------
Save an **xarray** dataset using losslessly compression:
......
Quick start
===========
This section contains instructions on **how to install the package** as well as how to perform the **first steps** with it.
.. grid:: 2
.. grid-item-card::
:columns: 5
.. image:: ../images/icons/installation.svg
:width: 50%
:alt: Alternative text
:align: center
+++
.. button-ref:: installation
:expand:
:color: secondary
:click-parent:
Installing the tool
.. grid-item-card::
:columns: 5
.. image:: ../images/icons/getting_started.svg
:width: 50%
:alt: Alternative text
:align: center
+++
.. button-ref:: basic_examples
:expand:
:color: secondary
:click-parent:
Basic examples
.. toctree::
:maxdepth: 1
:hidden:
installation.rst
basic_examples.rst
Installation
============
Python Package Index
--------------------
The easiest way of installing enstools is using **pip**:
>>> pip install enstools-compression
Dependencies
............
Besides the dependencies that are handled by **pip**, `GEOS`_ is required by **cartopy** which is a dependency
of **enstools**.
In **Ubuntu** it can be installed by doing:
>>> apt install libgeos-dev
Workaround for GEOS
...................
.. _GEOS: https://libgeos.org
In case the user has no root permissions and don't manage to install `GEOS`_ it is possible to install enstools
without cartopy. To do that:
1. Install enstools without its dependencies:
>>> pip install enstools --no-deps
2. Get list of missing dependencies and ignore **cartopy**:
>>> pip check | cut -d "," -f 1 | cut -d " " -f 4 | grep -v "cartopy" > pending_requirements.txt
3. Install the pending requirements:
>>> pip install -r pending_requirements.txt
4. Finally, install enstools-compression
>>> pip install enstools-compression
This will allow the installation of **enstools-compression** but it won't be possible to use enstools features that require
cartopy.
For development
---------------
A convenient way to install enstools for development is to make a local copy of the repository and install it as an
editable package:
>>> git clone https://github.com/wavestoweather/enstools-compression
>>> pip install -e enstools-compression/
User Guide
==========
.. toctree::
:maxdepth: 1
:hidden:
CompressionSpecificationFormat.rst
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment