<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" 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=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<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:"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:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Good evening,</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">First of all, I put my code up to pastebin here: <a href="http://pastebin.com/WyVn84bp">
http://pastebin.com/WyVn84bp</a></p>
<p class="MsoNormal">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.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b> if (spatial.average) {<o:p></o:p></b></p>
<p class="MsoNormal"><b> for (k in seq_len(length(gridded.data$levels))) {<o:p></o:p></b></p>
<p class="MsoNormal"><b> for (j in seq_len(length(gridded.data$variables))) {<o:p></o:p></b></p>
<p class="MsoNormal"><b> <span style="background:yellow;mso-highlight:yellow">
layer.img <- t(rbind(as.vector(cart.pts$x), as.vector(cart.pts$y[nrow(cart.pts$y):1,
<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="background:yellow;mso-highlight:yellow"> ]), as.vector(t(gridded.data$z[k, j, , ]))))</span><o:p></o:p></b></p>
<p class="MsoNormal"><b> profile.data[k, j] <- MBA::mba.points(layer.img,
<o:p></o:p></b></p>
<p class="MsoNormal"><b> cbind(0, 0))[[1]][3]<o:p></o:p></b></p>
<p class="MsoNormal"><b> }<o:p></o:p></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If I use this:</p>
<p class="MsoNormal"><b>lon <- c(-79.052104)#, -78.010020)<o:p></o:p></b></p>
<p class="MsoNormal"><b>lat <- c(35.907553)#, 36.000200)<o:p></o:p></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Then I get this in layer.img:</p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black"> [,1] [,2] [,3]<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black"> [1,] -102.02596 -129.16620 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black"> [2,] -102.68684 -73.50205 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black"> [3,] -103.33989 -17.83809 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black"> [4,] -103.98508 37.82569 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black"> [5,] -104.62235 93.48929 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black"> [6,] -57.42160 -129.57281 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black"> [7,] -57.79351 -73.91126 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black"> [8,] -58.16101 -18.24976 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black"> [9,] -58.52409 37.41168 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[10,] -58.88271 93.07305 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[11,] -12.81848 -129.75192 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[12,] -12.90150 -74.09151 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[13,] -12.98354 -18.43110 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[14,] -13.06459 37.22931 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[15,] -13.14464 92.88971 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[16,] 31.78435 -129.70356 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[17,] 31.99021 -74.04284 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[18,] 32.19362 -18.38214 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[19,] 32.39459 37.27855 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[20,] 32.59308 92.93921 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[21,] 76.38788 -129.42772 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[22,] 76.88265 -73.76524 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[23,] 77.37156 -18.10286 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[24,] 77.85458 37.55941 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[25,] 78.33167 93.22158 0<o:p></o:p></span></pre>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">BUT If I use this:<o:p></o:p></p>
<p class="MsoNormal"><b>lon <- c(-79.052104, -78.010020)<o:p></o:p></b></p>
<p class="MsoNormal"><b>lat <- c(35.907553, 36.000200)<o:p></o:p></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black"> [,1] [,2] [,3]<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black"> [1,] -101.50132 -141.10061 NA<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black"> [2,] -102.16831 -85.43643 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black"> [3,] -102.82751 -29.77243 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black"> [4,] -103.47889 25.89139 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black"> [5,] -104.12238 81.55503 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black"> [6,] -104.75795 137.21848 NA<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black"> [7,] -57.12636 -141.50666 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black"> [8,] -57.50171 -85.84509 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black"> [9,] -57.87267 -30.18358 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[10,] -58.23923 25.47787 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[11,] -58.60135 81.13926 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[12,] -58.95901 136.80059 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[13,] -12.75258 -141.68551 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[14,] -12.83637 -86.02510 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[15,] -12.91917 -30.36469 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[16,] -13.00100 25.29572 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[17,] -13.08183 80.95612 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[18,] -13.16167 136.61652 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[19,] 31.62094 -141.63722 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[20,] 31.82869 -85.97649 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[21,] 32.03402 -30.31579 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[22,] 32.23692 25.34490 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[23,] 32.43735 81.00557 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[24,] 32.63532 136.66622 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[25,] 75.99511 -141.36177 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[26,] 76.49445 -85.69927 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[27,] 76.98796 -30.03687 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[28,] 77.47562 25.62543 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[29,] 77.95737 81.28762 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[30,] 78.43319 136.94971 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[31,] 120.37085 -140.85909 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[32,] 121.16188 -85.19335 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[33,] 121.94369 -29.52787 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[34,] 122.71621 26.13736 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[35,] 123.47939 81.80233 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[36,] 124.23317 137.46704 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[37,] 164.74907 -140.12908 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[38,] 165.83197 -84.45864 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[39,] 166.90224 -28.78867 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[40,] 167.95981 26.88082 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[41,] 169.00459 82.54982 0<o:p></o:p></span></pre>
<pre style="mso-line-height-alt:6.7pt;background:white;word-break:break-all"><span style="font-family:"Lucida Console";color:black">[42,] 170.03650 138.21833 0<o:p></o:p></span></pre>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any help is greatly appreciated!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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<br>
<br>
<span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
</div>
</body>
</html>