-
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
Fixes mpp_domains_copy #707
Conversation
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.
Should the other overlapSpec pointers in domain2D get copied as well?
@@ -1693,16 +1742,29 @@ end subroutine mpp_get_tile_compute_domains | |||
domain_out%pe = domain_in%pe | |||
domain_out%pos = domain_in%pos | |||
|
|||
if (associated(domain_in%list)) then |
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.
Is this an actual pointer, or is it something that gets allocated?
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 a pointer that gets allocated.
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 should be changed to an allocatable then (in a different PR).
if (associated(domain_in%list)) then | ||
starting = lbound(domain_in%list, 1) | ||
ending = ubound(domain_in%list, 1) | ||
allocate(domain_out%list(starting:ending)) |
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.
Is this a pointer or an allocatable?
mpp/include/mpp_domains_util.inc
Outdated
end subroutine mpp_set_super_grid_indices | ||
|
||
!> @brief Modifies the indices of the input domain to create the supergrid domain | ||
subroutine mpp_create_super_grid(domain) |
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 think this name could cause confusion as people might think you are creating a supergrid from domain information. I would suggest a name such as mpp_create_super_grid_domain.
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.
Renames to mpp_create_super_grid_domain in fde2cad
@uramirez is this ready for review? |
@rem1776 I think those pointers are not required for any io stuff. |
@@ -161,6 +161,7 @@ module mpp_domains_mod | |||
public :: mpp_clear_group_update | |||
public :: mpp_group_update_initialized, mpp_group_update_is_set | |||
public :: mpp_get_global_domains | |||
public :: mpp_create_super_grid_domain |
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.
Since this is a destructive operation, there should be doxygen information on how to utilize this function (copy, modify).
116521c
!> @example This is an example of how to use mpp_create_super_grid_domain | ||
!! call mpp_copy_domain(domain_in, domain_out) | ||
!! call super_grid_domain(domain_out) | ||
!! domain_in is the original domain, domain_out is the domain with the supergrid indices |
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.
@bensonr This addresses your comment Since this is a destructive operation, there should be doxygen information on how to utilize this function (copy, modify).
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.
Thanks. I should have been more specific about this information also being in mpp_domains.F90. I use that as my first place for all documentation on usage, etc. I'll approve and we can augment at a later date.
!> @example This is an example of how to use mpp_create_super_grid_domain | ||
!! call mpp_copy_domain(domain_in, domain_out) | ||
!! call super_grid_domain(domain_out) | ||
!! domain_in is the original domain, domain_out is the domain with the supergrid indices |
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.
Thanks. I should have been more specific about this information also being in mpp_domains.F90. I use that as my first place for all documentation on usage, etc. I'll approve and we can augment at a later date.
Description
This PR:
Without the source code changes the test fails on the
mpp_get_compute_domains
call ondomain2
because domain2%list is never set ...How Has This Been Tested?
make check
passesmpp_create_supergrid
was implemented in NOAA-GFDL/FMScoupler#52 and it works now ...Checklist:
make distcheck
passes