<div dir="ltr">Stuart,<div>Thanks for providing the script, that certainly helps. With the first image, I have no problem getting the tcdcclm overlaid with apcpsfc. However, as it is, your code will generate only one such map since it should exit after the first timestep (=3). What is the value of "map"?</div><div>Stephen</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 7, 2015 at 8:29 AM, Chorley Weather <span dir="ltr"><<a href="mailto:weatherstu@chorleyweather.com" target="_blank">weatherstu@chorleyweather.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 07-08-2015 13:19, Stephen McMillan wrote:<br>
> Hi,<br>
> I don't quite follow what you're trying to do, since your last two<br>
> sample lines appear precisely the same. Bottom line, for it to work:<br>
><br>
> - Display first variable, save it<br>
> - Clear, then display second variable, then save it with previous<br>
> saved map as the background and a specified transparent color<br>
> -To add a third variable, clear, then display the third variable, then<br>
> save it with the second saved map as background and specified<br>
> transparent color<br>
> -And so on<br>
><br>
> If above is not addressing your problem then, to properly diagnose it,<br>
> it would help for you to send the appropriate lines of your code that<br>
> you are using. Also, which version of GrADS are you using?<br>
> Stephen Mc<br>
><br>
> On Fri, Aug 7, 2015 at 5:33 AM, Chorley Weather<br>
> <<a href="mailto:weatherstu@chorleyweather.com">weatherstu@chorleyweather.com</a>> wrote:<br>
><br>
>> On 05-08-2015 19:31, Stephen McMillan wrote:<br>
>><br>
>> Jose, Stuart,<br>
>><br>
>> Jeff's recommendation for 2.1+ and the alpha channel is probably<br>
>> the<br>
>> best way to go since you can control the transparency/opaqueness,<br>
>> but<br>
>> here's a sample script if you don't have or don't want to upgrade.<br>
>> Cloud clover with precip overlay sample attached, along with script<br>
>> that created it.<br>
>><br>
>> Good luck!<br>
>> Stephen Mc<br>
>><br>
>> On Wed, Aug 5, 2015 at 1:36 PM, Jeff Duda <<a href="mailto:jeffduda319@gmail.com">jeffduda319@gmail.com</a>><br>
>> wrote:<br>
>><br>
>> Upgrade to version 2.1+ and use the alpha channel when creating<br>
>> colors.<br>
>><br>
>> Jeff<br>
>><br>
>> On Wed, Aug 5, 2015 at 12:15 PM, Chorley Weather<br>
>> <<a href="mailto:weatherstu@chorleyweather.com">weatherstu@chorleyweather.com</a>> wrote:<br>
>><br>
>> On 05-08-2015 16:09, Stephen McMillan wrote:<br>
>> Stuart,<br>
>> 1. Display first variable then save to an image file<br>
>> 2. Clear screen, then display second variable<br>
>> 3. Save to another file using first file as background (-b<br>
>> option)<br>
>> and specify an appropriate transparent color (-t option)<br>
>><br>
>> Resulting saved map should be without the rough, pixelated<br>
>> edges<br>
>><br>
>> Stephen Mc<br>
>><br>
>> On Wed, Aug 5, 2015 at 10:04 AM, Chorley Weather<br>
>> <<a href="mailto:weatherstu@chorleyweather.com">weatherstu@chorleyweather.com</a>> wrote:<br>
>><br>
>> Hi guys,<br>
>><br>
>> I have been trying to combine two shaded variables in one<br>
> image,<br>
><br>
>>> for<br>
>>> example precip & cloud cover. I have tried the maskout<br>
> function but<br>
><br>
>>> the<br>
>>> output looks to rough and pixelated. Can anybody suggest a<br>
> better<br>
><br>
>>> way to<br>
>>> get a smoother result.<br>
>>><br>
>>> Many thanks in advance<br>
>>> Stuart.<br>
>>><br>
>>> --<br>
>>> Chief Forecaster & Owner<br>
>>> _______________________________________________<br>
>>> gradsusr mailing list<br>
>>> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
</div></div>>>> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a> [1] [1] [1]<br>
>><br>
>> Links:<br>
>> ------<br>
>> [1] <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a> [1] [1]<br>
<span class="">>><br>
>> _______________________________________________<br>
>> gradsusr mailing list<br>
>> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
</span>>> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a> [1] [1]<br>
<span class="">> Thanks Stephen, I will have a go at that cheers.<br>
> --<br>
> Chief Forecaster & Owner<br>
> _______________________________________________<br>
> gradsusr mailing list<br>
> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
</span>> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a> [1] [1]<br>
<span class="">><br>
> --<br>
><br>
> Jeff Duda<br>
> Graduate research assistant<br>
> University of Oklahoma School of Meteorology<br>
> Center for Analysis and Prediction of Storms<br>
><br>
> _______________________________________________<br>
> gradsusr mailing list<br>
> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
</span><span class="">> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a> [1] [1]<br>
><br>
> Links:<br>
> ------<br>
> [1] <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a> [1]<br>
><br>
> _______________________________________________<br>
> gradsusr mailing list<br>
> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a> [1]<br>
</span><span class="">> Hi Stephen,<br>
><br>
> The sample script you sent has worked well with my own variables as<br>
> shown in the attached image. The problem I have is the output image<br>
> keeps replacing the previous image, ie. my printim is<br>
><br>
> 'printim pcpn-cldcvr.png x1100 y675 -b gfs_ukcloudcover1'i'.png -t<br>
> 0';#overlay/save 2nd variable on previous image, black as transparent.<br>
><br>
> How do i script it were i get printim pcpn-cldcvr1.png x1100 y675<br>
> printim pcpn-cldcvr2.png x1100 y675<br>
> printim pcpn-cldcvr2.png x1100 y675<br>
> And so on.<br>
><br>
> --<br>
> Chief Forecaster & Owner<br>
> _______________________________________________<br>
> gradsusr mailing list<br>
> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a> [1]<br>
><br>
><br>
><br>
> Links:<br>
> ------<br>
> [1] <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
><br>
> _______________________________________________<br>
> gradsusr mailing list<br>
> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
Hi Stephen,<br>
</span>The last sample line was supposed to be 3.png (typo). I'm using<br>
opengrads and the code is thus:<br>
<br>
<br>
i = 3<br>
while ( i<maps )<br>
<br>
* Set up a few preliminary characteristics<br>
setmap(1)<br>
setSMcols(1)<br>
'set t 'i<br>
<br>
*'define dew = const((dewpt(tmp2m,rh2m)-273.16),0,-u)'<br>
'set gxout shaded'<br>
'set csmooth on'<br>
'set clevs 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100'<br>
'set ccols 0 63 62 61 60 59 58 57 56 55 54 53 52 51 50 47 46 45 44 43 42<br>
41 17 39 38 37 36 35 34 33'<br>
<br>
'd tcdcclm'<br>
<br>
'cbar'<br>
'printim gfs_ukcloudcover1'i'.png x1100 y675';#1st (backgrd) image<br>
<br>
'c'<br>
<br>
setstucols(1)<br>
'set t 'i<br>
'set gxout shaded'<br>
'set csmooth on'<br>
'set clevs 0.2 0.5 1.5 2 3 4 5 6 7 8 9 10 13 16 19 22 25 30 35 40 45 50<br>
60 70 80 90 100'<br>
'set ccols 0 43 44 45 46 47 48 49 39 38 37 36 35 33 22 23 24 25 26 27 28<br>
29 67 66 65 64 63 62 61'<br>
<br>
'd apcpsfc'<br>
<span class=""><br>
'printim pcpn-cldcvr.png x1100 y675 -b gfs_ukcloudcover1'i'.png -t<br>
0';#overlay/save 2nd variable on previous image, black as transparent<br>
<br>
<br>
</span>i = i+1<br>
endwhile<br>
<br>
Like I said the output image just re writes over the last, so I only<br>
ever have 1 image. I should be getting 80+ images. Thanks for your<br>
advice.<br>
<br>
regards,<br>
Stuart<br>
<div class="HOEnZb"><div class="h5">--<br>
Chief Forecaster & Owner<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</div></div></blockquote></div><br></div>