Skip to content

+Use I0 format to simplify integer output#960

Merged
Hallberg-NOAA merged 1 commit into
NOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA:use_I0_integer_format
Sep 22, 2025
Merged

+Use I0 format to simplify integer output#960
Hallberg-NOAA merged 1 commit into
NOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA:use_I0_integer_format

Conversation

@Hallberg-NOAA
Copy link
Copy Markdown
Member

Use the I0 format that was introduced with Fortran 95 in 155 lines scattered across 40 files to simplify or shorten some error messages. In 21 cases, adjustl() calls that are no longer necessary for intended formatting were also eliminated. These changes have the effect of ensuring that there are still appropriate messages if there are, for example, more than 99 vertical layers or 9999 points (total) in a horizontal directions or more than 9999 PEs. In 15 cases, this change allowed for the elimination or reduction of if tests that formatted output based on the size of an integer. All answers are bitwise identical but there there may be some minor formatting changes in some error messages.

@Hallberg-NOAA Hallberg-NOAA added the refactor Code cleanup with no changes in functionality or results label Aug 24, 2025
@Hallberg-NOAA Hallberg-NOAA force-pushed the use_I0_integer_format branch from 1e98062 to b746940 Compare August 26, 2025 10:12
Comment thread src/ALE/MOM_hybgen_unmix.F90
Comment thread src/ALE/MOM_remapping.F90
Copy link
Copy Markdown

@foxtran foxtran left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM!

@adcroft adcroft force-pushed the use_I0_integer_format branch from 1103a19 to 0ff1106 Compare September 19, 2025 20:37
  Use the I0 format that was introduced with Fortran 95 in 155 lines scattered
across 40 files to simplify or shorten some error messages.  In 21 cases,
adjustl() calls that are no longer necessary for intended formatting were also
eliminated.  These changes have the effect of ensuring that there are still
appropriate messages if there are, for example, more than 99 vertical layers or
9999 points (total) in a horizontal directions or more than 9999 PEs.  In 15
cases, this change allowed for the elimination or reduction of if tests that
formatted output based on the size of an integer.  All answers are bitwise
identical but there there may be some minor formatting changes in some error
messages.
@Hallberg-NOAA
Copy link
Copy Markdown
Member Author

This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/28921.

@Hallberg-NOAA Hallberg-NOAA merged commit 3138f84 into NOAA-GFDL:dev/gfdl Sep 22, 2025
52 checks passed
@Hallberg-NOAA Hallberg-NOAA deleted the use_I0_integer_format branch March 20, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Code cleanup with no changes in functionality or results

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants