function [prdData, info] = predict_Pterois_miles(par, data, auxData)
% file generated by prt_predict

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

% compute temperature correction factors
pars_T = T_A;
TC = tempcorr(temp.tL, T_ref, pars_T);
TC_am = tempcorr(temp.am, T_ref, pars_T);
TC_tL1 = tempcorr(temp.tL1, T_ref, pars_T);
TC_tL = tempcorr(temp.tL, T_ref, pars_T);
TC_LR = tempcorr(temp.LR, T_ref, pars_T);

% life cycle
pars_tj = [g; k; l_T; v_Hb; v_Hj; v_Hp];
[tau_j, tau_p, tau_b, l_j, l_p, l_b, l_i, rho_j, rho_B, info] = get_tj(pars_tj, f);

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

% initial
pars_UE0 = [V_Hb; g; k_J; k_M; v]; % compose parameter vector
U_E0 = initial_scaled_reserve(f, pars_UE0); % d.cm^2, initial scaled reserve
E_0 = p_Am * U_E0;               % J, initial energy content

% hatch
[U_H aUL] = ode45(@dget_aul, [0; U_Hh], [0 U_E0 1e-10], [], kap, v, k_J, g, L_m);
Lw_h = aUL(end,3)/ del_M; % cm, physical length at hatch

% birth
L_b = L_m * l_b;                  % cm, structural length at birth
a_b =  tau_b/ k_M/ TC;    % d, age at birth
Lw_b = L_b/ del_M;                % cm, physical length at birth

% puberty
L_p = L_m * l_p; % cm, structural length at puberty
Lw_p = L_p/ del_M; % cm, physical length at puberty
Ww_p = L_p^3 *(1 + f * w);        % g, wet weight at puberty 

% ultimate
L_i = L_m * l_i; % cm, ultimate structural length
Lw_i = l_i * L_m/ del_M; % cm, ultimate physical length
Ww_i = L_i^3 * (1 + f * w);       % g, ultimate wet weight 

% reproduction
pars_R = [kap; kap_R; g; k_J; k_M; L_T; v; U_Hb; U_Hj; U_Hp]; % compose parameter vector at T
RT_i = TC * reprod_rate_j(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/ k_M/ TC_am;                  % d, mean life span at T

% pack to output
prdData.Lh = Lw_h;
prdData.Lp = Lw_p;
prdData.Li = Lw_i;
prdData.Wwi = Ww_i;
prdData.am = aT_m;

  % length - wet weight
  EWw_L = (LWw(:,1) * del_M).^3 * (1 + f * ome); % g, wet weight

  % time - length
  tvel = get_tj(pars_tj, f_tL, [], tL(:,1)*k_M*TC_tL);
  ELw = L_m * tvel(:,4)/ del_M; % cm, physical length

  % time - length
  tvel = get_tj(pars_tj, f_tL1, [], tL1(:,1)*k_M*TC_tL1);
  ELw_1 = L_m * tvel(:,4)/ del_M; % cm, physical length

  % total length - reprod rate
  ER = TC_LR * reprod_rate_j(LR(:,1) * del_M, f, pars_R);                    % #/d, ultimate reproduction rate at T

  % total weight - reprod rate
  L = (WR(:,1)/(1 + f * w)).^(1/3);
  ER_W = TC_LR * reprod_rate_j(L, f, pars_R);                    % #/d, ultimate reproduction rate at T

  % temperature - metabolic rate
  TC_O = tempcorr(C2K(JOT(:,1)), T_ref, T_A);
  L = (135.5 / (1+w)) .^ (1/3);
  p_ref = TC_O * p_Am * L_m^2;        % J/d, max assimilation power at max size
  pars_power = [kap; kap_R; g; k_J; k_M; L_T; v; U_Hb; U_Hj; U_Hp];
  p_ACSJGRD = p_ref .* scaled_power_j(L*del_M, f, pars_power, l_b, l_j, l_p);
  p_ADG = p_ACSJGRD(:,[1 7 5]); % J/d, assimilation, dissipation, growth powers
  O2M = (- n_M\n_O)'; % -, matrix that converts organic to mineral fluxes  O2M is prepared for post-multiplication eq. 4.35
  JO = p_ADG * eta_O';      JM = JO * O2M;             % mineral fluxes   
  EJOT = - 1e6 * 2 * 16 * (JM(:,3)/135.5);   % oxygen consumption mg/kg/h

% pack to output
prdData.LWw = EWw_L;
prdData.tL = ELw;
prdData.tL1 = ELw_1;
prdData.LR = ER;
prdData.WR = ER_W;
prdData.JOT = EJOT;
end