mcidas

Contents

Type Size Name Notes
makefile 2kB Makefile
text 3kB README
C source code 7kB dispimage_x11.c
C source code 3kB drawlatlon.c This set of routines does navigation of latitude and longitude lines and plots them on the image.
C source code 3kB dumbinav.c invert the navigation problem -- given an image position, find the latitude and longitude. Uses dumbnav iteratively. 0 is returned on success, -1 on failure.
C source code 14kB dumbnav.c This routine assumes that the GOES satellite is in a nearly circular geostationary orbit nearly over the equator and that the center of the bitmap points nearly toward the center of the earth. It also assumes that satellite scan lines are nearly east-west. The navheader argument contains information about the satellite position and orientation. Lon and lat are the desired longitude and latitude. X and y are pointers to integers ranging from 0 to 639 in x and 0 to 349 in y, which give the x-y location on the bitmap. If the desired point is invisible, dumbnav returns -2. If it is outside the above range, dumbnav returns -1. Otherwise it returns 0. We assume for the GVAR satellite that the earth is a sphere.
C source code 2kB getarea.c Replacement for getstream for direct read of area files.
C source code 8kB getimage.c Candis version of subroutine that reads an image from a file produced by mcselect.
C source code 15kB getlwtoa3.c This subroutine extracts the "LWTOA3" product from the pc-mcidas data stream using calls to the getpacket routine. The string argument is the data from the header packet. This product contains satellite images.
C source code 2kB getpacket.c This subroutine reads a mcidas data stream from the standard input, returning a pointer to each mcidas data packet in turn. On end of file, returns NULL.
C source code 4kB getstream.c This routine converts the packet data structure of pc-mcidas to a stream structure, where an arbitrary number of bytes may be obtained irrespective of the packet structure. Getstream(pointer,number) reads "number" bytes into the location pointed to by "pointer". Resetstream() forces a new packet to be read on the next call to getstream. Resetstream must be called before the first call to getstream or any of the other routines. Getshort gets 2 bytes from the stream and interprets it as a short integer. Getword gets 4 bytes from the stream and interprets it as a long integer. Getsync gets 8 bytes from the stream and returns 0 if they are 0x00ff00ff00ff00ff. Getword assumes that a long is 4 bytes. This stuff won't work on Crays. Getskip(number) skips the indicated number of bytes in the stream.
C source code 681B jtime.c convert from year-month-day to julian day (derived from NSSDC CDF Implementer's Guide, Version 1 by Michael L. Gough)
8kB mccmd.l command module for mcdisp
C source code 21kB mcmap.c this program converts files produced by the mcidas system out of pixel format and into the standard candis format the pixel values are converted either to temperature or brightness scales by the effective opposite of the functions ibrite and itemp in procimage. the field is also converted to a grid in latitude and longitude (this is the main trick). this is accomplished primarily by using the dumbnav routine found in navpac and looping on latitude and longitude. The number of points in the proscessed field is dependent on the setting of the extreme latitude and longitudes as well as the dlong and dlat values (all float). Choosing a small value of dlat or dlong will cause the program to become incredibly slow so keep dlong and dlat relatively large.
C source code 879B mcselect.c This program reads the pc-mcidas data stream and selects headers for particular data products. Specialized subroutines then read the stream to retrieve and analyze each product. The pc-mcidas data stream is assumed to be on the standard input.
C source code 176B mctrans.c Translate a mcidas satellite area file into Candis.
C source code 7kB procimage.c Remap image and add lines and text.
C source code 9kB putimage.c This routine creates a file and writes an image to it. The file name is derived from date, time, satellite and type of image. This version writes a Candis file, with the image in pixel format.