You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Grad student Hansi Singh and I discovered an error in the amwg diagnostics. The vertical integral of the zonal mean eddy heat fluxes (set 4 "Stationary Heat Flux" and "Transient Heat Flux") in functions_eddyflux.ncl is off by a factor of ~4. This happened because the computation in functions_eddyflux.ncl involves a multiplication by "coeff", which is supposed to be cp/g. However, coeff is also defined in functions_zonal.ncl, where it is 2pire (re=earth radius). I put some print statements in the scripts to prove that functions_eddyflux.ncl is actually getting 2pire when it should be getting cp/g. Now these two coeff differ by 4e5 so you would think this would be noticeable. But there is an compensating (and wrong) division by PS in the vertical integrals in functions_eddyflux.ncl. This leaves only a factor of ~4 error. Computation of the meridional eddy flux terms for moisture and momentum are vertical averages not vertical integrals, so they should be divided by PS. They are not multiplied by cp/g, so they are fine. Only the heat flux functions are wrong because they should be multiplied by cp/g and they are integrals, so should not be divided by PS. It is very easy to fix. It requires two steps: 1) change coeff to another variable in either one of these functions 2) do not divide by PS in function get_VBSTAR_TBSTAR_2D and function get_VPTP_BAR_2D This is probably pretty important to fix. Thanks! Cecilia
From @cecilehannay on April 21, 2017 20:24
Grad student Hansi Singh and I discovered an error in the amwg diagnostics. The vertical integral of the zonal mean eddy heat fluxes (set 4 "Stationary Heat Flux" and "Transient Heat Flux") in functions_eddyflux.ncl is off by a factor of ~4. This happened because the computation in functions_eddyflux.ncl involves a multiplication by "coeff", which is supposed to be cp/g. However, coeff is also defined in functions_zonal.ncl, where it is 2pire (re=earth radius). I put some print statements in the scripts to prove that functions_eddyflux.ncl is actually getting 2pire when it should be getting cp/g. Now these two coeff differ by 4e5 so you would think this would be noticeable. But there is an compensating (and wrong) division by PS in the vertical integrals in functions_eddyflux.ncl. This leaves only a factor of ~4 error. Computation of the meridional eddy flux terms for moisture and momentum are vertical averages not vertical integrals, so they should be divided by PS. They are not multiplied by cp/g, so they are fine. Only the heat flux functions are wrong because they should be multiplied by cp/g and they are integrals, so should not be divided by PS. It is very easy to fix. It requires two steps: 1) change coeff to another variable in either one of these functions 2) do not divide by PS in function get_VBSTAR_TBSTAR_2D and function get_VPTP_BAR_2D This is probably pretty important to fix. Thanks! Cecilia
Copied from original issue: CESM-Development/cime#485
The text was updated successfully, but these errors were encountered: