Initial condition and parameter estimation in physical ‘on’off’ processes by variational data assimilation