candex

Python code to create shapefile for NetCDF lat and lon and intersection with other shapefiles and returning the average time series for the shapefile

https://github.com/shervangharari/candex

Science Score: 49.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 7 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.8%) to scientific vocabulary
Last synced: 6 months ago · JSON representation

Repository

Python code to create shapefile for NetCDF lat and lon and intersection with other shapefiles and returning the average time series for the shapefile

Basic Info
  • Host: GitHub
  • Owner: ShervanGharari
  • License: apache-2.0
  • Language: Jupyter Notebook
  • Default Branch: master
  • Homepage:
  • Size: 60.5 MB
Statistics
  • Stars: 3
  • Watchers: 2
  • Forks: 5
  • Open Issues: 0
  • Releases: 2
Created almost 7 years ago · Last pushed almost 5 years ago
Metadata Files
Readme License Citation

README.md

** ATTENTION: CANDEX is now part of EASYMORE python package**
CANDEX is now presented in a python package called EASYMORE (EArth SYstem MOdeling REmapper). EASYMORE is a user-friendly package that performs geospatial analysis including remapping of variables stored in NetCDF files from various shapes to various shapes (Thiessen polygons to subbasins). Examples of how to use install and use EASYMORE are provided at EASYMORE GitHub page.

DOI

CANDEX: CAtchment NetcDf EXtractor

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

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

Speed and Efficiency

Candex 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).

Example

  1. Remap a regular lat/lon gridded data or model to any shapefile
  2. Remap a rotate lat/lon gridded data or model to any shapefile
  3. Remap a irregular shapefile data, such as Thiessen polygon for example, to any shapefile such as sub-basin.
  4. Extract the data for multiple points (such as location of stations, cities, etc) from the grided or irregular data
  5. Resample to a different resolution using various interpolation technique (weights should be pre-calculated and fed to candex).

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.

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:

Remapped temperature field to the subbasins:

Publication that have used CANDEX so far:

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, 59535971, https://doi.org/10.5194/hess-24-5953-2020, 2020

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, submitted to Water Resources Research, https://doi.org/10.1002/essoar.10505333.1, 2020.

Owner

  • Name: Shervan Gharari
  • Login: ShervanGharari
  • Kind: user
  • Location: Saskatoon

GitHub Events

Total
Last Year