[gradsusr] Grads script won't run (out of ideas)

Rowell, Mason D. Mason.D.Rowell-1 at ou.edu
Tue Nov 8 16:13:37 EST 2011


Thanks Micheal, some of these I noticed and fixed with the help of an experienced grads user in my building, but we didn't catch the spacing issue. That would make since why it is failing at line 7, the first indent. I will give this a whirl. Thanks again!

Mason 

PS - Is a specific number of spaces needed?
________________________________________
From: gradsusr-bounces at gradsusr.org [gradsusr-bounces at gradsusr.org] on behalf of Michael Biggs [gradsuser at doubleplum.net]
Sent: Tuesday, November 08, 2011 1:23 PM
To: GrADS Users Forum
Subject: Re: [gradsusr] Grads script won't run (out of ideas)

Hello again Mason,

Please be advised that in my version of your script, I had set the max
bounds for tt to 2 instead of 8.  And I had also changed the file that was
opened by the script.  This was for my own testing purposes; please take
care to merge my suggestions into your script as appropriate.

__
Michael Biggs


On Tue, 8 Nov 2011, Michael Biggs wrote:
> Hi Rowell,
>
> Very interesting.. Your script gives a "Syntax Error" because it uses the
> Tab character, rather than spaces.  GrADS does not seem to be able to handle
> the Tabs.  So please replace your indentations with spaces instead.  This
> should mostly solve your problem.  Also make sure that you find and remove
> the trailing tab character that is at the end of line 21, which looks like:
>    'd skip(UGRDprs,3,3);VGRDprs;mag(UGRDprs,VGRDprs)'
>
> (The hidden tab isn't in this email, but your text-editor should be able to
> find it in your script.)
>
> Once that's fixed, you still have to fix your mistmatched quotes near the
> end of your script.  This is another confusing thing about GrADS.  In the
> last lines of your loop you have:
>    'printim 19981218_'tt.png x800 y600'
>    'clear
> What you want instead is:
>    'printim 19981218_'tt'.png x800 y600'
>    'clear'
>
> That is, the command for printim is in a string which will be interpreted by
> grads.  You drop out of the string to insert the variable 'tt' (which will
> be the number you want in the filename), and then go back into the string to
> finish the printim commands with its options, and then finally you must
> terminate the string.
>
> Similarly, "clear" is a "real" GrADS command, so you have to have it
> contained in single-quotes so that it will run.
>
> I recommend you get a text-editor that has syntax highlighting for GrADS
> which can help to point out the weird GrADS-script-quoting mechanism;
> otherwise it would have been difficult for me to find the problem.  And same
> goes for treating Tab-characters and Space-characters differently.  vim does
> this for me on my machine.
>
> Anyway, I have attached my version of your script.  Hope this helps,
>
> __
> Michael Biggs
>
>
> On Tue, 8 Nov 2011, Rowell, Mason D. wrote:
>> All,
>>
>> I tried some fixes suggested by Jeffery Duda. This script still fails at
>> the while loop. Can anyone see what the problem is? See the attached.
>>
>> Mason
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr




More information about the gradsusr mailing list