Parsing A Single NEMESIS Core
Once a NEMESIS job has finished running, eleos will be invoked automatically to generate some summary plots. In order to create some custom plots we can use the eleos.results submodule. The eleos.results.NemesisResult class holds all the information about the retrieval and contains some useful plotting routines. For a full lsit of everything the eleos.results.NemesisResult contains, see the documentation page.
1import matplotlib.pyplot as plt
2from eleos import results
3
4# Load the retrieved core as a NemesisResult object
5res = results.NemesisResult("example_cores/core_1")
6
7# Get some information about the run
8res.print_summary()
9
10# Create two plots
11fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12,5))
12
13# Plot the retrieved spectrum and aerosol optical thickness as a function of pressure
14res.plot_spectrum(ax=ax1)
15res.plot_aerosol_profiles(ax=ax2)
16
17# Save the figure
18fig.tight_layout()
19fig.savefig("example.png", dpi=500)