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.
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
The send_data math (field buffer update) functions. #1131
The send_data math (field buffer update) functions. #1131
Changes from 34 commits
6fa06b7
c7b4687
03b3288
cca95af
ab326c5
92f5067
bc688a5
47fb5a4
46a4b4b
f120ca2
f3ddae9
a7bc290
46c909c
cd133a3
e860e3d
08cacb8
8f819cb
4324b3e
79cd026
4430ab2
91049f5
f8ada45
5dbee60
71bbd48
8eed227
7e51b8f
c9c38d5
8190672
2b45ca6
cfaccac
acb3f42
87adf19
ca10d14
beebd46
7aba81b
2b688dc
c2615ba
39ffc6e
004ad06
9ff1c78
95e5e2c
3a0a674
f2b5b6d
8047cea
2653656
f31d685
76a2241
1583e90
8faab40
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why aren't these variables private? The type can be public, but shouldn't the variables be private? https://github.com/NOAA-GFDL/FMS/blob/main/CODE_STYLE.md#derived-types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm leaving this one for last. They are replacing / encapsulating fields that were public. The changes I would have to make to old code would be even more if they were made private. But the other two classes which are introduced in this PR should be changed to have their fields private.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK Done. But for the sake of supporting a simpler unit test, I had to also add this function initialize_for_ut() for fmsDiagOutfield_type. We may want to discuss it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add documentation about why these variables are public because it goes against the FMS coding standards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lacking descriptions of all arguments if they are not obvious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ganganoaa We don't require updating old code/variables. It's too onerous on developers because, like you said, it's not obvious what some of the variables are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the
=> null()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still needs to be fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this? Should it be a parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The the current diag_manager send_data_3d, there are several uses of magic numbers 0.5_r4_kind and 0.5_r8_kind. The same value, whatever it is, needs to be passed to one of the math functions. I used READ rmask_threshold to hold and pass the value being used. I will update comments.