<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Lucida Console";
        panose-1:2 11 6 9 4 5 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle22
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Thank you Danny,<o:p></o:p></span></a></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">The interesting thing I got from the grib file is this:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">1:0:grid_template=30:winds(grid):<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">        Lambert Conformal: (8 x 10) input WE:SN output WE:SN res 8<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">        Lat1 36.887638 Lon1 237.104317 LoV 265.000000<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">        LatD 25.000000 Latin1 25.000000 Latin2 25.000000<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">        LatSP 0.000000 LonSP 0.000000<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">        North Pole (8 x 10) Dx 13545.000000 m Dy 13545.000000 m mode 8<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">                            
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">* (lat1,lon1) = lat/lon of first grid point (deg)
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> * 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.)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">* latin1 = The first latitude from the pole at which the secant cone cuts   the spherical earth. (deg)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">* latin2 = The second latitude from the pole at which the secant cone cuts   the spherical earth. (deg)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">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<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">proj = setPROJ(type = 2, LAT0 =23, LON0 = 35)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">XY = GLOB.XY(grb.data$lat, grb.data$lon, proj)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Then I defined the following<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">cartnodes = list(x=XY$x, y=XY$y)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">The problem that crept in is when I ran the following.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">atmos <- ModelGrid(grb.data, resolution, grid.type, model.domain = domain, cartesian.nodes=cartnodes)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">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?
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">    grid <- list(x = seq(model.domain[1], model.domain[2], by = resolution[1]),
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">        y = seq(model.domain[4], model.domain[3], by = resolution[2]))<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">    fcst.grid <- list(z = array(rep(NA, length(grid$x) * length(grid$y) *
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">        length(variables) * length(levels)), dim = c(length(levels),
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">        length(variables), length(grid$x), length(grid$y))),
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">        x = grid$x, y = grid$y, variables = variables, levels = levels,
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">        model.run.date = model.run.date, fcst.date = fcst.date)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal" style="line-height:11.25pt"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black">Ruben Kertesz, Ph.D.<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:11.25pt"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black">Environmental Engineer<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:11.25pt"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#002060">EmNet LLC</span></b><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:11.25pt"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black">Office: 574.855.1012 x115<br>
<br>
</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> rnomads-user-bounces@lists.r-forge.r-project.org [mailto:rnomads-user-bounces@lists.r-forge.r-project.org]
<b>On Behalf Of </b>Bowman, Daniel<br>
<b>Sent:</b> Monday, February 29, 2016 7:49 PM<br>
<b>To:</b> rnomads-user@lists.r-forge.r-project.org<br>
<b>Subject:</b> Re: [Rnomads-user] Issue with using multiple Lat/Lon. Not sure what is causing it.<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div id="divtagdefaultwrapper">
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">Hi Ruben,<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">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.
<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">Long answer:<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">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.<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">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.  <o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">I've written up a script that should do what you want:<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><a href="http://pastebin.com/6gv6gkP6" id="LPlnk311811">http://pastebin.com/6gv6gkP6</a><o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">Best,<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">Danny<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<div id="Signature">
<div id="divtagdefaultwrapper">
<div name="divtagdefaultwrapper">
<p class="MsoNormal" style="margin-bottom:12.0pt;background:white"><span style="font-family:"Calibri",sans-serif;color:black">Daniel C. Bowman<br>
Doctoral Candidate in Geophysics<br>
UNC Chapel Hill<br>
phone: 575-418-8555<br>
<b>curriculum vitae</b>:  <a href="http://www.unc.edu/~haksaeng/curriculum_vitae/bowman_cv.pdf">
http://www.unc.edu/~haksaeng/curriculum_vitae/bowman_cv.pdf</a> <br>
<b>LinkedIn</b>:  <a href="https://www.linkedin.com/in/dannycbowman" title="Ctrl+Click or tap to follow the link" id="LPNoLP">
https://www.linkedin.com/in/dannycbowman</a><br>
web:http://geosci.unc.edu/page/daniel-c-bowman<br>
twitter: @dannycbowman<o:p></o:p></span></p>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt;background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<div>
<div class="MsoNormal" align="center" style="text-align:center;background:white">
<span style="font-family:"Calibri",sans-serif;color:black">
<hr size="3" width="98%" align="center">
</span></div>
<div id="divRplyFwdMsg">
<p class="MsoNormal" style="background:white"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">
<a href="mailto:rnomads-user-bounces@lists.r-forge.r-project.org">rnomads-user-bounces@lists.r-forge.r-project.org</a> <<a href="mailto:rnomads-user-bounces@lists.r-forge.r-project.org">rnomads-user-bounces@lists.r-forge.r-project.org</a>> on behalf of Ruben
 Kertesz <<a href="mailto:rkertesz@emnet.net">rkertesz@emnet.net</a>><br>
<b>Sent:</b> Monday, February 29, 2016 7:03 PM<br>
<b>To:</b> <a href="mailto:rnomads-user@lists.r-forge.r-project.org">rnomads-user@lists.r-forge.r-project.org</a><br>
<b>Subject:</b> [Rnomads-user] Issue with using multiple Lat/Lon. Not sure what is causing it.</span><span style="font-family:"Calibri",sans-serif;color:black">
<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Good evening,<o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">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.<o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">First of all, I put my code up to pastebin here:
<a href="http://pastebin.com/WyVn84bp"><span style="color:#0563C1">http://pastebin.com/WyVn84bp</span></a><o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">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.<o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="background:white"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">  if (spatial.average) {</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p style="background:white"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">        for (k in seq_len(length(gridded.data$levels))) {</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p style="background:white"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">            for (j in seq_len(length(gridded.data$variables))) {</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p style="background:white"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">               
<span style="background:yellow">layer.img <- t(rbind(as.vector(cart.pts$x), as.vector(cart.pts$y[nrow(cart.pts$y):1,
</span></span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p style="background:white"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black;background:yellow">                  ]), as.vector(t(gridded.data$z[k, j, , ]))))</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p style="background:white"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">                profile.data[k, j] <- MBA::mba.points(layer.img,
</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p style="background:white"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">                  cbind(0, 0))[[1]][3]</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p style="background:white"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">            }</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">If I use this:<o:p></o:p></span></p>
<p style="background:white"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">lon <- c(-79.052104)#, -78.010020)</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p style="background:white"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">lat <- c(35.907553)#, 36.000200)</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Then I get this in layer.img:<o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<div>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">            [,1]       [,2] [,3]</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black"> [1,] -102.02596 -129.16620    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black"> [2,] -102.68684  -73.50205    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black"> [3,] -103.33989  -17.83809    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black"> [4,] -103.98508   37.82569    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black"> [5,] -104.62235   93.48929    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black"> [6,]  -57.42160 -129.57281    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black"> [7,]  -57.79351  -73.91126    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black"> [8,]  -58.16101  -18.24976    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black"> [9,]  -58.52409   37.41168    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[10,]  -58.88271   93.07305    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[11,]  -12.81848 -129.75192    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[12,]  -12.90150  -74.09151    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[13,]  -12.98354  -18.43110    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[14,]  -13.06459   37.22931    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[15,]  -13.14464   92.88971    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[16,]   31.78435 -129.70356    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[17,]   31.99021  -74.04284    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[18,]   32.19362  -18.38214    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[19,]   32.39459   37.27855    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[20,]   32.59308   92.93921    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[21,]   76.38788 -129.42772    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[22,]   76.88265  -73.76524    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[23,]   77.37156  -18.10286    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[24,]   77.85458   37.55941    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[25,]   78.33167   93.22158    0</span><span style="color:black"><o:p></o:p></span></pre>
</div>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">BUT If I use this:<o:p></o:p></span></p>
<p style="background:white"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">lon <- c(-79.052104, -78.010020)</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p style="background:white"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">lat <- c(35.907553, 36.000200)</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">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.<o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<div>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">            [,1]       [,2] [,3]</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black"> [1,] -101.50132 -141.10061   NA</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black"> [2,] -102.16831  -85.43643    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black"> [3,] -102.82751  -29.77243    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black"> [4,] -103.47889   25.89139    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black"> [5,] -104.12238   81.55503    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black"> [6,] -104.75795  137.21848   NA</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black"> [7,]  -57.12636 -141.50666    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black"> [8,]  -57.50171  -85.84509    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black"> [9,]  -57.87267  -30.18358    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[10,]  -58.23923   25.47787    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[11,]  -58.60135   81.13926    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[12,]  -58.95901  136.80059    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[13,]  -12.75258 -141.68551    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[14,]  -12.83637  -86.02510    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[15,]  -12.91917  -30.36469    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[16,]  -13.00100   25.29572    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[17,]  -13.08183   80.95612    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[18,]  -13.16167  136.61652    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[19,]   31.62094 -141.63722    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[20,]   31.82869  -85.97649    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[21,]   32.03402  -30.31579    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[22,]   32.23692   25.34490    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[23,]   32.43735   81.00557    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[24,]   32.63532  136.66622    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[25,]   75.99511 -141.36177    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[26,]   76.49445  -85.69927    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[27,]   76.98796  -30.03687    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[28,]   77.47562   25.62543    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[29,]   77.95737   81.28762    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[30,]   78.43319  136.94971    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[31,]  120.37085 -140.85909    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[32,]  121.16188  -85.19335    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[33,]  121.94369  -29.52787    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[34,]  122.71621   26.13736    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[35,]  123.47939   81.80233    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[36,]  124.23317  137.46704    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[37,]  164.74907 -140.12908    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[38,]  165.83197  -84.45864    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[39,]  166.90224  -28.78867    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[40,]  167.95981   26.88082    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[41,]  169.00459   82.54982    0</span><span style="color:black"><o:p></o:p></span></pre>
<pre style="background:white;word-break:break-all;background-attachment:scroll;background-position-x:0%;background-position-y:0%"><span style="font-family:"Lucida Console";color:black">[42,]  170.03650  138.21833    0</span><span style="color:black"><o:p></o:p></span></pre>
</div>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Any help is greatly appreciated!<o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p style="margin-bottom:12.0pt;background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Ruben Kertesz, Ph.D.<br>
Environmental Engineer<br>
EmNet LLC<br>
121 S. Niles Ave.<br>
Suite #22<br>
South Bend, IN 46617<br>
Office: 574.855.1012 x115<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>