[ncl-talk] int2p

Dennis Shea shea at ucar.edu
Fri Apr 26 17:29:26 MDT 2019


[1] This is a hardware [memory] issue.
     fatal:int2p: *Unable to allocate memory *for output array,

[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?"
      Yes. No.

Try this trivial example

 linlog = 2   ; ln(p) interpolation

  pi =(/ 1000.,925.,850.,700.,600.,500.,400.,300.,250., \
          200.,150.,100.,70.,50.,30.,20.,10. /)

  xi =(/ 28., 23., 18., 10.,  2., -4., -15.,-30.,-40., \
        -52.,-67.,-78.,-72.,-61.,-52.,-48.,-46. /)

  po =(/ 235 /)

  xo = *int2p* (pi,xi,po,linlog)

  print(pi+"   "+xi)
  print("===")
  print(xo)



(0)    1000   28
(1)    925   23
(2)    850   18
(3)    700   10
(4)    600   2
(5)    500   -4
(6)    400   -15
(7)    300   -30
(8)    250   -40
                                          235   *-43.32748*
(9)    200   -52
(10)    150   -67
(11)    100   -78
(12)    70   -72
(13)    50   -61
(14)    30   -52
(15)    20   -48
(16)    10   -46
(0)    ===


Variable:* xo*
Type: float
Total Size: 4 bytes
            1 values
Number of Dimensions: 1
Dimensions and sizes:    [1]
Coordinates:
Number Of Attributes: 1
  _FillValue :    9.96921e+36
(0)    *-43.32748*



On Fri, Apr 26, 2019 at 2:31 PM Laura Fowler <laura at ucar.edu> wrote:

> Hello:
>
> I have a memory issue using int2p. Here is my call to int2p:
>
> mpas2 = int2p(pres,mpas,pres2,linlog)
>
> The input fields pres, mpas, and pres2 are:
>
>
> Variable: pres
>
> Type: float
>
> Total Size: 144179640 bytes
>
>             36044910 values
>
> Number of Dimensions: 2
>
> Dimensions and sizes: [nCells | 655362] x [nVertLevels | 55]
>
> Coordinates:
>
> Number Of Attributes: 2
>
>   units : hPa
>   long_name : Pressure
>
> Variable: mpas
>
> Type: float
>
> Total Size: 144179640 bytes
>
>             36044910 values
>
> Number of Dimensions: 2
>
> Dimensions and sizes: [nCells | 655362] x [nVertLevels | 55]
>
> Coordinates:
>
> Number Of Attributes: 2
>
>   units : kg m^{-3}
>
>   long_name : Dry air density
>
>
> Variable: pres2
>
> Type: float
>
> Total Size: 2621448 bytes
>
>             655362 values
>
> Number of Dimensions: 1
>
> Dimensions and sizes: [nCells | 655362]
>
> Coordinates:
>
> Number Of Attributes: 1
>
>   units : hPa
>
>
> where pres2 is one-dimensional and set to 200 hPa. I am getting the
> following error:
>
> fatal:int2p: Unable to allocate memory for output array
>
>
> So, is it possible to interpolate the data to one specific pressure level.
> May be I am using the wrong function to do this?
>
> Thanks,
> Laura
> --
>
> !-------------------------------------------------------------------------------------------------------------
> Laura D. Fowler
>
> Mesoscale and Microscale Meteorology Division (MMM)
> National Center for Atmospheric Research
> P.O. Box 3000, Boulder CO 80307-3000
>
> e-mail: laura at ucar.edu
> phone: 303-497-1628
>
>
> !-------------------------------------------------------------------------------------------------------------
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190426/eb1bd112/attachment.html>


More information about the ncl-talk mailing list