-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in ncdf4.helpers::nc.get.dim.for.axis(f.example, v.example, "T")$name : #6
Labels
Comments
What's in the script |
Thank you very much Hiebert. I edited the r script used as a sample to suit
my data. The content of is
"# ------------------------------------------------
# This wrapper script calls the 'create.indices.from.files' function from
the modified climdex.pcic.ncdf package
# to calculate ETCCDI, ET-SCI and other indices, using data and parameters
provided by the user.
# Note even when using a threshold file, the base.range parameter must
still be specified accurately.
# ------------------------------------------------
library(climdex.pcic.ncdf)
# list of one to three input files. e.g. c("a.nc","b.nc","c.nc")
infiles="./sample_data/Climate_2020_2049.nc"
# list of variable names according to above file(s)
vars=c(prec="PRECPMM",tmax="MAXTEMPC", tmin="MINTEMPC")
# output directory. Will be created if it does not exist.
outdir="./output2/"
# Output filename format. Must use CMIP5 filename convention. i.e. "
var_timeresolution_model_scenario_run_starttime-endtime.nc"
file.template="var_daily_CESM_CAM5_NA_2020-2049.nc"
# author data
author.data=list(institution="My University", institution_id="MU")
# reference period
base.range=c(2020,2049)
# number of cores to use, or FALSE for single core.
cores=FALSE
# list of indices to calculate, or NULL to calculate all.
indices=NULL #c("hw","tnn")
# input threshold file to use, or NULL for none.
thresholds.files=NULL#"thresholds.test.1991-1997.nc"
#######################################################
# Esoterics below, do not modify without a good reason.
# definition used for Excess Heat Factor (EHF). "PA13" for Perkins and
Alexander (2013), this is the default. "NF13" for Nairn and Fawcett (2013).
EHF_DEF = "PA13"
# axis to split data on. For chunking up of grid, leave this.
axis.name="Y"
# Number of data values to process at once. If you receive "Error:
rows.per.slice >= 1 is not TRUE", try increasing this to 20. You might have
a large grid.
maxvals=10
# output compatible with FCLIMDEX. Leave this.
fclimdex.compatible=FALSE
# Call the package.
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,
cluster.type="SOCK",ehfdef=EHF_DEF,max.vals.millions=maxvals,
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"))"
I dont have an idea what the variables f.example and v.example contain
because I dont have any variable like that in my data.
Please help me as this is delaying my Masters Degree.
…On Wed, Feb 22, 2017 at 7:01 PM, James Hiebert ***@***.***> wrote:
What's in the script climpact2.ncdf.wrapper1.r, and what do the variables
f.example and v.example contain? Without that information no one can
really help you here.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYtKuZiwMkJeWUrYKNJ5gP0QWK6nSldaks5rfHf9gaJpZM4MGVsB>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please help me as this is urgent,
i have been battling with computation of indices using climdex.pcic.ncdf
I get the error below
Rscript climpact2.ncdf.wrapper1.r
Loading required package: PCICt
Loading required package: methods
Loading required package: lmomco
Loading required package: parallel
Package SPEI (1.6) loaded [try SPEINews()].
Error in ncdf4.helpers::nc.get.dim.for.axis(f.example, v.example, "T")$name :
$ operator is invalid for atomic vectors
Calls: create.indices.from.files -> create.ncdf.output.files
Execution halted
The text was updated successfully, but these errors were encountered: