<div dir="ltr"><div>Dear Sir Dennis,</div><div><br></div><div>Thank you for this!</div><div><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">I figured out the mistake in my code.</div><div dir="ltr"><br></div><div dir="ltr">[1] The unit od dTdt is actually K/day not K/s. </div><div dir="ltr"><br></div><div dir="ltr">[2] This line: </div><div>p2 = conform(H,p,1)</div><div>p2 = p2*100</div><div>dHdp = center_finite_diff_n(H,p2,False,0,<b>1</b>)  ;dim should be 1</div><div><br></div><div>[3] Pressure should be in Pascals for the integration</div><div><br></div><div>After integration, the output will be in W/m2 (Q1) or [kg/kg](W/m2)</div><div>Attached is the working code.</div><div><br></div><div><br></div><div>Sincerely,</div><div>Lyndz</div></div></div></div></div></div></div></div></div></div></div>