Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Truncation Output Issue: Fileset Flag and Filename Handling #238

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

ezhilsabareesh8
Copy link
Contributor

In the current version of MOM6 with FMS2, truncation outputs are not produced when the fileset flag is set to SINGLE_FILE. This PR address issue 736 by setting the MULTIPLE and fixing the file handle check in MOM_PointAccel.F90.

Note that this is a temporary fix to produce the truncation output by setting the fileset toMULTIPLE. The patches can be removed when the official fix is updated in MOM6.

Copy link
Contributor

@aekiss aekiss left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @ezhilsabareesh8. Any reason to have a 50 char limit for filename? Bytes are cheap :-)

@ezhilsabareesh8
Copy link
Contributor Author

Thanks @aekiss In the original code, an uninitialized value was being passed to open() for the filename, which was misinterpreted as a massive string. This caused the following error when fileset was set to MULTIPLE:

forrtl: severe (66): output statement overflows record, unit -5, file Internal Formatted Write

I resolved the issue by switching to a fixed-length filename, which eliminated the error. I set the limit to 50 characters, though there's no specific reason for choosing this length. Increasing it to 200 or more might be safer, but GFDL typically prefers to avoid fixed-length filenames if possible. For the official fix, I hope they will develop a flexible solution that avoids this limitation.

@ezhilsabareesh8
Copy link
Contributor Author

I have increased the char limit for filename, tested it and it is producing truncation output.

@ezhilsabareesh8 ezhilsabareesh8 merged commit 1f36419 into main Oct 23, 2024
2 checks 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