[Rnomads-user] Problem reading archived RUC ANL data shen local.dir specified

Michael Whitby michael.whitby at huskers.unl.edu
Mon Apr 24 20:35:08 CEST 2017


Hello,

Great package and thanks for maintaining it.

I am downloading many archived RAP products and want to specify the
directory they are saved to. I do this according to the documentation and
it works fine, however, I cannot read them. If I do not specify the
local.dir, It works fine. However when I run the below code, I get the
error:


Error in seq.default(1, length(model.data.vector) - 6, by = 7) :
  wrong sign in 'by' argument
In addition: Warning message:
running command 'C:\Windows\system32\cmd.exe /c wgrib2
C:\Users\mwhitby2\Box Sync\BATTEAM\RAPdata\120150601_1200_000.grb2 -inv
my.inv -csv - -no_header -match "(TMP):(2 m above ground)"' had status 8

library(rNOMADS)

FOLDER.weather = ".\\RAPdata\\"
dir.create(FOLDER.weather)

date=20150601
hour=12
preds=00

model.info <- ArchiveGribGrab("rucanl", date, hour, preds, local.dir =
FOLDER.weather )

thisFILE <- paste0(model.info[[1]]$local.dir, model.info[[1]]$file.name[1])

model.data <- ReadGrib(thisFILE, "2 m above ground", "TMP")

##Have also tried this with same effect
model.data <- ReadGrib(model.info[[1]]$file.name[1], "2 m above ground",
"TMP")

________________________________________
Michael Whitby
michael.whitby at huskers.unl.edu
Cell: 609-923-0973
http://go.unl.edu/batmigration

PhD student
Nebraska Cooperative Fish and Wildlife Research Unit
University of Nebraska-Lincoln, School of Natural Resources
Associate Wildlife Biologist (R)

Mailing/Shipping Address:
Michael Whitby
University of Nebraska-Lincoln, Hardin Hall
3310 Holdrege St
Lincoln, NE 68583-0980
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rnomads-user/attachments/20170424/43d6a678/attachment.html>


More information about the Rnomads-user mailing list