[Thread Prev][Thread Next][Index]
Re: [ferret_users] Color error in shading with -gif
I've done some more checks on this. I have simplified my scripts down to a
very simple multi-panel shade plot and the problem persists and appears to
be the same issue reported back in 2008
(http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2008/msg00470.html
) and again in 2009
(http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2009/msg00451.html
). This is a pretty dangerous bug because the error is not always obvious
and it would be easy to not catch a one level error if many levels were
selected. In the 2008 thread the problem was blamed on some axis
manipulation. However, in my case I can reproduce the problem with just a
series of basic shade commands (see script below).
Essentially, the problem is that when executing Ferret using "ferret -gif"
the resulting GIF file has incorrect colors if more than one panel is
plotted with the shade command. The colors in the 2nd and subsequent
panels are shifted by one color level in the plot but the color bar stays
correct resulting in a mis-match between the bar and the plot. If the same
script is executed without the -gif command line argument so that the
image is drawn to the screen before doing a frame/file=name.gif to save
the file, then the colors are correct.
In the 2008 thread Ansley suggested calling the shade command twice with
the 2nd call being an overlay on top of the first shade command. This
seems to correct the problem in my case, but it is a bit annoying. I will
always be 2nd guessing the plots to make sure they are correct. For a
while, I thought the error had to do with an even or odd number of panels
being plotted, but this is a bit inconsistent. With my test script below,
the problem happens with any number of panels greater than one.
Any chance this bug can be fixed? It's been a longstanding issue, so it
may be something complicated/subtle and hard to do.
Thanks,
Bill
---------------------------------------------------------------------------
------
Instructions to reproduce the problem (at least with v6.8.2):
Execute the following script once with "ferret -script test.jnl" to get
the correct result.
Execute the script again with "ferret -gif -script test.jnl to get the
wrong result. In my case, the UL and LR panels are wrong.
Script:
use "../test.nc"
use "etopo120.cdf"
set v ul
shade/lev=5 rose
set v ur
shade/lev=5 rose
set v ll
shade/lev=5 rose
set v lr
shade/lev=5 rose
shade/ov/nolab/lev=5 rose
frame/file="test.gif"
___________________________________________________________________
William I. Gustafson Jr., Ph.D.
Scientist
ATMOSPHERIC SCIENCES AND GLOBAL CHANGE DIVISION
Pacific Northwest National Laboratory
P.O. 999, MSIN K9-30
Richland, WA 99352
Tel: 509-372-6110
William.Gustafson@xxxxxxxx
http://www.pnnl.gov/atmospheric/staff/staff_info.asp?staff_num=5716
http://www.researcherid.com/rid/A-7732-2008
On 2/13/13 5:29 PM, "Gustafson, William I" <william.gustafson@xxxxxxxx>
wrote:
>Hi,
>
>Today I discovered that the colors of my shaded panels are getting
>corrupted when using the frame command to save a gif file while running
>with the -gif command line argument in Ferret. Attached are two files.
>The one that has a big red blob is what I see when I display my plot on
>the screen with X-windows. The one that has blue inside the red blob is
>the resulting gif file. These pictures are from a screen dump showing the
>most obvious error. This particular case is one panel of a 6-panel plot.
>Other panels are also showing this behavior.
>
>I am using v6.8.2. The script is a bit convoluted to reproduce the whole
>6-panel plot. But basically, there are 6 shaded plots with the last 3
>having contours overlaid. The actual plotting commands are pretty
>straightforward. I can send them in if that would help. For now, I won't
>clutter up the archives. Tomorrow I will try to simplify things down to a
>more easily digestible reproduction of the problem.
>
>Has anybody else seen this behavior?
>
>-Bill
>___________________________________________________________________
>
>William I. Gustafson Jr., Ph.D.
>Scientist
>ATMOSPHERIC SCIENCES AND GLOBAL CHANGE DIVISION
>
>Pacific Northwest National Laboratory
>P.O. 999, MSIN K9-30
>Richland, WA 99352
>Tel: 509-372-6110
>William.Gustafson@xxxxxxxx
>http://www.pnnl.gov/atmospheric/staff/staff_info.asp?staff_num=5716
>http://www.researcherid.com/rid/A-7732-2008
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
Ferret
Privacy Policy | Disclaimer | Accessibility Statement