Hello,
I am trying to use this interpolation technique to achieve the same result as Morocco, in my case it is the French Pyrénées. You will find my code below :
library('aurelhy')
#read ascii grid and convert it into a geotm object
dem_path <- 'D:/These_PLVG-IMFT-ENIT/Prog/SpatialisationPluies_BVGP/PERFECT_RASTER/intdem30.asc'
GP_dem <- read.geotm(file=dem_path, type = "ascii")
#Read ASCII grid into and convert it as a geomask object
mask_path <- 'D:/These_PLVG-IMFT-ENIT/Prog/SpatialisationPluies_BVGP/PERFECT_RASTER/mask30.asc'
GP_mask <- read.geomask(file=mask_path, type = "ascii")
#Read station data into a dataframe
rain_path <- 'D:/These_PLVG-IMFT-ENIT/Prog/SpatialisationPluies_BVGP/POSTES_BVGP_EV2012.csv'
rain_df <- read.csv(rain_path)
#Rain interpolation
maurelhy <- aurelhy(GP_dem, GP_mask)
And the error that I get is the following one :
Error in par["x2"] <- par["x1"] + nrow(x) * par["size"] :
replacement has length zero
I don't really understand this error message, could you please tell me what does it mean ?
You will find attached the files I used to apply the aurelhy method.
Thanks in advance for your time and help,
Rabab
GP_AUREHYINTERPOLATION.zip
Hello,
I am trying to use this interpolation technique to achieve the same result as Morocco, in my case it is the French Pyrénées. You will find my code below :
library('aurelhy')
#read ascii grid and convert it into a geotm object
dem_path <- 'D:/These_PLVG-IMFT-ENIT/Prog/SpatialisationPluies_BVGP/PERFECT_RASTER/intdem30.asc'
GP_dem <- read.geotm(file=dem_path, type = "ascii")
#Read ASCII grid into and convert it as a geomask object
mask_path <- 'D:/These_PLVG-IMFT-ENIT/Prog/SpatialisationPluies_BVGP/PERFECT_RASTER/mask30.asc'
GP_mask <- read.geomask(file=mask_path, type = "ascii")
#Read station data into a dataframe
rain_path <- 'D:/These_PLVG-IMFT-ENIT/Prog/SpatialisationPluies_BVGP/POSTES_BVGP_EV2012.csv'
rain_df <- read.csv(rain_path)
#Rain interpolation
maurelhy <- aurelhy(GP_dem, GP_mask)
And the error that I get is the following one :
Error in par["x2"] <- par["x1"] + nrow(x) * par["size"] :
replacement has length zero
I don't really understand this error message, could you please tell me what does it mean ?
You will find attached the files I used to apply the aurelhy method.
Thanks in advance for your time and help,
Rabab
GP_AUREHYINTERPOLATION.zip