      SUBROUTINE MASKINPUTHW(ip2,iprobe)

C     MASKINPUTHW HARDWIRES THE INPUT MASKS FOR THE FINALSD PROGRAM
C     BASED ON VARIABLE

      parameter (maxmask=100)
      character*80 cfile
   
      dimension nmask(5)
      dimension ipar(0:maxmask),ipro(0:maxmask)
      dimension cfile(maxmask)

      common /maskfile/ cfile
      common /mfileinf/ nmask,ipar,ipro

c     Inclusive sequential mask

      nm=0
      iprx=-iprobe
      if ( iprobe .eq. 0 ) iprx=-1000

      if ( ip2 .gt. 2 ) then

       nm=1
       nmask(1)=nm
       ipar(nm)=ip2
       ipro(nm)=iprobe
       cfile(nm)='records.s'//CHAR(0)

      else
   
       nmask(1)=0

      endif

c    Exclusive sequential

      nm=nm+1
      cfile(nm)='cruiseout.s'//CHAR(0)
      ipar(nm)=ip2
      ipro(nm)=iprx
      nm=nm+1
      cfile(nm)='countryout.s'//CHAR(0)
      ipar(nm)=ip2
      ipro(nm)=iprx
      nm=nm+1
      cfile(nm)='duplicate.s'//CHAR(0)
      ipar(nm)=0
      ipro(nm)=iprx

      if ( ip2 .eq. 1 .or. ip2 .eq. 2 ) then
       nm=nm+1
       cfile(nm)='highrespair.s'//CHAR(0)
       ipar(nm)=0
       ipro(nm)=iprx
       nm=nm+1
       cfile(nm)='dinvstand2.s'//CHAR(0)
       ipar(nm)=0
       ipro(nm)=iprx
      endif

      nmask(2)=nm

c     Exclusive depth masks

      nm=nm+1
      cfile(nm)='Bullseye.d'//CHAR(0)
      ipar(nm)=ip2
      ipro(nm)=iprx
      nm=nm+1
      cfile(nm)='outliersS.d'//CHAR(0)
      ipar(nm)=ip2
      ipro(nm)=iprx

      if ( ip2 .eq. 1 .or. ip2 .eq. 2 ) then
       nm=nm+1
       cfile(nm)='dinvstand.d'//CHAR(0)
       ipar(nm)=0
       ipro(nm)=iprx
      endif

      nmask(3)=nm
      nmask(4)=nm
      nmask(5)=nm

      return
      end
