'Getting the unused argument error while running climpact Rscript?
I was trying to run the sample file of climpact for the historical and I got the error
error in create.indices.from.files(infiles, outdir, file.template, author.data, : unused arguments (root.dir = root.dir, ehfdef = EHF_DEF, wsdin_n = 5, csdin_n = 5, hddheatn_n = 18, cddcoldn_n = 18, gddgrown_n = 10, rxnday_n = 7, rnnmm_n = 30, ntxntn_n = 3, ntxbntnb_n = 3, project.lat2d.coords = TRUE) Execution halted
Could you please help me on how to solve this? Thanks in advance.
library(climdex.pcic.ncdf)
infiles=c("climpact.sampledata.gridded.1991-2010.nc")
vars=c(prec="precip",tmax="tmax", tmin="tmin")
outdir="TestIndex"
file.template="var_daily_climpact.sample_historical_NA_1991-2010.nc"
author.data=list(institution="My University", institution_id="MU")
base.range=c(1991,2010)
cores=FALSE
indices=NULL #c("hw","tnn")
thresholds.files=NULL#"./www/output/gridded/thresholds.test.1991-1997.nc"
root.dir=NULL
# Esoterics below, do not modify without a good reason.
EHF_DEF = "PA13"
axis.name="Y"
maxvals=10
fclimdex.compatible=FALSE
create.indices.from.files(infiles,outdir,file.template,author.data,variable.name.map=vars,base.range=base.range,parallel=cores,axis.to.split.on=axis.name,climdex.vars.subset=indices,thresholds.files=thresholds.files,fclimdex.compatible=fclimdex.compatible,root.dir=root.dir,
cluster.type="SOCK",ehfdef=EHF_DEF,max.vals.millions=maxvals,wsdin_n=5,csdin_n=5,hddheatn_n=18,cddcoldn_n=18,gddgrown_n=10,rxnday_n=7,rnnmm_n=30,ntxntn_n=3,ntxbntnb_n=3,project.lat2d.coords=TRUE,
thresholds.name.map=c(tx05thresh="tx05thresh",tx10thresh="tx10thresh", tx50thresh="tx50thresh", tx90thresh="tx90thresh",tx95thresh="tx95thresh",
tn05thresh="tn05thresh",tn10thresh="tn10thresh",tn50thresh="tn50thresh",tn90thresh="tn90thresh",tn95thresh="tn95thresh",
tx90thresh_15days="tx90thresh_15days",tn90thresh_15days="tn90thresh_15days",tavg90thresh_15days="tavg90thresh_15days",
tavg05thresh="tavg05thresh",tavg95thresh="tavg95thresh",
txraw="txraw",tnraw="tnraw",precraw="precraw",
r95thresh="r95thresh", r99thresh="r99thresh"))
Solution 1:[1]
Try to run after removing the line "root.dir=NULL"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | SHINTO ROOSE |