easymore


Nameeasymore JSON
Version 2.0.0 PyPI version JSON
download
home_pagehttps://github.com/ShervanGharari/EASYMORE
Summarygeo-spatial processing of the input data for environmental and hydrological modeling
upload_time2024-01-12 03:52:31
maintainer
docs_urlNone
authorShervan Gharari
requires_python
licenseGPLv3
keywords remapping netcdf shapefile geo-spatial processing environmental modeling
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![DOI](https://zenodo.org/badge/316842913.svg)](https://zenodo.org/badge/latestdoi/316842913)

# EASYMORE; EArth SYstem MOdeling REmapper:

This package allows you to extract and aggregate the relevant values from a
cfconventions compliant netcdf files given shapefiles.

EASYMORE is a collection of functions that allows extraction of the data from a NetCDF file for a given shapefile such as a basin, catchment, points or lines. It can map gridded data or model output to any given shapefile and provide area average for a target variable.

EASYMORE is very efficient as it uses pandas `groupby` functionality. Remapping of the entire north American domain from ERA5 with resolution of 0.25 degree to 500,000 subbasins of MERIT-Hydro watershed for 7 variables in 1.2 seconds for one time step (the time varying from device to device and depending on the source netCDF files sizes and their temporal aggregation).

EASYMORE also allows parallel computing across many netCDF files as well as command line interface to easily interact with its `nc_remapper()` functionallity.

## The code can be used for the following purposes:

1. Remapping the relevant forcing variables, such as precipitation or temperature and other variables for the effortless model set up. This transfer can be from Thiessen polygon or gridded data, for example, to computational units, hydrological model for example.
2. Remapping the output of a hydrological or land surface model to force another model, such as providing the gridded model output in sub-basin for routing.
3. Extraction of single or multiple points from the gridded or irregular data for comparison with gauges data, for example.
4. Interpolation to caorser or finer resolutions with full controllability in creating the interpolation rules.

## How to install:

**⚠ ATTENTION:**
We highly recommend before using EASYMORE, the virtual environment is set up properly, and then the examples from the GitHub repository are tested to evaluate the authenticity of the results with what is generated by the EASYMORE development team. Examples and more detailed information on installation is provided in the [env](https://github.com/ShervanGharari/EASYMORE/tree/main/env) folder.

### From PyPI:

`pip install easymore`

### From local repo:

clone the code on your perosnal computer or home on HPC by

```
git clone https://github.com/ShervanGharari/EASYMORE.git
cd EASYMORE
pip install .
```

## Flexibilities:

1. EASYMORE allows for commbination of the remapping of NetCDF on local computer or remote high performance computer. For example, the the GIS steps of creating remapping file can be done locally on a sample file that contains few time step of the data (but all the domain). EASYMORE can then be directed to remapping file on the HPC and will skip all the needed GIS steps and directly start remapping process of bulk of the data.

2. EASYMORE allows for parallel remapping of many NetCDF files on local computer or HPC.

3. Commnad line interface to easily call EASYMORE nc_remapper functionality while populating the varibales directly or from a saved config file.

## Examples:

1. [Illustrative example.](https://github.com/ShervanGharari/EASYMORE/blob/main/examples/00_test_example.ipynb)
2. [Remap variables from a regular lat/lon gridded data or model output to irregular shapes.](https://github.com/ShervanGharari/EASYMORE/blob/main/examples/01_ERA5_Regular_Lat_Lon.ipynb)
3. [Remap variables from a regular lat/lon gridded data or model output to irregular shapes with missing values and non-overlapping extent.](https://github.com/ShervanGharari/EASYMORE/blob/main/examples/02_ERA5_Regular_Lat_Lon_NaN.ipynb)
4. [Remap variables from a rotate lat/lon gridded data or model output to irregular shapes.](https://github.com/ShervanGharari/EASYMORE/blob/main/examples/03_WRF_Rotated_Lat_Lon.ipynb)
5. [Remap variables from an irregular shapefile data from Thiessen polygons of station data to irregular shapes.](https://github.com/ShervanGharari/EASYMORE/blob/main/examples/04_Thiessen_Polygons_SCDNA.ipynb)
6. [Remap variables from irregular shapefile data, such as administrative boundaries for example, to irregular shapes.](https://github.com/ShervanGharari/EASYMORE/blob/main/examples/05_irregular_shapes.ipynb)
7. [Extract variables for points (such as locations of stations, cities, etc) from the grided or irregular shapefiles; temperature example](https://github.com/ShervanGharari/EASYMORE/blob/main/examples/07_GRACE_capitals.ipynb)
8. [Parallel remapping of various NetCDF files from source to remapped on local computer](https://github.com/ShervanGharari/EASYMORE/blob/main/examples/11a_parallel_no_job.ipynb) or [HPC](https://github.com/ShervanGharari/EASYMORE/blob/main/examples/11b_parallel_job.py) with [SLURM scheduler](https://github.com/ShervanGharari/EASYMORE/blob/main/examples/11b_parallel_job.slurm)

## Illustrative visualization:

The two figures show remapping of the gridded temperature from ERA5 data set to subbasin of South Saskatchewan River at Medicine Hat.

### Original gridded temperature field:

![](https://github.com/ShervanGharari/EASYMORE/blob/main/fig/Gird_new.png)

### Remapped temperature field to the subbasins:

![](https://github.com/ShervanGharari/EASYMORE/blob/main/fig/Remapped_new.png)

## How to cite:

```
@article{gharari_easymore_2023,
	title = {{EASYMORE}: {A} {Python} package to streamline the remapping of variables for {Earth} {System} models},
	volume = {24},
	issn = {2352-7110},
	shorttitle = {{EASYMORE}},
	url = {https://www.sciencedirect.com/science/article/pii/S2352711023002431},
	doi = {10.1016/j.softx.2023.101547},
	urldate = {2023-11-07},
	journal = {SoftwareX},
	author = {Gharari, Shervan and Keshavarz, Kasra and Knoben, Wouter J. M. and Tang, Gouqiang and Clark, Martyn P.},
	month = dec,
	year = {2023},
	keywords = {EASYMORE, Earth System modeling, NetCDF, Remapping, Shapefile},
	pages = {101547},
}
```

Link to the above [publication](http://dx.doi.org/10.1016/j.softx.2023.101547).

## Publication that have used EASYMORE so far:

Tang, G., Clark, M. P., Knoben, W. J. M., Liu, H., Gharari, S., Arnal, L., Beck, H. E., Wood, A. W., Newman, A. J., Papalexiou, S. M. The impact of meteorological forcing uncertainty on hydrological modeling: A global analysis of cryosphere basins. Water Resources Research, 59, e2022WR033767. https://doi.org/10.1029/2022WR033767, 2023.

Knoben, W. J. M., Clark, M. P., Bales, J., Bennett, A., Gharari, S., Marsh, C. B., Nijssen, B., Pietroniro, A., Spiteri, R. J., Tarboton, D. G., Wood, A. W.: Community Workflows to Advance Reproducibility in Hydrologic Modeling: Separating Model-Agnostic and Model-Specific Configuration Steps in Applications of Large-Domain Hydrologic Models, Water Resources Research, 58, e2021WR031753. https://doi.org/10.1029/2021WR031753, 2022.

Gharari, S., Vanderkelen, I., Tefs, A., Mizukami, N., Stadnyk, T. A., Lawrence, D., Clark, M. P.: A Flexible Multi-Scale Framework to Simulate Lakes and Reservoirs in Earth System Models, Earth and Space Science Open Archive, 24, https://doi.org/10.1002/essoar.10510902.1, 2022.

Li, Z., Gao, S., Chen, M., Gourley, J., Mizukami, N., and Hong, Y.: CREST-VEC: a framework towards more accurate and realistic flood simulation across scales, Geosci. Model Dev., 15, 6181–6196, https://doi.org/10.5194/gmd-15-6181-2022, 2022.

Sheikholeslami, R., Gharari, S., Papalexiou, S. M., Clark, M. P.: VISCOUS: A Variance-Based Sensitivity Analysis Using Copulas for Efficient Identification of Dominant Hydrological Processes, Water Resources Research, https://doi.org/10.1029/2020WR028435, 2021.

Gharari, S., Clark, M. P., Mizukami, N., Knoben, W. J. M., Wong, J. S., and Pietroniro, A.: Flexible vector-based spatial configurations in land models, Hydrol. Earth Syst. Sci., 24, 5953–5971, https://doi.org/10.5194/hess-24-5953-2020, 2020.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ShervanGharari/EASYMORE",
    "name": "easymore",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "remapping,NetCDF,shapefile,geo-spatial processing,environmental modeling",
    "author": "Shervan Gharari",
    "author_email": "sh.gharari@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/2c/5f/6a77901dcb00adfaf4372fd283e34d852f9157e06a6e19fce1ef8b24020e/easymore-2.0.0.tar.gz",
    "platform": "any",
    "description": "[![DOI](https://zenodo.org/badge/316842913.svg)](https://zenodo.org/badge/latestdoi/316842913)\n\n# EASYMORE; EArth SYstem MOdeling REmapper:\n\nThis package allows you to extract and aggregate the relevant values from a\ncfconventions compliant netcdf files given shapefiles.\n\nEASYMORE is a collection of functions that allows extraction of the data from a NetCDF file for a given shapefile such as a basin, catchment, points or lines. It can map gridded data or model output to any given shapefile and provide area average for a target variable.\n\nEASYMORE is very efficient as it uses pandas `groupby` functionality. Remapping of the entire north American domain from ERA5 with resolution of 0.25 degree to 500,000 subbasins of MERIT-Hydro watershed for 7 variables in 1.2 seconds for one time step (the time varying from device to device and depending on the source netCDF files sizes and their temporal aggregation).\n\nEASYMORE also allows parallel computing across many netCDF files as well as command line interface to easily interact with its `nc_remapper()` functionallity.\n\n## The code can be used for the following purposes:\n\n1. Remapping the relevant forcing variables, such as precipitation or temperature and other variables for the effortless model set up. This transfer can be from Thiessen polygon or gridded data, for example, to computational units, hydrological model for example.\n2. Remapping the output of a hydrological or land surface model to force another model, such as providing the gridded model output in sub-basin for routing.\n3. Extraction of single or multiple points from the gridded or irregular data for comparison with gauges data, for example.\n4. Interpolation to caorser or finer resolutions with full controllability in creating the interpolation rules.\n\n## How to install:\n\n**\u26a0 ATTENTION:**\nWe highly recommend before using EASYMORE, the virtual environment is set up properly, and then the examples from the GitHub repository are tested to evaluate the authenticity of the results with what is generated by the EASYMORE development team. Examples and more detailed information on installation is provided in the [env](https://github.com/ShervanGharari/EASYMORE/tree/main/env) folder.\n\n### From PyPI:\n\n`pip install easymore`\n\n### From local repo:\n\nclone the code on your perosnal computer or home on HPC by\n\n```\ngit clone https://github.com/ShervanGharari/EASYMORE.git\ncd EASYMORE\npip install .\n```\n\n## Flexibilities:\n\n1. EASYMORE allows for commbination of the remapping of NetCDF on local computer or remote high performance computer. For example, the the GIS steps of creating remapping file can be done locally on a sample file that contains few time step of the data (but all the domain). EASYMORE can then be directed to remapping file on the HPC and will skip all the needed GIS steps and directly start remapping process of bulk of the data.\n\n2. EASYMORE allows for parallel remapping of many NetCDF files on local computer or HPC.\n\n3. Commnad line interface to easily call EASYMORE nc_remapper functionality while populating the varibales directly or from a saved config file.\n\n## Examples:\n\n1. [Illustrative example.](https://github.com/ShervanGharari/EASYMORE/blob/main/examples/00_test_example.ipynb)\n2. [Remap variables from a regular lat/lon gridded data or model output to irregular shapes.](https://github.com/ShervanGharari/EASYMORE/blob/main/examples/01_ERA5_Regular_Lat_Lon.ipynb)\n3. [Remap variables from a regular lat/lon gridded data or model output to irregular shapes with missing values and non-overlapping extent.](https://github.com/ShervanGharari/EASYMORE/blob/main/examples/02_ERA5_Regular_Lat_Lon_NaN.ipynb)\n4. [Remap variables from a rotate lat/lon gridded data or model output to irregular shapes.](https://github.com/ShervanGharari/EASYMORE/blob/main/examples/03_WRF_Rotated_Lat_Lon.ipynb)\n5. [Remap variables from an irregular shapefile data from Thiessen polygons of station data to irregular shapes.](https://github.com/ShervanGharari/EASYMORE/blob/main/examples/04_Thiessen_Polygons_SCDNA.ipynb)\n6. [Remap variables from irregular shapefile data, such as administrative boundaries for example, to irregular shapes.](https://github.com/ShervanGharari/EASYMORE/blob/main/examples/05_irregular_shapes.ipynb)\n7. [Extract variables for points (such as locations of stations, cities, etc) from the grided or irregular shapefiles; temperature example](https://github.com/ShervanGharari/EASYMORE/blob/main/examples/07_GRACE_capitals.ipynb)\n8. [Parallel remapping of various NetCDF files from source to remapped on local computer](https://github.com/ShervanGharari/EASYMORE/blob/main/examples/11a_parallel_no_job.ipynb) or [HPC](https://github.com/ShervanGharari/EASYMORE/blob/main/examples/11b_parallel_job.py) with [SLURM scheduler](https://github.com/ShervanGharari/EASYMORE/blob/main/examples/11b_parallel_job.slurm)\n\n## Illustrative visualization:\n\nThe two figures show remapping of the gridded temperature from ERA5 data set to subbasin of South Saskatchewan River at Medicine Hat.\n\n### Original gridded temperature field:\n\n![](https://github.com/ShervanGharari/EASYMORE/blob/main/fig/Gird_new.png)\n\n### Remapped temperature field to the subbasins:\n\n![](https://github.com/ShervanGharari/EASYMORE/blob/main/fig/Remapped_new.png)\n\n## How to cite:\n\n```\n@article{gharari_easymore_2023,\n\ttitle = {{EASYMORE}: {A} {Python} package to streamline the remapping of variables for {Earth} {System} models},\n\tvolume = {24},\n\tissn = {2352-7110},\n\tshorttitle = {{EASYMORE}},\n\turl = {https://www.sciencedirect.com/science/article/pii/S2352711023002431},\n\tdoi = {10.1016/j.softx.2023.101547},\n\turldate = {2023-11-07},\n\tjournal = {SoftwareX},\n\tauthor = {Gharari, Shervan and Keshavarz, Kasra and Knoben, Wouter J. M. and Tang, Gouqiang and Clark, Martyn P.},\n\tmonth = dec,\n\tyear = {2023},\n\tkeywords = {EASYMORE, Earth System modeling, NetCDF, Remapping, Shapefile},\n\tpages = {101547},\n}\n```\n\nLink to the above [publication](http://dx.doi.org/10.1016/j.softx.2023.101547).\n\n## Publication that have used EASYMORE so far:\n\nTang, G., Clark, M. P., Knoben, W. J. M., Liu, H., Gharari, S., Arnal, L., Beck, H. E., Wood, A. W., Newman, A. J., Papalexiou, S. M. The impact of meteorological forcing uncertainty on hydrological modeling: A global analysis of cryosphere basins. Water Resources Research, 59, e2022WR033767. https://doi.org/10.1029/2022WR033767, 2023.\n\nKnoben, W. J. M., Clark, M. P., Bales, J., Bennett, A., Gharari, S., Marsh, C. B., Nijssen, B., Pietroniro, A., Spiteri, R. J., Tarboton, D. G., Wood, A. W.: Community Workflows to Advance Reproducibility in Hydrologic Modeling: Separating Model-Agnostic and Model-Specific Configuration Steps in Applications of Large-Domain Hydrologic Models, Water Resources Research, 58, e2021WR031753. https://doi.org/10.1029/2021WR031753, 2022.\n\nGharari, S., Vanderkelen, I., Tefs, A., Mizukami, N., Stadnyk, T. A., Lawrence, D., Clark, M. P.: A Flexible Multi-Scale Framework to Simulate Lakes and Reservoirs in Earth System Models, Earth and Space Science Open Archive, 24, https://doi.org/10.1002/essoar.10510902.1, 2022.\n\nLi, Z., Gao, S., Chen, M., Gourley, J., Mizukami, N., and Hong, Y.: CREST-VEC: a framework towards more accurate and realistic flood simulation across scales, Geosci. Model Dev., 15, 6181\u20136196, https://doi.org/10.5194/gmd-15-6181-2022, 2022.\n\nSheikholeslami, R., Gharari, S., Papalexiou, S. M., Clark, M. P.: VISCOUS: A Variance-Based Sensitivity Analysis Using Copulas for Efficient Identification of Dominant Hydrological Processes, Water Resources Research, https://doi.org/10.1029/2020WR028435, 2021.\n\nGharari, S., Clark, M. P., Mizukami, N., Knoben, W. J. M., Wong, J. S., and Pietroniro, A.: Flexible vector-based spatial configurations in land models, Hydrol. Earth Syst. Sci., 24, 5953\u20135971, https://doi.org/10.5194/hess-24-5953-2020, 2020.\n\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "geo-spatial processing of the input data for environmental and hydrological modeling",
    "version": "2.0.0",
    "project_urls": {
        "Homepage": "https://github.com/ShervanGharari/EASYMORE"
    },
    "split_keywords": [
        "remapping",
        "netcdf",
        "shapefile",
        "geo-spatial processing",
        "environmental modeling"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0ddbec4a788f1acd4361a42acb7eb574cb3071f54f717a7cf3a97392bc04f1e4",
                "md5": "47b6aa042fbb0f1daf74237f0daadbb6",
                "sha256": "440878f87181fbddfb30e291b9d4dd1c53a01bc47918288ee384ea1410ca955d"
            },
            "downloads": -1,
            "filename": "easymore-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "47b6aa042fbb0f1daf74237f0daadbb6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 57128,
            "upload_time": "2024-01-12T03:52:29",
            "upload_time_iso_8601": "2024-01-12T03:52:29.132700Z",
            "url": "https://files.pythonhosted.org/packages/0d/db/ec4a788f1acd4361a42acb7eb574cb3071f54f717a7cf3a97392bc04f1e4/easymore-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2c5f6a77901dcb00adfaf4372fd283e34d852f9157e06a6e19fce1ef8b24020e",
                "md5": "a5c4fc720371d3c480aecdd22fb31481",
                "sha256": "08ce42cb22e808119c3792e0347eeb0f75fd6e0ec206f18b425a5aa326f96f02"
            },
            "downloads": -1,
            "filename": "easymore-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a5c4fc720371d3c480aecdd22fb31481",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 57809,
            "upload_time": "2024-01-12T03:52:31",
            "upload_time_iso_8601": "2024-01-12T03:52:31.270378Z",
            "url": "https://files.pythonhosted.org/packages/2c/5f/6a77901dcb00adfaf4372fd283e34d852f9157e06a6e19fce1ef8b24020e/easymore-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-12 03:52:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ShervanGharari",
    "github_project": "EASYMORE",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "easymore"
}
        
Elapsed time: 0.17579s