@@ -37,7 +37,7 @@ chelsa_project <- function(
3737 # Check metadata columns
3838 needed_columns <- c(
3939 " scale" , " offset" , " path_out_tif" , " climate_model" , " climate_scenario" ,
40- " variable" , " url" , " path_down " , " long_name" , " explanation" ,
40+ " variable" , " url" , " path_download " , " long_name" , " explanation" ,
4141 " path_out_netcdf" , " unit" , " time_period" )
4242 missing_columns <- setdiff(needed_columns , names(metadata ))
4343 if (length(missing_columns ) > 0 ) {
@@ -54,9 +54,9 @@ chelsa_project <- function(
5454
5555 # # ..................................................................... ###
5656
57- if (! file.exists(metadata $ path_down )) {
57+ if (! file.exists(metadata $ path_download )) {
5858 ecokit :: stop_ctx(
59- " Input file does not exist" , path = metadata $ path_down ,
59+ " Input file does not exist" , path = metadata $ path_download ,
6060 include_backtrace = TRUE )
6161 }
6262
@@ -126,8 +126,8 @@ chelsa_project <- function(
126126 # later consider the scale and offset information manually. This is more safe
127127 # as I found that some of the future projections do not include such
128128 # information in the tiff files.
129- r_map <- terra :: rast(metadata $ path_down , raw = TRUE ) %> %
130- stats :: setNames(basename(metadata $ path_down )) %> %
129+ r_map <- terra :: rast(metadata $ path_download , raw = TRUE ) %> %
130+ stats :: setNames(basename(metadata $ path_download )) %> %
131131 # crop to European boundaries although it is not necessary to crop the input
132132 # maps into the European boundaries, we will crop the data prior to
133133 # projection. Cropping will make the values of the raster read from memory
@@ -191,7 +191,7 @@ chelsa_project <- function(
191191 # global attributes to be added to the *.nc file
192192 attributes <- c(
193193 paste0(" url=" , metadata $ url ),
194- paste0(" original_file=" , metadata $ path_down ),
194+ paste0(" original_file=" , metadata $ path_download ),
195195 paste0(" variable=" , metadata $ variable ),
196196 paste0(" time_period=" , metadata $ time_period ),
197197 paste0(" climate_model=" , metadata $ climate_model ),
0 commit comments