Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Tutorial: simulate one column

This tutorial takes one WACCM column through the full pipeline: from model profiles, to the aerosol the simulator sees, to simulated ALI measurements, to the L2 retrieval, which is then compared with the model’s own aerosol.

It uses the example column bundled with cesm-hawc, so it needs no CESM output or orbit files, only the [sim] tier, installed as described in Installation.

The first run builds and caches several Mie scattering databases, which takes a few minutes. The L2 retrieval then takes a few more.

1. Load the example column

The example file holds one WACCM column, already interpolated onto a 0–65 km grid every 1 km: temperature, pressure, trace gases, and the number and median radius of the MAM4 accumulation (a1) and coarse (a3) sulfate modes. It has the same layout as the files cesm-hawc save-inputs writes.

To use your own model output instead, set WACCM_FILE in the next cell to a CAM history file. The column nearest LAT, LON is extracted, saved to example_column.nc in the current directory with the name of the source file recorded, and used for the rest of the tutorial. Leave WACCM_FILE as None to use the bundled example.

Saved example_column.nc  (27 KB)
Loading...

2. Look at the sulfate aerosol

Each mode is described by its number concentration and lognormal median radius at every altitude.

<Figure size 900x500 with 2 Axes>

3. Build the simulator’s atmosphere

build_waccm_constituents converts the profiles into sasktran2 constituents: WACCM ozone and NO₂, and one aerosol constituent per sulfate mode, each with a Mie database matched to that mode’s width. With return_extinction=True it also returns the resulting extinction, the “truth” the retrieval will be compared against.

['aerosol_accum', 'aerosol_coarse', 'no2', 'o3']
<Figure size 500x500 with 1 Axes>

4. Simulate the ALI observation and retrieval

The simulator needs the viewing geometry: here a fixed tangent point (the column’s location) and fixed solar angles. The noise model is seeded so this notebook gives the same result every time it is run.

The retrieval prints its progress; we capture it to check that it converged.

{'converged': True, 'termination_reason': 'ftol', 'n_function_evaluations': 45}

5. The simulated measurements (L1b)

ALI measures limb radiance and its degree of linear polarization (DoLP) at each tangent altitude. l1b_image_to_dataset collects them, with their noise, into one dataset.

<Figure size 900x500 with 2 Axes>

6. Compare the retrieval with the model truth

The L2 retrieval estimates aerosol extinction at 745 nm and a single median radius at each altitude. Unlike the model, which has two sulfate modes, the retrieval assumes one lognormal mode with a width of 1.6.

<Figure size 900x500 with 2 Axes>

Next steps

  • Run the same steps on your own model output from the command line with cesm-hawc run --mode fixed; see the Quickstart.

  • Sample along a real HAWC orbit with --mode orbit; see Run modes.