Re: Segmentation fault (core dumped)

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue Jul 05 2011 - 09:21:55 MDT

I am using 6.0.0 ... no access to 5.2.1

I had no problems reading the 2 files you sent after I added

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"

and changed to the following

    wMon&level = f->lev

===> OUTPUT
[snip]
Variable: wMon
Type: float
Total Size: 12288 bytes
             3072 values
Number of Dimensions: 4
Dimensions and sizes: [time | 24] x [level | 2] x [lat | 8] x [lon | 8]
Coordinates:
             time: [199801..199912]
             level: [1000.. 10]
             lat: [-10..-27.5]
             lon: [25..42.5]
Number Of Attributes: 5
   operation_tag : calculate_monthly_values: avg
   units : m/s
   long_name : Wind Speed
   time : 1744392
   _FillValue : -32767

Variable: wAllSea
Type: float
Total Size: 12288 bytes
             3072 values
Number of Dimensions: 4
Dimensions and sizes: [time | 24] x [level | 2] x [lat | 8] x [lon | 8]
Coordinates:
             time: [199801..199912]
             level: [1000.. 10]
             lat: [-10..-27.5]
             lon: [25..42.5]
Number Of Attributes: 6
   operation_tag : calculate_monthly_values: avg
   units : m/s
   long_name : Wind Speed
   time : 1744392
   _FillValue : -32767
   wgt_runave_op_ncl : wgt_runave_n

Variable: wSea
Type: float
Total Size: 4096 bytes
             1024 values
Number of Dimensions: 4
Dimensions and sizes: [time | 8] x [level | 2] x [lat | 8] x [lon | 8]
Coordinates:
             time: [199801..199910]
             level: [1000.. 10]
             lat: [-10..-27.5]
             lon: [25..42.5]
Number Of Attributes: 6
   wgt_runave_op_ncl : wgt_runave_n
   _FillValue : -32767
   time : 1744392
   long_name : Wind Speed
   units : m/s
   operation_tag : calculate_monthly_values: avg

On 7/5/11 4:27 AM, Vishali P. wrote:
> yrStrt = 1998
> yrLast = 2004
> nyrs = yrLast-yrStrt+1
> klev = 2
> nlat = 8
> mlon = 8
> ntim = 12*nyrs ; number of months
>
> wMon = new ( (/ntim,klev,nlat,mlon/), "float", 1e20)
> tMon = new ( ntim, "double", "No_FillValue")
>
>
> diru = "/home/Vishali/Documents/dadosVentos/SpeedTest/"
> filu = systemfunc("cd "+diru+" ; ls wind*red.nc <http://red.nc/>")
> nfilu = dimsizes(filu)
>
> ; calculate monthly means from 6hrly
> nmoStrt = 0
> nmoLast = 11
> do nf=0,nfilu-1
>
> print("nf="+nf+" "+filu(nf))
>
> f = addfile(diru+filu(nf), "r")
> w = f->WSpeed
> wMon(nmoStrt:nmoLast,:,:,:) = calculate_monthly_values(w,
> "avg",0, False)
> nmoStrt = nmoStrt+12
> nmoLast = nmoLast+12
> delete(w) ; may change size next iteration (leap yr)
> end do
> delete(wMon&time)
>
> printVarSummary(wMon) ; wMon(84,17,73,144)
>
> time = yyyymm_time(yrStrt, yrLast, "integer")
> wMon&time = time
>
> wMon!1 = "level" ; minor bug in "calculate_monthly_values"
> wMon&level = f->level
>
> printVarSummary(wMon)
> ; unweighted seasonal means
> wAllSea = wgt_runave_n_Wrap(wMon, 3, 0, 0)
> printVarSummary(wAllSea)
>
> wSea = wAllSea(::3,:,:,:) ; (28,14,73,144)
> printVarSummary(wSea)
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jul 5 09:22:01 2011

This archive was generated by hypermail 2.1.8 : Tue Jul 12 2011 - 15:03:53 MDT