modvis


Namemodvis JSON
Version 0.0.9 PyPI version JSON
download
home_pagehttps://github.com/pinshuai/modvis
SummaryA python package for model visualization.
upload_time2025-09-07 19:16:05
maintainerNone
docs_urlNone
authorPin Shuai
requires_python>=3.7
licenseMIT license
keywords modvis
VCS
bugtrack_url
requirements h5py matplotlib pandas scipy seaborn scikit-learn numpy dataretrieval geopandas
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ModVis


[![image](https://img.shields.io/pypi/v/modvis.svg)](https://pypi.python.org/pypi/modvis)

[![image](https://img.shields.io/conda/vn/conda-forge/modvis.svg)](https://anaconda.org/conda-forge/modvis)


**A python package for model visualization.**


-   Free software: GPL license
-   Documentation: https://pinshuai.github.io/modvis
    

## Features

-   Visualize model outputs from hydrologic models including ATS, PFLOTRAN, and etc.
-   Plot unstructured meshes with variables such as groundwater table, saturation, and evapotranspiration.
-   Evaluate model performance using different metrics.

## Installation

`ModVis` is available on PyPI. To install, run the following command:

```
pip install modvis
```

If you want to run the latest version of the code, you can install from git:

```
pip install -U git+https://github.com/pinshuai/modvis.git
```

Alternatively, if you want to debug and test the code, you can clone the repository and install from source:

```
git clone https://github.com/pinshuai/modvis.git
cd modvis
pip install -e .
```

## Quick start

### Plot variables on triangular meshes:

```python
import modvis.ats_xdmf as xdmf
import modvis.plot_vis_file as pv

# import visdump file
surface_vis = xdmf.VisFile(model_dir='.', domain='surface')
subsurface_vis = xdmf.VisFile(model_dir='.', domain=None, columnar=True)

# plot surface ponded depth
pv.plot_surface_data(surface_vis, var_name="surface-ponded_depth", log=True,
                              time_slice="2019-05-01", vmin=0.01, vmax=4)

# plot subsurface saturation. Note layer index is ordered from top to bottom (0--top).
pv.plot_layer_data(subsurface_vis, var_name = "saturation_liquid", 
                             layer_ind = 0, time_slice= 0,
                              cmap = "coolwarm")
```

### Plot variables on mixed-element meshes:

```python
import modvis.ats_xdmf as xdmf
import modvis.plot_vis_file as pv

# import visdump file
surface_vis = xdmf.VisFile(model_dir='.', domain='surface', mixed_element=True)
subsurface_vis = xdmf.VisFile(model_dir='.', domain=None, mixed_element=True)

# plot surface ponded depth
pv.plot_surface_data(surface_vis, var_name="surface-ponded_depth", 
                              time_slice="2019-05-01", mixed_element=True)

# plot subsurface saturation. Note layer index is ordered from top to bottom (0--top).
pv.plot_layer_data(subsurface_vis, var_name = "saturation_liquid", 
                             layer_ind = 0, time_slice= 0, mixed_element=True)
```

## Examples

Jupyter notebook examples can be found under [examples/notebooks](./examples/notebooks)


## Credits

This work is supported by LDRD funding from PNNL, with continuing support from the Utah Water Research Laboratory.

This package was created with [Cookiecutter](https://github.com/cookiecutter/cookiecutter) and the [giswqs/pypackage](https://github.com/giswqs/pypackage) project template.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pinshuai/modvis",
    "name": "modvis",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "modvis",
    "author": "Pin Shuai",
    "author_email": "pin.shuai@usu.edu",
    "download_url": "https://files.pythonhosted.org/packages/00/48/6dc2e22066b73b26d9cd20850de1060eda5d6512043bc94585c5ad40047f/modvis-0.0.9.tar.gz",
    "platform": null,
    "description": "# ModVis\n\n\n[![image](https://img.shields.io/pypi/v/modvis.svg)](https://pypi.python.org/pypi/modvis)\n\n[![image](https://img.shields.io/conda/vn/conda-forge/modvis.svg)](https://anaconda.org/conda-forge/modvis)\n\n\n**A python package for model visualization.**\n\n\n-   Free software: GPL license\n-   Documentation: https://pinshuai.github.io/modvis\n    \n\n## Features\n\n-   Visualize model outputs from hydrologic models including ATS, PFLOTRAN, and etc.\n-   Plot unstructured meshes with variables such as groundwater table, saturation, and evapotranspiration.\n-   Evaluate model performance using different metrics.\n\n## Installation\n\n`ModVis` is available on PyPI. To install, run the following command:\n\n```\npip install modvis\n```\n\nIf you want to run the latest version of the code, you can install from git:\n\n```\npip install -U git+https://github.com/pinshuai/modvis.git\n```\n\nAlternatively, if you want to debug and test the code, you can clone the repository and install from source:\n\n```\ngit clone https://github.com/pinshuai/modvis.git\ncd modvis\npip install -e .\n```\n\n## Quick start\n\n### Plot variables on triangular meshes:\n\n```python\nimport modvis.ats_xdmf as xdmf\nimport modvis.plot_vis_file as pv\n\n# import visdump file\nsurface_vis = xdmf.VisFile(model_dir='.', domain='surface')\nsubsurface_vis = xdmf.VisFile(model_dir='.', domain=None, columnar=True)\n\n# plot surface ponded depth\npv.plot_surface_data(surface_vis, var_name=\"surface-ponded_depth\", log=True,\n                              time_slice=\"2019-05-01\", vmin=0.01, vmax=4)\n\n# plot subsurface saturation. Note layer index is ordered from top to bottom (0--top).\npv.plot_layer_data(subsurface_vis, var_name = \"saturation_liquid\", \n                             layer_ind = 0, time_slice= 0,\n                              cmap = \"coolwarm\")\n```\n\n### Plot variables on mixed-element meshes:\n\n```python\nimport modvis.ats_xdmf as xdmf\nimport modvis.plot_vis_file as pv\n\n# import visdump file\nsurface_vis = xdmf.VisFile(model_dir='.', domain='surface', mixed_element=True)\nsubsurface_vis = xdmf.VisFile(model_dir='.', domain=None, mixed_element=True)\n\n# plot surface ponded depth\npv.plot_surface_data(surface_vis, var_name=\"surface-ponded_depth\", \n                              time_slice=\"2019-05-01\", mixed_element=True)\n\n# plot subsurface saturation. Note layer index is ordered from top to bottom (0--top).\npv.plot_layer_data(subsurface_vis, var_name = \"saturation_liquid\", \n                             layer_ind = 0, time_slice= 0, mixed_element=True)\n```\n\n## Examples\n\nJupyter notebook examples can be found under [examples/notebooks](./examples/notebooks)\n\n\n## Credits\n\nThis work is supported by LDRD funding from PNNL, with continuing support from the Utah Water Research Laboratory.\n\nThis package was created with [Cookiecutter](https://github.com/cookiecutter/cookiecutter) and the [giswqs/pypackage](https://github.com/giswqs/pypackage) project template.\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "A python package for model visualization.",
    "version": "0.0.9",
    "project_urls": {
        "Homepage": "https://github.com/pinshuai/modvis"
    },
    "split_keywords": [
        "modvis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "00486dc2e22066b73b26d9cd20850de1060eda5d6512043bc94585c5ad40047f",
                "md5": "b405043ca7b7901638a2dee5d15a9f8a",
                "sha256": "4c9e27dd7409ce2b23eb6b3e5d1385a79f3326bacb78650304f4dfaf6b51e53c"
            },
            "downloads": -1,
            "filename": "modvis-0.0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "b405043ca7b7901638a2dee5d15a9f8a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 67642,
            "upload_time": "2025-09-07T19:16:05",
            "upload_time_iso_8601": "2025-09-07T19:16:05.446829Z",
            "url": "https://files.pythonhosted.org/packages/00/48/6dc2e22066b73b26d9cd20850de1060eda5d6512043bc94585c5ad40047f/modvis-0.0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-07 19:16:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pinshuai",
    "github_project": "modvis",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "h5py",
            "specs": []
        },
        {
            "name": "matplotlib",
            "specs": []
        },
        {
            "name": "pandas",
            "specs": []
        },
        {
            "name": "scipy",
            "specs": []
        },
        {
            "name": "seaborn",
            "specs": []
        },
        {
            "name": "scikit-learn",
            "specs": []
        },
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "dataretrieval",
            "specs": []
        },
        {
            "name": "geopandas",
            "specs": []
        }
    ],
    "lcname": "modvis"
}
        
Elapsed time: 3.07735s