Fix optional threshold (#1129)
Fix optional threshold (#1129)

## Technical Description

Switch from ternary pattern to if/else when evaluating the optional threshold argument (details: https://github.com/j3-fortran/fortran_proposals/issues/138#issuecomment-573322935 ). Fixes the access to uninitialized memory problem.
MeteoSwiss-APN/dawn,MeteoSwiss-APN/dawn,MeteoSwiss-APN/dawn