Thanks. I actually tried monitoring the file size - I spun up a separate
thread which simply pinged the file and reported its size - but found that
the file did not grow until the very last moment before the code returned
from the FileWriter.finish() call. So it appears as though the file is
being built and retained in memory and then dumped to disk all at once.
Looks like I'll be sticking with the indeterminate progress bar!!
Thanks again for the help,
Chris
On 1/10/08 12:27 PM, "John Caron" <caron@xxxxxxxxxxxxxxxx> wrote:
> It depends on whether you are using the unlimited dimension or not. but,
> i would say that file size will be a reasonable proxy for completeness.
>
> Unfortunately, theres no exposed method for calculating the file size
> -though its rather easy, you can look at ucar.nc2.N3header.read()
>
> Christopher Mueller wrote:
>> Thanks John. An add-on question to my last one - the FileWriter.finish()
>> call write the file bit by bit, or all at once? Would it be possible to
>> monitor the size of the file that's being created, or would it just stay
>> very small (initialization size) right up until the last moment of the call
>> and then shoot up to it's full size all at once? I'd really just like to be
>> able to give the user some sense that there's something happening.
>>
>> Thanks again for the quick reply.
>>
>> Chris
>>
>>
>> On 1/8/08 6:46 PM, "John Caron" <caron@xxxxxxxxxxxxxxxx> wrote:
>>
>>> Hi Christopher:
>>>
>>> theres no way to do that right now, it would require code at some very
>>> deep layers. however, ill keep it in mind for the future to see if its
>>> possible to add.
>>>
>>> Christopher Mueller wrote:
>>>> John et al.,
>>>>
>>>> I have an application that contacts an OpENDAP server, gets a subset of
>>>> an available dataset, and then writes the desired data to a local Netcdf
>>>> file. Everything works quite well (for most datasets), however I have
>>>> not been able to find a way to keep track of the progress of the dataset
>>>> as it downloads/writes to disk. Is there a way to do this?? I have
>>>> profiled the methods and discovered that essentially all of the
>>>> processing time is within the FileWriter.finish() call.
>>>>
>>>> Does anyone have any ideas on how I can inform the user of the progress
>>>> without resorting to an indeterminate progress bar (which is what I¹m
>>>> currently using)??
>>>>
>>>> Thanks in advance,
>>>> Chris
>>>>
>>>> --
>>>> *Christopher Mueller* | Scientist
>>>> Applied Science Associates
>>>> 70 Dean Knauss Drive | Narragansett, RI 02882 USA
>>>> p: +1 401-789-6224 | f: +1 401-789-1932
>>>> e: cmueller@xxxxxxxxxxxxxx | www.asascience.com
>>>>
>>>> *ASA **| Science. Services. Solutions
>>>> *
>>>> Imagination is everything. It is the preview of life's coming
>>>> attractions. - Albert Einstein
>>>>
>>>> Whether you think you can or think you can't, either way you are right.
>>>> - Henry Ford
>>
>>
--
Christopher Mueller | Scientist
Applied Science Associates
70 Dean Knauss Drive | Narragansett, RI 02882 USA
p: +1 401-789-6224 | f: +1 401-789-1932
e: cmueller@xxxxxxxxxxxxxx | www.asascience.com
ASA | Science. Services. Solutions
Imagination is everything. It is the preview of life's coming attractions.
- Albert Einstein
Whether you think you can or think you can't, either way you are right. -
Henry Ford