From michael.whitby at huskers.unl.edu Mon Apr 24 20:35:08 2017 From: michael.whitby at huskers.unl.edu (Michael Whitby) Date: Mon, 24 Apr 2017 13:35:08 -0500 Subject: [Rnomads-user] Problem reading archived RUC ANL data shen local.dir specified Message-ID: 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: From danny.c.bowman at gmail.com Tue Apr 25 07:40:27 2017 From: danny.c.bowman at gmail.com (Daniel Bowman) Date: Mon, 24 Apr 2017 23:40:27 -0600 Subject: [Rnomads-user] Problem reading archived RUC ANL data shen local.dir specified In-Reply-To: References: Message-ID: 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 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 > From danny.c.bowman at gmail.com Wed Apr 26 05:47:49 2017 From: danny.c.bowman at gmail.com (Daniel Bowman) Date: Wed, 26 Apr 2017 03:47:49 +0000 Subject: [Rnomads-user] Problem reading archived RUC ANL data shen local.dir specified In-Reply-To: References: Message-ID: 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 wrote: > ---------- Forwarded message --------- > From: Michael Whitby > 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 > > > 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 > > 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 >>> 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: From ivan.latorrev at gmail.com Wed Apr 26 03:49:13 2017 From: ivan.latorrev at gmail.com (=?UTF-8?Q?Iv=C3=A1n_Latorre_Vera?=) Date: Tue, 25 Apr 2017 22:49:13 -0300 Subject: [Rnomads-user] Selecting Message-ID: Hello. First thanks for the package ! Im trying to read grib2 data on R (NOAA Precipitation data). Can I select the zone of study with RNOMADS ? Iv?n Latorre Vera -------------- next part -------------- An HTML attachment was scrubbed... URL: From danny.c.bowman at gmail.com Wed Apr 26 05:59:02 2017 From: danny.c.bowman at gmail.com (Daniel Bowman) Date: Wed, 26 Apr 2017 03:59:02 +0000 Subject: [Rnomads-user] Selecting In-Reply-To: References: Message-ID: Hello, Yes, you can use the "domain" argument in GribGrab. This will only download data from a latitude longitude box that you define. You can also set the "domain" argument in ReadGrib to only read data in a certain location. This is explained in the package help files, and I think some examples use them. Best, Danny On Tue, Apr 25, 2017 at 23:50 Iv?n Latorre Vera wrote: > Hello. > > First thanks for the package ! > > Im trying to read grib2 data on R (NOAA Precipitation data). > Can I select the zone of study with RNOMADS ? > > Iv?n Latorre Vera > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: