This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi everyone, I try to match an enhancement table I have for Water Vapor Imagery. I created it successfully in McIDAS: Brightness Blue Green Red min max min max min max min max --- --- --- --- --- --- --- --- 0 136 0 0 0 0 0 0 137 205 165 255 0 255 0 255 206 255 255 255 255 255 255 255 I tried to create a LUTFIL for GEMPAK that exhibits the same enhancement without any success. Is there a way to match a McIDAS enhancement table to a GEMPAK LUTFIL? Best regards, Christian Page address@hidden http://meteocentre.com/ Agent de recherche et de planification +1 514 987 3000 ext. 2376 Departement des Sciences de la Terre et de l'Atmosphere UQAM >From address@hidden Mon Mar 4 12:32:23 2002 >To: Christian Page <address@hidden> >cc: <address@hidden>, <address@hidden>, > <address@hidden> >Subject: Re: GEMPAK LUTFIL vs McIDAS ET file Christian, I've had success with the attached PERL code. In my experience, I've had to use 128 colors instead of the full 256. Also, be sure to enter in RED, GREEN, BLUE order (the standard) not the crazy BLUE, GREEN, RED order of Mcidas. The following input for make_sat_enhancement.pl produced the same enhancement in GEMPAK as yours did in Mcidas for me: 128 1,0,0,0 68,0,0,0 69,0,0,165 102,255,255,255 103,255,255,255 128,255,255,255 q q -- David Ovens e-mail: address@hidden (206) 685-8108 plan: Real-time MM5 forecasting for Pacific Northwest Research Meteorologist Dept of Atmospheric Sciences, Box 351640 University of Washington Seattle, WA 98195 On Mon, 4 Mar 2002, Christian Page wrote: > > Hi everyone, > > I try to match an enhancement table I have for Water Vapor Imagery. I created > it > successfully in McIDAS: > > Brightness Blue Green Red > min max min max min max min max > --- --- --- --- --- --- --- --- > 0 136 0 0 0 0 0 0 > 137 205 165 255 0 255 0 255 > 206 255 255 255 255 255 255 255 > > I tried to create a LUTFIL for GEMPAK that exhibits the same enhancement > without > any success. > > Is there a way to match a McIDAS enhancement table to a GEMPAK LUTFIL? > > Best regards, > > Christian Page > address@hidden http://meteocentre.com/ > > Agent de recherche et de planification +1 514 987 3000 ext. 2376 > Departement des Sciences de la Terre et de l'Atmosphere UQAM #!/usr/local/bin/perl unless (open (OUT,">mytopo.tbl")) { print "cannot create mytopo.tbl\n"; exit 1; } print OUT "! mytopo.tbl ! ! Color table generated by ~ovens/gempak/make_sat_enhancement_table.pl ! !Color name Abrev Red Green Blue X color name "; print "enter total number of colors 256,128,64,32, etc: "; chomp($num = <STDIN>); $input = "$num\n"; $total = 0; until ($srgb eq "q") { print "enter START color number,r,g,b or q to quit (e.g. 1,255,255,255: "; chomp($srgb = <STDIN>); $input .= "$srgb\n"; print "enter END color number,r,g,b (e.g. 256,0,0,255: "; chomp($ergb = <STDIN>); $input .= "$ergb\n"; ($start,$sr,$sg,$sb) = split(',',$srgb); ($end,$er,$eg,$eb) = split(',',$ergb); if ($start == $end) { $total++; if ($total > $num) { print "written $num colors to mytopo.tbl\n"; $srgb = "q"; last; } print sprintf " %3d %3d %3d %3d\n",$sr,$sg,$sb,$total; print OUT sprintf " %3d %3d %3d %3d\n",$sr,$sg,$sb,$total; } else { for ($i = $start; $i <= $end; $i++) { $red_int = ($er - $sr)/($end - $start); $green_int = ($eg - $sg)/($end - $start); $blue_int = ($eb - $sb)/($end - $start); $total++; if ($total > $num) { print "written $num colors to mytopo.tbl\n"; $srgb = "q"; last; } print sprintf " %3d %3d %3d %3d\n",int(($i-$start)*$red_int+$sr+0.5),int(($i-$start)*$green_int+$sg+0.5),int(($i-$start)*$blue_int+$sb+0.5),$total; print OUT sprintf " %3d %3d %3d %3d\n",int(($i-$start)*$red_int+$sr+0.5),int(($i-$start)*$green_int+$sg+0.5),int(($i-$start)*$blue_int+$sb+0.5),$total; } } } close OUT; open(OUT,">mytopo.in"); print OUT $input; close OUT; >From address@hidden Mon Mar 4 13:26:46 2002 >To: David Ovens <address@hidden> >cc: <address@hidden> >Subject: Re: GEMPAK LUTFIL vs McIDAS ET file Hi, Thank you very much!! It works very well and it is very fast... Best regards! Christian Page address@hidden http://meteocentre.com/ Agent de recherche et de planification +1 514 987 3000 ext. 2376 Departement des Sciences de la Terre et de l'Atmosphere UQAM