Re: Weird error from contributed...

From: Erick Rivera Lemus <lemus_at_nyahnyahspammersnyahnyah>
Date: Wed Sep 15 2010 - 14:46:12 MDT

Adam,
I try your first suggestion deleting U after deleting uAvg that did
not work

Then I try your second one, I read the u and then average it and then
delete it works good. Computer tend to slow down whenever I try to do
this but it works!!!

thanks for the help.

Cheers,
Erick Rafael Rivera Lemus
Software Technician
Institute of Marine and Coastal Sciences
Coastal Ocean Observation Laboratory

Rutgers, The State University of New Jersey
71 Dudley Road New Brunswick, NJ 08901 Phone: 732-932-6555 ext. 503
Fax: 732-932-1821
Cell: 617-447-5106

On Sep 15, 2010, at 3:59 PM, Adam Phillips wrote:

> Hi Erick,
> Whenever you see an error message with the word "Malloc" in it it
> usually means that you are running out of memory. First thing to try
> would be deleting the u array after you create uAvg. If that doesn't
> free up enough space Iwould try reading in u, and then dim_avg_n_Wrap
> it, delete(u), and then repeat for v. Adam
>
>
>
> On 09/15/2010 01:54 PM, Erick Rivera Lemus wrote:
>> Hello NCL
>>
>> I have a one year file of sea surface currents u and v. I am trying
>> to
>> calculate the mean for the entire time. The data is [8711 x 130 x
>> 138]
>>
>> I am able to load the u and v and printvarsummary tells me the
>> dimensions of the data.
>>
>>
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>>
>>
>> ; open file and read in data
>> diri = "/Users/lemus/Documents/MARCOOS/netcdf_comp/year/"
>> fili = "2009_year.nc"
>> ; adds the data into the u and the v with lat and lon
>> fin = addfile(diri+fili,"r")
>> u = fin->u(:,:,:)
>> v = fin->v(:,:,:)
>> printVarSummary(u) ; This will plot the variables u and v
>> printVarSummary(v)
>>
>>
>>
>>
>> When I do a dim_avg_n_Wrap it chokes and I get the following error:
>>
>>
>> uAvg = dim_avg_n_Wrap(u,0) ;Avg of grid points with Time (lat,lon)
>> vAvg = dim_avg_n_Wrap(v,0) ;Avg of grid points with Time (lat,lon)
>> Avgspd = sqrt(uAvg^2+vAvg^2)
>> printVarSummary(Avgspd)
>> printVarSummary(uAvg)
>> exit
>>
>> ncl(12360) malloc: *** mmap(size=1250205696) failed (error code=12)
>> *** error: can't allocate region
>> *** set a breakpoint in malloc_error_break to debug
>> 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 17 in file
>> avg_2monthcolor.ncl
>>
>> ncl(12360) malloc: *** mmap(size=1250205696) failed (error code=12)
>> *** error: can't allocate region
>> *** set a breakpoint in malloc_error_break to debug
>> 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 18 in file
>> avg_2monthcolor.ncl
>>
>> fatal: Assign: uAvg is undefined
>> fatal:Execute: Error occurred at or near line 19 in file
>> avg_2monthcolor.ncl
>>
>> fatal:Variable (uAvg) is undefined
>> fatal:Execute: Error occurred at or near line 20 in file
>> avg_2monthcolor.ncl
>>
>> fatal:Variable (Avgspd) is undefined
>> fatal:Execute: Error occurred at or near line 21 in file
>> avg_2monthcolor.ncl
>>
>> fatal:Variable (uAvg) is undefined
>> fatal:Execute: Error occurred at or near line 22 in file
>> avg_2monthcolor.ncl
>>
>> Is there anything wrong on the data set or is it to much files to
>> handle, Please let me know.
>>
>>
>>
>>
>> Cheers,
>> Erick Rafael Rivera Lemus
>> Software Technician
>> Institute of Marine and Coastal Sciences
>> Coastal Ocean Observation Laboratory
>>
>> Rutgers, The State University of New Jersey
>> 71 Dudley Road New Brunswick, NJ 08901 Phone: 732-932-6555 ext. 503
>> Fax: 732-932-1821
>> Cell: 617-447-5106
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> --
> __________________________________________________
> Adam Phillips
> asphilli@ucar.edu
> National Center for Atmospheric Research tel: (303) 497-1726
> Climate and Global Dynamics Division fax: (303) 497-1333
> P.O. Box 3000
> Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli
> _______________________________________________
> 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 Wed Sep 15 13:46:29 2010

This archive was generated by hypermail 2.1.8 : Thu Sep 16 2010 - 11:05:24 MDT