Rate This Document
Findability
Accuracy
Completeness
Readability

Error "F90-S-0034-Syntax error at or near" Reported When Compiling the nceppost Module

Symptom

During the NCEPLIBS compilation and installation, the nceppost module reports the two errors: "F90-S-0034-Syntax error at or near & (/path/to/NCEPLIBS/NCEPLIBE-1.2.0/download/emc_post/sorc/ncep_post.fd/CMASSI.f: 6)" and "F90-S-0034-Syntax error at or near & (/path/to/NCEPLIBS/NCEPLIBE-1.2.0/download/emc_post/sorc/ncep_post.fd/CMASSI.f: 26)."

Key Process and Cause Analysis

None

Conclusion and Solution

  1. Modify the /ncep_post.fd/CMakeLists.txt file.
    1. Open the /ncep_post.fd/CMakeLists.txt file.
      vi /path/to/NCEPLIBS/NCEPLIBS-1.2.0/download/emc_post/sorc/ncep_post.fd/CMakeLists.txt
    2. Press i to enter the edit mode and add a new line above line 188:
      elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(Flang)$")
        set(CMAKE_Fortran_FLAGS "-g -ffree-form -fconvert=big-endian")
        set(CMAKE_Fortran_FLAGS_RELEASE "-O3")
        set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -ggdb -fno-unsafe-math-optimizations -frounding-math
      -fsignaling-nans -ffpe-trap=invalid,zero,overflow -fbounds-check")

      After performing 1.a, press Esc, type :set nu, and press Enter to display the line number.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  2. Perform the compilation again.
    make