Author(s) of this notebook:
Johannes Röttenbacher, Institute for Environmental Physics, University Bremen, jroettenbacher@iup
.physik .uni -bremen .de
This notebook is licensed under the Creative Commons Attribution 4.0 International
Dataset description¶
Title: Aircraft measurements of spectral downward solar irradiance over Arctic sea ice and ocean during the HALO-(AC)³ campaign in spring 2022
Authors: Röttenbacher, Johannes; Ehrlich, André; Schäfer, Michael; Kirbus, Benjamin; Luebke, Anna E; Wendisch, Manfred
Year: 2023
Institutes: Leipzig Institute for Meteorology, Deutsches Zentrum für Luft- und Raumfahrt (DLR)
DOI: Röttenbacher et al. (2023)
License: Creative Commons Attribution 4.0 International
Contents of this notebook¶
Read in calibrated SMART data, plot the different processing stages of the downward irradiance in an interactive plot.
import holoviews as hv
import panel as pn
from pangaeapy import PanDataSet
import xarray as xr
hv.extension('bokeh')ds = PanDataSet(956151, enable_cache=True, cachedir='./data')
filenames = ds.download(indices=[15], columns=['Binary'])HALO-AC3_HALO_SMART_spectral-irradiance-Fdw_20220411_RF17_v1.0.nc is being retrieved from tape. Retrying in 30 seconds...
HALO-AC3_HALO_SMART_spectral-irradiance-Fdw_20220411_RF17_v1.0.nc is being retrieved from tape. Retrying in 60 seconds...
HALO-AC3_HALO_SMART_spectral-irradiance-Fdw_20220411_RF17_v1.0.nc is being retrieved from tape. Retrying in 90 seconds...
Downloaded HALO-AC3_HALO_SMART_spectral-irradiance-Fdw_20220411_RF17_v1.0.nc successfully!
ds = xr.open_dataset(filenames[0])
ds# Variable name mapping
names = dict(Fdw="Downward irradiance",
Fdw_cor="Corrected direct downward irradiance",
Fdw_cor_diff="Corrected diffuse downward irradiance")
# Select only the Fdw variables
fdw_vars = [var for var in ds.data_vars if "Fdw" in var]
# Create widgets for variable selection and wavelength slider
variables_widget = pn.widgets.MultiSelect(name="Select irradiance variable",
options=fdw_vars, size=3)
wavelength_slider = pn.widgets.DiscreteSlider(name="Wavelength",
options=list(ds['wavelength'].to_numpy()),
value=550)
# Function to filter and plot data based on widget values
def plot_fdw(selected_vars, wavelength):
if not selected_vars:
return hv.Text(0.5, 0.5, "No variables selected").opts(width=600, height=400)
curves = []
for var in selected_vars:
data = ds[var].sel(wavelength=wavelength).to_dataframe().reset_index()
curve = hv.Curve(data, kdims=["time"], vdims=[var], label=names[var])
curves.append(curve)
return hv.Overlay(curves).opts(legend_position="right",
width=1200,
show_grid=True)
# Bind the function to the widgets
interactive_plot = pn.bind(plot_fdw, selected_vars=variables_widget, wavelength=wavelength_slider)
# Create the layout
dashboard = pn.Column(
pn.WidgetBox(variables_widget, wavelength_slider),
interactive_plot
)
dashboard.servable()- Röttenbacher, J., Ehrlich, A., Schäfer, M., Kirbus, B., Luebke, A. E., & Wendisch, M. (2023). Aircraft measurements of spectral downward solar irradiance over Arctic sea ice and ocean during the HALO-(AC)3 campaign in spring 2022. PANGAEA. 10.1594/PANGAEA.956151