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.

SMART-HALO interactive quicklook

Author(s) of this notebook:

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
import pangaeapy as pgp
import xarray as xr
import nest_asyncio
nest_asyncio.apply()
hv.extension('bokeh')
Loading...
Loading...
Loading...
Loading...
Loading...
ds = pgp.PanDataSet(956151, enable_cache=True)
filenames = ds.download(interactive=False, indices=[15], columns=['Binary'])
[INFO] Cache directory set to: E:\tmp\pangaeapy_cache
[INFO] To change the cache directory permanently, edit: C:\Users\Johannes\.config\pangaeapy\config.toml
Downloading files to E:\tmp\pangaeapy_cache
File HALO-AC3_HALO_SMART_spectral-irradiance-Fdw_20220411_RF17_v1.0.nc already exists, skipping.
ds = xr.open_dataset(filenames[0])
ds
Loading...
# 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()
Loading...
References
  1. 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