[gradsusr] Background options failing

Jeff Duda jeffduda319 at gmail.com
Wed Nov 9 17:43:39 EST 2011


Did you get an image that wasn't just white?

On Wed, Nov 9, 2011 at 4:11 PM, Rowell, Mason D. <Mason.D.Rowell-1 at ou.edu>wrote:

>  Jeff,
>
> I don't know if I have tried this placement yet so I'll give it a whirl.
> Unless I am going crazy though, I don't see the geopoten. lines, despite
> the fact ccolor is at 0, which should be black. If I can't see them, I
> assume it is making them white, and I don't know why.
>
> Mason
>  ------------------------------
> *From:* gradsusr-bounces at gradsusr.org [gradsusr-bounces at gradsusr.org] on
> behalf of Jeffrey Duda [jdduda at iastate.edu]
> *Sent:* Wednesday, November 09, 2011 3:14 PM
> *To:* GrADS Users Forum
> *Subject:* Re: [gradsusr] Background options failing
>
>  Mason,
> Okay, I put your script to work on a different computer system and got the
> results you're looking for (I think, see attached image).  Here's the code
> that got those results:
>
> 'open narr-a_221_19981218_0000_000.ctl'
> hgt = 850
> 'set lev 'hgt
> 'set lat 34 46'
> 'set lon -114 -97'
> 'set mpdset hires'
> 'set display color white'
> 'clear'
> tt = 1
> while (tt <= 8)
>  'set t 'tt
>  'set cint 10'
>  'set ccolor 0'
>  'd HGTprs'
>  'set clab %.0f`3.`1C'
>  'set cint 2'
>  'set cstyle 2'
>  'set ccolor 2'
>  'd (TMPprs - 273)'
>  'set gxout barb'
>  'd skip(UGRDprs,3,3);VGRDprs;mag(UGRDprs,VGRDprs)'
>  'printim example_'tt'_'hgt'.png x800 y600'
>  'clear'
>  tt = tt + 1
> endwhile
>
> You'll notice the only things I changed (other than the path to the files)
> is where I put some of the setup commands, and that I removed the "set
> background" command.  You don't need to use both "set background" and "set
> display" to get what you want.  In fact, I think those two commands sort of
> canceled each other out.  I would suggest always going with the "set
> display color white" ; "clear" sequence.  Changing either the background or
> display color messes with the color that represents the "foreground" and
> "background".  When you did "set background 1", you told Grads to set the
> color index 1 to black and 0 to white instead of the other way around,
> which is the default behavior.  I don't know if it matters to get much
> deeper than that, but just use the suggestion I provided and you'll be fine.
>
> Jeff
>
> On Wed, Nov 9, 2011 at 2:20 PM, Rowell, Mason D. <Mason.D.Rowell-1 at ou.edu>wrote:
>
>> All,
>>
>> I reduced the iterations to one, and I still cannot get these commands in
>> the script to do the same thing when typing them one by one on the command
>> line with a refresh load of grads. Has anyone had this happen before? Could
>> someone run my script and tell me if you still only get a black background,
>> despite the command?
>>
>> Mason
>> ________________________________________
>> From: gradsusr-bounces at gradsusr.org [gradsusr-bounces at gradsusr.org] on
>> behalf of Rowell, Mason D. [Mason.D.Rowell-1 at ou.edu]
>> Sent: Wednesday, November 09, 2011 1:31 PM
>>  To: GrADS Users Forum
>> Subject: Re: [gradsusr] Background options failing
>>
>> All,
>>
>> Absolutely nothing will work. Even if I use white in printim the image is
>> STILL black. This is such a huge waste of time at this point. Should it be
>> so hard to get a script to work right?
>>
>> Mason
>> ________________________________________
>> From: gradsusr-bounces at gradsusr.org [gradsusr-bounces at gradsusr.org] on
>> behalf of Nick Heath [nkh09 at fsu.edu]
>> Sent: Wednesday, November 09, 2011 12:51 PM
>> To: GrADS Users Forum
>> Subject: Re: [gradsusr] Background options failing
>>
>> Try moving your 'clear' command to the line after you 'set display color
>> white', e.g.,
>>
>> 'set background 1'
>> 'set display color white'
>> 'clear'
>>
>> That might work.
>>
>> -Nick
>>
>> ----- Original Message -----
>> From: "Rowell, Mason D." <Mason.D.Rowell-1 at ou.edu>
>> Date: Wednesday, November 9, 2011 6:17 pm
>> Subject: [gradsusr] Background options failing
>> To: "gradsusr at gradsusr.org" <gradsusr at gradsusr.org>
>>
>> > All,
>> >
>> > See the below. I cannot get the script to do the same as the
>> > command line operations, even when they are the same.
>> >
>> > Mason
>> > ________________________________________
>> > From: Rowell, Mason D.
>> > Sent: Tuesday, November 08, 2011 4:17 PM
>> > To: gradsusr at gradsusr.org
>> > Subject:
>> >
>> > All,
>> >
>> > Running the above, command by command, gives me white background,
>> > with grey political boundaries and a black frame, but running the
>> > script, gives me orange boundaries and black background (with white
>> > frame). This is a complete mystery to me. In fact, I often have to
>> > completely close out of grads and reopen from scratch in order to
>> > get 'set background 1' to work from the command line (which only
>> > shows after using clear). So I would expect at least the first
>> > image from the script to look right but it doesn't. Anyone know why
>> > grads is needing a fresh start to change this, ALONG with a clear,
>> > then never to work properly again unless I reboot it? This can't be
>> > the only problem with the script since it won't even work right for
>> > the first image running the script with a fresh grads
>> > session....Again I am using an older 2.0 version 6.
>> >
>> > Mason
>> >
>>
>>
>>
>>
>>
>>
>>
>> Nick Heath
>> Graduate Student
>> Florida State University
>> Department of Earth, Ocean, and Atmospheric Science
>> Love Bldg. Rm 311
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>
>
>
> --
> Jeff Duda
> Iowa State University
> Meteorology Graduate Student
> www.meteor.iastate.edu/~jdduda <http://www.meteor.iastate.edu/%7Ejdduda>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>


-- 
Jeff Duda
Grad student - PhD, Meteorology
University of Oklahoma School of Meteorology - Center for Analysis and
Prediction of Storms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20111109/dd4b16e4/attachment-0003.html 


More information about the gradsusr mailing list