kspectrum.md.in (7940B)
1 # Kspectrum 2 3 Kspectrum computes the synthetic absorption spectrum for a gas mixture 4 in arbitrary thermodynamic conditions (pressure, temperature and molar 5 composition) from public spectroscopic databases. 6 The main and only purpose of the code is to produce high-resolution 7 absorption spectra for a given set of thermodynamic conditions; in 8 particular, Kspectrum will *NOT* perform the following tasks: 9 10 - compute molecular absorption for any other source than allowed 11 energetic transitions: even if some limited effort has been put into 12 the representation of collision-induced absorption and continua, these 13 sources of opacity will have to be computed separately for each 14 application in a separate step. 15 16 - perform radiative transfer computations: one of the main ideas behind 17 Kspectrum is that the resulting absorption spectra can be used for a 18 wide variety of applications, possibly in complex 3D scenes (as, for 19 instance, in combustion engines). 20 Dedicated tools will have to be used in order to solve radiative 21 transfer; Kspectrum by itself will only be used to produce the input 22 spectral data. 23 24 [](images/k001.svg) 25 26 > Absorption spectrum for terrestrial air, at ground level, for a 27 > Mid-Latitude Summer standard atmospheric profile. 28 > The absorption coefficient is also provided for each one of the three 29 > molecular species used in the gas mixture (logscale). 30 31 ## Spectroscopic databases 32 33 Kspectrum uses the [HITRAN](http://hitran.org) spectroscopic database in 34 order to retrieve transition parameters (versions 2004, 2008 and 2012). 35 Additionally, it can use the [HITEMP](http://hitran.org/hitemp/)-2010 36 and [CDSD](ftp://ftp.iao.ru/pub)-4000 databases (respectively for water 37 and carbon dioxide) at high-temperature levels. 38 Further development would be required for additional databases 39 (HITRAN-2016 ? GEISA ?). 40 41 ## Reference results 42 43 The main idea behind Kspectrum was initially to develop a code that 44 would not need to use numerical simplifications such as a line profile 45 truncation (assuming the distant line-wing profile is well known, which 46 is obviously not the case). 47 The resulting code was therefore capable of adding the contribution of 48 every known transition at every wavenumber, in order to produce a value 49 of the absorption coefficient with a known accuracy; also, a custom 50 spectral discretisation algorithm was implemented in order to produce a 51 non-uniform spectral grid according to a second accuracy criteria. 52 Further versions quickly acquired the possibility to perform a 53 line-wings truncation and use a specified constant spectral step, but 54 the original algorithms that give the possibility to compute reference 55 results (in the sense that a numerical accuracy is provided over 56 resulting spectra) are still available. 57 58 [](images/tau_cumulated_1180-1200.svg) 59 60 > Plot of the atmospheric cumulated optical depth as a function of 61 > wavenumber, for a clear-sky Mid-Latitude Summer standard terrestrial 62 > atmospheric profile. 63 > Two kspectrum results are provided: using a 25 inverse centimeters 64 > truncation of the line profile, and without any truncation. 65 > The same result (with a truncation) obtained from the 4A code is also 66 > presented. 67 68 ## Physical models 69 70 This code can take into account the Lorentz and the Voigt line profiles, 71 as well as common sub-lorentzian corrective profiles. 72 The isotopic composition can be specified, making this code suitable for 73 non-terrestrial applications. 74 The code was mainly thought for thermal infrared applications, but 75 absorption spectra can be produced for any spectral range as long as 76 transition parameters are available. 77 As a general rule, Kspectrum was designed to remain as polyvalent as 78 possible; one immediate disadvantage is that special sources of opacity, 79 such as collision-induced absorption or continua, should be computed 80 separately for any given application. 81 Also, line-mixing processes have not yet been taken into consideration, 82 and require further developments. 83 84 ## Some neat features 85 86 Every time-consuming step of the computation has been parallelised, even 87 though the parallel architecture is far from optimal and should require 88 a major revision: the computation time does not scale very well with the 89 number of processes because of inter-processes communication, and also 90 it was not thought for multi-node clusters. 91 But at least Kspectrum will run faster on a reasonably good single node 92 (approx. 20 cores). 93 94 Also, the code has been implemented with the obsessions of: 95 96 - working with arbitrary large numbers of transitions. 97 For instance, the CDSD-4000 database holds the parameters for more 98 than 6 hundred millions of transitions for carbon dioxide; 99 Kspectrum will, in time, eventually compute the contribution of every 100 transition at every wavenumber of the spectrum. 101 102 - being able to resume interrupted runs: whether your PC crashes or 103 Kspectrum reaches the maximum computation time allowed by the 104 cluster's queue, it will be possible to resume an interrupted 105 computation instead of starting over from scratch: as in a video game, 106 Kspectrum performs frequent backups of the current run. 107 108 ## Quickstart 109 110 Kspectrum @VERSION@: 111 112 - Sources: [tarball](downloads/kspectrum@VERSION@.tgz) / 113 [pgp](downloads/kspectrum@VERSION@.tgz.sig) 114 - Installation script: [bash](downloads/install_kspectrum@VERSION@.bash) 115 - Manual: [pdf](downloads/kspectrum@VERSION@_manual.pdf) 116 117 ### Preqrequisites 118 119 All you need is a fortran compiler. 120 We are using gfortran for development, but it should also work with 121 other fortran compilers (ifort, pgfortran, etc.). 122 You should export the name of your fortran compiler into the F77 123 environment variable; for instance, using the bash interpreter: 124 125 export F77=gfortran 126 127 Then you can try to compile Kspectrum: go to the main Kspectrum 128 directory, then use the `make all` command to compile. 129 The most common sources of failure can be fixed by editing the 130 "Makefile" file in order to check compilation options (and more 131 specifically options related to the target architecture and 132 optimisations). 133 Whenever you modify a source file, you can re-compile using the `make 134 all` command. 135 But in the case you have to modify an include file, you will have to 136 erase all existing object files first using the `make clean` command, 137 before recompiling from scratch using the `make all` command again. 138 139 ### Installation 140 141 You will have to download both the `.tgz` file and the installation 142 script, and place both files in the same directory. 143 Then run the installation script. 144 This will uncompress the archive, compile and run a small program that 145 will generate an example composition file (for Venus' atmosphere). 146 The installation script will also try to link Line-by-Line spectroscopic 147 databases to your new installation of Kspectrum, but will most probably 148 fail if you are not a frequent Kspectrum user, and you will have to read 149 the documentation in order to link LBL databases yourself (and probably 150 download then first if you have not already done so). 151 Please [contact us](mailto:contact@meso-star.com) if you want a specific 152 setup script for your machine so that the linking step is performed when 153 you download the next version. 154 155 ## Copyright notice 156 157 Copyright © 2014-2018 |Méso|Star> 158 ([contact@meso-star.com](mailto:contact@meso-star.com)) 159 Copyright © 2008-2014 Centre National de la Recherche Scientifique (CNRS) 160 Copyright © 2008-2014 Fondation Sciences et Technologies pour l'Aéronotique et l'Espace 161 Copyright © 2008-2014 Institut Mines-Télécom Albi-Carmaux 162 Copyright © 2008-2014 Université Bordeaux 1 163 Copyright © 2008-2014 Université Paul Sabatier 164 165 ## License 166 167 Kspectrum is free software released under the CeCILL v2.1 license. 168 You are welcome to redistribute it under certain conditions; refer to 169 the 170 [license](http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt) 171 for details.