burden_cdnc does not validate upon OpenACC port
Posted by Elsa Germann 05/11/2022 https://redmine.hammoz.ethz.ch/issues/828
While developing the OpenACC port of HAM, Elsa Germann (then Mikael Stellio) found that the variable burden_cdnc does not validate, ie the output value when obtained with an hybrid run does not stay within the tolerance range as compared to the one obtained with a pure CPU run.
This turns out to be a very difficult bug to chase. It is so far difficult to grasp, as the tracer itself cdnc, the companion variable cdnc_burden, and all other "automatic" burden_XXX (where XXX is another tracer) validate. Reminder:
- burden_cdnc (the culprit one) is automatically computed via the generic so-called burden calculations which take the tracer list and integrate their value over the columns.
- cdnc_burden (the valid one) is an adhoc variable computed manually by the Lohmann 2-m scheme. Note that it is always time-accumulated (which is not the case of the former).
In waiting for understanding where the pb comes from, Elsa has artificially introduced:
pxtte_cdnc(jl) = MERGE(0._dp, pxtte_cdnc(jl), pxtte_cdnc(jl) < 1E-10_dp)
toward the end of the 2-m microphysics scheme.This allows to progress on further OpenACC developments without hitting a failed validation test error because of the above pb. Of course, this has no physical meaning and basically destroys the meaning of all calculations performed in the 2-m scheme.