<html><body><div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Hello!</div><div><br></div><div>I am Ling, a student from France. I am very glad to use the package rNOMADS which is pretty comprehensive and useful.</div><div><br></div><div>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. )</div><div><br></div><div><p style="margin: 0px;" data-mce-style="margin: 0px;">library(xml2)<br>library(rvest)<br>library(rNOMADS)<br>#Latitude et longitude de Île de France<br>lat <- 48.8499<br>lon = 2.6370</p><p style="margin: 0px;" data-mce-style="margin: 0px;">abbrev <- "gfsanl"<br>model.seq = seq(as.Date(as.character(20140101), format = "%Y%m%d"), by = "day", length.out = 730) <br>model.seq.format = format(model.seq, format = "%Y%m%d")<br>model.run <- c(00, 06, 12, 18)<br>pred <- 00<br>#nombre de jours<br>d = 730<br>#nombre de prédictions<br>p = 4<br>Matrix_tmp = matrix(data = NA, nrow = d, ncol = p)<br>Matrix_prcp = matrix(data = NA, nrow = d, ncol = p)<br>Matrix_awnd = matrix(data = NA, nrow = d, ncol = p)</p><p style="margin: 0px;" data-mce-style="margin: 0px;">ptm <- proc.time()<br>for(i in 1:d)<br> {<br> for(k in 1:p)<br> {<br> ## Not run:<br> ##télécharger des données<br> <span style="color: rgb(255, 0, 0);">model.info <- ArchiveGribGrab(abbrev, model.seq.format[i], model.run[k], pred, file.type = "grib2")</span><br> ##lire des données<br> <span style="color: rgb(255, 0, 0);">model.data <- ReadGrib(model.info$file.name, c("2 m above ground"), c("TMP", "WIND", "PWAT", "PRATE", "APCP"))</span><br> #prendre des données de certaine point </p><p style="margin: 0px;" data-mce-style="margin: 0px;"> <span style="color: rgb(255, 0, 0);">#In profile, there is just TMP but no other parameters like WIND...</span></p><p style="margin: 0px;" data-mce-style="margin: 0px;"> <span style="color: rgb(255, 0, 0);">profile <- BuildProfile(model.data, lon, lat, TRUE)</span><br> #écrire des données de chaque 6 heures à une liste<br> tmp = profile[[1]]$profile.data[1,1,1] - 272.15<br> print(tmp)<br> Matrix_tmp[i,k] <- tmp<br> print(Matrix_tmp)<br> }<br>}<br>data_tmp = write.table(Matrix_tmp, file = "data_tmp.csv", row.names = T, col.names = c("00","06","12","18"),sep = ";")<br>proc.time() - ptm</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">There are not so many things about problem solutions of rNOMADS, so I ask for your help directly.</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">Looking for your answers and that will be very helpful for me! Thank you!</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">Best regards,</p></div><div><span name="x"></span> <p style="margin:0cm; margin-bottom:.0001pt;">
<b><span style="font-size:12.0pt;font-family:Arial;color:RGB(24,43,93);'">Ling JIN</span></b>
</p>
<p style="margin:0cm; margin-bottom:.0001pt;">
<span style="font-size:4.0pt;font-family:Arial;
color:#182B5D;"> </span>
</p>
<p style="margin:0cm; margin-bottom:.0001pt;">
<span style="font-size:10.0pt;font-family:Arial;'">Élève ingénieur 2ème année</span>
</p>
<div style="margin:4pt 0;font-family:Arial;font-size:10pt">
<div>
<table class="mceItemTable"><tbody><tr><td><a href="https://www.ensta-paristech.fr/?utm-source=mails"><img src="http://www.ensta-paristech.fr/logo-ensta-petit.png" height="80px"></a></td><td>
<div style="font-size:9pt;padding:10px 0 10px 9px;">
<p style="margin:0;color:#182B5D"><b>ENSTA ParisTech</b></p>
<p style="margin:0">828, boulevard des Maréchaux</p>
<p style="margin:0">91120 PALAISEAU [<a href="https://www.ensta-paristech.fr/fr/venir-ensta-paristech">plan</a>]</p>
<p style="margin:0"><a href="https://www.ensta-paristech.fr">www.ensta-paristech.fr</a></p>
<div style="margin-top:3pt;border-top:1px solid #1b8aae;padding-top:3pt;display:inline-block">
<p style="margin:0">
Nos réseaux :
<a href="https://www.facebook.com/ENSTA.ParisTech">Facebook</a> |
<a href="https://www.twitter.com/ENSTAParisTech">Twitter</a> |
<a href="https://plus.google.com/+ENSTA-ParisTechFr/posts">Google+</a> |
<a href="https://www.youtube.com/user/ENSTAParisTech">YouTube</a> |
<a href="https://www.linkedin.com/company/ensta">LinkedIn</a>
</p>
</div>
</div>
</td>
</tr>
</tbody></table>
</div>
</div>
<span name="x"></span><br></div></div></body></html>