CESM-Development / cime

Common Infrastructure for Modeling the Earth
Other
16 stars 13 forks source link

Bug in AMWG diags: set 4 Stationary Heat Flux #485

Closed cecilehannay closed 7 years ago

cecilehannay commented 7 years ago

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

bertinia commented 7 years ago

This issue was moved to NCAR/CESM_postprocessing#79