pyradtran.era5

pyradtran.era5#

ERA5 integration: normalisation, atmosphere files, and cloud profiles.

ERA5 data arrives under several naming conventions — the CDS NetCDF short names (t, q, o3, clwc, coordinate pressure_level) and the ARCO-ERA5 Zarr long names (temperature, specific_humidity, geopotential, coordinate level). normalize_era5() maps any of them onto one canonical form so the rest of pyRadtran never has to care which flavour the user opened.

From a normalised dataset this module can produce, per (time, lat, lon) point:

  • a libRadtran radiosonde atmosphere file — pressure, temperature, humidity and (when available) an ozone profile (write_atmosphere_file()), and

  • dict-valued wc_file / ic_file cloud profiles from the ERA5 clwc / ciwc fields (cloud_profiles()).

recommend_atmosphere() suggests the AFGL background profile (atmosphere_file) that matches a latitude and date. The background profile still matters when a radiosonde is used: libRadtran takes every level above the radiosonde top — and every gas the radiosonde does not provide — from the atmosphere_file.

See also

pyradtran.io.ERA5AtmosphereGenerator

Backwards-compatible wrapper.

cloud_profiles(profile[, reff_water_um, ...])

Build wc_file / ic_file profile dicts from an ERA5 column.

era5_atmosphere_file(era5_ds, latitude, ...)

One-step: normalise, select a point, write the atmosphere file.

normalize_era5(ds)

Return ds with ERA5 variables/coordinates on canonical names.

recommend_atmosphere(latitude, time)

Suggest the AFGL atmosphere_file shortname for a location/date.

select_profile(ds[, latitude, longitude, time])

Select a single vertical profile from a (normalised) ERA5 dataset.

write_atmosphere_file(profile, output_filepath)

Write a profile as a libRadtran radiosonde atmosphere file.