C+ C NAME: C bHOSName C PURPOSE: C Check whether a file name has the standard Helios format C CATEGORY: C Data processing: auxilliary C CALLING SEQUENCE: logical function bHOSName(cFile,iSc,iYr,IC,IFL) C INPUTS: C cFile character*(*) file name (READ ONLY) C OUTPUTS: C bHOSName logical .TRUE. if standard format, .FALSE. if not C iSc integer 1/2 for Helios A/B C iYr integer year (in I4 format, e.g. 1980) C IC integer color (1/2/3 for U/B/V) C IFL integer filter (1/2/3/4/5) or 9 if 90 deg data file C CALLS: C itrim, iSetFileSpec, iGetFileSpec C INCLUDE: include 'filparts.h' C PROCEDURE: C > The standard Helios format for a data file name is a 9 character C string containing information about s/c, year, color, filter and start C Doy, e.g. A76V4_103 contains Helios 1 (A) data for Doy 103 of year 1976 C for visual light (V) and the clear filter (4). C - 1:1 tested for a,A or b,B C - 2:3 tested for 1974-1985 for Helios A, 1976-1980 for Helios B C - 4:4 tested for u,U or b,B or v,V C - 5:5 tested for 1,2,3,4,5 or 9 C - 6:6 tested for underscore (_) C - 7:9 tested for 1 <= Doy <= 366 C > Optional: C - 10:10 tested for underscore(_) C - 11:14 tested for Carrington rotation number C > If bHOSName = .FALSE. then iSc=iYr=IC=IFL=0 is returned C MODIFICATION HISTORY: C NOV-1991, Paul Hick (UCSD) C- character cFile*(*) integer iSc integer iYr integer IC integer IFL character cName*20 bHOSName = .FALSE. iSc = 0 iYr = 0 IC = 0 IFL = 0 !IROT = 0 IL = itrim(cFile) if (IL .eq. 0) return ! Blank input string IL = iSetFileSpec(cFile) IL = iGetFileSpec(FIL__NAME,FIL__NAME,cName) if (IL .ne. 9 .and. IL .ne. 14) return iiSc = index('AB',cName(:1)) ! 1st char must be A or B if (iiSc .eq. 0) return read (cName(2:3),'(I2)',iostat=I) iiYr ! Check for year if (I .ne. 0) return ! Check for s/c launch and s/c death if (iiSc .eq. 1 .and. (iiYr .lt. 74 .or. iiYr .gt. 85)) return if (iiSc .eq. 2 .and. (iiYr .lt. 76 .or. iiYr .gt. 80)) return IIC = index('UBV',cName(4:4)) ! Color must be U,B or V if (IIC .eq. 0) return IIF = index('123459',cName(5:5))! Filter must be 1..5 or 9 (for 90 deg) if (IIF .eq. 0) return if (IIF .eq. 6) IIF = 9 ! Change position 6 to filer 9 if (cName(6:6) .ne. '_') return read (cName(7:9),'(I3)',iostat=I) J if (I .ne. 0) return ! Check for Doy if (J .lt. 1 .or. J .gt. 366) return C IIROT = 0 if (IL .eq. 14) then if (cName(10:10) .ne. '_') return read (cName(11:14),'(I4)',iostat=I) J if (I .ne. 0) return if (iiSc .eq. 1 .and. (J .lt. 2 .or. J .gt. 129)) return if (iiSc .eq. 2 .and. (J .lt. 14 .or. J .gt. 65)) return C IIROT = J end if iSc = iiSc iYr = 1900+iiYr IC = IIC IFL = IIF !IROT = IIROT bHOSName = .TRUE. return end