module jt65_host_support use jt65_decode, only: jt65_decoder,jt65_average_entry use prog_args, only: data_dir implicit none private public :: load_jt65_calls,write_jt65_averages contains subroutine load_jt65_calls(calls,grids) character(len=12), allocatable, intent(out) :: calls(:) character(len=4), allocatable, intent(out) :: grids(:) character(len=12), allocatable :: call_buffer(:) character(len=4), allocatable :: grid_buffer(:) character(len=180) :: line integer :: unit,ios,count,first,second allocate(call_buffer(10000),grid_buffer(10000)) count=0 open(newunit=unit,file=trim(data_dir)//'/CALL3.TXT',status='old',action='read',iostat=ios) if(ios==0) then do while(count0) polarity='*' write(unit,'(a1,i5.4,f6.1,f6.2,i6,1x,a1)') used,entries(i)%utc, & entries(i)%sync,entries(i)%dt,entries(i)%frequency,polarity enddo endfile(unit) flush(unit) end subroutine write_jt65_averages end module jt65_host_support