program make_user_spectral_grid implicit none include 'max.inc' c c Purpose: to generate a user-defined spectral grid, recorded c into "user_spectral_grid.in" c Remember that this grid should contain values in every narrowband c defined by the "narrowbands.in" input data file. c c Variables double precision nu_min,nu_max,dnu c temp integer i double precision nu character*(Nchar_mx) sgrid_file c label integer strlen character*(Nchar_mx) label label='program make_user_spectral_grid' c --------------------------------------------------------------------------------- c Simple scheme: use a constant spectral step in the [nu_min,nu_max] interval c c Lower limit nu_min=0.0D+0 ! inv. cm c Higher limit nu_max=12.0D+3 ! inv. cm c Spectral step dnu=1.0D-2 ! inv. cm c --------------------------------------------------------------------------------- c spectral grid filename sgrid_file='./user_spectral_grid.in' c coherence check if (nu_max.le.nu_min) then call error(label) write(*,*) 'nu_max=',nu_max write(*,*) 'should be higher than nu_min=',nu_min stop endif if (dnu.gt.nu_max-nu_min) then call error(label) write(*,*) 'dnu=',dnu write(*,*) '< mu_max-mu_min=',nu_max-nu_min stop endif c generate file write(*,*) 'Now recording spectral grid...' nu=nu_min open(10,file=sgrid_file(1:strlen(sgrid_file))) i=0 do while (nu.lt.nu_max) nu=nu_min+i*dnu write(10,*) nu i=i+1 enddo ! while (nu<=nu_max) close(10) write(*,*) 'Output file was succesfuly generated:' write(*,*) sgrid_file(1:strlen(sgrid_file)) end