This repository contains the Python workflow used to initialise, run and analyse iSKYLAB/AIDAd chamber experiments with the Bin Microphysics Model (BMM).
The maintained entry point is:
scripts/dataAnalysis_new.py
The driver can:
- read chamber meteorology, CPC, WELAS/OPC and initial aerosol PSD data;
- smooth measured chamber pressure and temperature forcing;
- construct aerosol initial conditions from fitted measured PSDs;
- generate experiment-specific BMM namelists by variable name;
- run a compiled BMM executable;
- run one experiment or a configured experiment group;
- override important chamber sensitivities from the command line;
- compare BMM output with WELAS/OPC observations;
- construct instrument-like number, liquid-water and size diagnostics;
- compare warm and mixed-phase size distributions on a common grid;
- diagnose wall, boundary-layer, fan and sedimentation/fallout processes;
- configure dust FHH activation and explicit ice-active-site-density (INAS/IASD) temperature classes;
- generate variable-length
inp_temparrays automatically.
The repository does not contain the BMM source tree or the iSKYLAB data.
The main files are:
scripts/
dataAnalysis_new.py main BMM driver and analysis
iskylab_config.py user-facing model/analysis configuration
experiment_metadata.py experiment groups and timing metadata
batchRuns.sh example experiment-by-experiment command lines
namelist_utils.py robust BMM namelist editing helpers
readMeteoCPC.py chamber meteorology/CPC reader
readOPC_Merged.py WELAS/OPC reader
readPNSD_Mrg_new.py initial aerosol PSD reader/fitter
readModel.py BMM NetCDF reader
svp.py saturation-vapour-pressure utilities
dataAnalysis.py legacy wrapper
adiabaticAnalysis.py additional/legacy diagnostics
mixingAnalysis.py additional/legacy diagnostics
overlayModelPlot.py additional/legacy plotting
requirements.txt
README.md
The configured data location is:
iSKYLAB-data/
at the repository root unless changed in scripts/iskylab_config.py.
The BMM namelist template is taken from the external BMM tree. The current configuration expects a template such as:
$BMM_MODEL_FOLDER/python/aida_analysis/iSKYLAB-namelists/namelist-aida-exp005.in
The template is only a schema/base configuration. Values are replaced by
variable name, and the complete &chamber_spec block is regenerated for each
experiment.
Install the Python dependencies with:
python3 -m pip install -r requirements.txtThe current workflow uses NumPy, SciPy, Matplotlib and NetCDF support.
The BMM itself is a separate repository:
https://github.com/UoM-maul1609/bin-microphysics-model
Compile BMM using its own build system first. Then point this repository at the compiled BMM tree, preferably with:
export BMM_MODEL_FOLDER=/path/to/bin-microphysics-modelor edit BMM_MODEL_FOLDER in scripts/iskylab_config.py.
The driver expects:
$BMM_MODEL_FOLDER/main.exe
to exist.
Run commands from scripts/.
A single experiment:
cd scripts
python3 dataAnalysis_new.py --experiment Exp006The short numeric form is also accepted:
python3 dataAnalysis_new.py --experiment 6A mixed-phase/dust experiment:
python3 dataAnalysis_new.py --experiment Exp021A configured experiment group:
python3 dataAnalysis_new.py --group 6Single-experiment mode reads only the requested experiment. Missing data from unrelated experiments therefore do not prevent a single experiment from running.
Use:
python3 dataAnalysis_new.py --helpfor the current list.
--experiment ExpNNN
--group N
These are mutually exclusive.
--winit VALUE
--no-run
--no-analysis
--no-plot
--no-run analyses an existing single-experiment output.
--no-analysis generates/runs the model but skips the observational comparison.
--no-plot suppresses display of plots; configured saved diagnostics are still
written.
--cloud-formation-time-min X
--saturation-time-min X
These are aliases. They are valid for a single experiment when:
INITIAL_RH_METHOD = "cloud_onset"The value changes the model saturation target used to infer initial vapour. It does not move the raw WELAS observations or the curated observational cloud window.
Example:
python3 dataAnalysis_new.py \
--experiment Exp006 \
--cloud-formation-time-min 12--bl-tau-s X
--bl-temp-offset-k X
--bl-evap-size-exp X
--bl-inhom-size-exp X deprecated alias of --bl-evap-size-exp
--bl-wall-water-mode {0,1,2}
Example:
python3 dataAnalysis_new.py \
--experiment Exp006 \
--cloud-formation-time-min 12 \
--bl-tau-s 10 \
--bl-evap-size-exp 2 \
--bl-wall-water-mode 0 \
--bl-temp-offset-k -0.09--wall-vapour-transfer-velocity-ms X
--wall-liquid-water-init-kg X
--wall-ice-water-init-kg X
--wall-water-efficiency X
The transfer velocity is used by wall-water mode 2.
--sce-bins N
--scebins N
This creates a temporary copy of the BMM SCE namelist, changes only
n_binsc, and points the generated main BMM namelist at that temporary file.
The repository/BMM copy of sce/namelist.in is not modified.
Example:
python3 dataAnalysis_new.py \
--experiment Exp006 \
--sce-bins 80--shift-cloud-measurements
The analysis first diagnoses the liquid-water lag between BMM and WELAS. With this option, the complete WELAS time coordinate is shifted consistently, including:
- liquid water;
- number;
- effective diameter;
- relative dispersion;
- ice number;
- the observed PSD.
Without this option the lag remains diagnostic only.
Interactive plotting is off by default.
Use:
--plt-ion
to call plt.ion() and keep Matplotlib in interactive mode.
Without --plt-ion, the driver uses non-interactive plotting and closes figures
after display, which is useful when calling multiple experiments from a shell
script.
For fully unattended runs, --no-plot is still the simplest option.
scripts/batchRuns.sh contains working experiment-by-experiment command lines
for sensitivity studies.
A typical warm-cloud command is:
python3 dataAnalysis_new.py \
--experiment Exp006 \
--cloud-formation-time-min 12 \
--bl-tau-s 10 \
--bl-evap-size-exp 2 \
--bl-wall-water-mode 0 \
--bl-temp-offset-k -0.09A mixed-phase example is:
python3 dataAnalysis_new.py \
--experiment Exp021 \
--cloud-formation-time-min 12.5 \
--bl-tau-s 10 \
--bl-evap-size-exp 2 \
--bl-wall-water-mode 0 \
--bl-temp-offset-k 0.4The values in batchRuns.sh are experiment sensitivities/examples, not a
replacement for documenting the exact configuration used in a scientific
analysis. For reproducible work, retain the generated namelist.
The default output root is:
/tmp/$USER/
Single-experiment files are written under:
/tmp/$USER/single_comparison/
Typical files are:
output-Exp006.nc
namelist-Exp006.in
comparison-Exp006.png
psd-Exp006.png
model-full-psd-Exp006.png
wall-vapour-Exp006.png
metrics-Exp006.csv
The wall-vapour figure is only produced when the corresponding BMM diagnostics are available.
Forcing-smoothing diagnostics are written under:
/tmp/$USER/forcing_smoothing/
including experiment plots and:
forcing-smoothing-method-comparison.csv
Generated namelists are retained when:
SAVE_GENERATED_NAMELISTS = TrueNormal sensitivity studies should be configured in:
scripts/iskylab_config.py
rather than by editing the driver.
The main configuration groups are:
- BMM paths and output paths;
- measured chamber forcing;
- forcing smoothing/despiking;
- qtot diagnostics/forcing;
- initial humidity;
- model saturation timing;
- aerosol normalisation;
- chamber BL processing;
- wall-vapour exchange;
- fan-associated particle loss;
- non-gravitational wall deposition;
- sedimentation/fallout;
- chamber geometry;
- WELAS/BMM comparison definitions;
- PSD diagnostic grids;
- dust FHH and INAS/IASD settings.
Pressure, gas temperature and total water are independent model controls:
FORCE_PRESSURE = True
FORCE_TEMPERATURE = True
FORCE_QTOT = FalseThe complete measured time series is written to the generated &chamber_spec
block using its actual length.
The driver writes:
time_chamber(...)
press_chamber(...)
temp_chamber(...)and, when enabled:
qtot_chamber(...)
wall_temp_chamber(...)There is no hard-coded historical chamber-data length.
Dew point is converted to vapour mixing ratio, not treated as total water.
The recommended diagnostic mode is:
QTOT_DATA_MODE = "vapour_plus_opc"which constructs:
qtot = qv(dew point) + ql(OPC)
after interpolation onto the meteorological time grid.
The alternative is:
QTOT_DATA_MODE = "dewpoint_only"WRITE_QTOT_DATA=True can write the diagnostic without forcing the model.
Keeping FORCE_QTOT=False is useful when explicit chamber water sinks/sources
are active, because imposing observed qtot at the same time can double-count
water exchange.
Measured chamber pressure and temperature contain short-period instrument noise. The driver can despike and smooth these series before exporting them to BMM.
Current controls include:
SMOOTH_CHAMBER_FORCING = True
CHAMBER_SMOOTH_METHOD = "butterworth"
CHAMBER_DESPIKE = True
CHAMBER_DESPIKE_WINDOW = 10.0
CHAMBER_DESPIKE_NSIGMA = 2.0
CHAMBER_SMOOTH_TEMP_WINDOW = 30.0
CHAMBER_SMOOTH_WALL_TEMP_WINDOW = 45.0
CHAMBER_SMOOTH_PRESSURE_WINDOW = 15.0
CHAMBER_SMOOTH_POLYORDER = 2
CHAMBER_BUTTERWORTH_ORDER = 2Supported smoothing methods are:
raw
savgol
butterworth
The pre-filter despiker uses a Hampel-style local median/MAD criterion. It is designed to replace isolated outliers rather than smooth genuine chamber structure.
The Savitzky-Golay option uses a physical-time window and zero-lag filtering. For sufficiently irregular sampling the data are temporarily interpolated onto a median-dt grid.
The Butterworth option uses a zero-phase sosfiltfilt low-pass filter. The
configured timescale is interpreted as the cutoff period.
By default:
CHAMBER_SMOOTH_WALL_AS_DELTA_T = Trueand wall temperature is reconstructed as:
Twall,filtered = Tgas,filtered + filtered(Twall - Tgas)
This avoids independently filtering gas and wall temperature in a way that artificially distorts the wall-minus-gas temperature difference.
Raw, filled, despiked, Savitzky-Golay and Butterworth candidates are retained for diagnostics.
To generate forcing diagnostics without running BMM:
python3 dataAnalysis_new.py --no-run --no-analysis --no-plotprovided the requested output/data path requirements are satisfied.
Two initial-humidity methods are available:
INITIAL_RH_METHOD = "cloud_onset"or:
INITIAL_RH_METHOD = "dewpoint"The initial vapour mixing ratio is chosen so that, in the absence of pre-cloud water exchange, the measured pressure/temperature trajectory would reach liquid saturation at the specified model target time.
Persistent controls are:
MODEL_SATURATION_TIME_SHIFT_S = 0.0
MODEL_SATURATION_TIME_OVERRIDES_S = {...}A single run can override the target with:
--cloud-formation-time-min XThe observational onset marker and cloud-comparison window remain separate.
The initial vapour mixing ratio is taken directly from the measured dew point
at t=0.
The initial aerosol PSD is derived from the measured/fitted PNSD and scaled to the CPC concentration.
Aerosol number can be normalised at:
AEROSOL_INIT_TIME = "t0"or:
AEROSOL_INIT_TIME = "cloud_onset"If fan, wall or fallout losses are represented before cloud formation, t0
avoids normalising to a later concentration and then applying the pre-cloud
loss a second time.
The generated namelist includes fitted modal:
number
dry diameter
log-width
component density
kappa
FHH coefficients
INP category
as applicable.
Aerosol diameters from the fitting workflow are converted from micrometres to metres exactly once when written to BMM.
The current interface separates:
- whether chamber BL processing is active;
- the thermodynamic state used for the processed air;
- the wall-water closure;
- how required liquid evaporation is represented in the PSD.
CHAMBER_BL_MIX = 1with:
0 = off
1 = on
CHAMBER_BL_MIX is not the homogeneous/inhomogeneous evaporation selector.
CHAMBER_BL_TAU = 10.0The BMM uses this as the chamber-scale BL processing/recirculation timescale.
For a timestep dt, the corresponding processed-air fraction is based on the
usual exponential relaxation form:
fmix = 1 - exp(-dt/tau)
The processed sensible temperature is based on:
T_sens =
T_gas
+ CHAMBER_BL_ALPHA_T * (T_wall - T_gas)
+ CHAMBER_BL_TEMP_OFFSET
Useful limits are:
alpha = 0, offset = 0 -> follows bulk gas temperature
alpha = 1, offset = 0 -> follows measured wall temperature
A small offset can be used as an unresolved chamber/BL thermal sensitivity.
The command-line override is:
--bl-temp-offset-k XThe way the thermodynamically required liquid evaporation is represented in the PSD is selected with:
CHAMBER_BL_EVAP_MODE = 2Current modes are:
1 = homogeneous evaporation
2 = inhomogeneous complete-particle evaporation
The thermodynamic liquid-water target is common to both modes. The difference is how that target is distributed across the particle population.
Particle number is retained while liquid mass/wet size decreases.
Selected wet particles completely evaporate their liquid water and return to aerosol/haze residuals; surviving wet particles retain their size.
Both modes use:
CHAMBER_BL_EVAP_SIZE_EXP = pwith the command-line override:
--bl-evap-size-exp pThe old:
--bl-inhom-size-expname is retained only as a deprecated alias.
Interpretation:
p = 0
homogeneous: equal fractional liquid-mass shrinkage
inhomogeneous: uniform complete-particle fraction
p = 2
homogeneous: common finite D^2-like decrement
inhomogeneous: inverse-D^2 lifetime weighting
p > 2
increasingly favours complete evaporation of smaller wet particles
in the inhomogeneous treatment
The generated BMM namelist supports:
chamber_bl_wall_water_mode = 0, 1 or 2
and the driver exposes:
--bl-wall-water-mode {0,1,2}Mode 0 retains the historical chamber saturation-adjustment closure used for reproducibility and chamber sensitivity studies.
It does not use the physical wall vapour-transfer velocity.
Therefore:
--wall-vapour-transfer-velocity-mshas no effect when --bl-wall-water-mode 0 is selected.
Mode 1 uses a prognostic finite wall-water reservoir and fractional relaxation toward wall equilibrium.
The main strength parameter is:
CHAMBER_WALL_WATER_EFFICIENCYThe wall cannot evaporate/sublimate more water than is stored in its prognostic liquid/frost reservoir.
Mode 2 uses the measured wall temperature and a vapour mass-transfer velocity:
CHAMBER_WALL_VAPOUR_TRANSFER_VELOCITYwith an area-mean flux based on vapour-pressure disequilibrium:
Jv = km * [e_eq(Twall) - e_air] / (Rv * Tgas)
In this mode wall-vapour exchange is independent of CHAMBER_BL_TAU.
Initial reservoir controls are:
CHAMBER_WALL_LIQUID_WATER_INIT_KG
CHAMBER_WALL_ICE_WATER_INIT_KGThe reservoir quantities are physical chamber masses in kg.
The optional chamber fan loss is a size-dependent first-order particle sink.
The configured functional form is:
kfan(D) = kmax / [1 + (D50/D)^p]
with an RPM-dependent reference size.
Controls are:
CHAMBER_FAN_LOSS
CHAMBER_FAN_LOSS_KMAX
CHAMBER_FAN_LOSS_D50_REF
CHAMBER_FAN_LOSS_EXP
CHAMBER_FAN_RPM
CHAMBER_FAN_RPM_REFThe same survival factor is applied to particle number and associated extensive particle moments.
This is separate from wall deposition and gravitational fallout.
The wall-loss switch is:
CHAMBER_WALL_LOSS = 1with the smooth-wall deposition treatment controlled by:
CHAMBER_WALL_USTAR
CHAMBER_DIAMETER
CHAMBER_HEIGHTThe current configuration uses:
diameter = 1.5 m
height = 2.15 m
The configured non-gravitational wall treatment represents side-wall/ceiling deposition separately from generic gravitational fallout.
Generic BMM sedimentation/fallout is controlled by:
FALLOUT_FLAG = True
RESIDENCE_DEPTH = CHAMBER_HEIGHTFor chamber runs, the updated BMM uses the chamber geometry to determine the
well-mixed floor-loss scale, with CHAMBER_HEIGHT corresponding to
V/A_floor for the cylindrical chamber.
Fan loss, non-gravitational wall loss and fallout are independent switches.
The configuration includes:
SYNTHETIC_UPDRAFT = FalseWhen enabled, synthetic-updraft mode disables measured chamber pressure and temperature forcing and chamber-specific BL/fan/wall processes, while leaving generic BMM controls such as fallout separately configurable.
The maintained workflow supports dust-containing AIDAd experiments, including
SDSA01 and ATD03 components configured in iskylab_config.py.
Dust FHH coefficients are selected by component:
DUST_FHH = {
"SDSA01": {"A": 2.25, "B": 1.20},
"ATD03": {"A": 0.27, "B": 0.79},
}and written to BMM through:
afhh_core1(...)
bfhh_core1(...)The Python driver supplies the component-specific parameters; the activation calculation remains in BMM.
Dust identity for explicit active-site calculations is passed through:
inp_category(...)using configuration such as:
DUST_INP_CATEGORY = {
"SDSA01": "sdsa01",
"ATD03": "atd03",
}The analytical n_s(T)/IASD expressions live in BMM, not in this repository.
For configured dust experiments the driver can enable ice and write:
ice_nucleation_mech(1:4)from:
DUST_ENABLE_ICE
DUST_ICE_NUCLEATION_MECHThe current configuration uses Koop + INAS for the maintained dust cases and does not enable DeMott for those components, avoiding double counting of the explicit dust IASD reservoir.
INP_TEMP_C is no longer restricted to the historical 16-point grid.
The configuration may contain any finite, strictly warm-to-cold sequence, for example:
import numpy as np
INP_TEMP_C = list(np.linspace(-18.0, -33.0, 50))or:
INP_TEMP_C = list(np.linspace(-18.0, -30.0, 100))The driver automatically writes matching namelist values:
n_inp_classes = 50
inp_temp(1:50) = ...or:
n_inp_classes = 100
inp_temp(1:100) = ...The old upper bound in the namelist template is detected and replaced dynamically, so a template containing:
inp_temp(1:16)does not restrict the run to 16 classes.
The Python validation requires:
- at least one threshold;
- all values finite;
- strictly decreasing temperatures from warm to cold.
For example:
-18, -18.3, -18.6, ..., -33 degC
is valid.
Running:
python3 dataAnalysis_new.py --experiment ExpNNNcreates the main model/observation figure plus PSD and metrics diagnostics.
The main comparison contains:
- chamber pressure;
- gas/wall temperature;
- hydrometeor water;
- particle number;
- effective diameter;
- relative dispersion;
- chamber water-exchange/reservoir diagnostics;
- a compact metrics summary.
Measured forcing and BMM output are plotted together. Measured wall temperature is shown when available.
Two liquid-water definitions are retained intentionally:
BMM native total ql
WELAS reader total LWC-derived ql
and a WELAS-equivalent thresholded quantity reconstructed from the PSD/model particle distribution.
The selected comparison is controlled by:
SINGLE_COMPARE_QL_MODE = "above_min"with supported values:
above_min
total
Ice water qi is also plotted when available.
The analysis keeps distinct:
WELAS supplied Nd
WELAS PSD-integrated N above Dmin
BMM activated liquid Nd
BMM warm-particle N above Dmin
Ice number is plotted on a secondary axis when available.
For mixed-phase experiments, the direct comparison to the merged WELAS PSD uses combined BMM liquid + ice moments:
Mk,total = sum_liquid(N D^k) + sum_ice(N D^k)
with:
Deff = M3/M2
and relative dispersion from the combined first and second moments.
Liquid-only and activated-liquid diagnostics remain visible separately.
The default minimum wet diameter is:
SINGLE_COMPARE_DROP_MIN_UM = 2.5WELAS spectra are treated as:
dN/dlog10(D)
using reconstructed logarithmic bin edges and their actual dlogD widths.
The observational analysis derives:
- number above
Dmin; - mean diameter;
- volume-mean diameter;
- effective diameter;
- relative dispersion;
- liquid-equivalent mass above
Dmin.
The WELAS-equivalent liquid retrieval treats each optical/wet diameter as a spherical water particle, matching the instrument-style calculation.
For mixed-phase experiments this quantity must be interpreted cautiously: large observed particles may be ice even though a liquid-equivalent diagnostic can still be calculated mathematically.
For full-moving BMM output (bin_scheme_flag=0), the diagnostic wet-diameter
threshold is a pointwise particle test.
For fixed water-mass schemes (bin_scheme_flag=1 or 2), if the diagnostic
diameter threshold lies inside a native water-mass bin, the analysis uses the
fraction of that bin above the corresponding water-mass threshold rather than
an all-or-nothing bin-centre decision.
This improves consistency of number and water diagnostics across BMM binning schemes.
The WELAS has many more optical channels than the BMM has independent particle populations. Direct comparison on the native WELAS grid would therefore make the model distribution unnecessarily sparse.
Both distributions are compared on a common coarse logarithmic grid configured by:
SINGLE_COMPARE_PSD_NBINS = 48
SINGLE_COMPARE_PSD_MIN_UM = None
SINGLE_COMPARE_PSD_MAX_UM = NoneNone uses the WELAS bounds for the experiment.
The observed dN/dlog10D is conservatively rebinned by exact overlap in
log-diameter space.
The BMM particle populations are histogrammed onto the same diagnostic bins using their complete number weights.
The colour limits are based on the observed WELAS concentration range so that matching colours correspond to matching concentrations rather than each panel being independently rescaled.
When ice is available, the plotted BMM comparison distribution is:
warm/liquid: nwat with dwet
ice: nicem with dmaxice
so the model panel represents liquid + ice hydrometeors.
WELAS provides optical size, whereas BMM ice is currently represented using
dmaxice; this distinction should be retained when interpreting the comparison.
The model-only figure:
model-full-psd-ExpNNN.png
covers a much wider size range than the WELAS comparison.
The warm panel uses:
nwat + dwet
and therefore includes:
- dry/wet aerosol represented by the warm population;
- haze;
- activated droplets;
- residual warm particles.
It is not restricted to the activated nliq subset.
When ice is present, a second panel uses:
nicem + dmaxice
The fixed log-D grids are post-processing grids only. They do not change the native BMM bin representation.
Current controls include:
SINGLE_MODEL_PSD_NBINS = 180
SINGLE_MODEL_WARM_PSD_MIN_UM = 0.005
SINGLE_MODEL_WARM_PSD_MAX_UM = 1000.0
SINGLE_MODEL_ICE_PSD_MIN_UM = 0.1
SINGLE_MODEL_ICE_PSD_MAX_UM = 10000.0The analysis searches for a bounded ql lag using:
SINGLE_COMPARE_MAX_LAG_S = 30.0
SINGLE_COMPARE_LAG_STEP_S = 1.0A positive diagnosed lag means the observation occurs later than the model.
By default this lag is reported only.
With:
--shift-cloud-measurementsthe whole WELAS time coordinate is shifted by the diagnosed amount before comparison, keeping all cloud measurements internally aligned.
Both absolute and lag-related liquid-water scores are retained.
For each single experiment the driver writes:
metrics-ExpNNN.csv
including quantities such as:
- comparison window;
- model saturation target;
- selected ql comparison mode;
- diagnosed ql lag and correlation;
- applied WELAS time shift;
- ql NRMSE;
- total-qL NRMSE;
- thresholded-qL NRMSE;
- thresholded number NRMSE;
- total-hydrometeor Deff NRMSE;
- total-hydrometeor relative-dispersion NRMSE;
- integrated model/observed liquid-water exposure.
Where wall-reservoir diagnostics exist, the figure summary also reports reservoir masses.
The main comparison can plot cumulative BMM diagnostics such as:
qfan_liq
qwall_liq
qfall_liq
qchamber_bl
qchamber_bl_evap
qchamber_wall_liq_evap
qchamber_wall_liq_cond
qchamber_wall_ice_subl
qchamber_wall_ice_dep
Prognostic wall reservoirs are plotted separately in physical grams:
chamber_wall_liquid_water
chamber_wall_ice_water
When available, the dedicated wall-vapour figure also plots:
chamber_wall_rh
chamber_wall_vapour_flux
with the vapour flux displayed in mg m-2 s-1.
Batch groups and their updraft/settings metadata are defined in:
scripts/experiment_metadata.py
Run a group with:
python3 dataAnalysis_new.py --group NGroup runs use the same aerosol initialisation and namelist-generation machinery as single runs.
When no --group or --experiment is supplied, the historical THIS_RUN
default in dataAnalysis_new.py is used.
A new experiment normally requires:
- add timing/group metadata to
experiment_metadata.py; - add the meteorology/CPC source to
readMeteoCPC.py; - add the WELAS/OPC source to
readOPC_Merged.py; - add the initial aerosol PSD definition to
readPNSD_Mrg_new.py; - keep parallel reader arrays index-aligned;
- add new aerosol composition/FHH metadata if required;
- add a new
inp_categoryand corresponding BMMn_s(T)implementation for a new ice-active dust species; - test the experiment in single-run mode before adding it to a group.
Example:
python3 dataAnalysis_new.py --experiment ExpNNNFor a model-development or chamber sensitivity run:
1. Build/update BMM.
2. Set BMM_MODEL_FOLDER.
3. Edit iskylab_config.py for persistent settings.
4. Run one representative experiment.
5. Inspect the generated namelist.
6. Inspect forcing-smoothing diagnostics.
7. Inspect the main model/observation figure.
8. Inspect the common-grid PSD comparison.
9. Inspect the complete model PSD.
10. Inspect wall/fan/fallout diagnostics where relevant.
11. Only then run a larger experiment group or batch script.
The generated namelist is the best record of the actual model inputs used for a specific run.
Check:
echo "$BMM_MODEL_FOLDER"
ls "$BMM_MODEL_FOLDER/main.exe"Single mode should only load the requested experiment. Check that the experiment names and filename/metadata arrays in the reader modules remain index-aligned.
Check:
grep -n "n_inp_classes\|inp_temp" \
/tmp/$USER/single_comparison/namelist-Exp021.inIf the config contains 50 classes, the generated namelist should show:
n_inp_classes = 50
inp_temp(1:50) = ...
Also confirm which configuration Python imported:
python3 - <<'PY'
import iskylab_config as cfg
print(cfg.__file__)
print(len(cfg.INP_TEMP_C))
print(cfg.INP_TEMP_C[:3], cfg.INP_TEMP_C[-3:])
PYThis commonly indicates that more inp_temp values were written than the
declared namelist slice can accept. Regenerate the namelist with the current
dynamic-INP driver and confirm that n_inp_classes and inp_temp(1:N) have the
same N.
Check chamber_bl_wall_water_mode.
CHAMBER_WALL_VAPOUR_TRANSFER_VELOCITY is used by wall-water mode 2, not legacy
mode 0.
The merged WELAS PSD can include ice. A D^3 spherical-water reconstruction is
then only an instrument-equivalent diagnostic, not a physical liquid-water
measurement. Use the distinct liquid and total-hydrometeor comparisons
appropriately.
Inspect the generated:
runtime
and the available measured forcing interval. The driver currently caps a single run at the smaller of the experiment forcing duration and 30 minutes.
For unattended operation omit --plt-ion, or use:
--no-plotto suppress displayed figures entirely.
For a simulation used in a publication, report or model intercomparison, retain:
- the exact BMM commit/version;
- the exact iSKYLAB-analysis commit/version;
scripts/iskylab_config.py;- the generated BMM namelist;
- the relevant experiment metadata;
- any command-line overrides;
- the BMM NetCDF output;
- the comparison metrics;
- the generated figures.
In particular, do not rely only on the persistent Python configuration when
command-line overrides were used. The generated namelist records the actual BMM
configuration passed to main.exe.