Re: Resource errors

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue, 22 Jul 2008 16:42:08 -0600 (MDT)

On Wed, 23 Jul 2008, Saji N. Hameed wrote:

> Hi James,
>
> I guess it would be hard to let NCL determine what is "non-essential".

Hi James,

Saji is right about determining what is a "non-essential" error.

I believe when NCL processes your script, it first sees that you have
an out-of-bounds error, and quits immediately. It doesn't first check
to see what's going on with the left-hand side, to see if it can
somehow ignore this out-of-bounds problem. This would make NCL run a
bit slower for one thing, and it would be dangerous for us to try to
determine what is a non-essential error for a user (i.e other users
may *want* to know that the value they've used for tiMainString was
bad, and want NCL to quit at that point).

Saji has a good suggestion about writing results to a file, to save
some time.

Cheers,

--Mary

> If I may guess, you are concerned that a time consuming calculation
> had to be repeated because of the error in resource allocation for
> plotting. My strategy in this situation would be to write the results
> from Step 1 to a temporary (or permanent) file and perform the
> plotting separately.
>
> cheers,
> saji
>
> * James Correia <jimmyc42_at_gmail.com> [2008-07-22 13:27:23 -0700]:
>
>> I can't speak for anyone else, but when I write NCL code and finally have it
>> debugged, at least all the way to the plotting section of the script, I
>> dislike that NCL will terminate when a non-essential line of code errs.
>> for example,
>> 1. do a large calculation
>> 2. prepare resources for plotting
>> then set the title of the plot:
>> res_at_tiMainString = times(it) ; <---"it"
>> plot = ...
>>
>> well, in my case I forgot to change the title (after my "it" loop, "it" was
>> greater than the dimensioned array). It would be nice if NCL could ignore my
>> forgetfulness and just not use said resource if it is undefined or that
>> array is out of bounds or something, and then continue to do the plot.
>>
>> I guess this would require resource error checking. Is that is at all
>> possible. I certainly understand if it is not feasible. But it would be nice
>> if NCL didnt quit when a resource wasnt set properly as demonstrated here.
>> Maybe even a function that would be called when a resource errors to set it
>> to null...
>>
>> --
>> James Correia Jr.
>> Post Doc
>> Climate Physics Group, PNNL
>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk_at_ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> --
> Saji N. Hameed
>
> APEC Climate Center +82 51 668 7470
> National Pension Corporation Busan Building 12F
> Yeonsan 2-dong, Yeonje-gu, BUSAN 611705 saji_at_apcc21.net
> KOREA
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jul 22 2008 - 16:42:08 MDT

This archive was generated by hypermail 2.2.0 : Wed Jul 23 2008 - 06:48:24 MDT