Re: problem reading multiple netcdf files in ncl v 5.1.0

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Wed, 20 May 2009 15:42:04 -0600

Hi Jamie,

I was able to reproduce the problem that resulted in the error:

"add_connect: too many connects, cannot add another"

using your code and an OPeNDAP-enabled version of NCL 5.1.0. An
internal temporary list variable was not being deleted, with the
result that the files that it referenced were not being closed as
they should have been when the user-level file list variable was
deleted. Since the OPeNDAP NetCDF client allows no more than 64
simultaneous file references, this resulted in an error within 2
iterations of the month by month loop in your code. A fix has been
checked in and will be part of the next release 5.1.1, which should
be soon. We would be interested for you (or anyone else motivated to
do so) to test out the new code before we release the new version.
Please contact Mary Haley to get an appropriate binary for your system.

Thanks for pointing out this problem.
  -dave

On May 15, 2009, at 1:57 PM, Jamie Scott wrote:

> 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:<hires.winds.4xd2.mon.mean.ncl>
>
>
> 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

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed May 20 2009 - 15:42:04 MDT

This archive was generated by hypermail 2.2.0 : Thu May 21 2009 - 16:54:57 MDT