Possible 5.0.0 bug: ncclose/Not a valid ID

From: Jamie Scott <James.D.Scott_at_nyahnyahspammersnyahnyah>
Date: Fri, 14 Dec 2007 08:38:20 -0700

I too have encountered this ncclose error, but it's not completely
harmless.
If you are reading a netCDF file, the error is harmless, but if you
writing a netCDF file
it appears it does not completely flush the buffer -- the new netCDF
file is empty.
Fortunately, the solution is simple. You can get rid of the error
(and flush the buffer when writing)
by deleting the file handle of the open netCDF file when you are done
with it. For example:

f1=addfile("/nas/jds/ISCCP/Update/qsw.warm.nc","c")
f1->qsw=qswwm
f2=addfile("/nas/jds/ISCCP/Update/qlw.warm.nc","c")
f2->qlw=qlwwm
f3=addfile("/nas/jds/ISCCP/Update/qsw.cold.nc","c")
f3->qsw=qswcd
f4=addfile("/nas/jds/ISCCP/Update/qlw.cold.nc","c")
f4->qlw=qlwcd

delete(f1)
delete(f2)
delete(f3)
delete(f4)

end

On Dec 14, 2007, at 12:09 AM, ncl-talk-request_at_ucar.edu wrote:

> Rick,
>
> It is good to have confirmation that the bug is understood and
> harmless. We will use 5.0 with confidence. Thank you for your
> quick reply.
>
> --Dave
>
> Rick Grubin wrote:
>> Hi Dave
>>
>>> After installing NCL 5.0.0 on Mac OS 10.4.11, we are getting an
>>> unexpected error upon exit from several scripts. The message is:
>>>
>>> ncclose: ncid 0: NetCDF: Not a valid ID
>>>
>>> Is anyone else on Mac or other systems getting this exit message?
>>>
>>> Please see my script and log below. This is related to addfile or
>>> Netcdf. When the addfile statement is commented out, the spurious
>>> error goes away.
>>>
>>> The error occurs when the script exits, not at the time of addfile.
>>> The error does not occur with NCL 4.3.0. Another clue is that the
>>> error does not occur in a script that accesses binary data rather
>>> than
>>> Netcdf (fbinrecread vs. addfile).
>>
>> The NCL team has seen this, and reported it to the OPeNDAP folks
>> -- this
>> message is generated by the netCDF implementation that
>> resides within the OPeNDAP libraries.
>>
>> Please rest assured that, after fairly extensive testing, data is
>> read
>> correctly. This has been reported to the OPeNDAP folks, who
>> acknowledge that it's a bug and it will be fixed in reasonably
>> short order.
>>
>> In the meantime, please be certain that the message you're seeing is
>> disconcerting, but NCL's behavior is not adversely affected.
>> Please contact me directly if you have any further questions or
>> comments. Thanks!
>>
>> ----
>> Rick Grubin NCAR/TDD/CISL/VETS

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Dec 14 2007 - 08:38:20 MST

This archive was generated by hypermail 2.2.0 : Mon Dec 17 2007 - 08:25:02 MST