ncCompare


NamencCompare JSON
Version 0.2.4 PyPI version JSON
download
home_pageNone
SummarynetCDF Comparison Tool
upload_time2024-09-30 14:14:45
maintainerNone
docs_urlNone
authorAntonio Mariani
requires_python<4.0,>=3.10
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # netCDF Diff Comparison tool - ncpare

`ncpare` is a tool for comparing netCDF files, providing a detailed diff of their contents. It is designed to help users
identify differences between datasets stored in netCDF format.

![Python](https://img.shields.io/badge/Python->3.10-blue.svg)
[![Anaconda](https://img.shields.io/badge/conda->22.11.1-green.svg)](https://anaconda.org/)
[![Pip](https://img.shields.io/badge/pip->19.0.3-brown.svg)](https://pypi.org/project/pip/)
[![netcdf4](https://img.shields.io/badge/netcdf4-1.7.1.post1-brown.svg)](https://pypi.org/project/pip/)
[![xarray](https://img.shields.io/badge/xarray-2024.6.0-brown.svg)](https://pypi.org/project/pip/)
[![rich](https://img.shields.io/badge/rich-13.7.1-brown.svg)](https://github.com/Textualize/rich?tab=readme-ov-file)
![Tests](https://img.shields.io/badge/coverage-0%25-red)

![Output](https://github.com/anto6715/ncCompare/raw/master/docs/output.png)

## Installation

### Via PIP

```shell
pip install nccompare
```

## Usage

```shell
ncpare [-h] [-f--filter FILTER_NAME] [--common_pattern COMMON_PATTERN] [--variables VARIABLES [VARIABLES ...]] [--last_time_step] [-V] folder1 folder2

netCDF Comparison Tool

positional arguments:
  folder1               Path of first folder to compare
  folder2               Path of second folder to compare

options:
  -h, --help            show this help message and exit
  -f--filter FILTER_NAME
                        Filter to select files to compare. Examples: *.nc, *_grid_*
  --common_pattern COMMON_PATTERN
                        Common file pattern in two files to compareEs mfsX_date.nc and expX_date.nc -> date.nc is the common part
  -v, --variables VARIABLES [VARIABLES ...]
                        Variable to compare
  --last_time_step      If True, compare only the last time step available in each file
  -V, --version         Print version and exit

```

### Select Variables

It is possible to choose which parameter to compare:

```shell
ncpare folder1 folder2 -v "votemper" "vosaline"
```

![Variables](https://github.com/anto6715/ncCompare/raw/master/docs/variables.png)


### Filter files

As default **ncpare** read iterate over all files in **folder1** and expect to find them in **folder2**. Using filters,
it is possible to select only a subset of input files. For example:

```shell
ncpare folder1 folder2 -f "*_grid_T.nc"
```

### Compare files with different filenames

It is possible to compare two files also if the filenames are slightly different if they have a common pattern.
For example, if we have:

* `a/my-simu_19820101_grid_T.nc`
* `b/another-exp_19820101_grid_T.nc`

It is still possible to compare the file with:
```shell
ncpare folder1 folder2 --commom-pattern ".+_19820101_grid_T.nc"
```

Notice the regex syntax `.+` to match any pattern before `_19820101`

## Author

- Antonio Mariani (antonio.mariani@cmcc.it)

## Contributing
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

## Contact
For any questions or suggestions, please open an issue on the project's GitHub repository.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ncCompare",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "Antonio Mariani",
    "author_email": "antonio.mariani@cmcc.it",
    "download_url": "https://files.pythonhosted.org/packages/5e/28/048ee59db2482c7c268b5cc4af44b0bffb78b8bcd11bb53fb3cee8e84000/nccompare-0.2.4.tar.gz",
    "platform": null,
    "description": "# netCDF Diff Comparison tool - ncpare\n\n`ncpare` is a tool for comparing netCDF files, providing a detailed diff of their contents. It is designed to help users\nidentify differences between datasets stored in netCDF format.\n\n![Python](https://img.shields.io/badge/Python->3.10-blue.svg)\n[![Anaconda](https://img.shields.io/badge/conda->22.11.1-green.svg)](https://anaconda.org/)\n[![Pip](https://img.shields.io/badge/pip->19.0.3-brown.svg)](https://pypi.org/project/pip/)\n[![netcdf4](https://img.shields.io/badge/netcdf4-1.7.1.post1-brown.svg)](https://pypi.org/project/pip/)\n[![xarray](https://img.shields.io/badge/xarray-2024.6.0-brown.svg)](https://pypi.org/project/pip/)\n[![rich](https://img.shields.io/badge/rich-13.7.1-brown.svg)](https://github.com/Textualize/rich?tab=readme-ov-file)\n![Tests](https://img.shields.io/badge/coverage-0%25-red)\n\n![Output](https://github.com/anto6715/ncCompare/raw/master/docs/output.png)\n\n## Installation\n\n### Via PIP\n\n```shell\npip install nccompare\n```\n\n## Usage\n\n```shell\nncpare [-h] [-f--filter FILTER_NAME] [--common_pattern COMMON_PATTERN] [--variables VARIABLES [VARIABLES ...]] [--last_time_step] [-V] folder1 folder2\n\nnetCDF Comparison Tool\n\npositional arguments:\n  folder1               Path of first folder to compare\n  folder2               Path of second folder to compare\n\noptions:\n  -h, --help            show this help message and exit\n  -f--filter FILTER_NAME\n                        Filter to select files to compare. Examples: *.nc, *_grid_*\n  --common_pattern COMMON_PATTERN\n                        Common file pattern in two files to compareEs mfsX_date.nc and expX_date.nc -> date.nc is the common part\n  -v, --variables VARIABLES [VARIABLES ...]\n                        Variable to compare\n  --last_time_step      If True, compare only the last time step available in each file\n  -V, --version         Print version and exit\n\n```\n\n### Select Variables\n\nIt is possible to choose which parameter to compare:\n\n```shell\nncpare folder1 folder2 -v \"votemper\" \"vosaline\"\n```\n\n![Variables](https://github.com/anto6715/ncCompare/raw/master/docs/variables.png)\n\n\n### Filter files\n\nAs default **ncpare** read iterate over all files in **folder1** and expect to find them in **folder2**. Using filters,\nit is possible to select only a subset of input files. For example:\n\n```shell\nncpare folder1 folder2 -f \"*_grid_T.nc\"\n```\n\n### Compare files with different filenames\n\nIt is possible to compare two files also if the filenames are slightly different if they have a common pattern.\nFor example, if we have:\n\n* `a/my-simu_19820101_grid_T.nc`\n* `b/another-exp_19820101_grid_T.nc`\n\nIt is still possible to compare the file with:\n```shell\nncpare folder1 folder2 --commom-pattern \".+_19820101_grid_T.nc\"\n```\n\nNotice the regex syntax `.+` to match any pattern before `_19820101`\n\n## Author\n\n- Antonio Mariani (antonio.mariani@cmcc.it)\n\n## Contributing\nContributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.\n\n## Contact\nFor any questions or suggestions, please open an issue on the project's GitHub repository.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "netCDF Comparison Tool",
    "version": "0.2.4",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "beaf5e2a1d14cadcf56f5a6c11756303ba0426f48a5ca665545c0a8bc600ea3a",
                "md5": "36205ff1c23c423b7f5496ef37dfb4ff",
                "sha256": "0ffa77cfa043ce706c1accd3cec671c7887ae09868bfc28af462db09de765f3f"
            },
            "downloads": -1,
            "filename": "nccompare-0.2.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "36205ff1c23c423b7f5496ef37dfb4ff",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 14140,
            "upload_time": "2024-09-30T14:14:44",
            "upload_time_iso_8601": "2024-09-30T14:14:44.413607Z",
            "url": "https://files.pythonhosted.org/packages/be/af/5e2a1d14cadcf56f5a6c11756303ba0426f48a5ca665545c0a8bc600ea3a/nccompare-0.2.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5e28048ee59db2482c7c268b5cc4af44b0bffb78b8bcd11bb53fb3cee8e84000",
                "md5": "c6c6e923ef0ce533de8753f44874f223",
                "sha256": "2f0443c32aba588a8a48667085b4a2419bafb763057992db87e7bd76b6ee280b"
            },
            "downloads": -1,
            "filename": "nccompare-0.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "c6c6e923ef0ce533de8753f44874f223",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 10313,
            "upload_time": "2024-09-30T14:14:45",
            "upload_time_iso_8601": "2024-09-30T14:14:45.897487Z",
            "url": "https://files.pythonhosted.org/packages/5e/28/048ee59db2482c7c268b5cc4af44b0bffb78b8bcd11bb53fb3cee8e84000/nccompare-0.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-30 14:14:45",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "nccompare"
}
        
Elapsed time: 0.74344s