emc2.simulator.subcolumn.set_stratiform_sub_col_frac¶
- emc2.simulator.subcolumn.set_stratiform_sub_col_frac(model, N_columns=None, use_rad_logic=True, parallel=True, chunk=None, q_trunc_thresh=1e-18, seed=None)[source]¶
Sets the hydrometeor fraction due to stratiform cloud particles in each subcolumn.
- Parameters:
- model: :py:func: `emc2.core.Model`
The model we are generating the subcolumns of stratiform fraction for.
- use_rad_logic: bool
When True using the cloud fraction utilized in a model radiative scheme. Otherwise, using the microphysics scheme (note that these schemes do not necessarily use exactly the same cloud fraction logic).
- N_columns: int or None
The number of subcolumns to generate. Specifying this will set the number of subcolumns in the model parameter when the first subcolumns are generated. Therefore, after those are generated this must either be equal to None or the number of subcolumns in the model. Setting this to None will use the number of subcolumns in the model parameter.
- parallel: bool or str
If True or ‘dask’, use Dask bag for parallelism (supports multi-node HPC via a distributed Dask scheduler). If ‘processes’, use ProcessPoolExecutor (faster on single-node workstations). If False, run serially.
- chunk: int or None
When parallel=’processes’, the chunksize hint for ProcessPoolExecutor.map (how many time steps are batched per worker). None auto-sizes to max(1, t_dim // cpu_count()). Ignored when parallel=True or ‘dask’.
- q_trunc_thresh: float
truncation value for q. Smaller values will be treated as 0.
- seed: int or None
Random seed for reproducibility. None (default) gives non-reproducible results with fully independent draws — best for production science runs. With an integer seed and parallel=False, a single global seed is set before the timestep loop (serial-only, statistically independent timesteps). With an integer seed and parallel=True/’processes’, each worker seeds with seed+tt (parallel-safe, with a weak cross-timestep correlation). See the seeding note above _randperm for full details.
- Returns:
- model: :py:func: emc2.core.Model
The Model object with the stratiform hydrometeor fraction in each subcolumn added.