The science
Growth progress g of a bed advances by dg/dt = k_tech / T_crop * L * f_T * f_CO2 * f_soil, where L is light (0..1), f_T = clamp((T-4)/14, 0.15, 1), f_CO2 = 0.75 + 0.25*clamp(ppm/800, 0, 1), and for soil crops f_soil = lerp(0.35, 1, (1-0.85*perchlorate)*(0.4+0.6*fertility)). Hydroponic crops skip the soil term.
Light is natural plus lamps: L = min(1, 0.3*S*(1-0.8*storm) + 0.75*power_satisfaction). The sun factor S = clamp(sin alt, 0, 1)^0.6 with sin alt = sin(decl) sin(lat) + cos(decl) cos(lat) cos(H); H is the hour angle, a Mars sol is 24.62 h, and the axial tilt swings the declination by about 0.42 rad over the 668-sol year.
Solar output is P = 24 kW * S * (1-dust) * (1-0.84*storm) per array on top of a 4 kW radioisotope source; dust builds up between cleanings. A person needs about 2500 kcal, 55 g protein and 1 vitamin unit per sol. Yield per harvest scales with plant health and, for soil crops, fertility and perchlorate load.
Simplifications: lamps and sun are lumped into one light number, plants do not shade each other, the crew eats stored crops in proportion to stock, soil fertility and the dome atmosphere are held by the sliders rather than evolving, and the crew cannot die here. This is an educational model, not a validated crop model.