Skip to content

dcuair fails to compile #170

@mzuranski

Description

@mzuranski

Gempak 7.19.0.1, Ubuntu 24.04 LTS, gfortran 13

Thinking an install of the latest release was working well, turns out dcuair wasn't compiled... possibly others. After some digging I found two problems with gempak/source/programs/dc/dcuair/dcudcd.f that were breaking:

make
gfortran -fallow-invalid-boz -fallow-argument-mismatch -fno-stack-protector -fno-second-underscore -fno-range-check -fd-lines-as-comments -I/home/gempak/NAWIPS/gempak/include -I/home/gempak/NAWIPS/os/linux64/include -g -O -c -o dcudcd.o dcudcd.f
dcudcd.f:245:72:

  245 |                                 ipres =  INDEX ( bultin ( 1: lenbul ), '21212' )
      |                                                                        1
Error: Unterminated character constant beginning at (1)
dcudcd.f:248:60:

  248 |                                        IF ( .not.  zwind ) good  = .true.
      |                                                            1
Error: Syntax error in IF-clause after (1)
make: *** [<builtin>: dcudcd.o] Error 1

Both exist in this code block:

C*                              If there are the 21212 group winds in 
C*                              the TTBB message, still decode the following
C*                              PPBB winds.
C
								ipres =  INDEX ( bultin ( 1: lenbul ), '21212' )
								IF  ( ipres .ne. 0 )  THEN
									IF ( part .eq.  'PPBB' )  THEN
                                                                           IF ( .not.  zwind ) good  = .true.
                                                                        END IF
								END IF

The problem is those two lines exceed 72 characters and that's when the interpreter cuts off, leaving it to read invalid syntax. I'm sure there's some compiler flag that could/should be set, but reducing the white space within those two lines was able to resolve this for me:

C*                              If there are the 21212 group winds in 
C*                              the TTBB message, still decode the following
C*                              PPBB winds.
C
                                ipres = INDEX(bultin(1:lenbul),'21212')
                                IF  ( ipres .ne. 0 )  THEN
                                    IF ( part .eq.  'PPBB' )  THEN
                                       IF (.not.  zwind ) good  = .true.
                                    END IF
                                END IF

If feel like if there is a compiler flag that could address this that'd be better, just in case it's more than this one program. I'm also afraid to start tugging on the thread of actually curating this code, because.... oh man....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions