
function [prdData, info] = predict_Dendrocygna_autumnalis(par, data, auxData)

% unpack par, data, auxData
cPar = parscomp_st(par); vars_pull(par);
vars_pull(cPar);  vars_pull(data);  vars_pull(auxData);

  if t_0 < 0
      info = 0; prdData = []; return;
  end

% compute temperature correction factors
TC = tempcorr(temp.am, T_ref, T_A); kT_M = TC * k_M;

% zero-variate data

% life cycle
pars_tp = [g; k; l_T; v_Hb; v_Hp];  % compose parameter vector
[t_p, t_b, l_p, l_b, info] = get_tp(pars_tp, f); % -, scaled times & lengths at f

% birth
L_b = L_m * l_b;                  % cm, structural length at birth at f
Ww_b = L_b^3 * (1 + f * ome);     % g, wet weight at birth at f
aT_b = t_0 + t_b/ kT_M;           % d, age at birth at f and T

% fledging
tT_p = (t_p - t_b)/ kT_M;         % d, time since birth at fledging at f and T

% ultimate
l_i = f - l_T;                    % -, scaled ultimate length
L_i = L_m * l_i;                  % cm, ultimate structural length at f
Ww_i = L_i^3 * (1 + f * ome);     % g, ultimate wet weight

% reproduction
pars_R = [kap; kap_R; g; k_J; k_M; L_T; v; U_Hb; U_Hp]; % compose parameter vector at T
RT_i = TC * reprod_rate(L_i, f, pars_R);                % #/d, ultimate reproduction rate at T

% life span
pars_tm = [g; l_T; h_a/ k_M^2; s_G];  % compose parameter vector at T_ref
t_m = get_tm_s(pars_tm, f, l_b);      % -, scaled mean life span at T_ref
aT_m = t_m/ kT_M;                     % d, mean life span at T

% pack to output
prdData.ab = aT_b;
prdData.tp = tT_p;
prdData.tR = t_R;
prdData.am = aT_m;
prdData.Wwb = Ww_b;
prdData.Wwi = Ww_i;
prdData.Ri = RT_i;

% uni-variate data

% time-weight
tvel = get_tp(pars_tp, f_tW, [], tW(:,1)*kT_M);
EWw = (L_m * tvel(:,4)).^3 .* (1 + tvel(:,3) * ome);   % g, weight

% time-energy
L = (WpX(:,1)/ (1 + f * ome)).^(1/3); % cm, structural length
EpT_A = TC * p_Am * L.^2/ 1e3; % kJ/d, assimilation energy
EpT_X = EpT_A/ kap_X;  % kJ/d, energy intake
EpT_P = EpT_X * kap_P; % kJ/d, excretory energy

% pack to output
prdData.tW = EWw;
prdData.WpX = EpT_X;
prdData.WpP = EpT_P;
prdData.WpA = EpT_A;

