subroutine bpm_number_to_name(bpm, bpm_name) use tbt_mod implicit none type (tbt_all_data_struct) tbt character*4 bpm_name integer bpm integer i bpm_name = tbt%bpm(bpm)%name ! bpm_name(1:3)=' ' ! bpm_name(3:3)='W' ! if(bpm<10)then ! write(bpm_name(2:2),'(i1)')bpm ! else ! write(bpm_name(1:2),'(i2)')bpm ! if(bpm > 49) bpm_name(3:3)='E' ! endif return end subroutine subroutine bpm_name_to_number(bpm, bpm_name, ok) use tbt_mod implicit none type (tbt_all_data_struct) tbt character*4 bpm_name integer bpm integer i logical ok, init/.true./ ok = .false. !if(init)then tbt%bpm(101)%name = '8AW' tbt%bpm(102)%name = '12W2' tbt%bpm(103)%name = '12W3' tbt%bpm(105)%name = '23W1' tbt%bpm(106)%name = '36W2' tbt%bpm(107)%name = '43AW' tbt%bpm(108)%name = '47AW' tbt%bpm(109)%name = '????' tbt%bpm(111)%name = '????' tbt%bpm(112)%name = '47AE' tbt%bpm(113)%name = '43E2' init=.false. !endif do i=101,120 ! print '(i,4a)',i,' tbt%bpm(i)%name ', trim(tbt%bpm(i)%name) !,' bpm_name ', trim(bpm_name) if(trim(tbt%bpm(i)%name) /= trim(bpm_name))cycle bpm=i ok = .true. end do return end subroutine