height=8848;(*h in m at the TROPOSPHERE *)

to=27; (*in celsius*)
t0=to+273;
h=height/1000;
h0=0;
grad=-7; (*temperature decreasing rate in K/km*)
th=t0 + grad * (h - h0)//N;
Print["Temperature at ", height ," (m) above from the ground is : ",(th - 273), " C"]

sig=5.67*(10^(-8));(* in J/s m^2 K^4 *)
ts=5778;(* in K *)
rs=695500*1000; (* in m *)
re=6400*1000; (* in m *)
d=149598000*1000; (* in m *)
e={0.01,0.1,0.5,0.9,0.99, 1.0} ;(* e in between 0 and 1 *)

te=(      ( (ts^4) * (rs^2) ) / ( e * (d^2) * 2 )     )^(1/4);
Print["Temperature on the Earth is : ",te - 273, " C"]

height=2524;(*h in m at the TROPOSPHERE *)

to=27; (*in celsius*)
t0=to+273;
h=height/1000;
h0=0;
grad=-6.5; (*temperature decreasing rate in K/km*)
th=t0 + grad * (h - h0)//N;
Print["Temperature at ", height ," (m) above from the ground is : ",(th - 273), " C"]