<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">onedtond!!!</div><div class=""><br class=""></div><a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/onedtond.shtml" class="">http://www.ncl.ucar.edu/Document/Functions/Built-in/onedtond.shtml</a><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">— <br class="">Alessandra Giannini<br class="">IRI for Climate and Society - The Earth Institute at Columbia University<br class="">P.O. Box 1000, Palisades NY 10964-8000, U.S.A.</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br class="">currently at:<br class="">LMD - École Normale Supérieure <br class="">24, Rue Lhomond 75231 PARIS CEDEX 05, France<br class=""></div></div></div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Jan 30, 2019, at 5:28 PM, Greg Thompson <<a href="mailto:gthompsn@ucar.edu" class="">gthompsn@ucar.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><br class=""><div class="">I am struggling (feeling dumb) that I cannot figure out how to write a one-line efficient solution to copy a 1D vector of latitude to all the columns of a 2D grid since the values (of latitude) are constant across my grid in the X-direction.</div><div class=""><br class=""></div><div class="">So what I have is this</div><div class=""><div class="">ny = 8</div><div class="">nx = 10</div><div class="">a = new( (/ny,nx/), float)</div><div class="">a = 0.</div><div class="">a(:, 0) = fspan(40., 42., ny)</div><div class="">do n = 1, nx-1</div><div class=""> a(:, n) = a(:,0)</div><div class="">end do</div></div><div class=""><br class=""></div><div class="">but that DO-n loop is slow as nx grows large and I thought there was an elegant solution in NCL to treat this array manipulation.</div><div class=""><br class=""></div><div class="">Any thoughts?</div><div class="">Thanks!!!</div><div class=""><br class=""></div><div class="">Greg</div><div class=""><br class=""></div></div></div>
_______________________________________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br class=""></div></blockquote></div><br class=""></div></body></html>