pyradtran.clouds#
Cloud utilities for pyRadtran.
This module provides tools to create libRadtran-compatible cloud input files from various data sources. The typical workflow is:
Build a list of
CloudLayerobjects — either from simple parameters (CloudGenerator.from_simple_parameters()) or from an ERA5 dataset (CloudGenerator.from_era5_dataset()).Write the layers to a
.datfile withCloudFileWriter.Pass the file path to
ds.pyradtran.run()viaparameter_overrides={'wc_file 1D': 'my_cloud.dat'}.
Examples
Create a simple water cloud and write it to a file:
>>> from pyradtran.clouds import CloudGenerator, CloudFileWriter
>>> from pathlib import Path
>>> layers = CloudGenerator.from_simple_parameters(
... z_base_km=1.0, z_top_km=2.0, lwc_g_m3=0.3, r_eff_um=10.0, n_layers=5
... )
>>> CloudFileWriter.write_water_cloud_file(layers, Path("work/wc.dat"))
See also
pyradtran.config.CloudParametersDeclarative cloud settings in YAML configs.
|
One-step cloud-file generation from an ERA5 dataset. |
Persist |
|
Factory for |
|
|
A single cloud layer with vertical extent and microphysical properties. |