[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20030605: Sat / Rad random color changes



Dana,

Several points:
1) No, you don't have to use an 8 bit visual for your scripts.
   You can launch your virtual server with a depth of 24 bits for
   True Color. This may make it easier to manage if you have lots of scripts
   running- since you won't have to worry about ntl suceeding in
   allocating a color map.

2) Your script starts a ntl session, but doesn't kill it, so
   that process will stay running. The next time you run your script 
   to the 8 bit display, trying to launch ntl will fail since the
   first invocation already has the color table (in True color, launching
   multiple ntl's will succeed....but won't be necessary, so you'd want to
   make sure your script isn't loading up your machine with processes.

3) You are not specifying "LUTFIL" in your gprcm script, so you are
   getting whatever color table already exists with the ntl session running.
   This may be a color table from a previous script!

   You should set LUTFIL=default or LUTFIL=gray, so that you get the color 
   table you are expecting.

Steve Chiswell


>From: Dana Price <address@hidden>
>Organization: UCAR/Unidata
>Keywords: 200306051416.h55EGRLd004599

>I plot a composite GOES12 IR satellite/radar loop.  Most of the time the
>finished product looks fine, but every once in awhile I'll get one which
>has the grey/green color gradient of the sat/radar replaced by a gradient
>made up of various bright colors.  The gif loop can be viewed at
>http://www.wx.rutgers.edu/comploop.shtml 
>
>You'll notice some of the frames burst into different colors. The script I
>make the images with is below.  It draws to an Xvfb started by
>'/usr/local/X11R6.4/bin/Xvfb :2 -screen 0 1600x1200x8' 
>I'm using gempak-5.6.j, do I still need to work with an 8 bit display? Can 
>anyone offer suggestions as to why this happens?
>
>Thanks!
>Dana
>
>
>
>#!/bin/tcsh -f
>setenv LD_LIBRARY_PATH /usr/ucblib:/usr/local/lib:/usr/local/wxp/lib
>source /usr/local/gempak/Gemenviron
>setenv DISPLAY web.envsci.rutgers.edu:2
>ntl -s 96 &
>
>set date=`date -u '+%y%m%d.%H%M'`
>set date2=`date -u '+%y%m'`
>set date3=`date -u '+%Y%m'`
># Obtain last 2 RCM file names to obtain data over
># the past hour. Open these files in reverse order.
>#
>set RCM=`ls -r /data/wx/gempak/rcm/$date3*_rcm.dat | head -2`
>
>if($#RCM < 1) then
>   echo "no radar data"
>   exit
>endif
>
># Obtain the latest satellite image
>cd /data/wx/sat/data/
>set SAT=`ls $date2*.12ir |tail -1`
>
># cat the rcm data to a single file
>set RCM1=/tmp/tmprad.$$
>cat $RCM > $RCM1
>
>gprcm << EOF_RCM
> MAP      = 2
> GAREA    = 19;-115;61;-35
> PROJ     = sat
> SATFIL   = /data/wx/sat/data/$SAT
> RADFIL   = 
> LATLON   = 0
> PANEL    = 0
> TITLE    = 5/+2/RCM-GOES12 IR Composite ($SAT)
> TEXT     = .9/21/1/hw
> CLEAR    = YES
> DEVICE   = gf|/data/wx/gempak/rcm/$date.composite.gif|825;525|||NP
> RCMFIL   = $RCM1
> RADTIM   = current
> RADDUR   = 60
> DITHER   = 2
> MESO     = 0
> TVS      = 0
> CNTR     = 0
> MAXTOP   = 0
> RADINFO  = 0
> ECHO     = 1
> CLRBAR   = 1/h/cc/.45;.06
> r
>
> e
>EOF_RCM
>
>gpend
>rm $RCM1
>
>cd /tmp
>set GIFS=`ls /data/wx/gempak/rcm/$date2*composite.gif | tail -12`
>
>foreach GIF ($GIFS)
>cp $GIF /tmp
>end
>
>/usr/local/bin/gifcat -s -o /data/wx/sat/g12/composite_loop.gif /tmp/*.composi
> te.gif
>rm /tmp/*.composite.gif
>
>-- 
>
>
>-----------------------------------------------------------
>Dana Price                        <address@hidden>
>Systems Administrator                   Voice: 732-932-5833
>Rutgers, The State University           Fax:   732-932-8644    
>Department of Environmental Sciences
>Center for Environmental Prediction
>-----------------------------------------------------------
>
>
>
>