Re: fatal:NclMalloc Failed:[errno=11]

From: Dave Allured <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Mon, 09 Mar 2009 13:42:33 -0600

I forgot to mention something. Before starting the loop, you must
create an output file, and predefine the output dimensions and
variable. Use addfile, filedimdef, and filevardef functions for
this. Here is an example with documentation:

http://www.ncl.ucar.edu/Applications/method_2.shtml

--Dave

Dave Allured wrote:
> Liang,
>
> I think that the function calcMonAnomTLL is independent over lat and
> lon. Therefore you can subset the entire operation over latitude,
> as follows.
>
> Both the input array x and the output array xAno are huge, so you
> have to be careful. Do not try to create the whole output array
> xAno in memory, or you will probably run into the same problem as
> with the input array x. Instead, make xAno into a file variable,
> and compute it for one latitude at a time.
>
> Add a single loop for latitudes. Inside the loop, read x for just
> one latitude at a time; call calcMonAnomTLL for that subset; and
> write the result array xAno to a subset of a file variable in an
> output file. Be sure to subscript all variables correctly inside
> the loop.
>
> Do only the minimum necessary inside the loop to complete the
> computation. Metadata can be fixed outside the loop. It is
> probably okay to read the complete array of monthly averages, xCli,
> into memory before starting the loop, because that is a much smaller
> array.
>
> Dave Allured
> CU/CIRES Climate Diagnostics Center (CDC)
> http://cires.colorado.edu/science/centers/cdc/
> NOAA/ESRL/PSD, Climate Analysis Branch (CAB)
> http://www.cdc.noaa.gov/psd1/
>
> Liang Guo wrote:
>> Dear All,
>>
>> I have two variables: x is 50yr monthly SST, and xCli is its
>> climatology monthly SST. And I want to calculate anomaly by using
>> "xAno = calcMonAnomTLL(x, xCli)".
>>
>> Variable: x
>> Type: float
>> Total Size: 1399680000 bytes
>> 349920000 values
>> Number of Dimensions: 3
>> Dimensions and sizes: [t | 600] x [latitude | 540] x [longitude | 1080]
>> Coordinates:
>> t: [7335..25305]
>> latitude: [-89.83333..89.83315]
>> longitude: [ 0..359.6663]
>> Number Of Attributes: 12
>> depth : 5.05
>> source : Unified Model Output (Vn 6.1):
>> name : temp
>> title : POTENTIAL TEMPERATURE (OCEAN) DEG.C
>> date : 01/09/78
>> time : 00:00
>> long_name : POTENTIAL TEMPERATURE (OCEAN) DEG.C
>> units : degC
>> missing_value : 2e+20
>> _FillValue : 2e+20
>> valid_min : -1.8
>> valid_max : 38.67299
>>
>>
>> Variable: xCli
>> Type: float
>> Total Size: 27993600 bytes
>> 6998400 values
>> Number of Dimensions: 3
>> Dimensions and sizes: [t | 12] x [latitude | 540] x [longitude | 1080]
>> Coordinates:
>> t: [24975..25305]
>> latitude: [-89.83333..89.83315]
>> longitude: [ 0..359.6663]
>> Number Of Attributes: 12
>> depth : 5.05
>> source : Unified Model Output (Vn 6.1):
>> name : temp
>> title : POTENTIAL TEMPERATURE (OCEAN) DEG.C
>> date : 01/09/78
>> time : 00:00
>> long_name : POTENTIAL TEMPERATURE (OCEAN) DEG.C
>> units : degC
>> missing_value : 2e+20
>> _FillValue : 2e+20
>> valid_min : -1.8
>> valid_max : 35.09643
>>
>> Obviously, x has 1.4GB and xCli has 24MB. So, the anomaly xAno is
>> suppose to be 1.4GB, too. An large file.
>>
>> I am using NCL 5.1.0 under the SunSO. And the error I've got is:
>> fatal:NclMalloc Failed:[errno=11]
>> Segmentation Fault
>>
>> How to solve it? Thank you very much!
>>
>> Thanks,
>>
>> Liang
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Mar 09 2009 - 13:42:33 MDT

This archive was generated by hypermail 2.2.0 : Mon Mar 09 2009 - 21:47:10 MDT