Rotational spectra

 1import pyarts
 2import numpy as np
 3
 4# Limit the frequency range of stored absorption lines
 5fmin = 0
 6fmax = 3e12
 7
 8# initialize ARTS
 9ws = pyarts.workspace.Workspace()
10
11# Download ARTS catalogs if they are not already present.
12pyarts.cat.download.retrieve()
13
14# We are setting up our absorption species to include hydrogen chloride,
15# chlorine monoxide, carbon monoxide, nitrous oxide, and ozone
16# To speed up calculations some, we limit ourself to absorption lines with less
17# than 3 THz as their central frequency
18# NOTE: Limiting the frequency range of absorption lines like this artificially
19# removes absorption from the wings of stronger absorption lines that lie
20# outside of the given freqeuncy range.  This migth affect the accuracy of the
21# total absorption that is computed
22ws.abs_speciesSet(
23    species=[f"HCl-*-{fmin}-{fmax}",
24             f"ClO-*-{fmin}-{fmax}",
25             f"CO-*-{fmin}-{fmax}",
26             f"N2O-*-{fmin}-{fmax}",
27             f"O3-*-{fmin}-{fmax}"])
28
29# Read the absorption lines.  These should be part of the arts-cata-data package
30ws.abs_lines_per_speciesReadSpeciesSplitCatalog(basename="lines/")
31
32# Use an automatic agenda
33ws.propmat_clearsky_agendaAuto()
34
35# Arts setup (No NLTE, no polarization, and standard isotopologue ratios)
36ws.nlte_do = 0
37ws.stokes_dim = 1
38ws.isotopologue_ratiosInitFromBuiltin()
39
40# Settings (Standard atmosphere midlatitude-summer)
41ws.Touch(ws.jacobian_quantities)
42ws.Touch(ws.select_abs_species)
43ws.Touch(ws.rtp_nlte)
44ws.rtp_mag = [10e-6, 20e-6, 40e-6]
45ws.rtp_los = [45, 45]
46ws.rtp_pressure = 110000
47ws.rtp_temperature = 2.942000e+02
48ws.f_grid = np.linspace(1e9, 3e12, 1000)
49ws.rtp_vmr = [1.000869e-09, 1.000869e-14,
50              2.850472e-06, 1.501303e-07, 3.019448e-08]
51
52# Check that the calculations are OK
53ws.lbl_checkedCalc()
54
55# Start the explorer
56ws.propmat_clearsky_agendaGUI()