subroutine lymalpha(pls,pflux) use datafile_mod use comcstfi_mod, only: pi implicit none !================================================================== ! Purpose ! ------- ! Get the lyman alpha flux according to the solar longitude ! ! Inputs ! ------ ! pls solar longitude ! ! Outputs ! ------- ! ! Both ! ---- ! ! Authors ! ------- ! Tanguy Bertrand !================================================================== !----------------------------------------------------------------------- ! Arguments REAL,INTENT(IN) :: pls REAL,INTENT(OUT) :: pflux !----------------------------------------------------------------------- ! Local variables REAL :: vectls REAL :: vectflux LOGICAL firstcall SAVE firstcall DATA firstcall/.true./ !!read lyman alpha flux integer Nfine parameter(Nfine=13281) integer ifine character(len=100) :: file_path real,save :: lsdat(Nfine),fluxdat(Nfine) !---------------- INPUT ------------------------------------------------ IF (firstcall) then firstcall=.false. file_path=trim(datadir)//'/sol_uv_flux.txt' print*,file_path open(222,file=file_path,form='formatted') do ifine=1,Nfine read(222,*) lsdat(ifine), fluxdat(ifine) enddo close(222) ENDIF CALL interp_line(lsdat,fluxdat,Nfine,pls*180./pi,pflux,1) !write(*,*) 'flux=',pflux end subroutine lymalpha