Title: | Visualization and Analysis of Coupled Model Intercomparison Project, Phase-6 (CMIP6) Hydroclimatic Data |
---|---|
Description: | Data manipulation for Coupled Model Intercomparison Project, Phase-6 (CMIP6) hydroclimatic data. The files are archived in the Federated Research Data Repository (FRDR) (Rajulapati et al, 2024, <doi:10.20383/103.0829>). The data set is described in Abdelmoaty et al. (2025, <doi:10.1038/s41597-025-04396-z>). |
Authors: | Simon Michael Papalexiou [aut], Heba Abdelmoaty [aut], Konstantinos Andreadis [aut], Kevin Shook [ctb, cre] |
Maintainer: | Kevin Shook <[email protected]> |
License: | GPL-3 |
Version: | 1.0.0 |
Built: | 2025-03-04 06:15:47 UTC |
Source: | https://github.com/tychelab/cmip6visr |
Provides data manipulation, analyses and visualization for Coupled Model Intercomparison Project, Phase-6 (CMIP6) hydroclimatic data. The files are archived in the Federated Research Data Repository (FRDR) (Rajulapati et al., 2024)
Maintainer: Kevin Shook [email protected] [contributor]
Authors:
Simon Michael Papalexiou
Heba Abdelmoaty
Konstantinos Andreadis
Rajulapati, C., Abdelmoaty, H., Nerantzaki, S., Papalexiou, S. (2024). High-resolution future temperature and precipitation dataset for Canada, 2015 - 2100. Federated Research Data Repository. https://doi.org/10.20383/103.0829
Useful links:
Extracts the daily precipitation values from CMIP6 NetCDF files, and calculates the mean precipitation for a given basin for each time interval. The original files are in longitude-latitude projection, so the areas of the cells varies. The cell areas are used to weight the precipitation when computing the basin mean precipitation.
The CMIP6 data are arranged by zone in 9 files. As a given basin may lie over more than one zone, it may necessary to read in data from more than one NetCDF file when computing the basin mean precipitation.
cv_basin_daily_precip( netcdf_directory = ".", scenario = "pr_day_ACCESS-CM2_ssp126_r2i1p1f1_gn_20150101-21001231_cannc_SPQM_", basin_zone_area = NULL, temp_file = TRUE )
cv_basin_daily_precip( netcdf_directory = ".", scenario = "pr_day_ACCESS-CM2_ssp126_r2i1p1f1_gn_20150101-21001231_cannc_SPQM_", basin_zone_area = NULL, temp_file = TRUE )
netcdf_directory |
Required. Directory containing NetCDF files. |
scenario |
Required. Full name of scenario to be used. This is the file name omitting the zone number. |
basin_zone_area |
Required. A list object returned by |
temp_file |
If |
Reruns a data frame with 2 columns: date
and precipitation
. The
date
is a standard R date over the interval 2015-01-01 to 2100-12-31, and the
precipitation
is the basin mean value.
Kevin Shook
# This function is marked to not be tested as it requires local copies of the CMIP6 data files # which are many GB in size library(terra) az_raster <- cv_zone_area_raster() fpath <- system.file("extdata", "07BF001.shp", package = "CMIP6VisR") basin_vector <- vect(fpath) basin_areas <- cv_clip_basin(az_raster, basin_vector) netcdf_directory <- "." values <- cv_basin_daily_precip(netcdf_directory = netcdf_directory, basin_zone_area = basin_areas, temp_file = FALSE)
# This function is marked to not be tested as it requires local copies of the CMIP6 data files # which are many GB in size library(terra) az_raster <- cv_zone_area_raster() fpath <- system.file("extdata", "07BF001.shp", package = "CMIP6VisR") basin_vector <- vect(fpath) basin_areas <- cv_clip_basin(az_raster, basin_vector) netcdf_directory <- "." values <- cv_basin_daily_precip(netcdf_directory = netcdf_directory, basin_zone_area = basin_areas, temp_file = FALSE)
Takes the SpatRaster
that represents zones and areas and
clips them from polygon basin
cv_clip_basin(za_rast, basin)
cv_clip_basin(za_rast, basin)
za_rast |
|
basin |
|
Returns a list with 3 elements: 1) raster
(rasters of cell areas for each zone),
2) area
total area of each zone in the basin, and 3) zone
zone numbers.
Kostas Andreadis
{ library(terra) az_raster <- cv_zone_area_raster() fpath <- system.file("extdata", "07BF001.shp", package = "CMIP6VisR") basin_vector <- vect(fpath) basin_areas <- cv_clip_basin(az_raster, basin_vector) }
{ library(terra) az_raster <- cv_zone_area_raster() fpath <- system.file("extdata", "07BF001.shp", package = "CMIP6VisR") basin_vector <- vect(fpath) basin_areas <- cv_clip_basin(az_raster, basin_vector) }
Uses the data frame zone_grid_df
. Returns a raster containing two layers, the zone (1-9) and the area (km^2^) for
each grid location in the CMIP6 files. The raster raster returned has 415 rows (latitudes in 0.1 degrees)
and 883 columns (longitudes in 0.1 degrees). The zone number is used to determine the file(s) to read in
for computing the basin mean precipitation statistics for a given Canadian hydrometric basin. The
cv_zone_area_raster()
cv_zone_area_raster()
Returns a terra SpatRaster
object (415 rows x 883 columns x 2 layers) of all Canadian grid locations.
Heba Abdelmoaty Kevin SHook
zone_area_grid <- cv_zone_area_raster() library(terra) plot(zone_area_grid)
zone_area_grid <- cv_zone_area_raster() library(terra) plot(zone_area_grid)
A dataframe of zone values and areas for all CMIP6 grid cells
zone_grid_df
zone_grid_df
A dateframe with 169584 rows and 4 columns.
Variables:
Longitude
Latitude
Zone (0-9)
Grid cell area km
https://doi.org/10.20383/103.0829