program read_transitions_geisa2015 !PROGRAM FOR READ ASCII FORMAT GEISA 2015 DATABASE implicit none ! FIELDS GEISA real(kind=8) :: waveNb ! A real(kind=8) :: intensity ! B real :: collHW ! C real :: energyLowerLevel ! D character(len=80) :: quant ! E real :: temperatureDependence ! F integer :: isotopeId ! G integer :: moleculeId ! I character(len=3) :: internalGeisaCode ! J integer(kind=2) :: hit_moleculeId ! K integer(kind=2) :: hit_isotopeId ! L real :: hit_EinsteinACoeff ! M real :: hit_selfBroadHW ! N real :: hit_airBroadHW ! O real :: temperatureDependenceAPS ! R real(kind=8) :: accWaveNb ! A' real(kind=8) :: accIntensity ! B' real :: accCollHW ! C' real :: accTemperatureDependence ! F' real :: accAirBroadHW ! O' real :: accTempDepAPS ! R' real :: accSelfBroadHW ! N' real :: temperatureDependenceSBH ! S real :: accTempDepSBH ! S' real :: selfPressShift ! T real :: accSelfPressShift ! T' real :: temperatureDependenceSPS ! U real :: accTempDepSPS ! U' ! OTHER DECLARATION integer :: n_arg,iargc,nbr_transitions integer :: unit_input_file character(len=250) :: prog,ascii_file_geisa ! unit_input_file=10 nbr_transitions=0 ! n_arg=iargc() call getarg(0,prog) if(n_arg.lt.1) then write(*,*)'Syntax error: '//trim(prog)// & & ' ascii format GEISA 2015 file ' stop endif call getarg(1,ascii_file_geisa) open(unit_input_file, file=trim(ascii_file_geisa),form='formatted') 10 read(unit_input_file,100,end=901) waveNb,intensity,collHW,energyLowerLevel,quant,temperatureDependence, & isotopeId,moleculeId,internalGeisaCode,hit_moleculeId, & hit_isotopeId,hit_EinsteinACoeff,hit_selfBroadHW, & hit_airBroadHW,temperatureDependenceAPS, & accWaveNb,accIntensity,accCollHW,accTemperatureDependence, & accAirBroadHW,accTempDepAPS,accSelfBroadHW,temperatureDependenceSBH, & accTempDepSBH,selfPressShift,accSelfPressShift, & temperatureDependenceSPS,accTempDepSPS nbr_transitions=nbr_transitions+1 write(*,100) waveNb,intensity,collHW,energyLowerLevel,quant,temperatureDependence, & isotopeId,moleculeId,internalGeisaCode,hit_moleculeId, & hit_isotopeId,hit_EinsteinACoeff,hit_selfBroadHW, & hit_airBroadHW,temperatureDependenceAPS, & accWaveNb,accIntensity,accCollHW,accTemperatureDependence, & accAirBroadHW,accTempDepAPS,accSelfBroadHW,temperatureDependenceSBH, & accTempDepSBH,selfPressShift,accSelfPressShift, & temperatureDependenceSPS,accTempDepSPS ! GOTO THE NEXT TRANSITION goto 10 100 format(f12.6,1P,d11.4,0P,f6.4,f10.4,a80,f4.2,i3,i3,a3,i2,i1,1P,e10.3,0P,f7.4,f9.6, & & f6.4,f10.6,1P,d11.4,0P,f6.4,f4.2,f9.6,f6.4,f7.4,f4.2,f4.2,f8.6,f8.6,f4.2,f4.2) 901 write(*,*) "End of ascii format GEISA 2015 file ", trim(ascii_file_geisa) write(*,*) "There are ",nbr_transitions," transitions in this file" end