1import pyarts
2import numpy as np
3
4# initialize ARTS
5ws = pyarts.workspace.Workspace()
6
7# Download ARTS catalogs if they are not already present.
8pyarts.cat.download.retrieve()
9
10# These are the same species as for the rotational spectra (see
11# ../rotational-spectra/start_gui.py) but we also add water, carbon dioxide
12# and methane since these are sometimes more interesting in the infrared.
13# Gone are also the frequency limits, we will later use another speed-up
14# technique to achieve faster copmpute times
15ws.abs_speciesSet(
16 species=["HCl",
17 "ClO",
18 "CO",
19 "N2O",
20 "O3",
21 "H2O",
22 "CO2",
23 "CH4"])
24
25# Read the absorption lines. These should be part of the arts-cata-data package
26ws.abs_lines_per_speciesReadSpeciesSplitCatalog(basename="lines/")
27
28# Speed-up technique of using a cutoff frequency
29# This will apply a cutoff of each absorption line at a frequency of 750 GHz
30# away from the pressure shifted line center. The value at the cutoff frequency
31# is subsequently used to remove the value from within the line center.
32# the latter modification is in line with how water continua models deal with
33# some of its unknown or just difficult to model absorption features, however
34# we will not consider this absorption in the current example
35# NOTE: Using a cutoff frequency across all species like this degrades the
36# quality of the absorption calculations, which can be seen by changing the
37# Y-scale of the absorption to logarithmic
38ws.abs_lines_per_speciesCutoff(option="ByLine", value=750e9)
39
40# Use an automatic agenda
41ws.propmat_clearsky_agendaAuto()
42
43# Arts setup (No NLTE, no polarization, and standard isotopologue ratios)
44ws.nlte_do = 0
45ws.stokes_dim = 1
46ws.isotopologue_ratiosInitFromBuiltin()
47
48# Settings (Standard atmosphere midlatitude-summer)
49ws.Touch(ws.jacobian_quantities)
50ws.Touch(ws.select_abs_species)
51ws.Touch(ws.rtp_nlte)
52ws.rtp_mag = [10e-6, 20e-6, 40e-6]
53ws.rtp_los = [45, 45]
54ws.rtp_pressure = 110000
55ws.rtp_temperature = 2.942000e+02
56ws.f_grid = pyarts.arts.convert.kaycm2freq(np.linspace(300, 3000, 1000))
57ws.rtp_vmr = [1.000869e-09, 1.000869e-14, 2.850472e-06, 1.501303e-07,
58 3.019448e-08, 1.877431e-02, 3.302947e-04, 1.701397e-06]
59
60# Check that the calculations are OK
61ws.lbl_checkedCalc()
62
63# Start the explorer
64ws.propmat_clearsky_agendaGUI()