Re: problem reading multiple netcdf files in ncl v 5.1.0

From: Jamie Scott <James.D.Scott_at_nyahnyahspammersnyahnyah>
Date: Mon, 18 May 2009 09:28:37 -0600

Hi Dennis,

I don't think I was using a DODS enabled ncl. How can you tell?

> Copyright (C) 1995-2009 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 5.1.0
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.

I tried setting "SuppressClose" to false as you suggested. It did
clear up the error about too many connections, but now I get an error
from malloc.

> ncl(8690) malloc: *** mmap(size=1027080192) 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: Could not coerce input data to double, can't continue
> fatal:Execute: Error occurred at or near line 121 in file /home/
> jscott/ncl/WBC/hires.winds.debug.ncl
This occurs after reading the 3 month of data.

I don't get this error running the same script on the same machine
with ncl 5.0.1

Here is the latest script:

I downloaded the data from here, if you want to test it, but it's
about 12GB/year of data. I'm trying to come up with a simpler demo of
the problem w/ less data.

ftp://eclipse.ncdc.noaa.gov/pub/seawinds/SI/uv/6hrly/netcdf/

-Jamie

On May 15, 2009, at 2:13 PM, Dennis Shea wrote:

> Not sure of the issue here. We read many more file than 30 or 60.
>
> [1]
> The "add_connect" is not familiar. Are you using a DODS
> enabled NCL?
>
> [2]
> You could try setting "SuppressClose"
> http://www.ncl.ucar.edu/Document/Functions/Built-in/
> setfileoption.shtml
>
> setfileoption("nc", "SuppressClose", False)
>
> D
>
>> Sorry, I spoke too soon. Changing the ListSetType from "join" to
>> "cat" allows me to read in the first 30 files, but I get a new
>> error when trying to read in the next 30. Again, this script runs
>> fine on
>> ncl 5.0.1, but does not work on ncl 5.1.0. Looks like it's having
>> trouble cleaning up the netCDF file connections....
>>
>> -Jamie
>>
>> modified script:
>>
>>
>>
>> output from ncl:
>>
>> [mac23:/Projects/Air_Sea/jscott] jscott% $NCARG_ROOT/bin/ncl /home/
>> jscott/ncl/WBC/hires.winds.4xd2.mon.mean.ncl
>> Copyright (C) 1995-2009 - All Rights Reserved
>> University Corporation for Atmospheric Research
>> NCAR Command Language Version 5.1.0
>> The use of this software is governed by a License Agreement.
>> See http://www.ncl.ucar.edu/ for more details.
>>
>>
>> Variable: innames
>> Type: string
>> Total Size: 124 bytes
>> 31 values
>> Number of Dimensions: 1
>> Dimensions and sizes: [31]
>> Coordinates:
>> (0) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871001.nc
>> (1) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871002.nc
>> (2) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871003.nc
>> (3) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871004.nc
>> (4) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871005.nc
>> (5) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871006.nc
>> (6) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871007.nc
>> (7) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871008.nc
>> (8) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871009.nc
>> (9) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871010.nc
>> (10) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871011.nc
>> (11) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871012.nc
>> (12) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871013.nc
>> (13) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871014.nc
>> (14) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871015.nc
>> (15) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871016.nc
>> (16) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871017.nc
>> (17) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871018.nc
>> (18) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871019.nc
>> (19) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871020.nc
>> (20) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871021.nc
>> (21) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871022.nc
>> (22) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871023.nc
>> (23) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871024.nc
>> (24) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871025.nc
>> (25) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871026.nc
>> (26) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871027.nc
>> (27) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871028.nc
>> (28) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871029.nc
>> (29) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871030.nc
>> (30) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871031.nc
>> (0)
>> (0) Sea Surface Wind: x-component: min=-46.5873 max=37.9598
>> (0)
>> (0) Sea Surface Wind: y-component: min=-44.5245 max=37.7156
>> (0) 1987 9-------------------------
>> (0)
>> (0) wind speed: min=0 max=29.6
>> (0) Month: 9 Year:1987
>>
>>
>> Variable: innames
>> Type: string
>> Total Size: 120 bytes
>> 30 values
>> Number of Dimensions: 1
>> Dimensions and sizes: [30]
>> Coordinates:
>> (0) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871101.nc
>> (1) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871102.nc
>> (2) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871103.nc
>> (3) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871104.nc
>> (4) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871105.nc
>> (5) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871106.nc
>> (6) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871107.nc
>> (7) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871108.nc
>> (8) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871109.nc
>> (9) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871110.nc
>> (10) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871111.nc
>> (11) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871112.nc
>> (12) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871113.nc
>> (13) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871114.nc
>> (14) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871115.nc
>> (15) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871116.nc
>> (16) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871117.nc
>> (17) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871118.nc
>> (18) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871119.nc
>> (19) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871120.nc
>> (20) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871121.nc
>> (21) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871122.nc
>> (22) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871123.nc
>> (23) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871124.nc
>> (24) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871125.nc
>> (25) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871126.nc
>> (26) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871127.nc
>> (27) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871128.nc
>> (28) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871129.nc
>> (29) /Projects/Air_Sea/jscott/noaa.highres/SeaWinds/uv19871130.nc
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> add_connect: too many connects, cannot add another
>> ncinquire: ncid -1: NetCDF: Not a valid ID
>> fatal:No valid instance of variable u found in file list
>> fatal:Execute: Error occurred at or near line 53 in file /home/
>> jscott/ncl/WBC/hires.winds.4xd2.mon.mean.ncl
>>
>> [mac23:/Projects/Air_Sea/jscott] jscott%
>> On May 15, 2009, at 10:57 AM, Jamie Scott wrote:
>>
>>> I've been testing ncl version 5.1.0 on Mac 0SX 10.5.6 (Darwin
>>> Kernel Version 9.6.0: Mon Nov 24 17:39:01 PST 2008;
>>> root:xnu-1228.9.59~1/RELEASE_PPC)
>>> and discovered a problem reading multple netcdf files. This code
>>> works fine on the same machine in ncl v 5.0.1.
>>>
>>> Here is a portion the output from v 5.1.0 (the rest is attached
>>> in a file called '5.1.0.err.msg'. (very long!)) :
>>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
>
> --
> ======================================================
> Dennis J. Shea tel: 303-497-1361 |
> P.O. Box 3000 fax: 303-497-1333 |
> Climate Analysis Section |
> Climate & Global Dynamics Div. |
> National Center for Atmospheric Research |
> Boulder, CO 80307 |
> USA email: shea 'at' ucar.edu |
> ======================================================
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon May 18 2009 - 09:28:37 MDT

This archive was generated by hypermail 2.2.0 : Tue May 19 2009 - 09:17:29 MDT