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

20000801: creating topographic composites automatically with McIDAS-X



>From: Mark Maciver <address@hidden>
>Organization: University of Washington
>Keywords: 200008012158.e71Lw1T00664 McIDAS composite

Mark,

>I am interested in creating composites similar to 
>http://www.unidata.ucar.edu/staff/tom/topoir.gif to be displayed in the 
>department. Are there scripts available that create these composites.

Yes, the routines needed to create composite imagery are distributed with
Unidata McIDAS-X.

>If so I 
>would be very interested in them or any advice you can give on creating a 
>satellite/topo image - Thank you - Mark MacIver

Your system can be configured to create the composite imagery
automatically as new Unidata-Wisconsin images are received.  This
requires some setup in the 'ldm' account (minimal) and some
configuration in the 'mcidas' account (also minimal).  This means,
however, that the machine running the LDM has to have a distribution of
Unidata McIDAS-X built for it and accessible to the user running the
LDM.  The other thing that makes all of this easy is if your 'ldm' and
'mcidas' users are in the same group.

The procedure is basically as follows:

<in the 'ldm' account>

o put a copy of the file batch.k that is included in the ldm-mcidas
  distribution in a directory that is in 'ldm's PATH.  A good directory
  for this is typically ~ldm/decoders.  It is a bad idea to leave batch.k
  (a Bourne shell script) in the ldm-mcidas distribution directory tree
  as it is a file that will get overwritten by each new ldm-mcidas
  installation and it is a file that you need to edit to change
  some internals to match your McIDAS installation setup.

o make sure that ~ldm/decoders/batch.k is executable

o edit ~ldm/decoders/batch.k and set MCHOME, MCDATA, MCPATH, MCGUI,
  MCLOG, and PATH to match your McIDAS-X installation.  For instance, if McIDAS
  is installed in /home/mcidas, then you would setup MCDATA, etc. to look
  like:

  MCHOME=/home/mcidas
  MCDATA=$MCHOME/workdata
  MCGUI=$MCHOME/bin
  MCLOG=$MCDATA/ROUTEPP.LOG
  MCPATH=${MCDATA}:$MCHOME/data:$MCHOME/help

  PATH=${MCGUI}:...

  (fill in the '...' with directories that 'ldm' would have for its
  login)

o since you are already receiving Unidata-Wisconsin imagery, you might
  be all setup on the LDM side to produce the composite images.  What
  you need to check is your ~ldm/etc/pqact.conf entries for UW images.
  In particular, you will need an entry that uses the McIDAS file
  routing table concept for output file naming.  In the recent past,
  the entry(ies) would be for execution of the ldm-mcidas decoder,
  lwtao3.  Now (as of yesterday :-), the entry(ies) would ve for
  execution of the ldm-mcidas decoder pnga2area.  This entry will
  probably look something like:

MCIDAS  ^pnga2area Q1 (..) (.*) (.*) (.*) (.*) (........) (....)
    PIPE    -close
    pnga2area -d /var/data/mcidas -r \1,\2

  This entry assumes that you are decoding your images into the
  /var/data/mcidas directory.  If your setup is different (likely),
  substitute your output directory for /var/data/mcidas in the
  discussion below.

o in order to run McIDAS ROUTE PostProcess BATCH files (the things that
  are going to create the composites for you), you will need to have
  copies of two McIDAS files in your ldm-mcidas image decoder output
  directory: ROUTE.SYS and SYSKEY.TAB.  Both of these files will need
  to be readable AND writable by the user running your LDM ('ldm').
  If these files don't exist in the decoder output directory yet, you
  can get them from the McIDAS installation:  ROUTE.SYS can be found
  in the ~mcidas/workdata directory, and SYSKEY.TAB can be found in the
  ~mcidas/data directory.  Simply copy these two files to the output
  data directory and make sure that they are readable and writable
  by 'ldm' (and 'mcidas'!!)

<as 'mcidas'>

o login and start a McIDAS-X session

o verify that your session is "pointed" to the copies of ROUTE.SYS
  and SYSKEY.TAB that are in the ldm-mcidas image decoder output
  directory:

  <from the McIDAS command window>

  DMAP ROUTE.SYS
  DMAP SYSKEY.TAB

  If the output from the McIDAS DMAP commands don't show the copies of
  these two files in /var/data/mcidas (again, substitute your own
  output directory in this discussion), you need to setup McIDAS
  REDIRECTions to them:

  REDIRECT ADD ROUTE.SYS "/var/data/mcidas
  REDIRECT ADD SYSKEY.TAB "/var/data/mcidas

  After doing this (if you had to, that is), you should verify that
  your McIDAS session can access the files by rerunning the DMAP
  commands above.

o make sure that he routing table (that is ROUTE.SYS) entries for the
  composite images are active.  This means that their entries in
  ROUTE.SYS are not SUSpended.  To find out the status of the needed
  entries, type the following in the McIDAS comamnd window:

  ROUTE LIST

  Look for the lines that refer to the compositing of imagery.  Here is
  a listing showing the entries that you need to be concerned with (i.e.,
  others have been removed from the listing for brevity):

S Pd         Description         Range       Last      Received  Post Process C
- -- ------------------------- --------- ------------ ---------- ------------ -
s CI GOES-E/W IR Composite       80-89       none        none        none     3
s CV GOES-E/W VIS Composite      90-99       none        none        none     3
s CW GOES-E/W H2O Composite      70-79       none        none        none     3
s N1 GOES-East IR/TOPO Composi  220-229      none        none        none     3
s N2 GOES-East VIS/TOPO Compos  230-239      none        none        none     3
s N3 GOES-West IR/TOPO Composi  240-249      none        none        none     3
s N4 GOES-West VIS/TOPO Compos  250-259      none        none        none     3
s N5 MDR/TOPO Composite         260-269      none        none        none     3
s N6 Mollweide IR/TOPO Composi  270-279      none        none        none     3
s N7 GOES-E/W IR/TOPO Composit  280-289      none        none        none     3
s N8 GOES-E/W VIS/TOPO Composi  290-299      none        none        none     3

  All of these entries are currently SUSpended in this list.  This is what
  the 's' in the first column refers to.

  To make these entries active, run the following McIDAS comand:

  ROUTE REL CI CV CW N1 N2 N3 N4 N5 N6 N7 N8

  Now, the listing should look like (again shotened for brevity):

S Pd         Description         Range       Last      Received  Post Process C
- -- ------------------------- --------- ------------ ---------- ------------ -
  CI GOES-E/W IR Composite       80-89       none        none        none     3
  CV GOES-E/W VIS Composite      90-99       none        none        none     3
  CW GOES-E/W H2O Composite      70-79       none        none        none     3
  N1 GOES-East IR/TOPO Composi  220-229      none        none        none     3
  N2 GOES-East VIS/TOPO Compos  230-239      none        none        none     3
  N3 GOES-West IR/TOPO Composi  240-249      none        none        none     3
  N4 GOES-West VIS/TOPO Compos  250-259      none        none        none     3
  N5 MDR/TOPO Composite         260-269      none        none        none     3
  N6 Mollweide IR/TOPO Composi  270-279      none        none        none     3
  N7 GOES-E/W IR/TOPO Composit  280-289      none        none        none     3
  N8 GOES-E/W VIS/TOPO Composi  290-299      none        none        none     3
  

That should be all that you have to do to get the PostProcessing working!

What happens is the following:

o an image is received by your LDM
o it is decoded by pnga2area (lwtoa3 if your system hasn't been upgraded yet)
o after successful decode of the image, the decoder reads the McIDAS
  routing table, ROUTE.SYS, IF it exists in the decoder output directory.
  If it finds ROUTE.SYS, and if it can write to ROUTE.SYS and SYSKEY.TAB,
  it will see if the routing table entry for the image just received
  is set to run a PostProcess BATCH file.  For instance, here is the
  listing from a machine here at Unidata:

S Pd         Description         Range       Last      Received  Post Process C
- -- ------------------------- --------- ------------ ---------- ------------ -
  U1 Antarctic IR Composite     190-199      none        none        none     3
  U3 Manually Digitized Radar   200-209      none        none    MDR.BAT      3
  U5 GOES-West US IR Band 4     130-139      none        none    GW-IR.BAT    3
  U9 GOES-West US Visible       120-129      none        none    GW-VIS.BAT   3
  UA Educational Floater I      160-169      none        none        none     3
  UB GOES-West US Water Vapor   170-179      none        none    GW-WV.BAT    3
  UC Educational Floater II      60-69       none        none        none     3
  UI GOES-East US IR Band 4     150-159      none        none    GE-IR.BAT    3
  UR Research Floater           180-189      none        none        none     3
  US Undecoded SAO Data         default      none        none        none     1
  UV GOES-East US Visible       140-149      none        none    GE-VIS.BAT   3
  UW GOES-East US Water Vapor   210-219      none        none    GE-WV.BAT    3
  UX Mollweide Composite IR     100-109      none        none    MOLL.BAT     3
  UY Mollweide Composite H2O    110-119      none        none        none     3

  The entries that have something in the 'Post Process' column other than
  'none' are setup to run McIDAS PostProcessing.  The McIDAS BATCH files
  that are named are distributed so that they will be installed in the
  ~mcidas/data directory.  These files will be available to the copy
  of batch.k that you edited earlier by virtue of the MCPATH setting
  in batch.k (that is why you have to edit batch.k to set MCHOME, etc.
  to match your McIDAS installation setup).

o if a product has a PostProcess in the routing table, it is run.  The
  entries above for Pd (product codes) U3, U5, etc. all have PostProcesses
  set to go, so they will do whatever is set in the BATCH files.

A snippit of what is in one of these PP BATCH files will show how the
composites are made:

<GW-IR.BAT>
REM Run NORTMAPR to remap the image and composite the remapped copy with a
REM a topography image
NORTMAPR 9017 %2 9989 N3 NONE 0 9017 MAPAREA=9970 DEV=NNN

REM Run GOESCOMP to create a composite of the GOES-East and TOES-West images
GOESCOMP %2 NONE 9986 C CI N7 SCRAREA=9981 9984 MAP=YES 9019 9970 DEV=NNN


NORTMAPR combines the image with a topographic image to give you a
composite like the one you mentioned at the beginning of this email.

GOESCOMP will composite the GOES-East and GOES-West images into a central
view.  An example of one of these can be found in:

http://www.unidata.ucar.edu/staff/tom/gewir.gif

If you are creating these composites and if the routing table entry for
compositing these composites with topography is not SUSpended, then
you will also start producing images like:

http://www.unidata.ucar.edu/staff/tom/gewirtopo.gif

The actual image extends further to both the east and west than this GIF (tm)
capture.  My frame was not big enough to display all of it at once, that
is why it is chopped off.

This should be enough to get you going.  Please let me know if you have
any questions about the setup.

Tom Yoksas