src/offline/cable_output.F90: Update Tmx and Tmn normalisation factor#711
Merged
SeanBryan51 merged 2 commits intomainfrom Mar 13, 2026
Merged
Conversation
Whyborn
reviewed
Mar 13, 2026
Contributor
Whyborn
left a comment
There was a problem hiding this comment.
Do we have to cast output%interval * int(dels) to 4 byte reals? Why are we converting dels to INT, and then casting the result to a REAL? Can't we just leave dels as a REAL?
Seems like it should read
out%Tmx = out%Tmx/NINT((output%interval * dels) / 86400)
I think that would give the same result, assuming default 4 byte precision?
SeanBryan51
commented
Mar 13, 2026
Whyborn
approved these changes
Mar 13, 2026
Collaborator
Author
|
Just confirmed your suggestion gives the same results as expected. Thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change updates the normalisation factor used to compute the monthly averages for variables
TmxandTmnto be rounded to the nearest integer, as the normalisation represents the number of records which are averaged in the monthly interval.This change is required to demonstrate bitwise equivalence with the new parallel I/O output module (#655).
Type of change
Testing
Site tests show no differences as
TmxandTmnis not available when outputting at all time steps:Spatial tests show precision level differences in
TmxandTmnVariables are equivalent if we allow for an absolute tolerance of
1e-5:📚 Documentation preview 📚: https://cable--711.org.readthedocs.build/en/711/