wrf-model / WRF

The official repository for the Weather Research and Forecasting (WRF) model
Other
1.18k stars 658 forks source link

Replace nonstandard isnan() call with value input checks instead #2061

Open islas opened 3 weeks ago

islas commented 3 weeks ago

TYPE: bug fix

KEYWORDS: compilation, nonstandard

SOURCE: internal

DESCRIPTION OF CHANGES: Problem: PR #1944 introduced a nonstandard function call isnan() which breaks compilation for compilers which don't support this extension.

Solution: A potential alternative is to use the ieee_is_nan() call from ieee_arithmetic. As there is conditional compilation of this module which requires Fortran 2003 standard, an easier alternative is just to check the input values before calling acos()

weiwangncar commented 3 weeks ago

The regression test results:

Test Type              | Expected  | Received |  Failed
= = = = = = = = = = = = = = = = = = = = = = = =  = = = =
Number of Tests        : 23           24
Number of Builds       : 60           57
Number of Simulations  : 158           150        0
Number of Comparisons  : 95           86        0

Failed Simulations are: 
None
Which comparisons are not bit-for-bit: 
None