[Rnomads-user] bug fixes / feature requests for new rNOMADS version?

Ruben Kertesz rkertesz at emnet.net
Tue Mar 15 03:13:04 CET 2016


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<mailto:haksaeng at live.unc.edu>
Sent: Monday, March 14, 2016 8:56 PM
To: Announcements, feature requests, and help using rNOMADS<mailto:rnomads-user at lists.r-forge.r-project.org>
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 <rnomads-user-bounces at lists.r-forge.r-project.org> on behalf of Ruben Kertesz <rkertesz at emnet.net>
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<tel:574.855.1012;115>




On Tue, Mar 8, 2016 at 6:50 PM -0800, "Bowman, Daniel" <haksaeng at live.unc.edu<mailto:haksaeng at live.unc.edu>> 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: <http://lists.r-forge.r-project.org/pipermail/rnomads-user/attachments/20160315/4ea7bde7/attachment-0001.html>


More information about the Rnomads-user mailing list