Skip to content

Fix warnings in copygb, tocgrib2, and tocgrib2super utilities#824

Open
AlysonStahl-NOAA wants to merge 7 commits intoNOAA-EMC:developfrom
AlysonStahl-NOAA:as_warnings2
Open

Fix warnings in copygb, tocgrib2, and tocgrib2super utilities#824
AlysonStahl-NOAA wants to merge 7 commits intoNOAA-EMC:developfrom
AlysonStahl-NOAA:as_warnings2

Conversation

@AlysonStahl-NOAA
Copy link
Contributor

@AlysonStahl-NOAA AlysonStahl-NOAA commented Feb 8, 2025

Fixes #813
Fixes #814
Fixes #815

@AlysonStahl-NOAA AlysonStahl-NOAA changed the title Fix warnings in tocgrib2 Fix warnings in some grib utilities Feb 8, 2025
@AlysonStahl-NOAA AlysonStahl-NOAA changed the title Fix warnings in some grib utilities Fix warnings in copygb, tocgrib2, and tocgrib2super utilities Feb 8, 2025
@AlysonStahl-NOAA AlysonStahl-NOAA marked this pull request as ready for review February 8, 2025 01:15
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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

warning in copygb warnings in tocgrib2super warnings in tocgrib2

2 participants