pyradtran.era5.cloud_profiles

Contents

pyradtran.era5.cloud_profiles#

pyradtran.era5.cloud_profiles(profile: Dataset, reff_water_um: float = 10.0, reff_ice_um: float = 20.0, threshold_g_m3: float = 0.0001) Tuple[dict | None, dict | None][source]#

Build wc_file / ic_file profile dicts from an ERA5 column.

Converts clwc / ciwc (kg/kg) to g m⁻³ using the ideal-gas air density, places layer boundaries midway between model levels, and writes the values with libRadtran’s 1D cloud-file semantics: the value at altitude z fills the layer above z, and the top row closes the grid with zero content.

Parameters:
  • profile (xarray.Dataset) – Single column, canonical names, pressure_level in hPa. Needs t plus at least one of clwc / ciwc.

  • reff_water_um (float) – Effective radii to assign (ERA5 has none).

  • reff_ice_um (float) – Effective radii to assign (ERA5 has none).

  • threshold_g_m3 (float, default 1e-4) – Layers below this water content count as cloud-free.

Returns:

(wc, ic) – Each a {"z": [...], "lwc"/"iwc": [...], "reff": [...]} mapping ready for a dict-valued wc_file / ic_file parameter, or None when that phase has no cloud.

Return type:

tuple of dict or None