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

20020328: National Mosaic Radar, and image display of grids (cont.)



>From: "Batson, Bryan" <address@hidden>
>Organization:  JSFC
>Keywords:  200203201846.g2KIk1a20211 NWS RCM composite CFILLCLP

Bryan,

>I can't remember from last week's correspondence whether anyone had an
>enhancement for this product or not.  Do you recall if there is one?

I use a slightly modified MDR.ET enhancement.  Both the MDR product (which
is an image representation of the MDR grids in NOAAPORT) and the RCM product
contain VIP levels.  The only reason I changed MDR.ET was to tone down
the display values at the high end of the display.  The RCM product is
basically contour values of VIP plus a value out at 7 which is the boundary
of the values.  The scaling of the contour values to brightness in the
conversion to an image is basically:

(0 - 6) -> (0 - 255)

The grid values of 7 get mapped to 255 brightness which is overwhelming
visually.  My approach was to change the 255 brightness value to a
muted gray:

EU TABLE MDR
 Brightness  Blue      Green      Red
  min max   min max   min max   min max
  --- ---   --- ---   --- ---   --- ---
    0  31     0   0     0   0     0   0
   32  63     0   0   110 110     0   0
   64  95     0   0   182 182     0   0
   96 127     0   0   255 255     0   0
  128 159   255 255     0   0     0   0
  160 191     0   0   255 255   255 255
  192 223     0   0     0   0   255 255
  224 254   255 255   255 255   255 255
  255 255    48  48    48  48    48  48
EU: Done

I stuck this version of MDR.ET out in the pub/mcidas/data directory of
anonymous FTP on our FTP server, ftp.unidata.ucar.edu (along with the 24
level enhancement needed for the Unidata NEXRAD radar composites,
BREF24.ET).

>MUG....this is why it would be really nice if IMGDISP could be able to read
>grids and display them directly (although I suppose a macro or batch file
>with a GRDIMG followed by an IMGDISP would not be too bad, but then you end
>up having to use a scratch AREA file to store the intermediate results).

I include a McBASI script in the Unidata McIDAS distribution that does
the display of GRID values as an image in the manner you are musing
about.  The script, CFILLCLP.MCB, interrogates the grid to find its
size (LINxELE) and scales it (up) to fit the screen while keeping the
original aspect ratio.  You can grab CFILLCLP.MCB from the same
pub/mcidas/data directory of our anonymous FTP server.  A sample
invocation of CFILLCLP goes like:

RUN iiii ppp lll ddd ttt fff pro ooo c d sss xxx FILE=CFILLCLP.MCB
      ^   ^   ^   ^   ^   ^   ^   ^  ^ ^  ^___^_ scratch image dataset members
      |   |   |   |   |   |   |   |  | |________ display image (Y/N)?
      |   |   |   |   |   |   |   |  |__________ clip the image at land (Y/N)?
      |   |   |   |   |   |   |   |_____________ ADDE image dataset member
      |   |   |   |   |   |   |_________________ grid parameter projection
      |   |   |   |   |   |_____________________ grid parameter forecast hour
      |   |   |   |   |_________________________ grid parameter time
      |   |   |   |_____________________________ grid parameter day
      |   |   |_________________________________ grid parmater level
      |   |_____________________________________ grid parameter name
      |_________________________________________ ADDE input GRID dataset

CFILLCLP RTGRIDS/ETA T SFC 2002088 12 6 LAMB MYDATA/IMAGES.1234 Y Y

This particular invocation will display the 12Z ETA run SurFaCe
Temperature using its original projection centered on the current
frame.  It will also clip the image at land/water boundaries (an option
that requires that one have a global topographic image in the dataset
TOPO/GLOB).  It writes the resultant image into MYDATA/IMAGES.1234 (a
local dataset).  It uses the BREF.ET enhancement for display
(hardwired) in the script.  A GIF (tm) rendition of this invocation can
be seen in:

http://www.unidata.ucar.edu/staff/tom/gifs/tsfc_eta.gif

It is amazing what you have to go through to get what is essentially a
color filled contour!

Tom

>From address@hidden Fri Mar 29 15:13:02 2002
>Subject: RE: 20020328: National Mosaic Radar, and image display of grids ( 
>cont.)
>Date: Fri, 29 Mar 2002 16:13:07 -0600

Thanks Tom. This is cool stuff!

BB