Skip to content

Widen rDate log formats that overflow to asterisks - #457

Merged
billsacks merged 1 commit into
ESCOMP:mainfrom
ACCESS-NRI:rdate-log-format
Oct 27, 2026
Merged

billsacks merged 1 commit into
ESCOMP:mainfrom
ACCESS-NRI:rdate-log-format

Conversation

@anton-seaice

Copy link
Copy Markdown
Contributor

Description of changes

Widen three log format statements that print yyyymmdd + fraction of day dates. An 8-digit date with 5 (or 6) decimals needs 14 (or 15) characters, so f13.5 / f13.6 always overflow and the values print as asterisks. This made the limit abort in shr_stream_findBounds hard to diagnose, as the dates in the error message were unreadable.

  • streams/dshr_stream_mod.F90: the two ERROR: limit on and rDateIn >= rDategvd writes, f13.5 -> f20.4 (matching the existing rDateIn lt rDatelvd error and the rDateIn,rDatelvd,rDategvd debug write in the same routine)
  • streams/dshr_strdata_mod.F90: the rdateLB,rdateM,rdateUB write in shr_strdata_readLBUB, f13.6 -> f20.6

Example output before:

(shr_stream_findBounds)  ERROR: limit on and rDateIn >= rDategvd*************  *************
(shr_strdata_readLBUB) Stream: 1 rdateLB,rdateM,rdateUB =   *************  *************  *************

After:

(shr_stream_findBounds)  ERROR: limit on and rDateIn >= rDategvd       20240201.5000         20240131.8750
(shr_strdata_readLBUB) Stream: 1 rdateLB,rdateM,rdateUB =        20000101.062500       20000101.093750       20000101.187500

Testing performed (e.g. aux_cdeps, CESM prealpha, etc): Compiled the old and new write statements standalone with ifx and printed representative dates (output above). Not run through aux_cdeps.

🤖 Generated with Claude Code

yyyymmdd.fraction dates need at least 14 characters, so f13.5/f13.6
always printed asterisks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
if (limit) then
if (strm%mainproc) then
write(strm%logunit,'(2a,2(f13.5,2x))') subname,&
write(strm%logunit,'(2a,2(f20.4,2x))') subname,&

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@anton-seaice
anton-seaice marked this pull request as ready for review October 27, 2026 04:05
@anton-seaice

Copy link
Copy Markdown
Contributor Author

ready to go @mvertens @billsacks

@billsacks billsacks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the fix!

@billsacks
billsacks merged commit 8b51a06 into ESCOMP:main Oct 27, 2026
1 check passed
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.

2 participants