NOAA-EMC / NEMS

NEMS (NOAA Environmental Modeling System)
https://noaa-emc.github.io/NEMS_doc/index.html
Other
11 stars 46 forks source link

NEMS hash 044400a8eea19d1ce991a2adaa0b369ed0e067c7 and head of develop broken for GNU compilers #41

Closed climbfuji closed 4 years ago

climbfuji commented 4 years ago

For the same reason as several times before, the current hash of NEMS in ufs-weather-model (044400a8eea19d1ce991a2adaa0b369ed0e067c7) doesn't work with the GNU compilers:

module_EARTH_GRID_COMP.F90:2625:41:

 2625 |         standardNames = (/"ice_fraction",&
      |                                         1
Error: Different CHARACTER lengths (12/21) in array constructor at (1)
make[1]: *** [module_EARTH_GRID_COMP.o] Error 1

The offending code is

      call NUOPC_FieldDictionarySetSyno( &
        standardNames = (/"ice_fraction",&
                          "sea_ice_concentration"/), rc=rc)
      if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
        line=__LINE__, &
        file=__FILE__)) &
        return  ! bail out

but it needs to be padded so that the character lengths match (see the other examples in the same file just below)

      call NUOPC_FieldDictionarySetSyno( &
        standardNames = (/"ice_fraction         ",&
                          "sea_ice_concentration"/), rc=rc)
      if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
        line=__LINE__, &
        file=__FILE__)) &
        return  ! bail out

I checked the head of develop and the bug is still there (slightly different line numbers). I will be submitting a PR to fix this.

Can you please watch out for these types of errors and notify the developers? Thanks.

climbfuji commented 4 years ago

PR: https://github.com/NOAA-EMC/NEMS/pull/42

climbfuji commented 4 years ago

@junwang-noaa @DusanJovic-NOAA @RatkoVasic-NOAA @MinsukJi-NOAA