Re: how to deal with an annual mean data

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Feb 17 2011 - 21:40:55 MST

[1] The variable 'land_use' is of type "short".
     Please look at your data. You must unpack before using

      lu = short2flt(f->land_use) ; (time,lat,lon)
      printVarSummary(lu)

      lu_clm = dim_avg_n_Wrap( lu ,0 )
      printVarSummary(lu_clm)

[2] fatal:NclMalloc Failed:[errno=12

This says you ran out of memory.

On 2/17/11 7:35 PM, 蜜ن¸¥ wrote:
> Hi,
> Still the data from
> 'http://ecospriv4.epfl.ch/pub/KK10_2k_1850_30m.nc.gz' (it's too large to
> be attached). It's an annual mean data, with variable
> 'land_use(time,lat,lon)'. I want to calculate the time average of the
> variable 'land_use' or calculate the EOFs.
> I tried 'dim_avg_n_Wrap' and 'run_ave_n_Wrap', they all failed.
>
> ncl 0> f=addfile("KK10_2k_1850_30m.nc","r")
> ncl 1> lu=f->land_use
> ncl 2> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>
> ncl 3>
> ncl 4> lua=runave_n_Wrap(lu,10,0,0)
> fatal:runave_n: Unable to allocate memory for output array
> fatal:Execute: Error occurred at or near line 6009 in file
> $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
>
> fatal:Execute: Error occurred at or near line 4
>
> ncl 5> luavftime=dim_avg_n_Wrap(lu,0)
> fatal:NclMalloc Failed:[errno=12]
> fatal:dim_avg_n: Could not coerce input data to double, can't continue
> fatal:Execute: Error occurred at or near line 2041 in file
> $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
>
> fatal:Execute: Error occurred at or near line 5
>
> And here is time information:
>
> ncl 6> tim=f->time
> ncl 7> printVarSummary(tim)
>
>
> Variable: tim
> Type: integer
> Total Size: 7604 bytes
> 1901 values
> Number of Dimensions: 1
> Dimensions and sizes: [time | 1901]
> Coordinates:
> time: [2000..100]
> Number Of Attributes: 3
> long_name : time
> units : years before 1950
> calendar : standard
>
> I tried a monthly mean data, both functions worked. I don't know why it
> failed for the annual mean data. What's wrong with my 'contributed.ncl'?
> Thanks a lot!
> Best regards,
> Mi
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Feb 17 21:41:06 2011

This archive was generated by hypermail 2.1.8 : Thu Feb 17 2011 - 22:00:17 MST