Using the Baum Ice Crystal Database with HR

[1]:
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
import sasktran as sk

SASKTRAN supports calculations using the Baum ice crystal database. The core of this functionality is contained within the BaumIceCrystal optical property. In principle including ice crystals is as simple as creating a climatology to go along with the optical property and adding it to the engine, however complications involving the radiative transfer of ice clouds usually means that the HR engine must be configured in a specific way to obtain accurate calculations.

The SpeciesBaumIceCloud species combines the BaumIceCrystal optical property with a climatology that creates a Gaussian shaped cloud with a specified size and optical thickness.

[2]:
baum_species = sk.SpeciesBaumIceCloud(particlesize_microns=20,
                                      cloud_top_m=16500,
                                      cloud_width_fwhm_m=500,
                                      vertical_optical_depth=0.01,
                                      vertical_optical_depth_wavel_nm=750)

Which creates a cloud species that consists of 20 micron sized particles, a cloud top altitude of 16.5 km, a full width at half maximum in altitude of 500 m, and has a vertical optical depth of 0.01 at 750 nm. Note that limb path lengths can be ~100 times that of vertical path lengths, so even a vertically thin cloud may appear thick in the limb geometry. Shown below is the calculated Gaussian number density.

[3]:
altitudes = np.arange(10000, 20000, 10)

cloud_dens = baum_species.climatology.get_parameter('icecloud', latitude=0, longitude=0, mjd=54372, altitudes=altitudes)

plt.plot(cloud_dens, altitudes)
plt.ylabel('Altitude [m]')
plt.xlabel('Number Density [/cm3]')
[3]:
Text(0.5, 0, 'Number Density [/cm3]')
../../_images/examples_hr_user_cloud_5_1.png

We can now set up the HR engine and add the species to it as we would any other species.

[4]:
tanalts_km = np.arange(10, 50, 1)

# First recreate our geometry and atmosphere classes
geometry = sk.VerticalImage()
geometry.from_sza_saa(sza=60, saa=60, lat=0, lon=0, tanalts_km=tanalts_km, mjd=54372, locallook=0,
                      satalt_km=600, refalt_km=20)

atmosphere = sk.Atmosphere()

atmosphere['ozone'] = sk.Species(sk.O3OSIRISRes(), sk.Labow())
atmosphere['air'] = sk.Species(sk.Rayleigh(), sk.MSIS90())
atmosphere['cloud'] = baum_species

# And now make the engine
engine = sk.EngineHR(geometry=geometry, atmosphere=atmosphere)

# Choose some wavelengths to do the calculation at
engine.wavelengths = [340, 800]

But before we run the calculation we should modify some settings in the engine to account for the cloud accurately.

Setting the model parameters

The default vertical resolution of SASKTRAN-HR is ~1000 m, however clouds typically have fine structures and the cloud included above is calculated at a 10 m resolution by default. We could set the grid spacing of HR to be 10 m, however this would result in a very slow calculation. It also is not necessary because the cloud is localized over a few km, we do not need 10 m resolution throughout the entire atmosphere. There are also several settings related to the adaptive integration of rays that should be used when including clouds. For convenience the configure_for_cloud method will set most of these things.

[5]:
engine.configure_for_cloud(cloud_altitudes=baum_species.altitude_grid, grid_spacing_m=1000)

rad = engine.calculate_radiance()
plt.plot(rad.T, tanalts_km)
plt.ylabel('Altitude [km]')
plt.xlabel('Radiance')
[5]:
Text(0.5, 0, 'Radiance')
../../_images/examples_hr_user_cloud_11_1.png