Hi guys,
I have been using the climate4R for a long time.
Recently, I got some trouble when saving the output of the "biasCorrection" function with grid2nc.
I am able to load and bias correct. That is, I am able to manipulate bc within R. The problem is when I try to save as a netCDF file.
The R crashes.... However, when I save other netcdf files using the grid2nc function (for example, the "hist" object), it works well
Below, the code:
nameHist <- "E:/teste/CMCC-ESM2-pr-interp.nc"
nameObs <- "E:/teste/MSWEP-pr-obs.nc"
hist <- loadGridData(dataset = nameHist,
var = 'pr', years = 1980:2013, latLim = lat1,
lonLim = lon1)
obs <- loadGridData(dataset = nameObs, var = 'pr'
years = 1980:2013, latLim = lat1,
lonLim = lon1)
bc <- biasCorrection(y = hist, x = obs,
method = 'qdm',
window = c(30,15),
n.quantiles = 100,
interpGrid.args = list(method = "bilinear"),
precipitation = logicalValue)
grid2nc(data = bc,
NetCDFOutFile = "E/dataNew/BC.nc",
missval = 1e20,
prec = "float")
Hi guys,
I have been using the climate4R for a long time.
Recently, I got some trouble when saving the output of the "biasCorrection" function with grid2nc.
I am able to load and bias correct. That is, I am able to manipulate bc within R. The problem is when I try to save as a netCDF file.
The R crashes.... However, when I save other netcdf files using the grid2nc function (for example, the "hist" object), it works well
Below, the code:
nameHist <- "E:/teste/CMCC-ESM2-pr-interp.nc"
nameObs <- "E:/teste/MSWEP-pr-obs.nc"
hist <- loadGridData(dataset = nameHist,
var = 'pr', years = 1980:2013, latLim = lat1,
lonLim = lon1)
obs <- loadGridData(dataset = nameObs, var = 'pr'
years = 1980:2013, latLim = lat1,
lonLim = lon1)
bc <- biasCorrection(y = hist, x = obs,
method = 'qdm',
window = c(30,15),
n.quantiles = 100,
interpGrid.args = list(method = "bilinear"),
precipitation = logicalValue)
grid2nc(data = bc,
NetCDFOutFile = "E/dataNew/BC.nc",
missval = 1e20,
prec = "float")