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

User/lmh/fv gfs #97

Closed
wants to merge 13 commits into from
Closed

User/lmh/fv gfs #97

wants to merge 13 commits into from

Conversation

lharris4
Copy link
Contributor

This includes Zhi's updates for the new nesting capabilities. I don't know if Zhi pushed his changes to the official FMS repo or even if he has authorized such a thing.

Lucas

@wrongkindofdoctor
Copy link
Contributor

None of Zhi's changes to the mpp_domains files have been pushed to the GFDL master because Ray had problems compiling with them. Zhi made the changes on a branch that was out of sync with the main I/O development branch, so FMS will test the domains once we have worked through the I/O.

@lharris4
Copy link
Contributor Author

lharris4 commented Jul 18, 2019 via email

@wrongkindofdoctor wrongkindofdoctor self-assigned this Aug 6, 2019
@wrongkindofdoctor wrongkindofdoctor requested review from underwoo and removed request for underwoo August 6, 2019 15:26
@underwoo underwoo requested a review from bensonr August 7, 2019 14:55
Copy link
Member

@underwoo underwoo left a comment

Choose a reason for hiding this comment

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

There are some updates I would like to see added, mainly documentation and comments to help explain why choices were made. I'm sure Zhi made many of the changes, so getting the information may be difficult. We should at least make an effort to address some of these.

I would also like to see a result (regression-like test) of a run using these updates.

Lastly, two of the files had extensive updates. I, unfortunately, am not the correct person to review those changes. Please get another to at least review the changes in mpp/include/mpp_update_nest_domains.h and mpp/test_mpp_domains.F90. The test_mpp_domains.F90 review needs to ensure that the tests do test the new code.

type nest_domain_type
character(len=NAME_LENGTH) :: name
Copy link
Member

Choose a reason for hiding this comment

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

Where is the documentation for the nest_domain_type and nest_level_type? Documentation of the derived types is something we should always have.

@@ -1347,6 +1349,9 @@ end subroutine check_message_size
end if
end do

allocate(domain%tile_id_all(num_tile))
Copy link
Member

Choose a reason for hiding this comment

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

This is a comment about code not touched: The tile_id_local allocatable array is not deallocated in this routine. While most compilers will, possibly, automatically deallocate it is much safer to add a deallocate in the routine. I'm not going to have this hold up the merge, but it is something that should be addressed.

@@ -512,7 +512,7 @@ end subroutine init_nonblock_type
logical :: native !true if I'm on the pelist of this domain
integer :: listsize, listpos
integer :: n
integer, dimension(11) :: msg, info !pe and compute domain of each item in list
integer, dimension(12) :: msg, info !pe and compute domain of each item in list
Copy link
Member

Choose a reason for hiding this comment

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

I do not like this 12 (previously 11) to be coded like this. It does not allow future developers to know why the dimension of these arrays is specifically 12.

@@ -571,12 +571,13 @@ end subroutine init_nonblock_type
else
info(11) = 0
endif
info(12) = domain%ntiles
Copy link
Member

Choose a reason for hiding this comment

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

I am concerned if the info(11) = 0 on line 572 should be info(12) = 0. Without knowing why info has 12 elements, I am unable to determine the reason.

!broadcast your info across current pelist and unpack if needed
listpos = 0
do n = 0,mpp_npes()-1
msg = info
if( mpp_pe().EQ.pes(n) .AND. debug )write( errunit,* )'PE ', mpp_pe(), 'broadcasting msg ', msg
call mpp_broadcast( msg, 11, pes(n) )
call mpp_broadcast( msg, 12, pes(n) )
Copy link
Member

Choose a reason for hiding this comment

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

Here is that 12 again.

logical :: native !true if I'm on the pelist of this domain
integer :: listsize, listpos, nestsize(size(tile_nest(:)))
integer :: n, tile, ind, num_nest
integer, dimension(15) :: msg, info !pe and compute domain of each item in list
Copy link
Member

Choose a reason for hiding this comment

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

And now we have 15 elements.

@@ -319,6 +325,7 @@ module mpp_domains_mod
type domain1D_spec
private
type(domain_axis_spec) :: compute
type(domain_axis_spec) :: global
Copy link
Member

Choose a reason for hiding this comment

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

derived type documentation?

@@ -535,7 +535,7 @@ module sat_vapor_pres_mod

! The default values below preserve the behavior of omsk and earlier revisions.
logical :: show_bad_value_count_by_slice=.true.
logical :: show_all_bad_values=.false.
logical :: show_all_bad_values=.true. ! Changed LMH 22may2018
Copy link
Member

Choose a reason for hiding this comment

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

A change in default behavior should be included in the release notes.

@@ -535,7 +535,7 @@ module sat_vapor_pres_mod

! The default values below preserve the behavior of omsk and earlier revisions.
logical :: show_bad_value_count_by_slice=.true.
logical :: show_all_bad_values=.false.
logical :: show_all_bad_values=.true. ! Changed LMH 22may2018
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there universal acceptance for changing the default behavior of a namelist controlled variable?

Copy link
Contributor

@bensonr bensonr left a comment

Choose a reason for hiding this comment

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

In mpp_do_update_nest.h we define nest_domain to be type nest_level_type at lines 23 and 264, but at line 860 we define nest as nest_level_type and have nest_domain as nest_domain_type. It would be beneficial to have consistent naming within this file to keep confusion to a minimum. I can make incorporate this branch into my fork and make the requested changes.

In mpp_define_nest_domains.inc there are times where nest_level is an integer and nest_domains is nest_level_type. This can be confusing for future developers.

In mpp_update_nest_domains.h nest_level is used as an integer and may be confused with nest_level_type for future developers.

@underwoo underwoo added this to the 2020.01 milestone Nov 27, 2019
@underwoo underwoo closed this Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants