Skip to content
  • Dave Gill's avatar
    4dd4f544
    Enforce conditional use of IEEE Fortran 2003 capabilities in v4.1 Goddard schemes (#906) · 4dd4f544
    Dave Gill authored
    TYPE: bug fix
        
    KEYWORDS: IEEE, GNU
        
    SOURCE: reported by Maik Reichert, fixed internally
        
    DESCRIPTION OF CHANGES:
    Problem:
    With the introduction of the Goddard MP and radiation schemes in release-v4.1, there
    are locations where the IEEE capability for Fortran 2003 is unconditionally used. With the 
    default GNU compiler on Linux, the WRF code will not build. Updating the compiler, while
    free, does require that the user then rebuild libraries from scratch.
        
    Solution:
    The WRF code has had tests for using IEEE for a number of years (with the svn releases,
    starting with v3.6). Since that release, during the `configure` step, if a small test code fails 
    to build or run successfully, the `configure.wrf` file sets a cpp compile-time flag. This ifdef
    infrastructure is now added to the new Goddard-related files that were recently included in 
    the WRF repository (b60a5b9e).
        
    ISSUE:
    Fixes #905 "ieee_arithmetic usage"
        
    LIST OF MODIFIED FILES:
    M ./configure
    M ./phys/module_checkerror.F
    M ./phys/module_gocart_coupling.F
    M ./phys/module_mp_gsfcgce_4ice_nuwrf.F
    M ./phys/module_ra_goddard.F
        
    TESTS CONDUCTED:
    1. No harm - the code performs as expected with newer GNU compilers.
    2. Code builds with an older GNU compiler (4.9.2), with this warning during the `configure` step:
    ```
    ************************** W A R N I N G ************************************
    There are some IEEE Fortran 2003 features in WRF that your compiler does not
    recognize. The IEEE function calls have been removed.
    *****************************************************************************
    ```
        
    RELEASE NOTE: The WRF code added unprotected IEEE functions in the source code with release-v4.1. Using existing infrastructure, those declarations and functions are now ifdef'ed out automatically when they the IEEE functions are detected to not be supported by the compiler. Note that this does remove some default error checking in the Goddard MP and Goddard radiation schemes.
    4dd4f544
    Enforce conditional use of IEEE Fortran 2003 capabilities in v4.1 Goddard schemes (#906)
    Dave Gill authored
    TYPE: bug fix
        
    KEYWORDS: IEEE, GNU
        
    SOURCE: reported by Maik Reichert, fixed internally
        
    DESCRIPTION OF CHANGES:
    Problem:
    With the introduction of the Goddard MP and radiation schemes in release-v4.1, there
    are locations where the IEEE capability for Fortran 2003 is unconditionally used. With the 
    default GNU compiler on Linux, the WRF code will not build. Updating the compiler, while
    free, does require that the user then rebuild libraries from scratch.
        
    Solution:
    The WRF code has had tests for using IEEE for a number of years (with the svn releases,
    starting with v3.6). Since that release, during the `configure` step, if a small test code fails 
    to build or run successfully, the `configure.wrf` file sets a cpp compile-time flag. This ifdef
    infrastructure is now added to the new Goddard-related files that were recently included in 
    the WRF repository (b60a5b9e).
        
    ISSUE:
    Fixes #905 "ieee_arithmetic usage"
        
    LIST OF MODIFIED FILES:
    M ./configure
    M ./phys/module_checkerror.F
    M ./phys/module_gocart_coupling.F
    M ./phys/module_mp_gsfcgce_4ice_nuwrf.F
    M ./phys/module_ra_goddard.F
        
    TESTS CONDUCTED:
    1. No harm - the code performs as expected with newer GNU compilers.
    2. Code builds with an older GNU compiler (4.9.2), with this warning during the `configure` step:
    ```
    ************************** W A R N I N G ************************************
    There are some IEEE Fortran 2003 features in WRF that your compiler does not
    recognize. The IEEE function calls have been removed.
    *****************************************************************************
    ```
        
    RELEASE NOTE: The WRF code added unprotected IEEE functions in the source code with release-v4.1. Using existing infrastructure, those declarations and functions are now ifdef'ed out automatically when they the IEEE functions are detected to not be supported by the compiler. Note that this does remove some default error checking in the Goddard MP and Goddard radiation schemes.
Loading