pyradtran.interface.execute_simulation_batch

pyradtran.interface.execute_simulation_batch#

pyradtran.interface.execute_simulation_batch(config: SimulationConfig, input_ds: Dataset, time_var: str = 'time', lat_var: str = 'latitude', lon_var: str = 'longitude', albedo_var: str | None = None, surface_temperature_var: str | None = None, surface_type_var: str | None = None, altitude_var: str | None = None, era5_atmosphere: Dataset | None = None, parameter_overrides: Dict[str, Any] = None, progress_callback: callable | None = None, cloud_wc_var: str | None = None, cloud_ic_var: str | None = None, cloud_reff_var: str | None = None, cloud_ic_reff_var: str | None = None, cloud_top_var: str | None = None, cloud_bottom_var: str | None = None, show_progress: bool = True) List[ParsedOutput | None][source]#

Run uvspec in parallel for every point in input_ds.

The input dataset is flattened (stacked) over all its dimensions so that each combination of coordinates becomes one simulation. Results are returned in the same flat order, ready for convert_batch().

Parameters:
  • config (SimulationConfig) – Merged configuration.

  • input_ds (xarray.Dataset) – Input coordinates (arbitrary number of dimensions).

  • time_var (str) – Names of core coordinate variables.

  • lat_var (str) – Names of core coordinate variables.

  • lon_var (str) – Names of core coordinate variables.

  • albedo_var (str, optional) – Dataset variable to use as per-point albedo.

  • surface_temperature_var (str, optional) – Per-point surface temperature variable.

  • surface_type_var (str, optional) – Per-point IGBP surface-type variable (1–20).

  • altitude_var (str, optional) – Per-point scalar altitude variable.

  • era5_atmosphere (xarray.Dataset, optional) – ERA5 dataset for atmosphere file generation.

  • parameter_overrides (dict, optional) – Extra key: value pairs forwarded to uvspec.

  • progress_callback (callable, optional) – callback(current, total) invoked after each simulation.

  • show_progress (bool, default True) – Show a tqdm progress bar. Set to False to suppress it (e.g. when running inside a rendered Jupyter notebook).

  • cloud_wc_var (str, optional) – Dataset variables for liquid / ice water content.

  • cloud_ic_var (str, optional) – Dataset variables for liquid / ice water content.

  • cloud_reff_var (str, optional) – Effective-radius variables.

  • cloud_ic_reff_var (str, optional) – Effective-radius variables.

  • cloud_top_var (str, optional) – Cloud-boundary variables (km). Required when cloud_wc_var or cloud_ic_var is set.

  • cloud_bottom_var (str, optional) – Cloud-boundary variables (km). Required when cloud_wc_var or cloud_ic_var is set.

Returns:

One entry per flattened input point. None for failed runs.

Return type:

list of ParsedOutput or None

Raises:

PyRadtranError – If all simulations fail.