pyhomogenize


Namepyhomogenize JSON
Version 0.6.1 PyPI version JSON
download
home_pagehttps://github.com/ludwiglierhammer/pyhomogenize
SummaryTool to homogenize netCDF files to CF standard
upload_time2023-10-04 15:36:52
maintainer
docs_urlNone
authorLudwig Lierhammer
requires_python>=3.9
licenseMIT license
keywords pyhomogenize
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            ====================================================
Homogenize NetCDF files to CF standard: pyhomogenize
====================================================

+----------------------------+-----------------------------------------------------+
| Versions                   | |pypi|                                              |
+----------------------------+-----------------------------------------------------+
| Documentation and Support  | |docs| |versions|                                   |
+----------------------------+-----------------------------------------------------+
| Open Source                | |license| |zenodo|                                  |
+----------------------------+-----------------------------------------------------+
| Coding Standards           | |black| |pre-commit|                                |
+----------------------------+-----------------------------------------------------+
| Development Status         | |status| |build| |coveralls|                        |
+----------------------------+-----------------------------------------------------+

Tool to homogenize netCDF to CF standard files using xarray

See https://cfconventions.org

Documentation
-------------
The official documentation is at https://pyhomogenize.readthedocs.io/

Features
--------

* some useful functions to read and write large netCDF files

* basics: This class creates a fixed frequency CFTimeIndex from user-given start and end dates.
  You can manipulate the CFTimeIndex and crop it to user-specific conditions.

* netcdf_basics: This class opens one or multiple netCDF files by calling the class.
  You can manipulate the netCDF attributes and write it to a new file.

* time_control: This class is a time checker for NetCDF files following CF Metadata Conventions.
  It is based on pyhomogenize's netcdf_basics class. Thus it opens the netCDF files by calling the class.

* time_compare: This class compares the time axes of list entires of multiple xr.datasets, netCDF files and/or time_control objects.


Installation
------------
You can install the package directly with pip:

.. code-block:: console

     pip install pyhomogenize

If you want to contribute, I recommend cloning the repository and installing the package in development mode, e.g.

.. code-block:: console

    git clone https://github.com/ludwiglierhammer/pyhomogenize.git
    cd pyhomogenize
    pip install -e .

This will install the package but you can still edit it and you don't need the package in your :code:`PYTHONPATH`

Requirements
------------

* python3.6 or higher

* cftime

* dask

* iteration_utilities

* xarray

Contact
-------
In cases of any problems, needs or wishes do not hesitate to contact:

ludwig.lierhammer@hereon.de

Credits
-------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage

.. |pypi| image:: https://img.shields.io/pypi/v/pyhomogenize.svg
        :target: https://pypi.python.org/pypi/pyhomogenize
        :alt: Python Package Index Build

.. |docs| image:: https://readthedocs.org/projects/pyhomogenize/badge/?version=latest
        :target: https://pyhomogenize.readthedocs.io/en/latest/?version=latest
        :alt: Documentation Status

.. |versions| image:: https://img.shields.io/pypi/pyversions/pyhomogenize.svg
        :target: https://pypi.python.org/pypi/pyhomogenize
        :alt: Supported Python Versions

.. |license| image:: https://img.shields.io/github/license/ludwiglierhammer/pyhomogenize.svg
        :target: https://github.com/ludwiglierhammer/pyhomogenize/blob/master/LICENSE
        :alt: License

.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
        :target: https://github.com/psf/black
        :alt: Python Black

.. |pre-commit| image:: https://results.pre-commit.ci/badge/github/ludwiglierhammer/pyhomogenize/main.svg
   :target: https://results.pre-commit.ci/latest/github/ludwiglierhammer/pyhomogenize/main
   :alt: pre-commit.ci status

.. |status| image:: https://www.repostatus.org/badges/latest/active.svg
        :target: https://www.repostatus.org/#active
        :alt: Project Status: Active – The project has reached a stable, usable state and is being actively developed.

.. |build| image:: https://github.com/ludwiglierhammer/pyhomogenize/actions/workflows/ci.yml/badge.svg
        :target: https://github.com/ludwiglierhammer/pyhomogenize/actions/workflows/ci.yml
        :alt: Build Status

.. |coveralls| image:: https://codecov.io/gh/ludwiglierhammer/pyhomogenize/branch/main/graph/badge.svg
        :target: https://codecov.io/gh/ludwiglierhammer/pyhomogenize
        :alt: Coveralls

.. |zenodo| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.7762681.svg
        :target: https://doi.org/10.5281/zenodo.7762681
        :alt: DOI


=======
History
=======

0.1.0 (2020-11-12)
------------------

* First release on PyPI.

0.1.1 (2022-06-24)
------------------

* Fixed bug in setup.py version number

0.1.2 (2022-06-24)
------------------

* pre-commit.ci bug fixed

0.1.3 (2022-06-24)
------------------

* Read version number from __init__

0.1.4 (2022-06-24)
------------------

* Expand HISTORY.rst

0.2.0 (2022-06-30)
------------------

* Outsource useful functions for reading and writing large netCDF files.
* Use those functiosn directly from pyhomogenize.
* Calling pyhomogenize classes is not needed.

0.2.1 (2022-07-01)
------------------

* rename save_to_netcdf to save_xrdataset
* write input files to ds attributes

0.2.2 (2022-07-05)
------------------

* create chunks if not already existing

0.2.3 (2022-07-11)
------------------

* write CF variables to dataset while calling open_xrdataset

0.2.4 (2022-07-12)
------------------

* add data via pip install

0.2.5 (2023-01-04)
------------------

* precise mid of time range
* add more dependencies (cftime, netcdf4, h5netcdf)

0.2.6 (2023-01-24)
------------------

* add `decode_times` and `combine` as keyword argumnets to `open_xrdataset`
* set default value of parallel in `open_xrdataset` to False

0.2.7 (2023-02-03)
------------------

* save_xrdataset is now working if Dataset does not include `time`

0.2.8 (2023-02-13)
------------------

* convert time axis to CFTimeIndex

0.2.9 (2023-02-16)
------------------

* set proleptic_gregorian to standard calendar

0.3.0 (2023-02-22)
------------------

* calculate time_bnds and add them to dataset

0.3.1 (2023-03-16)
------------------

* get CF_variables

0.3.2 (2023-03-22)
------------------

* read and write data with length of time axis is 1
* add time bounds with length of time axis is 1
* drop coordinates from non CF variables

0.3.3 (2023-03-23)
------------------

* testing for python version 3.8, 3.9 and 3.10

0.4.0 (2023-03-23)
------------------

* published on zenodo

0.5.0 (2023-06-13)
------------------

* add time bounds if length of time axis is 1
* convert np.datetime64 object to CFTimeIndex

0.5.1 (2023-06-14
-----------------

* fixing v0.5.1

0.5.2 (2023-06-30)
------------------

* convert time axis to cftime.datetime object
* `open_xrdataset`: set decode_cf to parameters

0.5.3 (2023-07-19)
------------------

* some restructuring in _convert_time

0.5.4 (2023-08-02)
------------------

* use unlimied_dims only if dimension name in ds.coords when saving dataset as netcdf file

0.6.0 (2023-09-14)
------------------

* remove `Sphinx` from `requirements_dev.txt`
* new frequency `time2`: `YY1-07-01` - `YY2-06-30`
* convert time_ranges to `CFTimeIndex`
* make time_control more flexible
* new frequency: `yearAC` (yyyy1-07-01 to yyyy2-06-30)
* new_frequency: `yearHydro` (yyyy1-09-01 to yyyy2-08-31)

0.6.1 (2023-10-04)
-------------------

* add time bounds for daily data
* testing python versions 3.9 to 3.11

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ludwiglierhammer/pyhomogenize",
    "name": "pyhomogenize",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "pyhomogenize",
    "author": "Ludwig Lierhammer",
    "author_email": "ludwig.lierhammer@hereon.de",
    "download_url": "https://files.pythonhosted.org/packages/da/2c/b09e796ad204b450905541da10240050278b5d2b22e567e8cf0dab1a97c4/pyhomogenize-0.6.1.tar.gz",
    "platform": null,
    "description": "====================================================\nHomogenize NetCDF files to CF standard: pyhomogenize\n====================================================\n\n+----------------------------+-----------------------------------------------------+\n| Versions                   | |pypi|                                              |\n+----------------------------+-----------------------------------------------------+\n| Documentation and Support  | |docs| |versions|                                   |\n+----------------------------+-----------------------------------------------------+\n| Open Source                | |license| |zenodo|                                  |\n+----------------------------+-----------------------------------------------------+\n| Coding Standards           | |black| |pre-commit|                                |\n+----------------------------+-----------------------------------------------------+\n| Development Status         | |status| |build| |coveralls|                        |\n+----------------------------+-----------------------------------------------------+\n\nTool to homogenize netCDF to CF standard files using xarray\n\nSee https://cfconventions.org\n\nDocumentation\n-------------\nThe official documentation is at https://pyhomogenize.readthedocs.io/\n\nFeatures\n--------\n\n* some useful functions to read and write large netCDF files\n\n* basics: This class creates a fixed frequency CFTimeIndex from user-given start and end dates.\n  You can manipulate the CFTimeIndex and crop it to user-specific conditions.\n\n* netcdf_basics: This class opens one or multiple netCDF files by calling the class.\n  You can manipulate the netCDF attributes and write it to a new file.\n\n* time_control: This class is a time checker for NetCDF files following CF Metadata Conventions.\n  It is based on pyhomogenize's netcdf_basics class. Thus it opens the netCDF files by calling the class.\n\n* time_compare: This class compares the time axes of list entires of multiple xr.datasets, netCDF files and/or time_control objects.\n\n\nInstallation\n------------\nYou can install the package directly with pip:\n\n.. code-block:: console\n\n     pip install pyhomogenize\n\nIf you want to contribute, I recommend cloning the repository and installing the package in development mode, e.g.\n\n.. code-block:: console\n\n    git clone https://github.com/ludwiglierhammer/pyhomogenize.git\n    cd pyhomogenize\n    pip install -e .\n\nThis will install the package but you can still edit it and you don't need the package in your :code:`PYTHONPATH`\n\nRequirements\n------------\n\n* python3.6 or higher\n\n* cftime\n\n* dask\n\n* iteration_utilities\n\n* xarray\n\nContact\n-------\nIn cases of any problems, needs or wishes do not hesitate to contact:\n\nludwig.lierhammer@hereon.de\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n.. |pypi| image:: https://img.shields.io/pypi/v/pyhomogenize.svg\n        :target: https://pypi.python.org/pypi/pyhomogenize\n        :alt: Python Package Index Build\n\n.. |docs| image:: https://readthedocs.org/projects/pyhomogenize/badge/?version=latest\n        :target: https://pyhomogenize.readthedocs.io/en/latest/?version=latest\n        :alt: Documentation Status\n\n.. |versions| image:: https://img.shields.io/pypi/pyversions/pyhomogenize.svg\n        :target: https://pypi.python.org/pypi/pyhomogenize\n        :alt: Supported Python Versions\n\n.. |license| image:: https://img.shields.io/github/license/ludwiglierhammer/pyhomogenize.svg\n        :target: https://github.com/ludwiglierhammer/pyhomogenize/blob/master/LICENSE\n        :alt: License\n\n.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n        :target: https://github.com/psf/black\n        :alt: Python Black\n\n.. |pre-commit| image:: https://results.pre-commit.ci/badge/github/ludwiglierhammer/pyhomogenize/main.svg\n   :target: https://results.pre-commit.ci/latest/github/ludwiglierhammer/pyhomogenize/main\n   :alt: pre-commit.ci status\n\n.. |status| image:: https://www.repostatus.org/badges/latest/active.svg\n        :target: https://www.repostatus.org/#active\n        :alt: Project Status: Active \u2013 The project has reached a stable, usable state and is being actively developed.\n\n.. |build| image:: https://github.com/ludwiglierhammer/pyhomogenize/actions/workflows/ci.yml/badge.svg\n        :target: https://github.com/ludwiglierhammer/pyhomogenize/actions/workflows/ci.yml\n        :alt: Build Status\n\n.. |coveralls| image:: https://codecov.io/gh/ludwiglierhammer/pyhomogenize/branch/main/graph/badge.svg\n        :target: https://codecov.io/gh/ludwiglierhammer/pyhomogenize\n        :alt: Coveralls\n\n.. |zenodo| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.7762681.svg\n        :target: https://doi.org/10.5281/zenodo.7762681\n        :alt: DOI\n\n\n=======\nHistory\n=======\n\n0.1.0 (2020-11-12)\n------------------\n\n* First release on PyPI.\n\n0.1.1 (2022-06-24)\n------------------\n\n* Fixed bug in setup.py version number\n\n0.1.2 (2022-06-24)\n------------------\n\n* pre-commit.ci bug fixed\n\n0.1.3 (2022-06-24)\n------------------\n\n* Read version number from __init__\n\n0.1.4 (2022-06-24)\n------------------\n\n* Expand HISTORY.rst\n\n0.2.0 (2022-06-30)\n------------------\n\n* Outsource useful functions for reading and writing large netCDF files.\n* Use those functiosn directly from pyhomogenize.\n* Calling pyhomogenize classes is not needed.\n\n0.2.1 (2022-07-01)\n------------------\n\n* rename save_to_netcdf to save_xrdataset\n* write input files to ds attributes\n\n0.2.2 (2022-07-05)\n------------------\n\n* create chunks if not already existing\n\n0.2.3 (2022-07-11)\n------------------\n\n* write CF variables to dataset while calling open_xrdataset\n\n0.2.4 (2022-07-12)\n------------------\n\n* add data via pip install\n\n0.2.5 (2023-01-04)\n------------------\n\n* precise mid of time range\n* add more dependencies (cftime, netcdf4, h5netcdf)\n\n0.2.6 (2023-01-24)\n------------------\n\n* add `decode_times` and `combine` as keyword argumnets to `open_xrdataset`\n* set default value of parallel in `open_xrdataset` to False\n\n0.2.7 (2023-02-03)\n------------------\n\n* save_xrdataset is now working if Dataset does not include `time`\n\n0.2.8 (2023-02-13)\n------------------\n\n* convert time axis to CFTimeIndex\n\n0.2.9 (2023-02-16)\n------------------\n\n* set proleptic_gregorian to standard calendar\n\n0.3.0 (2023-02-22)\n------------------\n\n* calculate time_bnds and add them to dataset\n\n0.3.1 (2023-03-16)\n------------------\n\n* get CF_variables\n\n0.3.2 (2023-03-22)\n------------------\n\n* read and write data with length of time axis is 1\n* add time bounds with length of time axis is 1\n* drop coordinates from non CF variables\n\n0.3.3 (2023-03-23)\n------------------\n\n* testing for python version 3.8, 3.9 and 3.10\n\n0.4.0 (2023-03-23)\n------------------\n\n* published on zenodo\n\n0.5.0 (2023-06-13)\n------------------\n\n* add time bounds if length of time axis is 1\n* convert np.datetime64 object to CFTimeIndex\n\n0.5.1 (2023-06-14\n-----------------\n\n* fixing v0.5.1\n\n0.5.2 (2023-06-30)\n------------------\n\n* convert time axis to cftime.datetime object\n* `open_xrdataset`: set decode_cf to parameters\n\n0.5.3 (2023-07-19)\n------------------\n\n* some restructuring in _convert_time\n\n0.5.4 (2023-08-02)\n------------------\n\n* use unlimied_dims only if dimension name in ds.coords when saving dataset as netcdf file\n\n0.6.0 (2023-09-14)\n------------------\n\n* remove `Sphinx` from `requirements_dev.txt`\n* new frequency `time2`: `YY1-07-01` - `YY2-06-30`\n* convert time_ranges to `CFTimeIndex`\n* make time_control more flexible\n* new frequency: `yearAC` (yyyy1-07-01 to yyyy2-06-30)\n* new_frequency: `yearHydro` (yyyy1-09-01 to yyyy2-08-31)\n\n0.6.1 (2023-10-04)\n-------------------\n\n* add time bounds for daily data\n* testing python versions 3.9 to 3.11\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "Tool to homogenize netCDF files to CF standard",
    "version": "0.6.1",
    "project_urls": {
        "Homepage": "https://github.com/ludwiglierhammer/pyhomogenize"
    },
    "split_keywords": [
        "pyhomogenize"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fd7666d7797fe139ee323ab392c73a04d26cb3d9582be813be58c8da50f11b6d",
                "md5": "a98ff68738f46aadc442f6767af6b284",
                "sha256": "fd6d4c861439a07d0d4ee642fabf9ba41de87380408a824caf6751954b3f4463"
            },
            "downloads": -1,
            "filename": "pyhomogenize-0.6.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a98ff68738f46aadc442f6767af6b284",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 34720520,
            "upload_time": "2023-10-04T15:36:47",
            "upload_time_iso_8601": "2023-10-04T15:36:47.400145Z",
            "url": "https://files.pythonhosted.org/packages/fd/76/66d7797fe139ee323ab392c73a04d26cb3d9582be813be58c8da50f11b6d/pyhomogenize-0.6.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "da2cb09e796ad204b450905541da10240050278b5d2b22e567e8cf0dab1a97c4",
                "md5": "a662d89a537172216c57987447bfa107",
                "sha256": "5f5a2afe31949a8e08a8438c24c56582d2f9beb8f9e98fede5eb5f7545e108ff"
            },
            "downloads": -1,
            "filename": "pyhomogenize-0.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a662d89a537172216c57987447bfa107",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 34649187,
            "upload_time": "2023-10-04T15:36:52",
            "upload_time_iso_8601": "2023-10-04T15:36:52.239458Z",
            "url": "https://files.pythonhosted.org/packages/da/2c/b09e796ad204b450905541da10240050278b5d2b22e567e8cf0dab1a97c4/pyhomogenize-0.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-04 15:36:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ludwiglierhammer",
    "github_project": "pyhomogenize",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "pyhomogenize"
}
        
Elapsed time: 4.24872s