From a9c844318210eb563b4e4a9c81b55d870f6b9d75 Mon Sep 17 00:00:00 2001 From: "Daniel.Frisinghelli" <daniel.frisinghelli@eurac.edu> Date: Wed, 16 Jun 2021 17:23:13 +0200 Subject: [PATCH] Downscaling configuration file for R. --- R/config.R | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 R/config.R diff --git a/R/config.R b/R/config.R new file mode 100644 index 0000000..9f147f1 --- /dev/null +++ b/R/config.R @@ -0,0 +1,55 @@ +# import +library(pathlibr) + +# ------------------------------------------------------------------------------ +# Input paths ------------------------------------------------------------------ +# ------------------------------------------------------------------------------ + +# Climax project directory path +# root <- pathlibr::Path$new('/mnt/CEPH_PROJECTS/FACT_CLIMAX/') +root <- pathlibr::Path$new('W:/') + +# path to Euro-Cordex simulations +mod_path <- root$join('CORDEX') + +# path to in-situ observations +obs_path <- root$join('OBS_DATA') + +# ------------------------------------------------------------------------------ +# Statistical downscaling configuration ---------------------------------------- +# ------------------------------------------------------------------------------ + +# variable to downscale +variable <- 'tasmin' # (tasmin, tasmax, pr) + +# emission scenario +scenario<-"rcp85" # (rcp45, rcp85, historical) + +# years in historical period +hist_years <- 1950:2005 + +# years in projections +proj_years <- 2006:2100 + +# years for the calibration +cal_years <- 1981:2010 + +# years to correct +cor_years <- 1950:2100 + +# moving window centered on each DOY +wday.width<-91 + +# definition of quantiles +minq<-0.01; maxq<-0.99; incq<-0.01 + +# frequency adjustment for precipitation? +FA <- TRUE + +# ------------------------------------------------------------------------------ +# Euro-Cordex simulations to downscale ----------------------------------------- +# ------------------------------------------------------------------------------ + +# list of models to process +inventory <- readRDS(paste0(mod_path,"/",variable,"_inventory.RDS")) #or a list for the selected models +CORDEX.models<-unique(paste0(inventory$gcm,"+",inventory$institute_rcm)) # total number of used models -- GitLab