[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: histogram crashes (example code)



"R.G.S." wrote:
> 
> Here is a main level code that does crash IDL 5.3.1 on WinNT4 SP5
> So if anyone cares to see if it runs on other platforms, please
> let me know how it works out.
> 
> Cheers,
> bob
> 
> ; An example of histogram error crashes (kills IDL 5.3.1, Winnt)
> 
> ;create fake data
> nscan = 1624
> nwide = 76
> lat = randomn(seed,nwide,nscan)*50
> 
> ;create NANs in data
> ind = randomu(seed,43293L)
> ind = ind(UNIQ(ind, SORT(ind)))
> ind = ind*n_elements(lat)
> lat(ind) = !values.f_nan
> 
> ; create binning ranges
> latrange = [-70,-20]
> deltalat = 4
> 
> ;offending histogram call
> hlat = histogram(lat(*),binsize = float(deltalat), min =float(latrange(0)),$
>  max = float(latrange(1)),REVERSE_INDICES = R,omax = omax,omin=omin,/nan)
> 
> end

Ran just fine on my machine (IDL 5.4, linux RH6.1). I don't know if the results were any
good or not but nothing untoward happened.

IDL> help
% At  $MAIN$                 
DELTALAT        INT       =        4
HLAT            LONG      = Array[13]
IND             FLOAT     = Array[43255]
LAT             FLOAT     = Array[76, 1624]
LATRANGE        INT       = Array[2]
NSCAN           INT       =     1624
NWIDE           INT       =       76
OMAX            FLOAT     =      -20.0000
OMIN            FLOAT     =      -70.0000
R               LONG      = Array[22970]
SEED            LONG      = Array[36]
Compiled Procedures:
    $MAIN$

Compiled Functions:
  UNIQ



paulv

-- 
Paul van Delst           Ph:  (301) 763-8000 x7274
CIMSS @ NOAA/NCEP        Fax: (301) 763-8545
Rm.207, 5200 Auth Rd.    Email: pvandelst@ncep.noaa.gov
Camp Springs MD 20746