<div>I fixed the issue and also made things simpler by just having the grib downloader return the full file name, so you can just say:</div><div><br></div><div>ReadGrib(<a href="http://grib.info">grib.info</a>[[1]]$<a href="http://file.name">file.name</a>, levels, variables)</div><div><br></div><div>no matter where the files listed in <a href="http://grib.info">grib.info</a> are located.</div><div><br></div><div>Thanks for bringing this to my attention! It will be in the next release, perhaps this weekend.</div><div><br><div class="gmail_quote"><div>On Tue, Apr 25, 2017 at 22:58 Daniel Bowman <<a href="mailto:danny.c.bowman@gmail.com">danny.c.bowman@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="gmail_quote"><div>---------- Forwarded message ---------<br>From: Michael Whitby <<a href="mailto:michael.whitby@huskers.unl.edu" target="_blank">michael.whitby@huskers.unl.edu</a>><br></div></div></div><div><div class="gmail_quote"><div>Date: Tue, Apr 25, 2017 at 14:57<br>Subject: Re: [Rnomads-user] Problem reading archived RUC ANL data shen local.dir specified<br>To: Daniel Bowman <<a href="mailto:danny.c.bowman@gmail.com" target="_blank">danny.c.bowman@gmail.com</a>><br></div></div></div><div><div class="gmail_quote"><br><br><div>scratch that second problem...somehow it randomly started working (aka, I probably messed up somewhere before)<br></div><div class="gmail_extra"></div><div class="gmail_extra"><br clear="all"><div><div class="m_-367877394588615699m_5421455208060749619gmail_signature" data-smartmail="gmail_signature"><div><div><div><div>________________________________________<br>Michael Whitby<br><a href="mailto:michael.whitby@huskers.unl.edu" target="_blank">michael.whitby@huskers.unl.edu</a><br>Cell: 609-923-0973<br><span style="font-size:12.8000001907349px"><a href="http://go.unl.edu/batmigration" target="_blank">http://go.unl.edu/batmigration</a></span><br></div><div><br></div><div>PhD student</div><div>Nebraska Cooperative Fish and Wildlife Research Unit<br>University of Nebraska-Lincoln, School of Natural Resources<br><span style="font-size:12.8000001907349px">Associate Wildlife Biologist (R)</span></div><div><br></div><div>Mailing/Shipping Address:</div><div>Michael Whitby</div><div>University of Nebraska-Lincoln, Hardin Hall</div><div>3310 Holdrege St</div><div>Lincoln, NE 68583-0980<br><br></div></div></div></div></div></div>
<br></div><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 25, 2017 at 1:13 PM, Michael Whitby <span><<a href="mailto:michael.whitby@huskers.unl.edu" target="_blank">michael.whitby@huskers.unl.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div>I got around it by temporarily changing my working directory and omitting the local.dir parameter...still might be worth a fix.<br><br></div>A second problem I ran into when reading the RAP anl layer (stored on Nomads under rucanl) is that I cannot figure out how to read anything from the layer stored as "entire atmosphere (considered as a single layer)" the GribInfo shows me that there are 4 variables with this layer but I cannot read any of them (I really only want 1 of them, but I've tried them all). <br><br></div>Thanks for any help you can manage. All in all, I can easily and quickly get the years of data I need with your package. <br></div><div class="gmail_extra"><span><br clear="all"><div><div class="m_-367877394588615699m_5421455208060749619m_-2243595375961468838gmail_signature" data-smartmail="gmail_signature"><div><div><div><div>________________________________________<br>Michael Whitby<br><a href="mailto:michael.whitby@huskers.unl.edu" target="_blank">michael.whitby@huskers.unl.edu</a><br>Cell: <a href="tel:(609)%20923-0973" value="+16099230973" target="_blank">609-923-0973</a><br><span style="font-size:12.8000001907349px"><a href="http://go.unl.edu/batmigration" target="_blank">http://go.unl.edu/batmigration</a></span><br></div><div><br></div><div>PhD student</div><div>Nebraska Cooperative Fish and Wildlife Research Unit<br>University of Nebraska-Lincoln, School of Natural Resources<br><span style="font-size:12.8000001907349px">Associate Wildlife Biologist (R)</span></div><div><br></div><div>Mailing/Shipping Address:</div><div>Michael Whitby</div><div>University of Nebraska-Lincoln, Hardin Hall</div><div>3310 Holdrege St</div><div>Lincoln, NE 68583-0980<br><br></div></div></div></div></div></div>
<br></span><div><div class="m_-367877394588615699m_5421455208060749619h5"><div class="gmail_quote">On Tue, Apr 25, 2017 at 12:40 AM, Daniel Bowman <span><<a href="mailto:danny.c.bowman@gmail.com" target="_blank">danny.c.bowman@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Michael,<br>
<br>
Thank you for letting me know about this problem. I'll track it down<br>
and fix it. Your timing is good because I'm planning on releasing a<br>
new version soon. In the meantime, I apologize for the inconvenience!<br>
<br>
Best,<br>
<br>
Danny<br>
<div><div class="m_-367877394588615699m_5421455208060749619m_-2243595375961468838h5"><br>
<br>
<br>
On Mon, Apr 24, 2017 at 12:35 PM, Michael Whitby<br>
<<a href="mailto:michael.whitby@huskers.unl.edu" target="_blank">michael.whitby@huskers.unl.edu</a>> wrote:<br>
> Hello,<br>
><br>
> Great package and thanks for maintaining it.<br>
><br>
> I am downloading many archived RAP products and want to specify the<br>
> directory they are saved to. I do this according to the documentation and it<br>
> works fine, however, I cannot read them. If I do not specify the local.dir,<br>
> It works fine. However when I run the below code, I get the error:<br>
><br>
><br>
> Error in seq.default(1, length(model.data.vector) - 6, by = 7) :<br>
> wrong sign in 'by' argument<br>
> In addition: Warning message:<br>
> running command 'C:\Windows\system32\cmd.exe /c wgrib2 C:\Users\mwhitby2\Box<br>
> Sync\BATTEAM\RAPdata\120150601_1200_000.grb2 -inv my.inv -csv - -no_header<br>
> -match "(TMP):(2 m above ground)"' had status 8<br>
><br>
> library(rNOMADS)<br>
><br>
> FOLDER.weather = ".\\RAPdata\\"<br>
> dir.create(FOLDER.weather)<br>
><br>
> date=20150601<br>
> hour=12<br>
> preds=00<br>
><br>
> <a href="http://model.info" rel="noreferrer" target="_blank">model.info</a> <- ArchiveGribGrab("rucanl", date, hour, preds, local.dir =<br>
> FOLDER.weather )<br>
><br>
> thisFILE <- paste0(<a href="http://model.info" rel="noreferrer" target="_blank">model.info</a>[[1]]$local.dir, <a href="http://model.info" rel="noreferrer" target="_blank">model.info</a>[[1]]$<a href="http://file.name" rel="noreferrer" target="_blank">file.name</a>[1])<br>
><br>
> model.data <- ReadGrib(thisFILE, "2 m above ground", "TMP")<br>
><br>
> ##Have also tried this with same effect<br>
> model.data <- ReadGrib(<a href="http://model.info" rel="noreferrer" target="_blank">model.info</a>[[1]]$<a href="http://file.name" rel="noreferrer" target="_blank">file.name</a>[1], "2 m above ground",<br>
> "TMP")<br>
><br>
> ________________________________________<br>
> Michael Whitby<br>
> <a href="mailto:michael.whitby@huskers.unl.edu" target="_blank">michael.whitby@huskers.unl.edu</a><br>
> Cell: <a href="tel:609-923-0973" value="+16099230973" target="_blank">609-923-0973</a><br>
> <a href="http://go.unl.edu/batmigration" rel="noreferrer" target="_blank">http://go.unl.edu/batmigration</a><br>
><br>
> PhD student<br>
> Nebraska Cooperative Fish and Wildlife Research Unit<br>
> University of Nebraska-Lincoln, School of Natural Resources<br>
> Associate Wildlife Biologist (R)<br>
><br>
> Mailing/Shipping Address:<br>
> Michael Whitby<br>
> University of Nebraska-Lincoln, Hardin Hall<br>
> 3310 Holdrege St<br>
> Lincoln, NE 68583-0980<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Rnomads-user mailing list<br>
> <a href="mailto:Rnomads-user@lists.r-forge.r-project.org" target="_blank">Rnomads-user@lists.r-forge.r-project.org</a><br>
> <a href="http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rnomads-user" rel="noreferrer" target="_blank">http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rnomads-user</a><br>
><br>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div></blockquote></div></div>