pyradtran.interface.execute_simulation_batch#
- pyradtran.interface.execute_simulation_batch(config: SimulationConfig, input_ds: Dataset, params: Dict[str, Any] | None = None, 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, era5_clouds: bool | Dict[str, Any] = False, parameter_overrides: Dict[str, Any] | None = 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, return_outcomes: bool = False) List[ParsedOutput | None][source]#
Run
uvspecin 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).
params (dict, optional) – Unified parameter mapping: registry keys / raw uvspec keywords / dotted config paths to literal values or
Varper-point dataset references. Preferred over the deprecated*_varandparameter_overrideskwargs below.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) – Deprecated — use
params={"albedo": Var(...)}.surface_temperature_var (str, optional) – Deprecated — use
params={"sur_temperature": Var(...)}.surface_type_var (str, optional) – Deprecated — use
params={"brdf_rpv_type": Var(...)}.altitude_var (str, optional) – Deprecated — use
params={"zout": Var(...)}.era5_atmosphere (xarray.Dataset, optional) – ERA5 dataset for atmosphere file generation. Accepts raw CDS or ARCO-ERA5 naming — it is normalised via
pyradtran.era5.normalize_era5()before use. When an ozone profile (o3) is present it is written into the radiosonde file and the configozone_duscaling is skipped.era5_clouds (bool or dict, default
False) – When truthy, additionally derive per-pointwc_file/ic_filecloud profiles from the ERA5clwc/ciwcfields. A dict is forwarded as keyword arguments topyradtran.era5.cloud_profiles()(e.g.{"reff_water_um": 8.0}). Explicit cloud parameters (paramsor thecloud_*_varkwargs) take precedence for points where both are present. Requires era5_atmosphere.parameter_overrides (dict, optional) – Deprecated — use
paramsinstead.progress_callback (callable, optional) –
callback(current, total)invoked after each simulation.show_progress (bool, default
True) – Show atqdmprogress bar. Set toFalseto suppress it (e.g. when running inside a rendered Jupyter notebook).return_outcomes (bool, default
False) – WhenTrue, return the full list ofPointOutcome(status codes + failure detail) instead of bare parsed outputs.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.
Notes
When
execution.max_workersis 1, points run serially in-process (no process pool);Noneor >1 uses a process pool.A
failures_<YYYYmmdd_HHMMSS>.logfile is written toconfig.paths.working_dirwhenever at least one point fails, with one block per failure (point id, status, and detail/stderr).- Returns:
One entry per flattened input point. None for failed runs. When return_outcomes is
True, a list ofPointOutcomeinstead.- Return type:
list of ParsedOutput or None
- Raises:
PyRadtranError – If all simulations fail.