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