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

[Support #FWQ-357482]: Re: conversion to image format



Megan,

I looked at your attached images, and the 2nd image which I believe is supposed
to be your satellite image while showing the color bar, appears to have the 
wrong
LUTFIL defined. Ensure you either have set LUTFIL=default to
use the color lookup table define in satimg.tbl, or you have defined 
LUTFIL=ir_upc2.tbl in GDPLOT2). Otherwise, I do not see the number of colors in
your plot that I do here. Check your nex2gini.tbl for any typo as well-
the two sections of the curve are separated by the ";" character.

I have attached a GIF image that I produced here showing the satellite image
I created using your CTMPC grid and the modified Celsius nex2gini.tbl
entries of:
CTMPC     16    2 C,255,176,-110,-31;175,0,-30.5,57         TICZ99 TMPC

I have overlaid the image with the TYPE=p plot of data values
from your grid using IJSKIP=5 for readability. I do see gray areas
to the northwest of the storm with values from 18 to 29C.

I have also attached the GINI image I used, so you should be able to
duplicate my image if you had a typo in your nex2gini.tbl. If the problem
was in your LUTFIL setting in the display, then you would probably see a 
similar 
issue with not matching the display of the GIF that I sent. 

Steve Chiswell
Unidata User Support



Where previously I had sent you the TMPK values.


> Dr. Chiswell,
> 
> I have a question about the mapping of temperature to pixel at the higher
> temp values.  I've noticed that there's a lack of the the warmer/light
> gray colors in my satellite images.
> I've included some figures as an example of what I mean.  The observed IR
> has a lot of the lighter grays (5 to 20 C) around the storm.  My IR image
> shows a pretty abrupt change from the colder temps (below 0) to a black
> background.
> I checked output from the algorithm before it is converted to image and
> just plotted my homemade satellite IR table with some contours; it's the
> gempak.gif file.  The warmest temperatures it shows are between 20 to 25
> outside the northwest quadrant of the storm and within the eye (the sign's
> flipped on the contours so that the color table would go up for decreasing
> temperature).  So shouldn't I have a light gray color in those areas,
> instead of the black that shows up when it's mapped to a pixel?
> I'm not sure I understand the IR temperature curve that is in
> nex2gini.tbl.  Is this just because the IR temperature is plotted on a
> logorithmic scale for the colder temps and a linear scale for the warm
> values?
> 
> Thanks for all your help,
> Megan
> 
> >> Dr. Chiswell,
> >>
> >> I have a question of gd2img.  The satellite observations that I'm using
> >> to
> >> compare with my model-simulated satellite are all in celsius.  I have
> >> both
> >> celsius and kelvin versions of cloud top temperatures in my gempak files
> >> before they're converted to gini with gd2img.  Can I also use gd2img to
> >> convert the celsius cloud top temperatures?
> >
> > Yes, you can use any variable for GFUNC as long as you create a
> > nex2gini.tbl
> > entry such as:
> > CTMPC     15    2 K,255,176,-110,-31;175,0,-31.5,15         TICZ99 TMPK
> >
> > The band number of n=15 is what is used in imgtyp.tbl column 6
> > as 2**n-1 (so that would be 2**14), where I had previously
> > sent you 2**15 for band=16 (or you can just redefine CTMPK to CTMPC
> > using the same band number).
> >
> > Steve Chiswell
> > Unidata User Support
> >
> >> I attempted to put a table entry for a celsius variable (CTMPC) in
> >> nex2gini.tbl, by subtracting 273 off all the values for the kelvin cloud
> >> top temps. Is that correct?  I'm also not sure what values to put into
> >> imgtyp.tbl for CTMPC.
> >> Thanks!
> >> Megan
> >>
> >> > Megan,
> >> >
> >> > I put together a completely standalone tarfile (attached to this
> >> message)
> >> > that should run without any upgrade of your previous versions.
> >> >
> >> > First thing is to see if your Redhat can run the binary I built here
> >> under
> >> > fedora core 5.
> >> >
> >> > Unpack the tarfile (it will create its own "ncsu" subdirectory where
> >> you
> >> > unpack it.
> >> > In the directory are the nex2gini.tbl file that defines the mapping
> >> from
> >> > temperature to pixel value:
> >> > CTMPK     16    2 K,255,176,163,242;175,0,242.5,330         TICZ99
> >> TMPK
> >> >
> >> > The 2 part IR mapping is pixel values 255 -> 176 convert to 163K ->
> >> 242K,
> >> >                                       175 ->   0 convert to 242.5K ->
> >> 330K
> >> > These match the standard IR curve used for10.7 micron imagery in
> >> > $GEMPAK/source/gemlib/im/imbtot.f
> >> > and GEMPAK/source/gemlib/im/imttob.f.
> >> >
> >> > The CTMPK in this entry must match the name of your grid function!
> >> Band
> >> > used will be "16" which is used in the $GEMTBL/imgtyp.tbl entry I sent
> >> > you previously as 2**(band-1) (aka 2**15).
> >> >
> >> > You will be able to run the program within the ncsu directory since
> >> all
> >> > tables are searched
> >> > in the current working directory. Otherwise, the nex2gini.tbl would be
> >> > found in
> >> > $GEMTBL/unidata/nex2gini.tbl, the gd2img.pdf would be found in
> >> > $GEMPDF/gd2img.pdf.
> >> >
> >> > The program can be run as:
> >> >> gd2img
> >> >  GDATTIM   Grid date/time                    f024
> >> >  GDFILE    Grid file                         satir_f24.gem
> >> >  GLEVEL    level                             0
> >> >  GVCORD    Vertical coordinate               none
> >> >  GFUNC     Gridded parameter                 CTMPK
> >> >  SCALE     Output scaling                    0
> >> >  PROJ      Map projection/angles/margins|dr
> >> >  GRDAREA   Area covered by grid
> >> >  KXKY      Number of grid points in x;y
> >> >  CPYFIL    Grid file whose navigation is to  satir_f24.gem
> >> >  SATFIL    output file name                  testimg.gini
> >> >
> >> > Since your grid is a 4x4km LCC grid, I used that in cpyfil for
> >> > the output image projection. Otherwise, a GRDAREA, PROJ, and KXKY
> >> could
> >> > be specified but it has to be a lambert tangent cone with dx=dy, but
> >> > you probably don't want to have to figure that out unless you change
> >> the
> >> > model resoltion!
> >> >
> >> > The GFUNC name CTMPK must match the entry in nex2gini.tbl
> >> >
> >> > Go ahead and give this a try. As I mentioned, its under development so
> >> it
> >> > spits out some debug information
> >> > and the help file is basically non-existant, but improving 100% all
> >> the
> >> > time ;-)
> >> >
> >> > Let me know if you can get the program to run, and I'll keep working
> >> on
> >> > cleaning up
> >> > the interface and input. Of course, you will eventually want to run a
> >> > production version in an
> >> > up to date GEMPAK release in the future.
> >> >
> >> > Steve Chiswell
> >> > Unidata User Support
> >> >
> >> >
> >> >
> >> >
> >> >> Dr. Chiswell,
> >> >> We are running Red Hat Enterprise Linux, 4 or 5.  I am currently
> >> using
> >> >> gempak v5.6.  If that's too old, I think 5.8.3 is also compiled on
> >> the
> >> >> cluster I'm using, so I could use it instead.
> >> >> Thanks again for your help,
> >> >> Megan
> >> >>
> >> >> >> Mr. Chiswell,
> >> >> >> I took a look at that test image you sent, and that's exactly what
> >> I
> >> >> >> wanted.
> >> >> >> I'd like to generate a lot more of these images from my model
> >> output.
> >> >>  I
> >> >> >> was wondering if you could send me the code you used.  Could I
> >> >> install
> >> >> >> gd2img by itself or would I need a whole new gempak version?
> >> >> >> Thanks,
> >> >> >> Megan
> >> >> >
> >> >> > Megan,
> >> >> >
> >> >> > I have the gd2img directory in the source distribution of 5.10.1,
> >> but
> >> >> > didn't
> >> >> > configure it to be built in the binary distributions since it is
> >> still
> >> >> > under development.
> >> >> > I have been testing it out to create topo images from dem data, but
> >> >> > created the
> >> >> > TMPK to pixel value entry in the table for your data. I will make
> >> it
> >> >> part
> >> >> > of the standard
> >> >> > build for 5.10.2; I just need to add some user friendliness to the
> >> >> > program.
> >> >> >
> >> >> > I can send you the program to run without upgrading your
> >> distribution
> >> >> if
> >> >> > you can tell me what OS etc you are running. Do you know what
> >> version
> >> >> of
> >> >> > GEMPAK you are
> >> >> > currently running?
> >> >> >
> >> >> > Dr. Steve Chiswell
> >> >> > NC State 87, 90, 94
> >> >> > Unidata User Support
> >> >> >
> >> >> >
> >> >> >
> >> >> >>
> >> >> >>
> >> >> >> > Megan,
> >> >> >> >
> >> >> >> > I created the attached GINI format satellite image from your
> >> data.
> >> >> >> > To display the image, you will need to add the following line to
> >> >> your
> >> >> >> > $GEMTBL/sat/imgtyp.tbl file (or imgtyp.tbl file in your working
> >> >> >> > directory):
> >> >> >> >
> >> >> >> > CTMPK                IR_TMPK       0    255     11  2**15      1
> >> >> >> > ir_upc3.tbl
> >> >> >> >
> >> >> >> > Note use only spaces in that file, not tabs.
> >> >> >> >
> >> >> >> > The conversion process is somewhat manual for this process since
> >> I
> >> >> >> have to
> >> >> >> > generate a
> >> >> >> > mapping of pixel values to gridded data values. This is
> >> something I
> >> >> >> need
> >> >> >> > to add for
> >> >> >> > users in a working program, but doing this with your data helps
> >> me
> >> >> get
> >> >> >> to
> >> >> >> > that
> >> >> >> > point - I did discuss this type of project with Gary Lackmann
> >> here
> >> >> >> last
> >> >> >> > summer,
> >> >> >> > so its a work in progress.
> >> >> >> >
> >> >> >> > I need to find out from you if this mapping of brightness
> >> >> temperature
> >> >> >> to
> >> >> >> > pixel
> >> >> >> > is what you are looking for (its the standard 2 part temperature
> >> >> curve
> >> >> >> > used for
> >> >> >> > IR satellites), and if not, I'll need to get this worked out to
> >> >> >> provide
> >> >> >> > you with the
> >> >> >> > program.
> >> >> >> >
> >> >> >> > I displayed this with your grid points and contours in gdplot2
> >> and
> >> >> the
> >> >> >> > image lines up
> >> >> >> > with the points, so my first pass seems to be in the right
> >> >> direction.
> >> >> >> >
> >> >> >> > Let me know how this works for you.....
> >> >> >> >
> >> >> >> > Steve Chiswell
> >> >> >> > Unidata User Support
> >> >> >> >
> >> >> >> >
> >> >> >> >> Here's the grid navigation from gdinfo...
> >> >> >> >> GDFILE    Grid file                         satir_f24.gem
> >> >> >> >> LSTALL    Full list flag                    YES
> >> >> >> >> OUTPUT    Output device/filename            T
> >> >> >> >> GDATTIM   Grid date/time                    last
> >> >> >> >> GLEVEL    Grid level                        0
> >> >> >> >> GVCORD    Grid vertical coordinate          none
> >> >> >> >> GFUNC     Scalar grid                       CTMPK
> >> >> >> >> Parameters requested:
> >> >> >> GDFILE,LSTALL,OUTPUT,GDATTIM,GLEVEL,GVCORD,GFUNC.
> >> >> >> >> GEMPAK-GDINFO>r
> >> >> >> >>
> >> >> >> >> GRID FILE: satir_f24.gem
> >> >> >> >>
> >> >> >> >> GRID NAVIGATION:
> >> >> >> >> PROJECTION:          LCC
> >> >> >> >> ANGLES:                27.0   -85.3    27.0
> >> >> >> >> GRID SIZE:          159 159
> >> >> >> >> LL CORNER:              15.83    -82.64
> >> >> >> >> UR CORNER:              21.20    -76.45
> >> >> >> >>
> >> >> >> >> GRID ANALYSIS BLOCK:
> >> >> >> >> ANALYSIS TYPE:        BARNES
> >> >> >> >> DELTAN:               0.073
> >> >> >> >> DELTAX:           -9999.000
> >> >> >> >> DELTAY:           -9999.000
> >> >> >> >> GRID AREA:            15.00  -84.00   22.00  -75.00
> >> >> >> >> EXTEND AREA:          15.00  -84.00   23.00  -75.00
> >> >> >> >> DATA AREA:            15.00  -84.00   23.00  -75.00
> >> >> >> >>
> >> >> >> >> Also, the file (satir_f24.gem) is posted at..
> >> >> >> >> http://tempest.meas.ncsu.edu/megan
> >> >> >> >> if you'd like to have the actual file.
> >> >> >> >>
> >> >> >> >> Basically, I'm working on generating a model-simulated
> >> satellite
> >> >> IR
> >> >> >> >> product, kind of like model-simulated radar.  But I'd like to
> >> use
> >> >> the
> >> >> >> >> satellite color tables to make an observational comparison.
> >> I'd
> >> >> >> >> eventually like to try and use the model-simulated IR on grids
> >> of
> >> >> >> >> different navigation, but I started out with this grid because
> >> >> it's
> >> >> >> 4-km
> >> >> >> >> grid spacing, similar to satellite resolution.
> >> >> >> >>
> >> >> >> >> Thanks for your help! If there's any other information you'd
> >> like,
> >> >> >> just
> >> >> >> >> let me know.
> >> >> >> >>
> >> >> >> >> Megan
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> > Megan,
> >> >> >> >> > I have been working on a gd2img program in the source
> >> >> distribution
> >> >> >> >> which
> >> >> >> >> > can convert a grid to an image using a specified satellite id
> >> >> and
> >> >> >> >> > channel number with a projection remapped into one that the
> >> >> image
> >> >> >> >> format
> >> >> >> >> > can handle.
> >> >> >> >> >
> >> >> >> >> > Can you send me some information about what grid
> >> >> >> projection/navigation
> >> >> >> >> > you have so I can see if this will be sufficient for your
> >> >> >> application?
> >> >> >> >> > The GINI format is somewhat limited specifying a projection
> >> and
> >> >> >> pixel
> >> >> >> >> > shape, so might have to use an AREA format instead. Please
> >> send
> >> >> >> this
> >> >> >> >> to
> >> >> >> >> > address@hidden.
> >> >> >> >> >
> >> >> >> >> > Steve Chiswell
> >> >> >> >> > Unidata User Support
> >> >> >> >> >
> >> >> >> >> > On Fri, 2007-03-30 at 10:25 -0400, Megan Gentry wrote:
> >> >> >> >> >> I have a GEMPAK grid file that I'd like to convert to image
> >> >> format
> >> >> >> >> and
> >> >> >> >> >> view using the satellite IR color tables.  I was wondering
> >> what
> >> >> >> the
> >> >> >> >> best
> >> >> >> >> >> way is to convert a grid file to an image file that can be
> >> >> viewed
> >> >> >> >> using
> >> >> >> >> >> the IR color tables?
> >> >> >> >> >> Thanks,
> >> >> >> >> >> Megan
> >> >> >> >> >>
> >> >> >> >> >> ----------------------------------------------------
> >> >> >> >> >> Megan S. Gentry
> >> >> >> >> >> Graduate Research Assistant, Forecasting Lab
> >> >> >> >> >> Department of Marine, Earth and Atmospheric Sciences
> >> >> >> >> >> North Carolina State University
> >> >> >> >> >>
> >> >> >> >> >> ===============================================================================
> >> >> >> >> >> To unsubscribe gembud, visit:
> >> >> >> >> >> http://www.unidata.ucar.edu/mailing-list-delete-form.html
> >> >> >> >> >> ===============================================================================
> >> >> >> >> > --
> >> >> >> >> > Steve Chiswell <address@hidden>
> >> >> >> >> > Unidata
> >> >> >> >> >
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> ----------------------------------------------------
> >> >> >> >> Megan S. Gentry
> >> >> >> >> Graduate Research Assistant, Forecasting Lab
> >> >> >> >> Department of Marine, Earth and Atmospheric Sciences
> >> >> >> >> North Carolina State University
> >> >> >> >>
> >> >> >> >>
> >> >> >> >
> >> >> >> >
> >> >> >> > Ticket Details
> >> >> >> > ===================
> >> >> >> > Ticket ID: FWQ-357482
> >> >> >> > Department: Support
> >> >> >> > Priority: Normal
> >> >> >> > Status: Closed
> >> >> >>
> >> >> >>
> >> >> >> ----------------------------------------------------
> >> >> >> Megan S. Gentry
> >> >> >> Graduate Research Assistant, Forecasting Lab
> >> >> >> Department of Marine, Earth and Atmospheric Sciences
> >> >> >> North Carolina State University
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >> > Ticket Details
> >> >> > ===================
> >> >> > Ticket ID: FWQ-357482
> >> >> > Department: Support GEMPAK
> >> >> > Priority: Normal
> >> >> > Status: Closed
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >> ----------------------------------------------------
> >> >> Megan S. Gentry
> >> >> Graduate Research Assistant, Forecasting Lab
> >> >> Department of Marine, Earth and Atmospheric Sciences
> >> >> North Carolina State University
> >> >>
> >> >>
> >> >
> >> >
> >> > Ticket Details
> >> > ===================
> >> > Ticket ID: FWQ-357482
> >> > Department: Support GEMPAK
> >> > Priority: Normal
> >> > Status: Closed
> >>
> >>
> >> ----------------------------------------------------
> >> Megan S. Gentry
> >> Graduate Research Assistant, Forecasting Lab
> >> Department of Marine, Earth and Atmospheric Sciences
> >> North Carolina State University
> >>
> >>
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: FWQ-357482
> > Department: Support GEMPAK
> > Priority: Normal
> > Status: Closed
> >
> >
> 
> 
> ----------------------------------------------------
> Megan S. Gentry
> Graduate Research Assistant, Forecasting Lab
> Department of Marine, Earth and Atmospheric Sciences
> North Carolina State University
> 


Ticket Details
===================
Ticket ID: FWQ-357482
Department: Support GEMPAK
Priority: Normal
Status: Closed

Attachment: upc_display.gif
Description: GIF image

Attachment: testimg.gini
Description: Binary data