function [error_flag, yH, pH, pB, pBz, yFz, rkB, rkB_zd, rkB_zu, rkB_zz, rkG, rkG_zd, rkG_zu, rkG_zz] =find_climateram_ss(gamma,gammaz,eta,beta,betaz,alpha1,alpha2,alpha2bar,alpha1z,alpha2z,alpha2barz,kappaG,kappaGz,GAM,n,delta,iota,zeta,csi,kappaA,mu,muz,nu,tau,tauz,A,r,rz,v,g,gz,Az,psiG,psiB,kappaB,kappaBz,rho,deltax,yHss,pHss,pBss,pBzss,prBss,prBzss,prGss,prGzss,yFzss)


error_flag=0;
X0=[yHss,pHss,pBss,pBzss,prBss,prBzss,prGss,prGzss,yFzss];
options = optimoptions('fsolve','MaxFunEvals',300000,'MaxIter',30000,'TolFun',1e-15,'Display','off');
try
    [X,~,EXITFLAG] = fsolve(@(XX) find_steady_final(XX,gamma,gammaz,eta,beta,betaz,alpha1,alpha2,alpha2bar,alpha1z,alpha2z,alpha2barz,kappaG,kappaGz,GAM,n,delta,iota,zeta,csi,kappaA,mu,muz,nu,tau,tauz,A,r,rz,v,g,gz,Az,psiG,psiB,kappaB,kappaBz,rho,deltax),X0,options);
    if EXITFLAG<1
        error_flag=1;
        X=X0;
    end
catch
    error_flag=1;
    X=X0;
end
yH=X(1);
pH=X(2);
pB=X(3);
pBz=X(4);
prB=X(5);
prBz=X(6);
prG=X(7);
prGz=X(8);
yFz=X(9);

rkB=iota/beta-(1-delta)+prB;            % brown return of AE domestic capital
rkB_zd=iota/beta-(1-delta)+prB;         % brown return of EME foreign capital
rkB_zu=iota/betaz-(1-delta)+prBz;       % brown return of AE foreign capital
rkB_zz=iota/betaz-(1-delta)+prBz;       % brown return of EME domestic capital
rkG=iota/beta-(1-delta)+prG;            % green return of AE domestic capital
rkG_zz=iota/betaz-(1-delta)+prGz;       % green return of EME domestic capital
rkG_zd=iota/beta-(1-delta)+prG;         % green return of EME foreign capital
rkG_zu=iota/betaz-(1-delta)+prGz;       % green return of AE foreign capital

end

