Skip to content

Commit 503ef9d

Browse files
authored
Merge pull request #16 from nichollsh/mainUV
UV add-on from mainUV
2 parents 2dda621 + cd6ce70 commit 503ef9d

File tree

11 files changed

+451
-296
lines changed

11 files changed

+451
-296
lines changed

make/Mk_cmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Generated automatically
2-
# System: Linux atmlxint6.atm.ox.ac.uk 5.4.0-193-generic #213-Ubuntu SMP Fri Aug 2 19:14:16 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
3-
# Date: Thu 31 Oct 13:48:05 GMT 2024
2+
# System: Linux norma1.intra.astro.rug.nl 5.14.0-570.58.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Oct 31 13:55:05 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
3+
# Date: Mon Dec 8 02:01:11 PM CET 2025
44

55
FORTCOMP = /usr/bin/gfortran -Ofast -march=native -fPIC -c
66
LINK = /usr/bin/gfortran -Ofast -march=native -fPIC
77
LIBLINK = /usr/bin/ar rvu
8-
INCCDF_PATH = /usr/include -I/usr/include
9-
LIBCDF_PATH = /usr/lib/x86_64-linux-gnu
8+
INCCDF_PATH = /usr/include -I/usr/lib64/gfortran/modules
9+
LIBCDF_PATH = netcdff
1010
LIBCDF_NAME = netcdff
1111
OMPARG = -fopenmp
1212

spectraltools/INFOSpectralFiles.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
The following table contains information about spectral files that can be downloaded through Zenodo (https://zenodo.org/communities/proteus_framework/records?q=&f=subject%3Aspectral_files&l=list&p=1&s=10&sort=newest).
2+
3+
| Codename | Bands | Absorbers | Continua | UV | Tolerance | Sources | NaN-clean | SOCRATES | Date | Platform | Creator | Notes |
4+
|------------|-------|------------------------|--------------------------|---------|-----------|---------|-----------|----------|------------|-------------|------------------|---------------------|
5+
| Legacy | 318 | H2O, CO2, O3, N2O, CO, CH4, O2, NO, SO2, NO2, NH3, HNO3, N2, H2, He, OCS | CO2, CH4, O2, N2, H2, He |No | 1.00E-02 | HITRAN | TRUE | 2002 | 2021 | Linux Intel | Tim Lichtenberg | Legacy spectral file used in Lichtenberg+2021 |
6+
| Oak | 318 | H2O | H2O | No | 1.00E-02 | HITRAN | TRUE | 2306 | 2023-07-10 | Linux Intel | Harrison Nicholls | Water-only spectral file from HITRAN. To be used for benchmarking. |
7+
| Idwal | 318 | H2O | H2O | No | 1.00E-02 | HITRAN | FALSE | 2211 | 2023-07-11 | Linux Intel | Harrison Nicholls | Made redundant by Oak. They only differ by SOCRATES version. |
8+
| Balmora | 318 | H2O | H2O | No | 1.00E-02 | HITRAN | FALSE | 2306 | 2023-07-19 | Mac ARM | Tim Lichtenberg | Made redundant by Oak. They only differ by creation platform. |
9+
| Triangle | 318 | H2O, H2, CO2 | H2O, H2, CO2 | No | 1.00E-02 | HITRAN | TRUE | 2306 | 2023-07-11 | Linux Intel | Harrison Nicholls | Test |
10+
| Mallard | 318 | H2O, H2, CO2, CO, CH4, O2, N2, He | H2O, CO2, CH4, O2, N2, H2, He | No | 1.00E-02 | HITRAN | TRUE | 2306 | 2023-07-13 | Linux Intel | Harrison Nicholls | HITRAN file with useful opacities |
11+
| Reach | 318 | H2O, CO2, O3, N2O, CO, CH4, O2, NO, SO2, NO2, NH3, HNO3, N2, H2, He, OCS | H2O, CO2, CH4, O2, N2, H2, He | No | 1.00E-02 | HITRAN | TRUE | 2306 | 2023-07-19 | Linux Intel | Harrison Nicholls | Same as above but with more opacities |
12+
| Vivec | 318 | H2O, CO2, O3, N2O, CO, CH4, O2, NO, SO2, NO2, NH3, HNO3, N2, H2, He, OCS | H2O, CO2, CH4, O2, N2, H2, He | No | 1.00E-02 | HITRAN | FALSE | 2306 | 2023-07-25 | Mac Intel | Tim Lichtenberg | Same as above, but compiled on MacOS |
13+
| Alduin | 318 | H2O | H2O | No | 1.00E-02 | EXOMOL | TRUE | 2306 | | Linux Intel | Ryan Boukrouche | Script exists to generate this file, but it is not currently available |
14+
| Kynesgrove | 318 | O2 | O2-O2 | No | 5.00E-04 | DACE | TRUE | 2403 | 2024-03-14 | Linux Intel | Harrison Nicholls | Created for validation of DACE xsec data against SOCRATES' own LbL calculations used in Mallard. |
15+
| Frostflow | 4096 | H2O | H2O | No | 5.00E-03 | DACE | TRUE | 2403 | 2024-03-20 | Linux Intel | Harrison Nicholls | Very high resolution. Intended for benchmarking. |
16+
| Frostflow | 256 | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | High resolution. |
17+
| Frostflow | 48 | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | Medium resolution. |
18+
| Frostflow | 16 | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | Low resolution. Intended for debugging. |
19+
| Dayspring | 4096 | H2O, H2, CO2, CO, CH4, N2 | H2O-H2O, H2-CH4, H2-H2, N2-H2, N2-N2, N2-H2O, CO2-CO2, CO2-H2, CO2-CH4 | No | 1.00E-02 | DACE | TRUE | 2403 | 2024-04-30 | Linux Intel | Harrison Nicholls | Very high resolution. Intended for benchmarking. |
20+
| Dayspring | 256 | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | High resolution. |
21+
| Dayspring | 48 | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | Medium resolution. |
22+
| Dayspring | 16 | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | Low resolution. Intended for debugging. |
23+
| Honeyside | 4096 | H2O, H2, CO2, CO, CH4, N2, NH3, SO2, N2O, O3, HCN, H2S | H2O-H2O, H2-CH4, H2-H2, H2-N2, N2-N2, N2-H2O, CO2-CO2, CO2-H2, CO2-CH4 | No | 1.00E-02 | DACE | TRUE | 2403 | 2024-07-07 | Linux Intel | Harrison Nicholls | Very high resolution. Intended for benchmarking. |
24+
| Honeyside | 256 | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | High resolution. |
25+
| Honeyside | 48 | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | Medium resolution. |
26+
| Honeyside | 16 | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | ^ | Low resolution. Intended for debugging. |
27+
| Rocks | 256 | O2, SiO, SiO2 | O2-O2 | No | ? | DACE | TRUE | 2407.2 | 2025-05-15 | Linux Intel | Alex McGinty | High resolution file used for comparison with JWST observations of rock-vapour atmospheres. |
28+
| Rocks | 128 | H2, H2O, O2, SiO, SiO2 | H2O-H2O, H2-H2, O2-O2 | ^ | ? | ^ | ^ | ^ | ^ | ^ | Alex McGinty | Rock vapours and key volatiles. |
29+
| Rocks | 64 | H2, H2O, O2, SiO, SiO2 | H2O-H2O, H2-H2, O2-O2 | ^ | ? | ^ | ^ | ^ | ^ | ^ | Alex McGinty | Rock vapours and key volatiles (low resolution). |
30+
| Winterfell | 4096 | H2O, H2, CO2, CO, CH4, N2, NH3, SO2, N2O, O3, HCN, H2S, O2 | H2O-H2O, H2-CH4, H2-H2, H2-N2, N2-N2, N2-H2O, CO2-CO2, CO2-H2, CO2-CH4 | CO2, H2O, H2S, N2, N2O, NH3, O3, SO2 | ?|DACE, MPI| TRUE | 2407.2 | 2026-01-12 | Linux Intel | Bruna Fena | Honeyside but with UV included for some molecules. Very high-resolution. |
31+
| Winterfell | 256 | H2O, H2, CO2, CO, CH4, N2, NH3, SO2, N2O, O3, HCN, H2S, O2 | ^ | ^ | ?|^ | ^ | ^ | ^ | ^ | ^ | High resolution. |
32+
| Winterfell | 48 | H2O, H2, CO2, CO, CH4, N2, NH3, SO2, N2O, O3, HCN, H2S, O2 | ^ | ^ | ?|^ | ^ | ^ | ^ | ^ | ^ | Medium resolution. |
33+
| Winterfell | 16 | H2O, H2, CO2, CO, CH4, N2, NH3, SO2, N2O, O3, HCN, H2S, O2 | ^ | ^ | ?|^ | ^ | ^ | ^ | ^ | ^ | Low-resolution. |
34+
| Dragonstone| 4096 | H2O, H2, CO2, CO, CH4, N2, NH3, SO2, N2O, O3, HCN, H2S | H2O-H2O, H2-CH4, H2-H2, H2-N2, N2-N2, N2-H2O, CO2-CO2, CO2-H2, CO2-CH4 | CO2, H2O, H2S, N2, N2O, NH3, O3, SO2 | ?|DACE, MPI| TRUE | 2407.2 | 2026-01-12 | Linux Intel | Bruna Fena | Same as Lighthouse but no O2 included. Very high-resolution. |
35+
| Dragonstone | 256 | H2O, H2, CO2, CO, CH4, N2, NH3, SO2, N2O, O3, HCN, H2S | ^ | ^ | ?|^ | ^ | ^ | ^ | ^ | ^ | High resolution. |
36+
| Dragonstone | 48 | H2O, H2, CO2, CO, CH4, N2, NH3, SO2, N2O, O3, HCN, H2S | ^ | ^ | ?|^ | ^ | ^ | ^ | ^ | ^ | Medium resolution. |
37+
| Dragonstone | 16 | H2O, H2, CO2, CO, CH4, N2, NH3, SO2, N2O, O3, HCN, H2S | ^ | ^ | ?|^ | ^ | ^ | ^ | ^ | ^ | Low-resolution. |
38+
| Sunspear | 4096 | H2O, H2, CO2, CO, CH4, N2, NH3, SO2, N2O, O3, HCN, H2S, O2 | H2O-H2O, H2-CH4, H2-H2, H2-N2, N2-N2, N2-H2O, CO2-CO2, CO2-H2, CO2-CH4 | CO2, SO2, H2S | ?|DACE, MPI| TRUE | 2407.2 | 2026-01-12 | Linux Intel | Bruna Fena | To simulate Ranjan and Sasselov (2016), only CO2, SO2 and H2S have UV values. Very high-resolution. |
39+
| Sunspear | 256 | H2O, H2, CO2, CO, CH4, N2, NH3, SO2, N2O, O3, HCN, H2S, O2 | ^ | ^ | ?|^ | ^ | ^ | ^ | ^ | ^ | High resolution. |
40+
| Sunspear | 48 | H2O, H2, CO2, CO, CH4, N2, NH3, SO2, N2O, O3, HCN, H2S, O2 | ^ | ^ | ?|^ | ^ | ^ | ^ | ^ | ^ | Medium resolution. |
41+
| Sunspear | 16 | H2O, H2, CO2, CO, CH4, N2, NH3, SO2, N2O, O3, HCN, H2S, O2 | ^ | ^ | ?|^ | ^ | ^ | ^ | ^ | ^ | Low-resolution. |
42+
43+
44+
The files for the UV were taken from the MPI-Mainz UV/VIS Spectral Atlas:
45+
CO2: Archer et al. (2013); Cook et al. (1966); Kuo et al. (2004); Gallagher et al. (1988); Shaw et al. (1995); Shemansky (1972); Venot, O. et al. (2018).
46+
H2O: Gürtler et al. (1977); J.B. Burkholder; S.P. Sander; J. Abbatt; J.R. Barker; R.E. Huie; C.E. Kolb; M.J. Kurylo; V.L. Orkin and Wine (2015); Ranjan et al. (2020).
47+
H2S: Feng et al. (1999); Grosch et al. (2015); Wu and Chen (1998).
48+
N2: Souza and Srivastava (1994).
49+
N2O: Johnston and Graham (1974).
50+
NH3: Burton et al. (1993); Limão-Vieira et al. (2019).
51+
O3: Mason et al. (1996); Molina and Molina (1986); Serdyuchenko et al. (2014).
52+
SO2: Golomb et al. (1962); Olive (2015).

spectraltools/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ Step 1 is by far the slowest, so it is helpful to use pre-computed opacities. Th
1414

1515
These tools all operate by storing the spectral absorption cross-section (versus wavenumber) of an absorber (at a given temperature and pressure) in an `xsec` Python object. This is defined in `src/cross.py`. The various sources can be loaded into this object, and then written as a netCDF, plotted, or otherwise manipulated as required.
1616

17+
**Ultraviolet range**. It is possible to enable the option that takes into consideration the ultraviolet opacities of gases when the compiling the spectral files. To do this, set `UV=True` in the script `Tmake_spectralfile.py`. As with the other data, you will need to obtain these cross-sections and wavenumbers (same file) for each molecule before running the `Tmake_spectralfile.py` script. The data should be placed inside the folder `spectraltools/data/moleculesUV/`. It's required to have a resolution of 0.01 cm-1. Take care to ensure that your UV files end where DACE starts (if there is a gap between the two datasets, near-zero cross-section values can be used to pad the UV data).
18+
19+
**Plotting**. For every molecule, a plot is created with wavelength in the x-axis and cross-section in the y-axis. It can be changed by modifying the xaxis (`Tmake_spectralfile.py`).
20+
21+
**Existing Spectral Files**. Read `INFOSpectralFiles.md` for details and how to download and use existing spectral files. Contains: number of bands, absorbers and continua used and sources. Honeyside is the suggested file for magma world simulations (common absorbers and up-to-date DACE opacities). For synthetic observations, high-resolution files are recommended (4096 resolution).
22+
1723
### Content
1824

1925
| Tool | Description |

spectraltools/Tdownload_cia.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python3
1+
#!/usr/bin/env python3
22
# Download CIA databases from HITRAN website
33

44
import requests, os, glob
@@ -13,17 +13,17 @@ def main():
1313
"H2-H": "H2-H_2011.cia",
1414
"H2-He": "H2-He_2011.cia",
1515
"He-H": "He-H_2011.cia",
16-
"N2-H2": "N2-H2_2011.cia",
16+
"N2-H2": "N2-H2_2024.cia",
1717
"N2-He": "N2-He_2018.cia",
1818
"N2-N2": "N2-N2_2021.cia",
1919
"N2-H2O": "N2-H2O_2018.cia",
20-
"O2-CO2": "O2-CO2_2011.cia",
21-
"O2-N2": "O2-N2_2021.cia",
22-
"O2-O2": "O2-O2_2018b.cia",
23-
"CO2-CO2": "CO2-CO2_2018.cia",
24-
"CO2-H2": "CO2-H2_2018.cia",
20+
"O2-CO2": "O2-CO2_2024.cia",
21+
"O2-N2": "O2-N2_2024.cia",
22+
"O2-O2": "O2-O2_2024.cia",
23+
"CO2-CO2": "CO2-CO2_2024.cia",
24+
"CO2-H2": "CO2-H2_2024.cia",
2525
"CO2-He": "CO2-He_2018.cia",
26-
"CO2-CH4": "CO2-CH4_2018.cia",
26+
"CO2-CH4": "CO2-CH4_2024.cia",
2727
"CO2-Ar": "CO2-Ar_2021.cia",
2828
"CH4-He": "CH4-He_2018.cia"
2929
}
@@ -38,24 +38,24 @@ def main():
3838
for p in file_map.keys():
3939
print("Downloading %s database"%p)
4040

41-
url = "https://hitran.org/data/CIA/%s"%file_map[p]
41+
url = "https://hitran.org/data/CIA/main/%s"%file_map[p]
4242
out = os.path.join(utils.dirs["cia"] , "%s.cia"%p)
4343

4444
# Check server
4545
response = requests.get(url)
46-
46+
4747
# Download file if request is ok
4848
if response.status_code == 200:
4949
utils.rmsafe(out)
5050
with open(out, 'wb') as file:
5151
file.write(response.content)
5252
else:
5353
flag = 1
54-
print(" failed")
54+
print(" failed. Status:", response.status_code)
5555

5656
return flag
5757

58-
58+
5959

6060
if __name__ == "__main__":
6161
flag = main()

0 commit comments

Comments
 (0)