subroutine is_mass_scan (iflag) c c------------------------------------------------------------------------------ c c iflag = 1 ==> in mass scan mode c iflag = 0 ==> not in mass scan mode c------------------------------------------------------------------------------ c integer*4 irpa(32), jrpa(512), jmsh(512), nrpa, ndif_1, iflag common/rpamsh/jrpa,jmsh c c------------------------------------------------------------------------------ c------------------------------------------------------------------------------ c nrpa = 32 call fndval (jrpa, nrpa, irpa, ndif_1) ! get unique RPA values iflag = 0 ! initialize to not in mass scan mode if (ndif_1 .gt. 0) then call sort (irpa, ndif_1) num0 = 32 do i = 1, 32 if (irpa(i) .gt. 0) num0 = num0 - 1 end do if (num0 .ge. 22) iflag = 1 ! not enough RPA values else ! no RPA values, assume mass scan mode iflag = 1 end if c c------------------------------------------------------------------------------ c------------------------------------------------------------------------------ c return end