public void Run(Clock clock, IClimateForcingState state, IDimensions dimensions) { var s = state; var t = clock.Current; if (clock.IsFirstTimestep) { } else { double ch4n2o = Interact(s.ch4pre, s.n2opre); s.rfCO2[t] = 5.35 * Math.Log(s.acco2[t] / s.co2pre); s.rfCH4[t] = 0.036 * (Math.Sqrt(s.acch4[t]) - Math.Sqrt(s.ch4pre)) - Interact(s.acch4[t], s.n2opre) + ch4n2o; s.rfN2O[t] = 0.12 * (Math.Sqrt(s.acn2o[t]) - Math.Sqrt(s.n2opre)) - Interact(s.ch4pre, s.acn2o[t]) + ch4n2o; s.rfSF6[t] = 0.00052 * (s.acsf6[t] - s.sf6pre); s.rfSO2[t] = s.so2dir * s.acso2[t] / 14.6 + s.so2ind * Math.Log(1.0 + s.acso2[t] / 34.4) / Math.Log(1 + 14.6 / 34.4) - 0.9; s.radforc[t] = s.rfCO2[t] + s.rfCH4[t] + s.rfN2O[t] + s.rfSF6[t] - s.rfSO2[t]; s.rfEMF22[t] = s.rfCO2[t] + s.rfCH4[t] + s.rfN2O[t]; } }
public void Run(Clock clock, IClimateForcingState state, IDimensions dimensions) { var s = state; var t = clock.Current; if (clock.IsFirstTimestep) { } else { double ch4n2o = Interact(s.ch4pre, s.n2opre); s.rfCO2[t] = 5.35 * Math.Log(s.acco2[t] / s.co2pre); s.rfCH4[t] = 0.036 * (Math.Sqrt(s.acch4[t]) - Math.Sqrt(s.ch4pre)) - Interact(s.acch4[t], s.n2opre) + ch4n2o; s.rfN2O[t] = 0.12 * (Math.Sqrt(s.acn2o[t]) - Math.Sqrt(s.n2opre)) - Interact(s.ch4pre, s.acn2o[t]) + ch4n2o; s.rfSF6[t] = 0.00052 * (s.acsf6[t] - s.sf6pre); s.rfSO2[t] = s.so2dir * s.acso2[t] / 14.6 + s.so2ind * Math.Log(1.0 + s.acso2[t] / 34.4) / Math.Log(1 + 14.6 / 34.4) - 0.9; s.radforc[t] = s.rfCO2[t] + s.rfCH4[t] + s.rfN2O[t] + s.rfSF6[t] - s.rfSO2[t]; s.rfEMF22[t] = s.rfCO2[t] + s.rfCH4[t] + s.rfN2O[t]; } }