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

[McIDAS #VNE-851750]: Help with McIDAS



Hi Angel,

re:
> The imgremap.k command expects and input and output spec. What's the
> recommended way to store temp images/areas which will be converted to
> a web-viewable form? Do I need to dsserve add a new source?

Here is what to do:

- first, run the BATCH file MYDATA.BAT:

<as the user account you are setting things up in>
cd $MCDATA
batch.k MYDATA.BAT

  This creates 4 ADDE datasets:

  MYDATA/GRIDS
  MYDATA/IMAGES
  MYDATA/PTSRCS
  MYDATA/TOPO

  The dataset MYDATA/IMAGES can contain all images in AREA format named using
  the McIDAS AREA naming convention (e.g., AREA0001, AREA002, ..., AREA9999)

  You will use the MYDATA/IMAGES dataset as the target for the IMGREMAP output.

- next, decide which dataset you want to use as the input to IMGREMAP.  If you
  intend to use the Unidata-Wisconsin imagery, they should already be accessible
  using the RTIMAGES/<type> datasets (e.g., RTIMAGES/GE-IR, RTIMAGES/GW-IR, 
etc.).
  To see the list of all datasets available in the RTIMAGES group, use the
  DSINFO command.

  For instance, if you are runing as the user 'mcidas' on metofis, run:

cd $MCDATA
dataloc.k LIST RTIMAGES   <- make sure that the source is either LOCAL-DATA or
                             metofis.rsmas.miami.edu
dsinfo.k IMAGE RTIMAGES

- next, use IMGREMAP to remap an input image to an output image.

  For instance, let's remap the most recent GOES-East thermal IR (10.7 um) image
  in to one with a MERCator projection such that the output image is:

  - centered on 30N,60W
  - is 800x800 (linesXelements) in size
  - the effective resolution of the remapped image is 4 km

<again, assuming that you are running as 'mcidas'>
cd $MCDATA
imgremap.k RTIMAGES/GE-IR MYDATA/IMAGES.3000 LAT=30 60 SSIZE=ALL SIZE=800 800 
PRO=MERC RES=4

  This will create an image in the file AREA3000.  This file should be located
  in your $MCDATA directory.

Now, if you want to generate a web-viewable form (e.g., GIF), I would do the 
following:

mcenv -f 1@800x800
imgdisp.k MYDATA/IMAGES.3000 LAT=30 60
map.k SAT
frmsave.k 1 mercremap.gif
exit

Some notes:

1) You could wrap the entire sequence in a single 'mcenv' invocation:

cd $MCDATA
mcenv -f 1@800x800
imgremap.k RTIMAGES/GE-IR MYDATA/IMAGES.3000 LAT=30 60 SSIZE=ALL SIZE=800 800 
PRO=MERC RES=4
imgdisp.k MYDATA/IMAGES.3000 LAT=30 6
map.k SAT
frmsave.k 1 mercremap.gif
exit

2) instead of remapping the latest image from RTIMAGES/GE-IR, you could pick 
the time
   you wanted:

imglist.k RTIMAGE/GE-IR.-15
imgremap.k RTIMAGES/GE-IR MYDATA/IMAGES.3000 LAT=30 60 SSIZE=ALL SIZE=800 800 
PRO=MERC RES=4 DAY=2008079 TIME=22:45

3) you could use an example script provided in the Unidata McIDAS distribution 
to simplify
   your processing:

cd $MCDATA
cp ~mcidas/data/mcrun.sh myrun.sh
-- edit myrun.sh and include the set of McIDAS commands you want to process
   in the block that looks like (snippit from mcrun.sh near the bottom):

 ...
cd $MCDATA
mcenv << EOF

# put McIDAS-X commands you want to run here, one command per line.

# Example (note that these lines are commented out!!):
#
# dataloc.k ADD GINIEAST adde.ucar.edu
# eg.k
# imgdisp.k GINIEAST/GE1KVIS STA=KMIA MAG=-2 EU=IMAGE SF=YES
# map.k H
# bar.k
# frmsave.k 1 miamivis.gif

# done
  exit

EOF

  Just make sure to not use the file included in the distribution as it will
  be overwritten with the next McIDAS installation (i.e., rename the script)

4) you could put all of the McIDAS commands into a McIDAS BATCH file and use
   the mcbatch.sh script that is included with the Unidata McIDAS distribution.

   For instance:

   - create $MCDATA/REMAPIT.BAT with the following content:

IMGREMAP RTIMAGES/GE-IR MYDATA/IMAGES.3000 LAT=30 60 SSIZE=ALL SIZE=800 800 
PRO=MERC RES=4
IMGDISP MYDATA/IMAGES.3000 LAT=30 6
MAP SAT
FRMSAVE 1 mercremap.gif

   - now, execute the REMAPIT.BAT content using mcbatch.sh:

mcbatch.sh REMAPIT.BAT

   N.B.:

   The McIDAS session created by mcbatch.sh has a frame size of 640x480, not
   800x800.  You may want to create your own copy of mcbatch.sh (e.g., 
mybatch.sh)
   and edit it to specify the frame size in the 'mcenv' clause.

   For example:

cd $MCDATA
cp ~mcidas/data/mcbatch.sh mybatch.sh
-- edit mybatch.sh and

   change:

mcenv << EOF

  batch.k $1
  exit

EOF

   to:
mcenv -f 1@800x800 -i 128 -g 16 << EOF

  batch.k $1
  exit

EOF

5) etc.

> Thanks,

No worries.

Cheers,

Tom
****************************************************************************
Unidata User Support                                    UCAR Unidata Program
(303) 497-8642                                                 P.O. Box 3000
address@hidden                                   Boulder, CO 80307
----------------------------------------------------------------------------
Unidata HomePage                       http://www.unidata.ucar.edu
****************************************************************************


Ticket Details
===================
Ticket ID: VNE-851750
Department: Support McIDAS
Priority: Normal
Status: Closed