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

[McIDAS #TWS-355653]: changing center longitude

Hi John,

> I placed two AREA (MSG-1) files on:
> ftp://ftp.nsstc.org/outgoing/johnm/Unidata/
> Thank you, and let me know what you find. Again, the "-1" central longitude
> should be "-9.5". I have a day's worth of images to fix.


I did some research and found that others are running into the same problem with
MSG images in AREA format they got from EUMETSAT.  The problem is not with the
images, but, rather, with the McIDAS navigation module for MSG: it is hardwired
for a subsatellite longitude of 0 degrees.

The workaround that I found in the SSEC McIDAS inquiry tracking system
is to set the navigation type in the image to 'GEOS' with appropriate
navigation values so that maps register correctly:

Create a McIDAS BATCH file named MSGNAV.BAT in a directory in your MCPATH.
For sites using Unidata McIDAS, I recommend creating the BATCH file in the
$MCDATA directory.  This will be ~user/mcidas/data for the non-'mcidas' user
and ~/workdata for the user 'mcidas'.

The content of MSGNAV.BAT should be:


REM Correct MSG nav satellite is off Greenwich
REM Longitude is input in degrees*10, east positive
REM Area number must be greater than 1000

LWU POKE AREA%1 55720     65
LWU POKE AREA%1 55720     66
LWU POKE AREA%1 409325130 67
LWU POKE AREA%1 409325130 68
LWU POKE AREA%1 %2        69

Invoke this BATCH file as follows to set the needed values in
the image contained in AREA0013:


Note that I specified 0013 for the AREA file number.  This
is because the BATCH file refers to the file as AREA%1.  Simply
specifying the number as 13 would result in the name AREA13
which is not a valid McIDAS AREA file name (but AREA0013 is).

Very important:

For the BATCH file to correctly set the needed values in
the AREA file, the endianness of the AREA file must match
that of the system you are running McIDAS on.

The AREA files that you put on your FTP server for me to
look at were created on a big-endian machine.  For me to
be able to correctly use the above BATCH file on my
little-endian Fedora Linux machine, I had to first convert
the images to little-endian format.  I did this using
the McIDAS IMGCOPY command.

To determine if the endianness of the file matches the
system you are running McIDAS on, use the LWU LIST
command and examine the output:


If your output looks like:

     0.          0    67108864 HEX:        0  4000000 ASCII:
     2.  855638016 -1817313024 HEX: 33000000 93AE0100 ASCII:    3
     4.  543228160  2030174208 HEX: 20610100 79020000 ASCII:   a     y

then your machine is little-endian, and the big-endian image
must be converted into little-endian format before you can
use MSGNAV.BAT to make the needed navigation changes.  If
the output looks like:

       0.          0           4 HEX:        0        4 ASCII:
       2.         51      110227 HEX:       33    1AE93 ASCII: 3
       4.      90400         633 HEX:    16120      279 ASCII:  a   y

then you do NOT have to convert the image before using the MSGNAV.BAT file.

Converting the endianness of the original image(s) is easily done using
the IMGCOPY command.  Here is an example of how to use IMGCOPY to convert
the big-endian image in AREA0013 to little-endian format (assuming that
your machine is little-endian):

DSSERVE ADD MYDATA/IMAGES AREA 1 9999 "All images in AREA format


At this point, AREA3000 is guaranteed to be an identical copy of AREA0013,
and be in the correct endian format for your machine.  After the conversion
you can run MSGNAV.BAT to correct the navigation:


You can verify that this has the desired effect by displaying the resulting
image and drawing a map on top of it using IMGDISP:


Please let me know if you have any questions about the procedure outlined above.


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: TWS-355653
Department: Support McIDAS
Priority: Normal
Status: Closed

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.