From ling.jin at ensta-paristech.fr Tue Jul 19 11:40:16 2016 From: ling.jin at ensta-paristech.fr (Ling Jin) Date: Tue, 19 Jul 2016 11:40:16 +0200 (CEST) Subject: [Rnomads-user] Questions to rNOMADS In-Reply-To: <615080350.8426218.1468920482352.JavaMail.zimbra@ensta.fr> Message-ID: <459889933.8429711.1468921216931.JavaMail.zimbra@ensta.fr> Hello! I am Ling, a student from France. I am very glad to use the package rNOMADS which is pretty comprehensive and useful. I encountered some problems when I used it. I would like to download all temperatures, precipitations and wind speeds from 1st January, 2014 to 31st December, 2015. The problem is that I can not get other parameters except temperatures. The codes are below: (you can just read red lines to save time. ) library(xml2) library(rvest) library(rNOMADS) #Latitude et longitude de ?le de France lat <- 48.8499 lon = 2.6370 abbrev <- "gfsanl" model.seq = seq(as.Date(as.character(20140101), format = "%Y%m%d"), by = "day", length.out = 730) model.seq.format = format(model.seq, format = "%Y%m%d") model.run <- c(00, 06, 12, 18) pred <- 00 #nombre de jours d = 730 #nombre de pr?dictions p = 4 Matrix_tmp = matrix(data = NA, nrow = d, ncol = p) Matrix_prcp = matrix(data = NA, nrow = d, ncol = p) Matrix_awnd = matrix(data = NA, nrow = d, ncol = p) ptm <- proc.time() for(i in 1:d) { for(k in 1:p) { ## Not run: ##t?l?charger des donn?es model.info <- ArchiveGribGrab(abbrev, model.seq.format[i], model.run[k], pred, file.type = "grib2") ##lire des donn?es model.data <- ReadGrib(model.info$file.name, c("2 m above ground"), c("TMP", "WIND", "PWAT", "PRATE", "APCP")) #prendre des donn?es de certaine point #In profile, there is just TMP but no other parameters like WIND... profile <- BuildProfile(model.data, lon, lat, TRUE) #?crire des donn?es de chaque 6 heures ? une liste tmp = profile[[1]]$profile.data[1,1,1] - 272.15 print(tmp) Matrix_tmp[i,k] <- tmp print(Matrix_tmp) } } data_tmp = write.table(Matrix_tmp, file = "data_tmp.csv", row.names = T, col.names = c("00","06","12","18"),sep = ";") proc.time() - ptm There are not so many things about problem solutions of rNOMADS, so I ask for your help directly. Looking for your answers and that will be very helpful for me! Thank you! Best regards, Ling JIN ?l?ve ing?nieur 2?me ann?e ENSTA ParisTech 828, boulevard des Mar?chaux 91120 PALAISEAU [ plan ] www.ensta-paristech.fr Nos r?seaux : Facebook | Twitter | Google+ | YouTube | LinkedIn -------------- next part -------------- An HTML attachment was scrubbed... URL: From banco at at.fcen.uba.ar Tue Jul 19 14:53:44 2016 From: banco at at.fcen.uba.ar (banco) Date: Tue, 19 Jul 2016 09:53:44 -0300 Subject: [Rnomads-user] Error in open.connection(x, "rb") : Timeout was reached Message-ID: <1b62323de1d1566fef6ca7dc16887915@mail3.at.fcen.uba.ar> Good morning! I would like to check the following commands: model.urls <- GetDODSDates("gfs_0p50") or urls.out <- CrawlModels(abbrev = "gfs_0p50", depth = 2, verbose = FALSE) or urls.out[2] <- CrawlModels(abbrev = "gfs_0p50", depth = 2, verbose = FALSE) (They are from PDF?s documents like Package ?rNOMADS? and Downloading and Analyzing Weather Forecast Data with rNOMADS using the GrADS - DODS system and so on). It appears to me the following error: Error in open.connection(x, "rb") : Timeout was reached Any idea how to fix it? Is it has to do with my net and internet connection or something like that? I would appreciate any help. Thank you in advance, Gustavo Pittaluga From danny.c.bowman at gmail.com Thu Jul 28 03:03:52 2016 From: danny.c.bowman at gmail.com (Daniel Bowman) Date: Wed, 27 Jul 2016 19:03:52 -0600 Subject: [Rnomads-user] Error in open.connection(x, "rb") : Timeout was reached In-Reply-To: <1b62323de1d1566fef6ca7dc16887915@mail3.at.fcen.uba.ar> References: <1b62323de1d1566fef6ca7dc16887915@mail3.at.fcen.uba.ar> Message-ID: Hi Gustavo, First, please make sure your firewall is not blocking port 9090. The DODS system uses that port to download data. If the port is not blocked and the code still does not work, please send me the output from the following: library(rNOMADS) sessionInfo() I'm a little concerned because another user had a similar problem recently. Best, Danny 2016-07-19 6:53 GMT-06:00 banco : > Good morning! > > I would like to check the following commands: > > model.urls <- GetDODSDates("gfs_0p50") > or > urls.out <- CrawlModels(abbrev = "gfs_0p50", depth = 2, verbose = FALSE) > or > urls.out[2] <- CrawlModels(abbrev = "gfs_0p50", depth = 2, verbose = > FALSE) > > (They are from PDF?s documents like Package ?rNOMADS? and Downloading and > Analyzing Weather Forecast Data with rNOMADS using the GrADS - DODS system > and so on). > > It appears to me the following error: > Error in open.connection(x, "rb") : Timeout was reached > > Any idea how to fix it? Is it has to do with my net and internet > connection or something like that? > > I would appreciate any help. > > Thank you in advance, > > Gustavo Pittaluga > > > > _______________________________________________ > Rnomads-user mailing list > Rnomads-user at lists.r-forge.r-project.org > http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rnomads-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: