! f90 easy BYU SIR file format include file ! ! This include file defines an easy record based fortran interface for the ! BYU SIR file format. A fortran data structure which stores the key ! SIR header information is defined in this file to simplify transfer ! of the SIR information to the various routines. ! ! ! written by DGL 30 Jan. 2002 ! ! *************************************************************** ! ! define a TYPE to hold the standard SIR file header info ! TYPE :: sirhead ! ! the following variables are defined in the standard SIR file ! header (version 3.0) and are fixed length ! INTEGER :: nhead ! number of 512 byte header records INTEGER :: nhtype ! version number of SIR file header INTEGER :: nsx, nsy ! image size INTEGER :: iopt ! projection option REAL :: xdeg, ydeg, ascale, bscale, a0, b0 ! projection parameters INTEGER :: ixdeg_off, iydeg_off, ideg_sc, iscale_sc ! projection scale INTEGER :: ia0_off, ib0_off, i0_sc ! factors INTEGER :: idatatype ! data storage type INTEGER :: ioff, iscale ! data storage scale factor and offset value REAL :: anodata, vmin, vmax ! no data value, visible range INTEGER :: iyear, isday, ismin, ieday, iemin ! file time codes INTEGER :: iregion, itype, ipol, ifreqhm ! region id number, etc INTEGER :: ispare1 ! spare integer in header CHARACTER (len=100) :: title ! title for image CHARACTER (len=40) :: sensor ! sensor description CHARACTER (len=138) :: type ! image type description CHARACTER (len=100) :: tag ! file tag CHARACTER (len=100) :: crproc ! file creation process name CHARACTER (len=28) :: crtime ! file createion time/date ! ! After the first 512 byte header of variables defined above, ! the SIR file format permits optional additional 512 byte headers ! containing an optional user-defined string 'descrip' and an ! array of INTEGER*2 (kind=2) 'iaopt'. These may be arbitrarily long, but ! are stored in a multiple of 512 byte records). Here, we have choosen to ! store a small number of maximum of MAXDES characters and MAXI ! in the type variable integerss. ! INTEGER :: ndes ! number of chars of extra description string INTEGER :: ldes ! number of 512 records devoted to descript INTEGER :: nia ! number of extra integerss ! note: some f90 compilers do not like the initializations of MAXDES and MAXI in ! the type definition. If this is the case, remove the initializations ! and set the values before first use. INTEGER :: MAXDES = 512 ! maximum chars in extra description string CHARACTER (len=512) :: descrip ! size should match MAXDES above INTEGER :: MAXI = 128 ! maximum number of extra integers INTEGER(kind=2), dimension(128) :: iaopt ! integer storage END TYPE sirhead