Hi,
I'm using the acc_phy_tend=1 option to analyze my potential temperature results. The default outputs for accumulated theta tendency are ATHMPTEN, ATHCUTEN, ATHSHTEN, ATHBLTEN, ATHRATENLW, and ATHRATENSW. Following advice from other threads, I've modified source codes to include the tendency due to total advection (ATHFTEN). This was done by integrating RTHFTEN over a 10-minute output interval. The figure below illustrates the results.
Interestingly, under stable conditions, the accumulated theta tendency due to total advection (indicated by the purple line) is quite significant. Since I disabled the cumulus and shallow cumulus schemes, ATHCUTEN and ATHSHTEN consistently show zero. So I didn't include them in the figure.
My assumption was that the theta change over 10 minutes could be represented as the sum of ATHMPTEN, ATHBLTEN, ATHRATENLW, ATHRATENSW, and ATHFTEN. However, I've noticed a residual term labelled as "RES" in the results (brown line), which I can't account for. The change of theta over 10 minutes is determined by calculating the difference in output potential temperature (TK) at the first model level between the current and the previous timestep.
Could there be an error in my calculations or in my interpretation of these results? Any insights or suggestions would be greatly appreciated.
For reference, I've attached my namelist.input file and the scripts I modified.

Best,
Yue
I'm using the acc_phy_tend=1 option to analyze my potential temperature results. The default outputs for accumulated theta tendency are ATHMPTEN, ATHCUTEN, ATHSHTEN, ATHBLTEN, ATHRATENLW, and ATHRATENSW. Following advice from other threads, I've modified source codes to include the tendency due to total advection (ATHFTEN). This was done by integrating RTHFTEN over a 10-minute output interval. The figure below illustrates the results.
Interestingly, under stable conditions, the accumulated theta tendency due to total advection (indicated by the purple line) is quite significant. Since I disabled the cumulus and shallow cumulus schemes, ATHCUTEN and ATHSHTEN consistently show zero. So I didn't include them in the figure.
My assumption was that the theta change over 10 minutes could be represented as the sum of ATHMPTEN, ATHBLTEN, ATHRATENLW, ATHRATENSW, and ATHFTEN. However, I've noticed a residual term labelled as "RES" in the results (brown line), which I can't account for. The change of theta over 10 minutes is determined by calculating the difference in output potential temperature (TK) at the first model level between the current and the previous timestep.
Could there be an error in my calculations or in my interpretation of these results? Any insights or suggestions would be greatly appreciated.
For reference, I've attached my namelist.input file and the scripts I modified.

Best,
Yue