Contents — find the section you need
Change parameters and verify
Open the panel, then press Run to load Python. You can stop execution and reset parameters. Results are computed on this device. No Python installation is required.
Local execution steps below are optional for reproducing the source results; they are not required for the browser experiment.
Change conditions in your browser
Use the panel above to change constant air temperature, relative humidity while lit/dark, lit-period PPFD, lights-on hour and daily lighting duration. Defaults reproduce the published synthetic CSV's VPD and DLI. No Python installation is needed.
The schedule always covers midnight to midnight in fixed UTC+09:00, exactly 24 hours. Lighting times use half-hour steps and may cross midnight. Temperature stays constant; humidity switches with the lighting schedule and dark-period PPFD is zero. Zero hours means lights off all day; 24 means lights on all day. Moving the start time leaves DLI unchanged when duration and PPFD stay the same.
The upper plot shows air VPD; the lower plot accumulates light, ending at DLI. The VPD metric is a time-weighted interval mean. The data table also includes interval-mean PPFD. Compare A/B and share conditions to change humidity and light independently. This computes air VPD and integrated interval-mean light, without predicting leaf temperature, transpiration, growth or yield.
The browser generates a complete synthetic schedule; it does not import CSV or repair missing measurements. Missing-data rejection can be checked with the optional downloadable tests below. Save the browser entrypoint and existing analyzer together to reproduce defaults locally.
Start with the result
The synthetic day gives air VPD ≈ 1.584 kPa and DLI = 11.52 mol m⁻² day⁻¹. Temperature is 25°C and relative humidity 50% throughout. PPFD is 200 from 08:00 until the next midnight, and zero otherwise. These are fictional inputs for checking units and integration, not facility measurements.
| Change | Expected result | Interpretation |
|---|---|---|
| Baseline | VPD ≈1.584; DLI 11.52 | Independent calculations |
| RH to 100% | Air VPD 0 | Saturation in this equation |
| Lit-period PPFD to 100 | DLI 5.76 | Half the light quantity |
| Delete the 08–09 interval | Error | Missing data is not darkness |
Read the CEA overview for the system boundary. This Lab calculates environmental quantities; it does not predict yield or command equipment.
Air VPD needs temperature and humidity
Use the FAO-56 saturation vapor pressure relation, equation 11, with T in °C and pressure in kPa:
At 25°C, a rounded saturation pressure of 3.168 kPa gives about 1.584 kPa at 50% RH. Applying this nonlinear equation once to daily mean inputs generally differs from averaging values calculated at each timestamp.
No leaf temperature is supplied, so this is not leaf-to-air VPD. Nor is it a transpiration model. Consult MSU's VPD discussion before extending interpretation to plant responses.
DLI weights each interval by its duration
Following Purdue's DLI explanation, integrate PPFD over a day. Each CSV row supplies an interval-mean PPFD, not an instantaneous reading for trapezoidal interpolation.
Durations are in seconds: 200 × 16 × 3600 / 1e6 = 11.52. Splitting an interval without changing its mean leaves the total unchanged.
| Interval (UTC+09:00) | Hours | PPFD | Contribution (mol m⁻²) |
|---|---|---|---|
| 00–05 | 5 | 0 | 0 |
| 05–08 | 3 | 0 | 0 |
| 08–09 | 1 | 200 | 0.72 |
| 09–15 | 6 | 200 | 4.32 |
| 15–next 00 | 9 | 200 | 6.48 |
A row-count average multiplied by 24 hours is wrong for these unequal intervals. Instantaneous measurements need a separately specified interpolation and maximum-gap policy.
Input contract
| Column | Meaning | Accepted teaching range |
|---|---|---|
| start / end | ISO 8601 timestamps with UTC offset | Contiguous midnight-to-midnight intervals at one fixed offset |
| temp_c | Air temperature assumed constant within interval, °C | 0–50 |
| rh_pct | Relative humidity at that temperature, % | 0–100 |
| ppfd_umol_m2_s | Interval mean, μmol m⁻² s⁻¹ | 0–3000 |
Temperature and light limits are teaching-model choices, not crop recommendations or universal validity bounds. Blank values, NaN, infinity, negative light, overlaps, gaps, reversed rows and incomplete days are rejected. Daylight-saving transitions are outside the fixed 24-hour model. Real measurements also require location, calibration and sensor-response records.
Run the complete experiment
Extract the experiment ZIP, then run these commands inside its directory. Python 3.10+ and the standard library suffice; no packages or network access are required. The browser panel above also runs the calculation without local setup.
python3 generate.py
python3 experiment.py synthetic.csv > result.json
python3 -m unittest -v
generate.py recreates the synthetic CSV; save a separate copy before editing inputs. The analyzer outputs interval VPD and accumulated light in JSON. Compare expected.json and the file hashes and contract in manifest.json.
The calculation core is below; experiment.py contains the complete executable including validation.
es = 0.6108 * math.exp(17.27 * temp_c / (temp_c + 237.3))
air_vpd_kpa = es * (1 - rh_pct / 100)
dose_mol_m2 += ppfd * interval_seconds / 1_000_000
Change, break and verify
- Set every RH value to 100. VPD becomes zero; DLI stays 11.52.
- Halve lit-period PPFD. DLI becomes 5.76 while VPD stays unchanged.
- Delete a lit interval. The analyzer rejects the gap instead of returning a misleading total.
- Enter RH
0.5. It is accepted as 0.5%, giving approximately 3.15 kPa. If you intended 50%, range checks cannot detect that unit mistake.
The 12 supplied tests cover rounded independent reference values, saturation, proportional light changes, interval splitting, invalid inputs and missing coverage. Passing them is not validation for a crop. Equal DLI does not imply equal growth.
Continue with temperature measurement and sampling: identify what information you would lose when converting real readings to this interval format.

Comments
Please log in to post a comment
No comments yet.