Panel Plot Issue

Austin Conaty Austin.L.Conaty at NASA.GOV
Wed Aug 13 19:22:40 EDT 2008


There are lots of ways to handle this.

What I would do in my grads script is this:
before any plotting is done, check for the existence of
each file, one at a time.  If your open fails, set a flag.

So you've examined the 4 files and set a flag
for each one, now you can use this information.

You can make your flag binary
flag1=1 if it opens, flag1=0 if it doesn't open
flag2=1 if it opens, flag2=0 if it doesn't open
flag3=1 if it opens, flag3=0 if it doesn't open
flag4=1 if it opens, flag4=0 if it doesn't open

You can build a string of the flags.
if the string = 1111, you proceed as normal.
if the string is 1011, you have s special case
    and "file3" is now "file2" "file4" is now "file3"
and so on.

It can be done in other ways and it kind of reminds
me of a computer science homework assignment. :)

Good luck.


Walsh, Brian J wrote:
> I have not received any replies to my question regarding a paneling
> issue with GrADS.
>
> Is there someone with a lot of experience with GrADS, including
> developers, who are able to answer my question.  I assume it is
> something easy that I'm not figuring out.
>
> Thanks,
>
> Brian
>
> ________________________________
>
> From: Walsh, Brian J
> Sent: Wednesday, August 06, 2008 2:42 PM
> To: 'GRADSUSR at LIST.CINECA.IT'
> Subject: Panel Plot Issue
>
>
> Hello,
>
> I have an issue with GrADS when I try to plot up a 4-panel chart using
> four different models.
>
> At the beginning of the script, I open each control file separately,
> then I reference them by calling file.1, file.2, file.3, and file.4
>
> But I run into problems if, for instance, file 2 isn't available, but
> file 3 is.  Since GrADS can't open the second file, it will open the
> third file, but think it is the second one since it was the second file
> it was able to open.  This means that the incorrect data will be plotted
> for a model.
>
> Is there an easy way around this.  I have attached my gradscript for
> reference.  My thought would be opening each file one at a time within
> the called product, but would I have to close it out each time or how
> would that work.
>
> Any help would be appreciated.
>
> Thanks,
>
> Brian
>
>
> The information contained in this e-mail is intended only for the individual or entity to whom it is addressed.
> Its contents (including any attachments) may contain confidential and/or privileged information.
> If you are not an intended recipient you must not use, disclose, disseminate, copy or print its contents.
> If you receive this e-mail in error, please notify the sender by reply e-mail and delete and destroy the message.
>



More information about the gradsusr mailing list