Skip to content
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

climdexGrid does not take station data input? #3

Open
cicatrixx opened this issue Dec 10, 2018 · 5 comments
Open

climdexGrid does not take station data input? #3

cicatrixx opened this issue Dec 10, 2018 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@cicatrixx
Copy link

Does climdexGrid not take climate4R station data type? I tried the following:

download.file("http://meteo.unican.es/work/loadeR/data/VALUE_ECA_86_v2.tar.gz", destfile = "VALUE_ECA_86_v2.tar.gz")
untar("VALUE_ECA_86_v2.tar.gz")
value <- "VALUE_ECA_86_v2"
example1 <- loadStationData(dataset = value, var="tmax", stationID = c("000234", "003946"), years = 1981:2000)
SU1<-climdexGrid(tx=example1, index.code="SU")

which gives the following error message:
Error in aperm.default(array3D, match(c("time", "lat", "lon"), dimNames)) : perm is of wrong length 3 (!= 2)

@jbedia
Copy link
Member

jbedia commented Dec 18, 2018

Hi, thanks for reporting!
We developed the package thinking in grid data, but everything should work seamlessly with stations. We will have a look to this asap. Best regards

@jbedia jbedia self-assigned this Dec 18, 2018
@jbedia jbedia added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Dec 18, 2018
@jbedia
Copy link
Member

jbedia commented Dec 18, 2018

Hi, I have just included support for station data. See the examples section of climdexGrid, using the VALUE dataset. In case any problems arise just let us know. Best regards.

@cicatrixx
Copy link
Author

Hi @jbedia,
I reinstalled climate4R.climdex and ran the VALUE dataset example but I get errors as follows:

cwd <- climdexGrid(index.code = "CWD", pr = station.data)
[2018-12-21 11:44:50] Calculating CWD ...
Error in as.POSIXlt.character(x, tz, format, ...) : 
  character string is not in a standard unambiguous format

@jbedia
Copy link
Member

jbedia commented Dec 22, 2018

Hi @cicatrixx . I am unable to reproduce the problem. The example is running fine in my computer after reinstalling from master. Does the problem persist after reinstall and restart? Could you at least send the trace?

@cicatrixx
Copy link
Author

I reinstalled and restarted and tried running the example in R and Rstudio. But I still get the same error. I have not used traces before, sorry I am relatively new in R. But attached is the output when I call traceback() after I get the error for climdexGrid(). Is that helpful? Else can you please instruct on how to generate the trace you are looking for? Thanks!
traceback_output.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants