<div dir="ltr">Stuart,<div>Thanks for sending your script.</div><div><br></div><div>The reason the output keeps replacing the previous image is because the output filename is static, i.e., it is replacing the previous one with each loop. Following is a suggested fix to the affected line, where i changed pcpn-cldcvr.png to pcpn-cldcvr'i'.png:</div><div><br></div><div>'printim pcpn-cldcvr'i'.png x1100 y675 -b gfs_ukcloudcover1'i'.png -t 0';#overlay/save 2nd variable on previous image, black as transparent<br></div><div><br></div><div>Note: if you don't need to keep each background image, you could make its name static since it would be replaced with each loop.</div><div><br></div><div>Let me know if you have an additional question. Otherwise, good luck!</div><div>Stephen Mc</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 7, 2015 at 9:58 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 14:36, Stephen McMillan wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Stuart,<br>
Thanks for providing the script, that certainly helps. With the first<br>
image, I have no problem getting the tcdcclm overlaid with apcpsfc.<br>
However, as it is, your code will generate only one such map since it<br>
should exit after the first timestep (=3). What is the value of<br>
"map"?<br>
Stephen<br>
<br>
On Fri, Aug 7, 2015 at 8:29 AM, Chorley Weather<br>
<<a href="mailto:weatherstu@chorleyweather.com" target="_blank">weatherstu@chorleyweather.com</a>> wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
On 07-08-2015 13:19, Stephen McMillan wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
I don't quite follow what you're trying to do, since your last<br>
</blockquote>
two<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
sample lines appear precisely the same. Bottom line, for it to<br>
</blockquote>
work:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<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,<br>
</blockquote>
then<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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<br>
</blockquote>
diagnose it,<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
it would help for you to send the appropriate lines of your code<br>
</blockquote>
that<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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" target="_blank">weatherstu@chorleyweather.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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<br>
</blockquote></blockquote>
transparency/opaqueness,<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
but<br>
here's a sample script if you don't have or don't want to<br>
</blockquote></blockquote>
upgrade.<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Cloud clover with precip overlay sample attached, along with<br>
</blockquote></blockquote>
script<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
that created it.<br>
<br>
Good luck!<br>
Stephen Mc<br>
<br>
On Wed, Aug 5, 2015 at 1:36 PM, Jeff Duda<br>
</blockquote></blockquote>
<<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>><br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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" target="_blank">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" target="_blank">weatherstu@chorleyweather.com</a>> wrote:<br>
<br>
Hi guys,<br>
<br>
I have been trying to combine two shaded variables in one<br>
</blockquote>
image,<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
for<br>
example precip & cloud cover. I have tried the maskout<br>
</blockquote></blockquote>
function but<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
the<br>
output looks to rough and pixelated. Can anybody suggest a<br>
</blockquote></blockquote>
better<br>
<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
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" target="_blank">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] [1]<br>
</blockquote>
<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] [1]<span class=""><br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">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] [1]<br>
</blockquote><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" target="_blank">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] [1]<span class=""><br>
<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" target="_blank">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] [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>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">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] [1]<br></span><div><div class="h5">
Hi Stephen,<br>
<br>
The sample script you sent has worked well with my own variables<br>
</div></div></blockquote><div><div class="h5">
as<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
shown in the attached image. The problem I have is the output<br>
</blockquote>
image<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
keeps replacing the previous image, ie. my printim is<br>
<br>
'printim pcpn-cldcvr.png x1100 y675 -b gfs_ukcloudcover1'i'.png<br>
</blockquote>
-t<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
0';#overlay/save 2nd variable on previous image, black as<br>
</blockquote>
transparent.<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
How do i script it were i get printim pcpn-cldcvr1.png x1100<br>
</blockquote>
y675<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
printim pcpn-cldcvr2.png x1100<br>
</blockquote>
y675<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
printim pcpn-cldcvr2.png x1100<br>
</blockquote>
y675<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
And so on.<br>
<br>
--<br>
Chief Forecaster & Owner<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">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] [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> [1]<br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">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>
</blockquote>
Hi Stephen,<br></div></div><div><div class="h5">
The last sample line was supposed to be 3.png (typo). I'm using<br>
opengrads and the code is thus:<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<br>
100'<br>
'set ccols 0 63 62 61 60 59 58 57 56 55 54 53 52 51 50 47 46 45 44<br>
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<br>
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<br>
27 28<br>
29 67 66 65 64 63 62 61'<br>
<br>
'd apcpsfc'<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<br>
transparent<br>
<br>
i = i+1<br>
endwhile<br>
<br>
Like I said the output image just re writes over the last, so I<br>
only<br>
ever have 1 image. I should be getting 80+ images. Thanks for your<br>
advice.<br>
<br>
regards,<br>
Stuart<br>
<br>
--<br>
Chief Forecaster & Owner<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">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>
</div></div></blockquote><div><div class="h5">
<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" target="_blank">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>
Hi Stephen,<br>
<br>
I have attached the full script so you can have a look through. Once again thank you very much.<div class="HOEnZb"><div class="h5"><br>
<br>
Stuart<br>
-- <br>
Chief Forecaster & Owner</div></div><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>
<br></blockquote></div><br></div>