Re: netcdf

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Tue Mar 13 2012 - 16:28:04 MDT

Thanks for the suggestion Dave. This definitely make sense.
 -dave

On Mar 13, 2012, at 3:57 PM, Dave Allured wrote:

> OpenDap error status has been requested before now. Up to now, the
> NCL paradigm for external data access has been a simple uniform
> interface for both local files and network file entities. There has
> been no provision for user controlled error handling.
>
> One simple idea would be to provide a query function for Netcdf error
> status. Simply return the official Netcdf error number from the most
> recent underlying library call. Then, any user program that needs to
> work in a soft error environment could simply poll the status after
> each data access:
>
> do while (True)
> record = f->var(i,:,:)
> if (io_status(f) .eq. nc_noerr) then
> break
> end if
> print ("OpenDap error, wait and retry...")
> sleep (60)
> end do
>
> NCL should update its internal io_status for each file, after every
> NCL statement that accesses the file, including addfile. Make this
> function always return nc_noerr for ordinary non-OpenDap files. All
> of this is old techniques found in other programming languages.
> "There is more than one way to do this." HTH.
>
> --Dave
>
> On Tue, Mar 13, 2012 at 3:20 PM, David Brown <dbrown@ucar.edu> wrote:
>> Hi Scott,
>> Sorry for the delay in answering. The new version of NetCDF (4.2.0), which we have been told is going to be released within 2 weeks, has significant improvements to the OPeNDAP client. We are planning a release of NCL by the end of April that will link to this new version of the library. This may, in itself, resolve some of your difficulties. We were also experiencing some intermittent problems that seem to be resolved using the new version of NetCDF.
>> However, we do not yet have a good answer to the question of how to code a "try until successful" scenario. It is something we would like to figure out and we welcome suggestions.
>> -dave
>>
>> On Mar 5, 2012, at 1:33 PM, Scott Durski wrote:
>>
>>> Hi
>>>
>>> I am reading variables from a bunch of grib files located remotely and
>>> writing them to a netcdf file. I get an error that looks like:
>>>
>>>
>>> ncvarget: ncid 2686976; varid 109: NetCDF: I/O failure
>>> fatal:NetCdf: An error occurred while attempting to read variable ...
>>> from file (http://nomads.ncdc.noaa.gov/thredds/... .grb)
>>>
>>> The error is intermittent. I can rerun the script and successfully read
>>> the same variable from the same file. So I'm not sure if it's due to
>>> some network hiccup or server slowdown. Is there anyway in NCL to trap
>>> the error status returned by the ncvarget call so I can have the routine
>>> 'try again' until it succeeds rather than just write garbage to the file
>>> and continue?
>>>
>>> Any thoughts or suggestions would be appreciated. Thanks.
>>>
>>>
>>> Scott
>>> _______________________________________________
>>> 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

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Mar 13 16:28:13 2012

This archive was generated by hypermail 2.1.8 : Tue Mar 20 2012 - 15:27:15 MDT