from pyhdf.SD import SD, SDC
import numpy as np
from matplotlib import pyplot as PLT
CALIPSO Ozone Number Density
Summary
Note
By: Cheyenne Land
Tested using Python 3.8.10
1. Setup
2. Open and read file
= 'CAL_LID_L1-Standard-V4-11.2021-04-01T00-29-13ZN.hdf'
data_file = SD(data_file, SDC.READ)
hdf = hdf.datasets() ds
3. Retrieve data
Ozone_number_density [# of single shot (333m) resn profiles in file (55725), met_data_altitude (33)]
= hdf.select('Ozone_Number_Density')
hdfdataobject = hdf.select('Latitude')
latitude = hdfdataobject.get()
data = np.transpose(data)
ozone_number_density = latitude.get()[:,0] lat
4. Create interval for altitude to plot on the y-axis.
Range is from -2 km - 40 km of 33 range bins. For more detail go to CALIPSO Data Products Catalog at https://www-calipso.larc.nasa.gov/products/CALIPSO_DPC_Rev4x93.pdf
= np.linspace(-2,40,33) met_data_altitudes
5. Generate plot
=(7.20,3.60))
PLT.figure(figsize= PLT.contourf(lat, met_data_altitudes, ozone_number_density,
im =PLT.get_cmap('jet'))
cmap'CAL_LID_L1-Standard-V4-11.2021-04-01T00-29-13ZN Ozone Number Density',
PLT.title(=8)
fontsize"Altitude (km)", fontsize = 8)
PLT.ylabel("Latitude (deg)", fontsize = 8)
PLT.xlabel(= PLT.colorbar(im , shrink=0.90)
cb 'Ozone Number Denisty m-³', fontsize=8) cb.set_label(
6. Save the figure in your current directory
# PLT.savefig("CAL_LID_L1-Standard-V4-11.2021-04-01T00-29-13ZN_Ozone_Number_Density.jpg",
# dpi=200)
# PLT.close()