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

Added fix for blocking factor of 0 in mppnccombine #275

Merged
merged 5 commits into from
Feb 12, 2024

Conversation

0cole
Copy link
Contributor

@0cole 0cole commented Feb 8, 2024

Implemented the working fix in mppnccombine.c. A bug occurred when the blocking factor (bf) was set to 0 with the flag -k 0. In this case, if the number of records (nrecs) exceeded the maximum block size (MAX_BF) and the number of records was not an integer multiple of MAX_BF, time slices would have been lost.

The fix addresses this issue by ensuring that the correct number of blocks (nblocks) is calculated even when (bf) is set to 0. A subtest has been created in Test02-mppnccombine.sh that tests for this edge case where bf is set to 0.

Fixes #272

@rem1776 rem1776 self-requested a review February 9, 2024 17:51
Copy link
Contributor

@rem1776 rem1776 left a comment

Choose a reason for hiding this comment

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

looks good! just one little nitpick for the code style

postprocessing/mppnccombine/mppnccombine.c Outdated Show resolved Hide resolved
@rem1776 rem1776 merged commit 65c34e7 into NOAA-GFDL:master Feb 12, 2024
4 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.

mppnccombine data loss
2 participants