-
Notifications
You must be signed in to change notification settings - Fork 136
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
modern_diag_manager: fms_diag_do_reduction #1321
modern_diag_manager: fms_diag_do_reduction #1321
Conversation
…arguments are correct
LOGICAL, DIMENSION(:,:,:,:), pointer, INTENT(in) :: mask !< The location of the mask | ||
CLASS(*), DIMENSION(:,:,:,:), pointer, INTENT(in) :: rmask !< The masking values |
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.
do these have to be pointer? Is it just because their input arguments are pointers? Is that a requirement in Fortran? Since Fortran is pass by reference, I don't think these need to be pointers.
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.
It is required because I am doing if(associated(mask))
|
||
real(kind=r8_kind) :: out_weight | ||
|
||
out_weight = 1.0_r8_kind |
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.
Did you run this by @mlee03 ?
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.
1.0_r8_kind
is preferred over real(1.0 kind=r8_kind)
type is (real(kind=r8_kind)) | ||
out_weight = real(weight, kind = r8_kind) | ||
type is (real(kind=r4_kind)) | ||
out_Weight = real(weight, kind = r4_kind) |
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 declared out_Weight
as r8, but here you are making it r4? Maybe you need out_Weight
to be class(*) and allocate it to whatever weight
is? Then out_weight = 1.0_r8_kind
would be in the class default
branch of the select type
. Otherwise you should have kind=r8_kind
on this line I think.
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.
out_weight
is going to be saved as a r8_kind
and converted to r4_kind
if needed when doing the mad.
That should be kind=r8_kind
no kind=r4_kind
@thomas-robinson I think everything was addressed in 91a249a |
field_modern(1:ie,1:je,1:ke,1:1) => field | ||
field_remap(1:ie,1:je,1:ke,1:1) => field | ||
if (present(mask)) mask_remap(1:ie,1:je,1:ke,1:1) => mask | ||
if (present(rmask)) rmask_remap(1:ie,1:je,1:ke,1:1) => rmask |
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 isn't rmask declared with contiguous
?
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 am not sure why the compiler didn't complain, but i declared it ascontiguous
@uramirez8707 There is a merge conflict |
@thomas-robinson the "merge conflict" was resolved |
Description
This contains part of #1295
Fixes # (issue)
How Has This Been Tested?
CI
Checklist:
make distcheck
passes