Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/Intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
cd g2
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/nceplibs/jasper;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-bacio;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-w3emc;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-ip;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-g2c" -DBUILD_UTILS=OFF ..
cmake -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/nceplibs/jasper;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-bacio;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-w3emc;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-ip;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-g2c" -DBUILD_UTILS=ON ..
make -j2

- name: test
Expand Down
2 changes: 1 addition & 1 deletion utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$")
set_target_properties(copygb PROPERTIES COMPILE_FLAGS "-r8 -auto -heap-arrays")
set_target_properties(grbindex PROPERTIES COMPILE_FLAGS "-convert big_endian -fpp")
elseif(CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$")
set_target_properties(copygb PROPERTIES COMPILE_FLAGS "-fdefault-real-8")
set_target_properties(copygb PROPERTIES COMPILE_FLAGS "-fdefault-real-8 -frecursive")
set_target_properties(grbindex PROPERTIES COMPILE_FLAGS "-fconvert=big-endian -cpp")
endif()

Expand Down
14 changes: 7 additions & 7 deletions utils/tocgrib2.F90
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ end subroutine getgb2p2
call baopenw(lugo, fileo, iret1)
if (iret1 .ne. 0) then
write(6, fmt='(" Error opening output transmission file: ", &
A200)') fileo
&A200)') fileo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is happening here? Why is there a line continuation character on the second line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warnings for this one and tocgrib2super was for the lack of ampersand. I believe it's standard to have the ampersand there and at the end of the first line if the continued line is a string constant.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead, just put it all on one line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a few other WRITE expressions using the same leading ampersand to address the -Wampersand warning which would result in pretty long lines, such as:

     WRITE (6, FMT='(//, '' ******** RECAP OF THIS EXECUTION '', &
          &''********'', /, 5X, ''READ  '', I6, '' INDIVIDUAL IDS'', &
          &/, 5X, ''WROTE '', I6, '' BULLETINS OUT FOR TRANSMISSION'', &
          &//)') nrec, NBUL

Do we want to just put the shorter ones on one line, or address all of the other warnings this way?

write(6, fmt='(" baopenw error = ", I5)') iret1
stop 20
endif
Expand All @@ -135,13 +135,13 @@ end subroutine getgb2p2
nrec = nrec + 1
if (ios .ne. 0) then
write(6, fmt='(" Error reading PDS from input file. iostat = " &
, i5)') ios
&, i5)') ios
cycle
endif

! Echo input record
WRITE(6, FMT='(/, ''***********************************'', &
''********************************************'')')
&''********************************************'')')
write(6, '(A, I0)') ' Start new record no. = ', nrec
write(6, '(73A)') ' DESC=', DESC(1:73)
write(6, '(11A)') ' WMOHEAD=', WMOHEAD(1:11)
Expand Down Expand Up @@ -205,17 +205,17 @@ end subroutine getgb2p2
! CLOSING SECTION
999 if (nbul .EQ. 0) then
WRITE (6, FMT='('' SOMETHING WRONG WITH DATA CARDS...'', &
''NOTHING WAS PROCESSED'')')
&''NOTHING WAS PROCESSED'')')
! CALL W3TAGE('tocgrib2')
stop 19
else
call baclose (LUGB, iret)
call baclose (LUGI, iret)
call baclose (LUGO, iret)
WRITE (6, FMT='(//, '' ******** RECAP OF THIS EXECUTION '', &
''********'', /, 5X, ''READ '', I6, '' INDIVIDUAL IDS'', &
/, 5X, ''WROTE '', I6, '' BULLETINS OUT FOR TRANSMISSION'', &
//)') nrec, NBUL
&''********'', /, 5X, ''READ '', I6, '' INDIVIDUAL IDS'', &
&/, 5X, ''WROTE '', I6, '' BULLETINS OUT FOR TRANSMISSION'', &
&//)') nrec, NBUL
endif
! TEST TO SEE IF ANY BULLETINS MISSING
mbul = nrec - nbul
Expand Down
14 changes: 7 additions & 7 deletions utils/tocgrib2super.F90
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ end subroutine getgb2p2
call baopenw(lugo,fileo,iret1)
if (iret1 .ne. 0) then
write(6,fmt='(" Error opening output transmission file: ", &
A200)') fileo
&A200)') fileo
write(6,fmt='(" baopenw error = ",I5)') iret1
stop 20
endif
Expand Down Expand Up @@ -207,14 +207,14 @@ end subroutine getgb2p2
nrec = nrec + 1
if (ios .ne. 0) then
write(6,fmt='(" Error reading PDS from input file. iostat = " &
,i5)') ios
&,i5)') ios
cycle
endif
!
! Echo input record
!
WRITE(6,FMT='(/,''***********************************'', &
''********************************************'')')
&''********************************************'')')
write(6,'(A,I0)') ' Start new record no. = ',nrec
write(6,'(73A)') ' DESC=',DESC(1:73)
write(6,'(11A)') ' WMOHEAD=',WMOHEAD(1:11)
Expand Down Expand Up @@ -279,17 +279,17 @@ end subroutine getgb2p2
!
999 if (nbul .EQ. 0) then
WRITE (6,FMT='('' SOMETHING WRONG WITH DATA CARDS...'', &
''NOTHING WAS PROCESSED'')')
&''NOTHING WAS PROCESSED'')')
! CALL W3TAGE('tocgrib2super')
stop 19
else
call baclose (LUGB,iret)
call baclose (LUGI,iret)
call baclose (LUGO,iret)
WRITE (6,FMT='(//,'' ******** RECAP OF THIS EXECUTION '', &
''********'',/,5X,''READ '',I6,'' INDIVIDUAL IDS'', &
/,5X,''WROTE '',I6,'' BULLETINS OUT FOR TRANSMISSION'', &
//)') nrec, NBUL
&''********'',/,5X,''READ '',I6,'' INDIVIDUAL IDS'', &
&/,5X,''WROTE '',I6,'' BULLETINS OUT FOR TRANSMISSION'', &
&//)') nrec, NBUL
endif
!
! TEST TO SEE IF ANY BULLETINS MISSING
Expand Down
Loading