skip to primary navigation skip to content

A collection of JScripts for retrieval of gas column amounts using DOAS methodology

A collection of JScripts for retrieval of gas column amounts using DOAS methodology

Since 2001, the Cambridge Volcanology Group (CVG) has pioneered the application of compact, fibre-optic UV spectrometers (e.g., Ocean Optics™) and Differential Optical Absorption Spectroscopy (DOAS) methods for remote sensing of volcanic SO2 fluxes (McGonigle et al., 2003; Galle et al., 2003). This approach has led to many benefits compared with the old technology – the correlation spectrometer (COSPEC) – which was the principal tool for remote monitoring of volcanic SO2 fluxes during the previous 30 years. These advantages include:

  • Recording of wideband spectra allowing retrieval of several gas species in addition to SO2 (including BrO, NO2, HONO, etc);
  • The use of absorption cross sections measured with high accuracy in the laboratory instead of calibration cells, which are delicate and may leak;
  • The ability to check for unidentified gases by examination of fit residuals;
  • Robust and compact design and low power consumption;
  • Low cost.

The combination of miniature, ultraviolet fibre-optic spectrometers and DOAS retrieval is in widespread use and is probably now the main ground-based remote sensing approach for investigation of volcanic gas emissions.

Cambridge Volcanology Group is an active member of the expanding volcanological remote sensing community. Some of our results are:

  • Detection of H2S (O'Dwyer et al., 2003), NO2 (Oppenheimer et al., 2005) and BrO (Oppenheimer et al., 2006a) in volcanic plumes;
  • Re-assessment of volcanic emission fluxes in Papua New Guinea (McGonigle et al., 2004) and Central America (Mather et al., 2004; Mather et al., 2006); the first measurements of SO2 and BrO emission rates from several poorly-known volcanoes (Oppenheimer et al., 2006b; Mori ae al., 2006; Sawyer et al., 2008; Bani et al., 2009); and ongoing studies of Mt. Erebus (Boichu et al., 2009).
  • Assessment of the accuracy of volcano flux measurements with DOAS technique (Elias et al., 2006; Tsanev and Oppenheimer, 2006)
  • The Ocean Optics™ spectrometers and DOAS retrieval have also been applied to measurements of pollution sources including power plants (McGonigle et al., 2004; Bani et al., 2009), NO2 emission from sugar cane field burns in Saõ Paulo, Brazil (Oppenheimer et al., 2004), the oil depot fire at Buncefield (Mather et al., 2007), and aviation.

This document presents a collection of DOASIS JScript projects designed to collect spectra from Ocean Optics™ spectrometers and to retrieve column amounts of absorbing gases using DOAS methodology (Platt and Stutz, 2008). To investigate the gas content of the plume, it is necessary to collect spectra of dark current and electronic offset, and scattered sunlight passing through both the plume and background atmosphere (with no plume present).

Requirements at a glance

  • Windows Vista or Windows XP
  • DOASIS software installed following the instructions at
  • Microsoft Excel (2007 version not yet tested)
  • Users have to be acquainted with DOASIS and Jscript manuals form
  • Scripts are edited using Microsoft Visual Studio. Other ASCII editors can be used but may result in less elegant formatting of the scripts.
  • The maintained Ocean Optics™ spectrometers as of early 2009 are USB2000, USB2000+ and USB 4000. Other spectrometers may be added on request.
  • Correct operation requires that the handled spectra, scripts, convolved cross-sections and fit scenarios, related to a particular spectrometer, are arranged in a specific folder structure as shown below:

Folder structure

JScript Project Files are used to structure scripts (for more details see JScript manual referred to above). The first file in each project is a detailed manual explaining what the project can do and how to use it. It contains only comments and may be excluded from the project. The second file initializes the execution of the project. Users type in parameters in this file only; no other files require modification or input.

Roadmap for using scripts

  • The JScript project collect_dark_and_offset.jsp is designed to collect dark and offset spectra and to store them in the folder c:\work\dark_and_offsets\. Spectral file names are created automatically based on date and hour of script execution. In principle, the utilization of darks and offsets requires thermo stabilization of the spectrometer because offset is temperature dependent.
  • The JScript project optimum_IT.jsp is designed to find an integration time providing spectra making full use of the spectrometer dynamic range but avoiding saturation, within user defined intervald of pixels/wavelengths. This yields spectra with high signal-to-noise ratio, which minimise errors in retrievals.
  • The group of three JScript projects "collection_short" collects sequences of spectra with specified, fixed integration time and number of scans. These Scripts are suitable for traversing plumes (e.g., for SO2 flux measurements).
  • The JScript project collection_long.jsp is designed for collection of spectra for atmospheric chemistry investigations. It allows recording of sets of spectra with optimized integration times. A set is terminated if three spectra with non-optimal amplitude are identified. Then the script automatically searches for a new optimised integration time and starts to record the next set of spectra, and so on.
  • The two JScript projects make_a_list_short.jsp and make_a_list_long.jsp are obsolete. Their function is to create lists of spectra recorded with some of the old CVG JScripts. The lists have been introduced due to difficulties using the AutoFileName approach and to read scenario properties. The lists are used as inputs for the JScript project retrieval.jsp.
  • The two JScript projects correction_short.jsp and correction_long.jsp are used to correct the impacts of dark current, offset and stray light on retrieval accuracy. These scripts have to be run before DOAS retrieval.
  • The JScript project optimization.jsp finds the optimal fitting window for DOAS retrieval. For details see (Tsanev and Oppenheimer, 2006 – provide link for downloading from the server here)
  • The JScript project retrieval.jsp performs retrieval of spectra that have been corrected.

A DOS executable program (ooWINDc.exe) is provided as well. Its converts spectra recorded with OOIBase32 and SpectraSuite to DOASIS std-format and also to WinDOAS format, simultaneously carrying out correction for dark spectrum, offset and stray light.

We will provide DOS executable programs for decoding Garmin GPS records and for calculation of emission fluxes in future.

Most of the JScripts are provided with test data, corresponding initialization and results.

All enquiries for support should be addressed to the software author Dr Vitchko Tsanev [].

If you make use of the software or associated manual in your research, please acknowledge this in publications by referencing the software as:

V.I. Tsanev, 2008. A collection of JScripts for retrieval of gas column amounts using DOAS methodology. Available from .


Many of the scripts use the DOS executable beep.exe, available below in 'spectrometers_and_beep'.

collect_dark_and_offset JScript project for collection of dark spectrum and offest signal
collection_long JScript project for prolonged collection sets of spectra with optimized integration time
dark_do_traverse_dark Jscript project for collection set of specta: dark, spectrum,...,spectrum, dark – suitable for traversing plumes
dark_do_treverse_dark_3_pixels [available shortly] Jscript project for collection set of spectra: dark, spectrum,...,spectrum, dark with simultaneous approximate evaluation of column amount– suitable for traversing plumes
dark_do_treverse_dark_retrieval [available shortly] Jscript project for collection set of spectra: dark, spectrum,...,spectrum, dark with simultaneous retrieval of column amount– suitable for traversing plumes
correction_long Jscript project for correction of dark, offset and stray light of sets of spectra collected by Jsript project cillecjion_long
correction_short Jscript project for correction of dark, offset and stray light of sets of spectra collected by one Jsript projects cillecjion_short
make_a_list_long Jscript project for creation of lists of spectra recorded with some of the old CVG Jscript collection_longs
make_a_list_short Jscript project for creation of lists of spectra recorded with some of the old CVG Jscript collection_short
optimum_IT Jscript project designed to find an integration time providing spectra making full use of the spectrometer dynamic range but avoiding saturation
optimization Jscript project for finding the optimal fitting window for DOAS retrieval
retrieval Jscript project for retrieval of spectra that have been corrected
spectrometers_and_beep Collection of convolved cross sections for use with a few particular spectrometers used in examples provided
ooWINDc DOAS executable performing for correction of dark, offset and stray ligh of sets of spectra collected by OOIBase32™ and transforming corrected spectra to DOASIS std-format.
DOASIS_std_format Explained usage of DOASIS std-format's properties by present collection of JScripts

References and DOAS-related papers with CVG contribution:

  • Aiuppa, A., Inguaggiato, S., McGonigle, A.J.S., O'Dwyer, M., Oppenheimer, C., Padgett, M.J., Rouwet, D. & Valenza, M., 2005, H2S fluxes from Mt. Etna, Stromboli and Vulcano (Italy) and implications for the global volcanic sulfur budget, Geochimica et Cosmochimica Acta, 69, 1861-1871, doi: doi:10.1016/j.gca.2004.09.018.
  • Bani, P., C. Oppenheimer, V. Tsanev, M. Lardy, T. Hoibian, M. Allenbach, I. Rouet, 2008, Correlation between SO2 emissions rate and S contained in fuel used in a power plant, Noumea, New Caledonia. Proceedings of SPIE, 7149, 71490Y-1, doi:10.1117/12.804902.
  • Bani, P., C. Oppenheimer, V.I. Tsanev, Crimp, R., Cronin, S., Calkins, J., D. Charley, M. Lardy, 2009, Surge in sulphur and halogen degassing from Ambrym volcano, Vanuatu. Bulletin of Volcanology, (in press).
  • Bani, P., C. Oppenheimer, J.C. Varekamp, T. Quinou, M. Lardy, and S. Carn, 2009, Remarkable geochemical changes and degassing at Voui crater lake, Ambae volcano, Vanuatu, Geophysical Research Letters (in review).
  • Boichu, M., C. Oppenheimer, V.I. Tsanev, P.R. and Kyle, 2009, High temporal resolution SO2 flux measurements at Mt. Erebus, Antarctica, submitted to Journal of Geophysical Research.
  • Edmonds, M., R.A. Herd, B. Galle, and C. Oppenheimer, 2003, Automated, high time-resolution measurements of SO2 flux at Soufrière Hills Volcano, Montserrat, Bulletin of Volcanology, 65, 578-586, doi:10.1007/s00445-003-0286-x.
  • Elias, T., A. J. Sutton, C. Oppenheimer, K.A. Horton, H. Garbeil, V. Tsanev, A.J.S. McGonigle, and G. Williams-Jones, 2006, Comparison of COSPEC and two miniature ultraviolet spectrometer systems for SO2 measurements using scattered sunlight, Bulletin of Volcanology, 68 (4),313-322, doi:10.1007/s00445-005-0026-5.
  • Galle, B, C. Oppenheimer, A. Geyer, A.J.S. McGonigle, M. Edmonds, L. Horrocks, 2003, A miniaturised ultraviolet spectrometer for remote sensing of SO2 fluxes: a new tool for volcano surveillance, Journal of Volcanology and Geothermal Research, 119 (1 - 4), 241-254.
  • Mather T.A., V.I. Tsanev, D.M. Pyle, A.J.S. McGonigle, C. Oppenheimer, A.G. Allen, 2004, Characterization and evolution of tropospheric plumes from Lascar and Villarrica volcanoes, Chile, Journal of Geophysical Research, 109 (D21303), doi:10.1029/2004JD004934.
  • Mather, T.A., D.M. Pyle, V.I. Tsanev, A.J.S. McGonigle, C. Oppenheimer, A.G. Allen, 2006, A reassessment of current volcanic emissions from the Central American arc with specific examples from Nicaragua. Journal of Volcanology and Geothermal Research, 149 (3-4), 297– 311, 2006, doi:10.1016/j.jvolgeores.2005.07.021.
  • Mather, T.A., R.G. Harrison, V.I. Tsanev, D.M. Pyle, M.L. Karamudi, A.J. Bennett, G.M. Sawyer, and E.J. Highwood, 2007, Observations of the plume generated by the December 2005 oil depot explosions and prolonged fire at Buncefield (Hertfordshire, UK) and associated atmospheric changes. Proceedings of Royal Society. A, 463, 1153-1177, doi:10.1098/rspa.2006.1810.
  • McGonigle, A.J.S., C. Oppenheimer, B. Galle, T. Mather, and D. Pyle, 2002, Walking traverse and scanning DOAS measurements of volcanic gas emission rates, Geophysical Research Letters, 22 (10), doi:10.1029/2002GL015827.
  • McGonigle, A.J.S., C. Oppenheimer, V.I. Tsanev, S. Saunders, K. Mulina, S. Tohui, J. Bosco, J. Nahou, J. Kuduon, and F. Taranu, 2004, Sulphur dioxide fluxes from Papua New Guinea's volcanoes, Geophysical Research Letters, 31 (L08606), doi:10.1029/2004GL019568.
  • McGonigle, A.J.S., C.L. Thomson, V.I. Tsanev and C. Oppenheimer, 2004,. A simple technique for measuring power station SO2 and NO2 emissions. Atmospheric Environment, 38 (1), 21-25. doi:10.1016/j.atmosenv.2003.09.048
  • McGonigle, A.J.S., P. Delmelle, C. Oppenheimer, V.I. Tsanev, T. Delfosse, H. Horton, and G. Williams-Jones, 2004, SO2 depletion in tropospheric volcanic plumes, Geophysical Research Letters, 31, L13201, doi:10.1029/2004GL019990.
  • McGonigle, A.J.S., Hilton, D.R., Fischer, T.P., and C. Oppenheimer, 2005, Plume velocity determination for volcanic SO2 flux measurements, Geophysical Research Letters, 32, L11302, doi:10.1029/2005GL022470.
  • Mori, T., K. Kazahaya, C. Oppenheimer, A.J.S. McGonigle, V. Tsanev, R. Olmos, M. Ohwada, and T. Shuto, 2006, Sulphur dioxide fluxes from the volcanoes of Hokkaido, Japan. Journal of Volcanology and Geothermal Research, 158 (3-4) , 235-243, doi:10.1016/j.jvolgeores. 2006.04.024.
  • O'Dwyer, M., M.J. Padgett, A.J.S. McGonigle, C. Oppenheimer, and S. Inguaggiato, 2003, Real-time measurement of volcanic H2S and SO2 concentrations by UV spectroscopy, Geophysical Research Letters, 30 (12), 1652, doi: 10.1029/2003GL017246.
  • Oppenheimer C., V. Tsanev, A.G . Allen, A.J.S. McGonigle, A. Cardoso, A. Wiatr, W. Paterlini, and C. De Mello Dias, 2004, NO2 Emissions from Agricultural Burning in São Paulo, Brazil. Environmental Science and Technology, 38 (17), 4557 – 4561, doi: 10.1021/es0496219.
  • Oppenheimer, C. and A.J.S. McGonigle, 2004, Exploiting ground-based optical sensing technologies for volcanic gas surveillance, Annals of Geophysics, 47(4), 1455-1470.
  • Oppenheimer, C., P.R. Kyle, V.I. Tsanev, A.J.S. McGonigle, T.A. Mather, and D. Sweeney, 2005, Mt. Erebus, the largest point source of NO2 in Antarctica. Atmospheric Environment, 39 (32), 6000-6006.
  • Oppenheimer, C., V.I. Tsanev, C.F. Braban, R.A. Cox, J.W. Adams, A. Aiuppa, N. Bobrowski, P. Delmelle, J. Barclay, A.J.S. McGonigle, 2006, BrO formation in volcanic plumes. Geochimica et Cosmochimica Acta, 70 (12), 2935-2941, 2006, doi:10.1016/j.gca.2006.04.001.
  • Oppenheimer, C., V.I. Tsanev, P. Bani, R. Crimp, S. Cronin, J. Calkins, D. Charley, and M. Lardy, 2006b, Colossal sulphur and bromine degassing from Ambrym volcano, Vanuatu. Report at Third International DOAS Workshop 2006, 20-22 March 2006, Bremen, Germany (CD edition).
  • Platt, U. and J. Stutz, 2008, Differential Optical Absorption Spectroscopy. Principles and Applications. Springer, 597 p.
  • Salerno, G.G., M.R. Burton, C. Oppenheimer, T., Caltabiano, V.I. Tsanev, M., Bruno, and D. Randazzo., 2009, Novel retrieval of volcanic SO2 abundance from ultraviolet spectra, Journal of Volcanology and Geothermal Research, 181, 141-153, doi:10.1016/j.jvolgeores.2009.01.009.
  • Salerno, G.G., M., Burton, C., Oppenheimer, T., Caltabiano, D., Randazzo, N., Bruno, and V., Longo, 2009, Three-years of SO2 flux measurements of Mt. Etna using an automated UV scanner array: comparison with conventional traverses and uncertainties in flux retrieval, Journal of Volcanology and Geothermal Research, doi:10.1016/j.jvolgeores.2009.02.013.
  • Sawyer, G.M., C. Oppenheimer, V.I. Tsanev, and G. Yirgu, 2008, Magmatic degassing at Erta 'Ale volcano, Ethiopia, Journal of Volcanology and Geothermal Research, 178, 837-846, doi:10.1016/j.jvolgeores.2008.09.017
  • Sawyer, G.M., S.A. Carn, V.I. Tsanev, C. Oppenheimer, M. Burton, 2008, Investigation into magma degassing at Nyiragongo volcano, Democratic Republic of the Congo, Geochemistry, Geophysics, Geosystems, 9 (2), Q02017, doi:10.1029/2007GC001829.
  • Sweeney, D., P. R. Kyle, C. Oppenheimer, 2008, Sulfur dioxide emissions and degassing behavior of Erebus volcano, Antarctica, Journal of Volcanology and Geothermal Research, 177, 725-733, doi: 10.1016/j.jvolgeores.2008.01.024
  • Tsanev, V.I. and C. Oppenheimer, 2006, Optimization of SO2 retrieval in volcanic plumes. Third International DOAS Workshop 2006, 20-22 March 2006, Bremen, Germany (CD edition).