Skip to content

Questions about discrepancies in calculated heating rate #55

@Aaron-Hsieh-0129

Description

@Aaron-Hsieh-0129

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 = $g/C_p \times \text{SecForADay} \times \frac{\Delta F}{\Delta p}$

Results

Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions