From rkertesz at emnet.net Tue Mar 1 01:03:13 2016 From: rkertesz at emnet.net (Ruben Kertesz) Date: Tue, 1 Mar 2016 00:03:13 +0000 Subject: [Rnomads-user] Issue with using multiple Lat/Lon. Not sure what is causing it. Message-ID: Good evening, I have been using rNOMADS for some rainfall work and am happy to say that it is very powerful! Today I ran into an issue where I can?t use multiple lat/lon values for the RTModelProfile function. Actually, I can if they are very close to (-79.052104, 35.907553 - lon/lat). I would like to ask if anyone has insight into why this is happening. First of all, I put my code up to pastebin here: http://pastebin.com/WyVn84bp The issue is showing up in BuildProfile. The code is reproduced here. I get valid values in layer.img when using the single x/y. if (spatial.average) { for (k in seq_len(length(gridded.data$levels))) { for (j in seq_len(length(gridded.data$variables))) { layer.img <- t(rbind(as.vector(cart.pts$x), as.vector(cart.pts$y[nrow(cart.pts$y):1, ]), as.vector(t(gridded.data$z[k, j, , ])))) profile.data[k, j] <- MBA::mba.points(layer.img, cbind(0, 0))[[1]][3] } If I use this: lon <- c(-79.052104)#, -78.010020) lat <- c(35.907553)#, 36.000200) Then I get this in layer.img: [,1] [,2] [,3] [1,] -102.02596 -129.16620 0 [2,] -102.68684 -73.50205 0 [3,] -103.33989 -17.83809 0 [4,] -103.98508 37.82569 0 [5,] -104.62235 93.48929 0 [6,] -57.42160 -129.57281 0 [7,] -57.79351 -73.91126 0 [8,] -58.16101 -18.24976 0 [9,] -58.52409 37.41168 0 [10,] -58.88271 93.07305 0 [11,] -12.81848 -129.75192 0 [12,] -12.90150 -74.09151 0 [13,] -12.98354 -18.43110 0 [14,] -13.06459 37.22931 0 [15,] -13.14464 92.88971 0 [16,] 31.78435 -129.70356 0 [17,] 31.99021 -74.04284 0 [18,] 32.19362 -18.38214 0 [19,] 32.39459 37.27855 0 [20,] 32.59308 92.93921 0 [21,] 76.38788 -129.42772 0 [22,] 76.88265 -73.76524 0 [23,] 77.37156 -18.10286 0 [24,] 77.85458 37.55941 0 [25,] 78.33167 93.22158 0 BUT If I use this: lon <- c(-79.052104, -78.010020) lat <- c(35.907553, 36.000200) Then I get this. The NA causes all sorts of problems. I ran out of steam to try and figure out why this is happening. [,1] [,2] [,3] [1,] -101.50132 -141.10061 NA [2,] -102.16831 -85.43643 0 [3,] -102.82751 -29.77243 0 [4,] -103.47889 25.89139 0 [5,] -104.12238 81.55503 0 [6,] -104.75795 137.21848 NA [7,] -57.12636 -141.50666 0 [8,] -57.50171 -85.84509 0 [9,] -57.87267 -30.18358 0 [10,] -58.23923 25.47787 0 [11,] -58.60135 81.13926 0 [12,] -58.95901 136.80059 0 [13,] -12.75258 -141.68551 0 [14,] -12.83637 -86.02510 0 [15,] -12.91917 -30.36469 0 [16,] -13.00100 25.29572 0 [17,] -13.08183 80.95612 0 [18,] -13.16167 136.61652 0 [19,] 31.62094 -141.63722 0 [20,] 31.82869 -85.97649 0 [21,] 32.03402 -30.31579 0 [22,] 32.23692 25.34490 0 [23,] 32.43735 81.00557 0 [24,] 32.63532 136.66622 0 [25,] 75.99511 -141.36177 0 [26,] 76.49445 -85.69927 0 [27,] 76.98796 -30.03687 0 [28,] 77.47562 25.62543 0 [29,] 77.95737 81.28762 0 [30,] 78.43319 136.94971 0 [31,] 120.37085 -140.85909 0 [32,] 121.16188 -85.19335 0 [33,] 121.94369 -29.52787 0 [34,] 122.71621 26.13736 0 [35,] 123.47939 81.80233 0 [36,] 124.23317 137.46704 0 [37,] 164.74907 -140.12908 0 [38,] 165.83197 -84.45864 0 [39,] 166.90224 -28.78867 0 [40,] 167.95981 26.88082 0 [41,] 169.00459 82.54982 0 [42,] 170.03650 138.21833 0 Any help is greatly appreciated! Ruben Kertesz, Ph.D. Environmental Engineer EmNet LLC 121 S. Niles Ave. Suite #22 South Bend, IN 46617 Office: 574.855.1012 x115 -------------- next part -------------- An HTML attachment was scrubbed... URL: From haksaeng at live.unc.edu Tue Mar 1 01:49:21 2016 From: haksaeng at live.unc.edu (Bowman, Daniel) Date: Tue, 1 Mar 2016 00:49:21 +0000 Subject: [Rnomads-user] Issue with using multiple Lat/Lon. Not sure what is causing it. In-Reply-To: References: Message-ID: Hi Ruben, The short answer is that the NARRE is not on a regular lat-lon grid, and my data processing codes are not optimized for such grids. Long answer: The data processing code in rNOMADS work best on regular lat lon grids, for the simple reason that I exclusively use the GFS in my own work. I decided to put some of the more useful functions into the official package after considerable internal debate, mainly because I wanted to save users time. At the same time, rNOMADS is intended to be a pipeline and not a "weather model processing package" so some of these functions are not very sophisticated. Your best bet at this point is to download the grib file in the region of interest, read it in, examine the lat/lon values it returns, select the one closest to the region you want, and use that one. I've written up a script that should do what you want: http://pastebin.com/6gv6gkP6 Best, Danny Daniel C. Bowman Doctoral Candidate in Geophysics UNC Chapel Hill phone: 575-418-8555 curriculum vitae: http://www.unc.edu/~haksaeng/curriculum_vitae/bowman_cv.pdf LinkedIn: https://www.linkedin.com/in/dannycbowman web:http://geosci.unc.edu/page/daniel-c-bowman twitter: @dannycbowman ________________________________ From: rnomads-user-bounces at lists.r-forge.r-project.org on behalf of Ruben Kertesz Sent: Monday, February 29, 2016 7:03 PM To: rnomads-user at lists.r-forge.r-project.org Subject: [Rnomads-user] Issue with using multiple Lat/Lon. Not sure what is causing it. Good evening, I have been using rNOMADS for some rainfall work and am happy to say that it is very powerful! Today I ran into an issue where I can?t use multiple lat/lon values for the RTModelProfile function. Actually, I can if they are very close to (-79.052104, 35.907553 - lon/lat). I would like to ask if anyone has insight into why this is happening. First of all, I put my code up to pastebin here: http://pastebin.com/WyVn84bp The issue is showing up in BuildProfile. The code is reproduced here. I get valid values in layer.img when using the single x/y. if (spatial.average) { for (k in seq_len(length(gridded.data$levels))) { for (j in seq_len(length(gridded.data$variables))) { layer.img <- t(rbind(as.vector(cart.pts$x), as.vector(cart.pts$y[nrow(cart.pts$y):1, ]), as.vector(t(gridded.data$z[k, j, , ])))) profile.data[k, j] <- MBA::mba.points(layer.img, cbind(0, 0))[[1]][3] } If I use this: lon <- c(-79.052104)#, -78.010020) lat <- c(35.907553)#, 36.000200) Then I get this in layer.img: [,1] [,2] [,3] [1,] -102.02596 -129.16620 0 [2,] -102.68684 -73.50205 0 [3,] -103.33989 -17.83809 0 [4,] -103.98508 37.82569 0 [5,] -104.62235 93.48929 0 [6,] -57.42160 -129.57281 0 [7,] -57.79351 -73.91126 0 [8,] -58.16101 -18.24976 0 [9,] -58.52409 37.41168 0 [10,] -58.88271 93.07305 0 [11,] -12.81848 -129.75192 0 [12,] -12.90150 -74.09151 0 [13,] -12.98354 -18.43110 0 [14,] -13.06459 37.22931 0 [15,] -13.14464 92.88971 0 [16,] 31.78435 -129.70356 0 [17,] 31.99021 -74.04284 0 [18,] 32.19362 -18.38214 0 [19,] 32.39459 37.27855 0 [20,] 32.59308 92.93921 0 [21,] 76.38788 -129.42772 0 [22,] 76.88265 -73.76524 0 [23,] 77.37156 -18.10286 0 [24,] 77.85458 37.55941 0 [25,] 78.33167 93.22158 0 BUT If I use this: lon <- c(-79.052104, -78.010020) lat <- c(35.907553, 36.000200) Then I get this. The NA causes all sorts of problems. I ran out of steam to try and figure out why this is happening. [,1] [,2] [,3] [1,] -101.50132 -141.10061 NA [2,] -102.16831 -85.43643 0 [3,] -102.82751 -29.77243 0 [4,] -103.47889 25.89139 0 [5,] -104.12238 81.55503 0 [6,] -104.75795 137.21848 NA [7,] -57.12636 -141.50666 0 [8,] -57.50171 -85.84509 0 [9,] -57.87267 -30.18358 0 [10,] -58.23923 25.47787 0 [11,] -58.60135 81.13926 0 [12,] -58.95901 136.80059 0 [13,] -12.75258 -141.68551 0 [14,] -12.83637 -86.02510 0 [15,] -12.91917 -30.36469 0 [16,] -13.00100 25.29572 0 [17,] -13.08183 80.95612 0 [18,] -13.16167 136.61652 0 [19,] 31.62094 -141.63722 0 [20,] 31.82869 -85.97649 0 [21,] 32.03402 -30.31579 0 [22,] 32.23692 25.34490 0 [23,] 32.43735 81.00557 0 [24,] 32.63532 136.66622 0 [25,] 75.99511 -141.36177 0 [26,] 76.49445 -85.69927 0 [27,] 76.98796 -30.03687 0 [28,] 77.47562 25.62543 0 [29,] 77.95737 81.28762 0 [30,] 78.43319 136.94971 0 [31,] 120.37085 -140.85909 0 [32,] 121.16188 -85.19335 0 [33,] 121.94369 -29.52787 0 [34,] 122.71621 26.13736 0 [35,] 123.47939 81.80233 0 [36,] 124.23317 137.46704 0 [37,] 164.74907 -140.12908 0 [38,] 165.83197 -84.45864 0 [39,] 166.90224 -28.78867 0 [40,] 167.95981 26.88082 0 [41,] 169.00459 82.54982 0 [42,] 170.03650 138.21833 0 Any help is greatly appreciated! Ruben Kertesz, Ph.D. Environmental Engineer EmNet LLC 121 S. Niles Ave. Suite #22 South Bend, IN 46617 Office: 574.855.1012 x115 -------------- next part -------------- An HTML attachment was scrubbed... URL: From rkertesz at emnet.net Wed Mar 2 19:04:19 2016 From: rkertesz at emnet.net (Ruben Kertesz) Date: Wed, 2 Mar 2016 18:04:19 +0000 Subject: [Rnomads-user] Issue with using multiple Lat/Lon. Not sure what is causing it. In-Reply-To: References: Message-ID: Thank you Danny, I wanted to try and use some of the other functions in the rNOMADS package which require the use of ModelGrid so I thought I could define the map as Cartesian and define the projection using GEOmap. The interesting thing I got from the grib file is this: 1:0:grid_template=30:winds(grid): Lambert Conformal: (8 x 10) input WE:SN output WE:SN res 8 Lat1 36.887638 Lon1 237.104317 LoV 265.000000 LatD 25.000000 Latin1 25.000000 Latin2 25.000000 LatSP 0.000000 LonSP 0.000000 North Pole (8 x 10) Dx 13545.000000 m Dy 13545.000000 m mode 8 * (lat1,lon1) = lat/lon of first grid point (deg) * lov = the orientation of the grid, i.e., the east longitude value of the meridian which is parallel to the y-axis (or columns of the grid) along which latitude increases as the y-coordinate increases. (Note: The orientation longitude may, or may not, appear within a particular grid.) * latin1 = The first latitude from the pole at which the secant cone cuts the spherical earth. (deg) * latin2 = The second latitude from the pole at which the secant cone cuts the spherical earth. (deg) I had trouble finding the center of the projection from this but lo and behold, I did get a 13 by 13 km resolution after projecting it using a default projection proj = setPROJ(type = 2, LAT0 =23, LON0 = 35) XY = GLOB.XY(grb.data$lat, grb.data$lon, proj) Then I defined the following cartnodes = list(x=XY$x, y=XY$y) The problem that crept in is when I ran the following. atmos <- ModelGrid(grb.data, resolution, grid.type, model.domain = domain, cartesian.nodes=cartnodes) I think that the model domain should now be the extent of the result from GLOB.XY rather than the extents of the unprojected x/y values from the grib file. Otherwise, what happens is that I use a 13 km resolution (see Dx and Dy in the grib file metadata at the top of this email) but the following code steps by the value 13 in a domain of span with value = 2 because there is a unit mismatch. Am I understanding correctly? I know that you've not used this with projected models like this so I understand if you do not have time to provide any answers. grid <- list(x = seq(model.domain[1], model.domain[2], by = resolution[1]), y = seq(model.domain[4], model.domain[3], by = resolution[2])) fcst.grid <- list(z = array(rep(NA, length(grid$x) * length(grid$y) * length(variables) * length(levels)), dim = c(length(levels), length(variables), length(grid$x), length(grid$y))), x = grid$x, y = grid$y, variables = variables, levels = levels, model.run.date = model.run.date, fcst.date = fcst.date) Ruben Kertesz, Ph.D. Environmental Engineer EmNet LLC Office: 574.855.1012 x115 From: rnomads-user-bounces at lists.r-forge.r-project.org [mailto:rnomads-user-bounces at lists.r-forge.r-project.org] On Behalf Of Bowman, Daniel Sent: Monday, February 29, 2016 7:49 PM To: rnomads-user at lists.r-forge.r-project.org Subject: Re: [Rnomads-user] Issue with using multiple Lat/Lon. Not sure what is causing it. Hi Ruben, The short answer is that the NARRE is not on a regular lat-lon grid, and my data processing codes are not optimized for such grids. Long answer: The data processing code in rNOMADS work best on regular lat lon grids, for the simple reason that I exclusively use the GFS in my own work. I decided to put some of the more useful functions into the official package after considerable internal debate, mainly because I wanted to save users time. At the same time, rNOMADS is intended to be a pipeline and not a "weather model processing package" so some of these functions are not very sophisticated. Your best bet at this point is to download the grib file in the region of interest, read it in, examine the lat/lon values it returns, select the one closest to the region you want, and use that one. I've written up a script that should do what you want: http://pastebin.com/6gv6gkP6 Best, Danny Daniel C. Bowman Doctoral Candidate in Geophysics UNC Chapel Hill phone: 575-418-8555 curriculum vitae: http://www.unc.edu/~haksaeng/curriculum_vitae/bowman_cv.pdf LinkedIn: https://www.linkedin.com/in/dannycbowman web:http://geosci.unc.edu/page/daniel-c-bowman twitter: @dannycbowman ________________________________ From: rnomads-user-bounces at lists.r-forge.r-project.org > on behalf of Ruben Kertesz > Sent: Monday, February 29, 2016 7:03 PM To: rnomads-user at lists.r-forge.r-project.org Subject: [Rnomads-user] Issue with using multiple Lat/Lon. Not sure what is causing it. Good evening, I have been using rNOMADS for some rainfall work and am happy to say that it is very powerful! Today I ran into an issue where I can't use multiple lat/lon values for the RTModelProfile function. Actually, I can if they are very close to (-79.052104, 35.907553 - lon/lat). I would like to ask if anyone has insight into why this is happening. First of all, I put my code up to pastebin here: http://pastebin.com/WyVn84bp The issue is showing up in BuildProfile. The code is reproduced here. I get valid values in layer.img when using the single x/y. if (spatial.average) { for (k in seq_len(length(gridded.data$levels))) { for (j in seq_len(length(gridded.data$variables))) { layer.img <- t(rbind(as.vector(cart.pts$x), as.vector(cart.pts$y[nrow(cart.pts$y):1, ]), as.vector(t(gridded.data$z[k, j, , ])))) profile.data[k, j] <- MBA::mba.points(layer.img, cbind(0, 0))[[1]][3] } If I use this: lon <- c(-79.052104)#, -78.010020) lat <- c(35.907553)#, 36.000200) Then I get this in layer.img: [,1] [,2] [,3] [1,] -102.02596 -129.16620 0 [2,] -102.68684 -73.50205 0 [3,] -103.33989 -17.83809 0 [4,] -103.98508 37.82569 0 [5,] -104.62235 93.48929 0 [6,] -57.42160 -129.57281 0 [7,] -57.79351 -73.91126 0 [8,] -58.16101 -18.24976 0 [9,] -58.52409 37.41168 0 [10,] -58.88271 93.07305 0 [11,] -12.81848 -129.75192 0 [12,] -12.90150 -74.09151 0 [13,] -12.98354 -18.43110 0 [14,] -13.06459 37.22931 0 [15,] -13.14464 92.88971 0 [16,] 31.78435 -129.70356 0 [17,] 31.99021 -74.04284 0 [18,] 32.19362 -18.38214 0 [19,] 32.39459 37.27855 0 [20,] 32.59308 92.93921 0 [21,] 76.38788 -129.42772 0 [22,] 76.88265 -73.76524 0 [23,] 77.37156 -18.10286 0 [24,] 77.85458 37.55941 0 [25,] 78.33167 93.22158 0 BUT If I use this: lon <- c(-79.052104, -78.010020) lat <- c(35.907553, 36.000200) Then I get this. The NA causes all sorts of problems. I ran out of steam to try and figure out why this is happening. [,1] [,2] [,3] [1,] -101.50132 -141.10061 NA [2,] -102.16831 -85.43643 0 [3,] -102.82751 -29.77243 0 [4,] -103.47889 25.89139 0 [5,] -104.12238 81.55503 0 [6,] -104.75795 137.21848 NA [7,] -57.12636 -141.50666 0 [8,] -57.50171 -85.84509 0 [9,] -57.87267 -30.18358 0 [10,] -58.23923 25.47787 0 [11,] -58.60135 81.13926 0 [12,] -58.95901 136.80059 0 [13,] -12.75258 -141.68551 0 [14,] -12.83637 -86.02510 0 [15,] -12.91917 -30.36469 0 [16,] -13.00100 25.29572 0 [17,] -13.08183 80.95612 0 [18,] -13.16167 136.61652 0 [19,] 31.62094 -141.63722 0 [20,] 31.82869 -85.97649 0 [21,] 32.03402 -30.31579 0 [22,] 32.23692 25.34490 0 [23,] 32.43735 81.00557 0 [24,] 32.63532 136.66622 0 [25,] 75.99511 -141.36177 0 [26,] 76.49445 -85.69927 0 [27,] 76.98796 -30.03687 0 [28,] 77.47562 25.62543 0 [29,] 77.95737 81.28762 0 [30,] 78.43319 136.94971 0 [31,] 120.37085 -140.85909 0 [32,] 121.16188 -85.19335 0 [33,] 121.94369 -29.52787 0 [34,] 122.71621 26.13736 0 [35,] 123.47939 81.80233 0 [36,] 124.23317 137.46704 0 [37,] 164.74907 -140.12908 0 [38,] 165.83197 -84.45864 0 [39,] 166.90224 -28.78867 0 [40,] 167.95981 26.88082 0 [41,] 169.00459 82.54982 0 [42,] 170.03650 138.21833 0 Any help is greatly appreciated! Ruben Kertesz, Ph.D. Environmental Engineer EmNet LLC 121 S. Niles Ave. Suite #22 South Bend, IN 46617 Office: 574.855.1012 x115 -------------- next part -------------- An HTML attachment was scrubbed... URL: From haksaeng at live.unc.edu Wed Mar 9 03:50:09 2016 From: haksaeng at live.unc.edu (Bowman, Daniel) Date: Wed, 9 Mar 2016 02:50:09 +0000 Subject: [Rnomads-user] bug fixes / feature requests for new rNOMADS version? Message-ID: Hello all, I'm hoping to release a new version of rNOMADS soon, and I'd like to know if there are any outstanding issues or feature requests that you'd like to see. Currently there are some problems involving making profiles, and I'll be addressing those. Best, Danny Daniel C. Bowman Doctoral Candidate in Geophysics UNC Chapel Hill phone: 575-418-8555 curriculum vitae: http://www.unc.edu/~haksaeng/curriculum_vitae/bowman_cv.pdf LinkedIn: https://www.linkedin.com/in/dannycbowman web:http://geosci.unc.edu/page/daniel-c-bowman twitter: @dannycbowman -------------- next part -------------- An HTML attachment was scrubbed... URL: From rkertesz at emnet.net Wed Mar 9 21:45:51 2016 From: rkertesz at emnet.net (Ruben Kertesz) Date: Wed, 9 Mar 2016 20:45:51 +0000 Subject: [Rnomads-user] bug fixes / feature requests for new rNOMADS version? In-Reply-To: References: Message-ID: <663F8CECE869AEBD.2888663F-F8F5-4B21-B3E6-D0144421A2B8@mail.outlook.com> Not a bug but a suggestion. It would be nice to set up the ReadGrib function to get passed variables, then levels. I know we can explicitly define them and then use whatever order we like but I see that in the function we execute commands using variables then levels. Why not by default pass them to the function in the same way? Surprisingly, the order of string construction using -match is fairly important and it needs variables then levels. FYI: I am doing some major adding to the ReadGrib function to let me use gridded variables and multiple time horizons for the NARRE data that isn't currently possible. Also, I found a neat function in wgrib2 to generate a regular grid for the NARRE data (to answer a previous q I posted to the list). You probably are just as well off doing this using an r mapping function however. Ruben Kertesz, Ph.D. Environmental Engineer EmNet LLC Office: 574.855.1012 x115 On Tue, Mar 8, 2016 at 6:50 PM -0800, "Bowman, Daniel" > wrote: Hello all, I'm hoping to release a new version of rNOMADS soon, and I'd like to know if there are any outstanding issues or feature requests that you'd like to see. Currently there are some problems involving making profiles, and I'll be addressing those. Best, Danny Daniel C. Bowman Doctoral Candidate in Geophysics UNC Chapel Hill phone: 575-418-8555 curriculum vitae: http://www.unc.edu/~haksaeng/curriculum_vitae/bowman_cv.pdf LinkedIn: https://www.linkedin.com/in/dannycbowman web:http://geosci.unc.edu/page/daniel-c-bowman twitter: @dannycbowman -------------- next part -------------- An HTML attachment was scrubbed... URL: From haksaeng at live.unc.edu Tue Mar 15 01:56:10 2016 From: haksaeng at live.unc.edu (Bowman, Daniel) Date: Tue, 15 Mar 2016 00:56:10 +0000 Subject: [Rnomads-user] bug fixes / feature requests for new rNOMADS version? In-Reply-To: <663F8CECE869AEBD.2888663F-F8F5-4B21-B3E6-D0144421A2B8@mail.outlook.com> References: , <663F8CECE869AEBD.2888663F-F8F5-4B21-B3E6-D0144421A2B8@mail.outlook.com> Message-ID: Hi Ruben, Thanks for the suggestion, and sorry for the late reply. I'd be happy to change the order except that I do not used named arguments in my paper. So, if I were to change the order, it would break my examples! I'm very interested in seeing your version of ReadGrib, are you willing to have it added to rNOMADS? I'd add you as a contributor to the package. Best, Danny Daniel C. Bowman Doctoral Candidate in Geophysics UNC Chapel Hill phone: 575-418-8555 curriculum vitae: http://www.unc.edu/~haksaeng/curriculum_vitae/bowman_cv.pdf LinkedIn: https://www.linkedin.com/in/dannycbowman web:http://geosci.unc.edu/page/daniel-c-bowman twitter: @dannycbowman ________________________________ From: rnomads-user-bounces at lists.r-forge.r-project.org on behalf of Ruben Kertesz Sent: Wednesday, March 9, 2016 3:45 PM To: Announcements, feature requests, and help using rNOMADS Subject: Re: [Rnomads-user] bug fixes / feature requests for new rNOMADS version? Not a bug but a suggestion. It would be nice to set up the ReadGrib function to get passed variables, then levels. I know we can explicitly define them and then use whatever order we like but I see that in the function we execute commands using variables then levels. Why not by default pass them to the function in the same way? Surprisingly, the order of string construction using -match is fairly important and it needs variables then levels. FYI: I am doing some major adding to the ReadGrib function to let me use gridded variables and multiple time horizons for the NARRE data that isn't currently possible. Also, I found a neat function in wgrib2 to generate a regular grid for the NARRE data (to answer a previous q I posted to the list). You probably are just as well off doing this using an r mapping function however. Ruben Kertesz, Ph.D. Environmental Engineer EmNet LLC Office: 574.855.1012 x115 On Tue, Mar 8, 2016 at 6:50 PM -0800, "Bowman, Daniel" > wrote: Hello all, I'm hoping to release a new version of rNOMADS soon, and I'd like to know if there are any outstanding issues or feature requests that you'd like to see. Currently there are some problems involving making profiles, and I'll be addressing those. Best, Danny Daniel C. Bowman Doctoral Candidate in Geophysics UNC Chapel Hill phone: 575-418-8555 curriculum vitae: http://www.unc.edu/~haksaeng/curriculum_vitae/bowman_cv.pdf LinkedIn: https://www.linkedin.com/in/dannycbowman web:http://geosci.unc.edu/page/daniel-c-bowman twitter: @dannycbowman -------------- next part -------------- An HTML attachment was scrubbed... URL: From rkertesz at emnet.net Tue Mar 15 03:13:04 2016 From: rkertesz at emnet.net (Ruben Kertesz) Date: Tue, 15 Mar 2016 02:13:04 +0000 Subject: [Rnomads-user] bug fixes / feature requests for new rNOMADS version? In-Reply-To: References: , <663F8CECE869AEBD.2888663F-F8F5-4B21-B3E6-D0144421A2B8@mail.outlook.com>, Message-ID: Thanks Danny, I think that would be great. My company often encourages us to contribute back to OSS projects and it helps my case to be shown as a contributor to rNOMADS. I should be able to disclose at least some if not all of the code after our project with our current client is complete. Also, a bug that I came across in your code that you may be interested in: profile.data[[k]] <- BuildProfile(gridded.data, lon[k], lat[k], spatial.average)[l.i$ix, ] #The [l.i$ix, ] works when using spatial averaging but not nearest neighbor. #So, either there would be a check here to see if spatial averaging is used or the matrix needs to be the same between the two methods #\/ \/ ##########in BuildProfile####################\/ \/ #This will create a 1 x 5 matrix for me since I wave one level and 5 variables if (spatial.average) { for (k in seq_len(length(gridded.data$levels))) { for (j in seq_len(length(gridded.data$variables))) { layer.img <- t(rbind(as.vector(cart.pts$x), as.vector(cart.pts$y[nrow(cart.pts$y):1, ]), as.vector(t(gridded.data$z[k, j, , ])))) profile.data[k, j] <- MBA::mba.points(layer.img, cbind(0, 0))[[1]][3] } } } #This will create a list of 5 elements where there isn?t an explicit enumeration for the single level. else { cart.dist <- sqrt(cart.pts$x^2 + cart.pts$y^2) node.ind <- rev(which(cart.dist[nrow(cart.dist):1, ] == min(cart.dist), arr.ind = TRUE)) profile.data <- gridded.data$z[, , node.ind[1], node.ind[2]] #THIS IS THE OFFENDING CODE #redundant spatial.average.method <- "Nearest Node" } Ruben Kertesz, Ph.D. Environmental Engineer EmNet LLC 121 S. Niles Ave. Suite #22 South Bend, IN 46617 Office: 574.855.1012 x115 From: Bowman, Daniel Sent: Monday, March 14, 2016 8:56 PM To: Announcements, feature requests, and help using rNOMADS Subject: Re: [Rnomads-user] bug fixes / feature requests for new rNOMADS version? Hi Ruben, Thanks for the suggestion, and sorry for the late reply. I'd be happy to change the order except that I do not used named arguments in my paper. So, if I were to change the order, it would break my examples! I'm very interested in seeing your version of ReadGrib, are you willing to have it added to rNOMADS? I'd add you as a contributor to the package. Best, Danny Daniel C. Bowman Doctoral Candidate in Geophysics UNC Chapel Hill phone: 575-418-8555 curriculum vitae: http://www.unc.edu/~haksaeng/curriculum_vitae/bowman_cv.pdf LinkedIn: https://www.linkedin.com/in/dannycbowman web:http://geosci.unc.edu/page/daniel-c-bowman twitter: @dannycbowman ________________________________ From: rnomads-user-bounces at lists.r-forge.r-project.org on behalf of Ruben Kertesz Sent: Wednesday, March 9, 2016 3:45 PM To: Announcements, feature requests, and help using rNOMADS Subject: Re: [Rnomads-user] bug fixes / feature requests for new rNOMADS version? Not a bug but a suggestion. It would be nice to set up the ReadGrib function to get passed variables, then levels. I know we can explicitly define them and then use whatever order we like but I see that in the function we execute commands using variables then levels. Why not by default pass them to the function in the same way? Surprisingly, the order of string construction using -match is fairly important and it needs variables then levels. FYI: I am doing some major adding to the ReadGrib function to let me use gridded variables and multiple time horizons for the NARRE data that isn't currently possible. Also, I found a neat function in wgrib2 to generate a regular grid for the NARRE data (to answer a previous q I posted to the list). You probably are just as well off doing this using an r mapping function however. Ruben Kertesz, Ph.D. Environmental Engineer EmNet LLC Office: 574.855.1012 x115 On Tue, Mar 8, 2016 at 6:50 PM -0800, "Bowman, Daniel" > wrote: Hello all, I'm hoping to release a new version of rNOMADS soon, and I'd like to know if there are any outstanding issues or feature requests that you'd like to see. Currently there are some problems involving making profiles, and I'll be addressing those. Best, Danny Daniel C. Bowman Doctoral Candidate in Geophysics UNC Chapel Hill phone: 575-418-8555 curriculum vitae: http://www.unc.edu/~haksaeng/curriculum_vitae/bowman_cv.pdf LinkedIn: https://www.linkedin.com/in/dannycbowman web:http://geosci.unc.edu/page/daniel-c-bowman twitter: @dannycbowman -------------- next part -------------- An HTML attachment was scrubbed... URL: From haksaeng at live.unc.edu Tue Mar 22 16:31:48 2016 From: haksaeng at live.unc.edu (Bowman, Daniel) Date: Tue, 22 Mar 2016 15:31:48 +0000 Subject: [Rnomads-user] rNOMADS 2.2.0 released Message-ID: Hello all, A new version of rNOMADS is on CRAN, and I've gone through and updated all the code on my vignettes, blog, examples, etc. The most significant changes include: reworking BuildProfile to use the output of ReadGrib or DODSGrab (previously you had to project to a grid using ModelGrid prior to using BuildProfile), allowing BuildProfile to have multiple input points, discontinuing the ability of ModelGrid to attempt to project to non-regular lat/lon grids, and removing the RTModelProfile function entirely. I made these changes to streamline data processing with rNOMADS while trying to keep it from becoming a geospatial analytics package. There are plenty of good packages for that; rNOMADS should focus on providing the data. Please try out the new version (rNOMADS 2.2.0) and let me know what you think! Best, Danny Daniel C. Bowman Doctoral Candidate in Geophysics UNC Chapel Hill phone: 575-418-8555 curriculum vitae: http://www.unc.edu/~haksaeng/curriculum_vitae/bowman_cv.pdf LinkedIn: https://www.linkedin.com/in/dannycbowman web:http://geosci.unc.edu/page/daniel-c-bowman twitter: @dannycbowman -------------- next part -------------- An HTML attachment was scrubbed... URL: