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

Daniel Bowman danny.c.bowman at gmail.com
Wed Apr 26 05:47:49 CEST 2017


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:

ReadGrib(grib.info[[1]]$file.name, levels, variables)

no matter where the files listed in grib.info are located.

Thanks for bringing this to my attention!  It will be in the next release,
perhaps this weekend.

On Tue, Apr 25, 2017 at 22:58 Daniel Bowman <danny.c.bowman at gmail.com>
wrote:

> ---------- Forwarded message ---------
> From: Michael Whitby <michael.whitby at huskers.unl.edu>
> Date: Tue, Apr 25, 2017 at 14:57
> Subject: Re: [Rnomads-user] Problem reading archived RUC ANL data shen
> local.dir specified
> To: Daniel Bowman <danny.c.bowman at gmail.com>
>
>
> scratch that second problem...somehow it randomly started working (aka, I
> probably messed up somewhere before)
>
> ________________________________________
> 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
>
>
> On Tue, Apr 25, 2017 at 1:13 PM, Michael Whitby <
> michael.whitby at huskers.unl.edu> wrote:
>
>> I got around it by temporarily changing my working directory and omitting
>> the local.dir parameter...still might be worth a fix.
>>
>> 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).
>>
>> 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.
>>
>> ________________________________________
>> Michael Whitby
>> michael.whitby at huskers.unl.edu
>> Cell: 609-923-0973 <(609)%20923-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
>>
>>
>> On Tue, Apr 25, 2017 at 12:40 AM, Daniel Bowman <danny.c.bowman at gmail.com
>> > wrote:
>>
>>> Hi Michael,
>>>
>>> Thank you for letting me know about this problem.  I'll track it down
>>> and fix it.  Your timing is good because I'm planning on releasing a
>>> new version soon.  In the meantime, I apologize for the inconvenience!
>>>
>>> Best,
>>>
>>> Danny
>>>
>>>
>>>
>>> On Mon, Apr 24, 2017 at 12:35 PM, Michael Whitby
>>> <michael.whitby at huskers.unl.edu> wrote:
>>> > 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
>>> >
>>> >
>>> > _______________________________________________
>>> > 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: <http://lists.r-forge.r-project.org/pipermail/rnomads-user/attachments/20170426/d0bea559/attachment.html>


More information about the Rnomads-user mailing list