<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>[1] This is a hardware [memory] issue.</div><div><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">     fatal:int2p: <b>Unable to allocate memory </b>for output array,</span></div><div><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">    <br></span></div><div><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">[2] "So, is it possible to interpolate the data to one specific pressure level. May be I am using the wrong function to do this?"</span></div><div><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">      Yes. No.</span></div><div><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Try this trivial example</span></div><div><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures"> linlog = 2   ; ln(p) interpolation<br>  <br>  pi =(/ 1000.,925.,850.,700.,600.,500.,400.,300.,250., \<br>          200.,150.,100.,70.,50.,30.,20.,10. /)<br><br>  xi =(/ 28., 23., 18., 10.,  2., -4., -15.,-30.,-40., \<br>        -52.,-67.,-78.,-72.,-61.,-52.,-48.,-46. /)<br><br>  po =(/ 235 /)<br><br>  xo = <b>int2p</b> (pi,xi,po,linlog)<br><br>  print(pi+"   "+xi)<br>  print("===")<br>  print(xo)<br><br></span></div><div><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">    <br></span></div><div><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">(0)    1000   28<br>(1)    925   23<br>(2)    850   18<br>(3)    700   10<br>(4)    600   2<br>(5)    500   -4<br>(6)    400   -15<br>(7)    300   -30<br>(8)    250   -40</span></div><div><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">                                          <span style="color:rgb(0,0,255)">235   <span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures"><b>-43.32748</b></span></span></span></div><div><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">(9)    200   -52<br>(10)    150   -67<br>(11)    100   -78<br>(12)    70   -72<br>(13)    50   -61<br>(14)    30   -52<br>(15)    20   -48<br>(16)    10   -46<br>(0)    ===<br><br><br>Variable:<b> xo</b><br>Type: float<br>Total Size: 4 bytes<br>            1 values<br>Number of Dimensions: 1<br>Dimensions and sizes:    [1]<br>Coordinates: <br>Number Of Attributes: 1<br>  _FillValue :    9.96921e+36<br>(0)    <b>-43.32748</b><br></span></div><div><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 26, 2019 at 2:31 PM Laura Fowler <<a href="mailto:laura@ucar.edu">laura@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hello:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I have a memory issue using int2p. Here is my call to int2p:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">





<p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">mpas2 = int2p(pres,mpas,pres2,linlog)</span></p></div><div class="gmail_default" style="font-size:small"><br></div><div><div class="gmail_default" style="font-size:small">The input fields pres, mpas, and pres2 are:</div>





<p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></p><p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Variable: pres</span></p>
<p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Type: float</span></p>
<p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Total Size: 144179640 bytes</span></p>
<p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_762796162054835174gmail-Apple-converted-space">            </span>36044910 values</span></p>
<p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Number of Dimensions: 2</span></p>
<p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Dimensions and sizes:<span class="gmail-m_762796162054835174gmail-Apple-tab-span" style="white-space:pre-wrap">      </span>[nCells | 655362] x [nVertLevels | 55]</span></p>
<p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Coordinates:<span class="gmail-m_762796162054835174gmail-Apple-converted-space"> </span></span></p>
<p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Number Of Attributes: 2</span></p>
<p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_762796162054835174gmail-Apple-converted-space">  </span>units :<span class="gmail-m_762796162054835174gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>hPa</span></p>
<div class="gmail_default" style="font-size:small"><span class="gmail-m_762796162054835174gmail-Apple-converted-space" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,128);font-family:Courier;font-size:14px">  </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,128);font-family:Courier;font-size:14px">long_name :</span><span class="gmail-m_762796162054835174gmail-Apple-tab-span" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,128);font-family:Courier;font-size:14px;white-space:pre-wrap">       </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,128);font-family:Courier;font-size:14px">Pressure</span></div><br></div><div>





<p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Variable: mpas</span></p>
<p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Type: float</span></p>
<p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Total Size: 144179640 bytes</span></p>
<p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_762796162054835174gmail-Apple-converted-space">            </span>36044910 values</span></p>
<p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Number of Dimensions: 2</span></p>
<p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Dimensions and sizes:<span class="gmail-m_762796162054835174gmail-Apple-tab-span" style="white-space:pre-wrap">      </span>[nCells | 655362] x [nVertLevels | 55]</span></p>
<p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Coordinates:<span class="gmail-m_762796162054835174gmail-Apple-converted-space"> </span></span></p>
<p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Number Of Attributes: 2</span></p>
<p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_762796162054835174gmail-Apple-converted-space">  </span>units :<span class="gmail-m_762796162054835174gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>kg m^{-3}</span></p>
<p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_762796162054835174gmail-Apple-converted-space">  </span>long_name :<span class="gmail-m_762796162054835174gmail-Apple-tab-span" style="white-space:pre-wrap">    </span>Dry air density</span></p>
<p class="gmail-m_762796162054835174gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128);min-height:17px"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p><p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font:14px Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Variable: pres2</span></p><p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font:14px Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Type: float</span></p><p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font:14px Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Total Size: 2621448 bytes</span></p><p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font:14px Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_762796162054835174gmail-Apple-converted-space">            </span>655362 values</span></p><p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font:14px Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Number of Dimensions: 1</span></p><p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font:14px Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Dimensions and sizes:<span class="gmail-m_762796162054835174gmail-Apple-tab-span" style="white-space:pre-wrap">    </span>[nCells | 655362]</span></p><p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font:14px Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Coordinates:<span class="gmail-m_762796162054835174gmail-Apple-converted-space"> </span></span></p><p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font:14px Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">Number Of Attributes: 1</span></p><p class="gmail-m_762796162054835174gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128);min-height:17px">













</p><p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_762796162054835174gmail-Apple-converted-space">  </span>units :<span class="gmail-m_762796162054835174gmail-Apple-tab-span" style="white-space:pre-wrap">      </span>hPa</span></p></div><div><br></div><div><br></div><div><div class="gmail_default" style="font-size:small">where pres2 is one-dimensional and set to 200 hPa. I am getting the following error:</div><div class="gmail_default" style="font-size:small">





<p class="gmail-m_762796162054835174gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier;color:rgb(0,0,128)"><span class="gmail-m_762796162054835174gmail-s1" style="font-variant-ligatures:no-common-ligatures">fatal:int2p: Unable to allocate memory for output array</span></p></div><br></div><div><br></div><div><div class="gmail_default" style="font-size:small">So, is it possible to interpolate the data to one specific pressure level. May be I am using the wrong function to do this?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks,</div><div class="gmail_default" style="font-size:small">Laura</div><div class="gmail_default" style="font-size:small"></div></div>-- <br><div dir="ltr" class="gmail-m_762796162054835174gmail_signature"><div dir="ltr"><font style="background-color:rgb(255,255,255)" face="arial, helvetica, sans-serif" color="#0000ff">!-------------------------------------------------------------------------------------------------------------</font><div><font style="background-color:rgb(255,255,255)" face="arial, helvetica, sans-serif" color="#0000ff">Laura D. Fowler                                                                                       </font></div><div><font style="background-color:rgb(255,255,255)" face="arial, helvetica, sans-serif" color="#0000ff">Mesoscale and Microscale Meteorology Division (MMM)         </font></div><div><font style="background-color:rgb(255,255,255)" face="arial, helvetica, sans-serif" color="#0000ff">National Center for Atmospheric Research<br></font></div><div><font style="background-color:rgb(255,255,255)" face="arial, helvetica, sans-serif" color="#0000ff">P.O. Box 3000, Boulder CO 80307-3000</font></div><div><font style="background-color:rgb(255,255,255)" face="arial, helvetica, sans-serif" color="#0000ff"><br></font></div><div><font style="background-color:rgb(255,255,255)" face="arial, helvetica, sans-serif" color="#0000ff">e-mail: <a href="mailto:laura@ucar.edu" target="_blank">laura@ucar.edu</a></font></div><div><font style="background-color:rgb(255,255,255)" face="arial, helvetica, sans-serif" color="#0000ff">phone: 303-497-1628</font></div><div><font style="background-color:rgb(255,255,255)" face="arial, helvetica, sans-serif" color="#0000ff"><br></font></div><div><font style="background-color:rgb(255,255,255)" face="arial, helvetica, sans-serif" color="#0000ff">!-------------------------------------------------------------------------------------------------------------</font><br></div></div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>