-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Hi,
I'm working on calculating the heating rate and have some questions about my results. Based on my understanding, the heating rate in the troposphere should be around -2 K/day, near 0 at the tropopause, and potentially show significant heating in the stratosphere due to ozone absorption. However, my results indicate weaker-than-expected cooling and unexpected heating in the troposphere.
Could this be due to an incorrect method or improper variable selection? Below, I’ve outlined my approach and included relevant details.
Method:
I used the allsky test to generate input data and ran the program with this input (without the cloud-optics option).
I calculated the longwave and shortwave heating rates from the output file using the formula:
Heating rate =
Results
Code
import numpy as np
import matplotlib.pyplot as plt
import xarray as xr
ds = xr.open_dataset("rte_rrtmgp_output.nc")
p_lay = np.squeeze(ds['p_lay'].to_numpy())
p_lev = np.squeeze(ds['p_lev'].to_numpy())
sw_flux_net = np.squeeze(ds['sw_flux_net'].to_numpy())
lw_flux_net = np.squeeze(ds['lw_flux_net'].to_numpy())
sw_heat_rate = 9.8/1004*86400*(sw_flux_net[1:]-sw_flux_net[:-1]) / (p_lev[:-1]-p_lev[1:])
lw_heat_rate = 9.8/1004*86400*(lw_flux_net[1:]-lw_flux_net[:-1]) / (p_lev[:-1]-p_lev[1:])
heat_rate = sw_heat_rate + lw_heat_rate
plt.figure(figsize=(14,10))
plt.plot(heat_rate[:,10], p_lay[:,10], label="Total Heat Rate")
plt.plot(sw_heat_rate[:,10], p_lay[:,10], label="SW Heat Rate")
plt.plot(lw_heat_rate[:,10], p_lay[:,10], label="LW Heat Rate")
plt.xlim(-3,3)
plt.ylim(100000,100)
plt.xlabel("Heating Rate [K/day]")
plt.ylabel("Pressure [Pa]")
plt.legend()
plt.show()Could you help clarify if my approach or variable choices are causing these discrepancies? Any guidance would be appreciated!
Thanks,
Aaron
