-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add constituent tendency capability (#584)
Adds constituent tendency array and enables the use of individual constituent tendency variables. In order to facilitate time-splitting, this PR adds/enables the following: - ccpp_constituent_tendencies: standard name for constituent tendencies array - standard names of the form "tendency_of_CONSTITUENT" now handled by the framework - must also include "constituent = True" in metadata for the tendency Testing: unit tests: Added doctests to new check_tendency_variables function in host_cap.F90 system tests: Modified advection_test to use tendency variable and tendency array
- Loading branch information
Showing
17 changed files
with
311 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
module apply_constituent_tendencies | ||
|
||
use ccpp_kinds, only: kind_phys | ||
|
||
implicit none | ||
private | ||
|
||
public :: apply_constituent_tendencies_run | ||
|
||
CONTAINS | ||
|
||
!> \section arg_table_apply_constituent_tendencies_run Argument Table | ||
!!! \htmlinclude apply_constituent_tendencies_run.html | ||
subroutine apply_constituent_tendencies_run(const_tend, const, errcode, errmsg) | ||
! Dummy arguments | ||
real(kind_phys), intent(inout) :: const_tend(:,:,:) ! constituent tendency array | ||
real(kind_phys), intent(inout) :: const(:,:,:) ! constituent state array | ||
integer, intent(out) :: errcode | ||
character(len=512), intent(out) :: errmsg | ||
|
||
! Local variables | ||
integer :: klev, jcnst, icol | ||
|
||
errcode = 0 | ||
errmsg = '' | ||
|
||
do icol = 1, size(const_tend, 1) | ||
do klev = 1, size(const_tend, 2) | ||
do jcnst = 1, size(const_tend, 3) | ||
const(icol, klev, jcnst) = const(icol, klev, jcnst) + const_tend(icol, klev, jcnst) | ||
end do | ||
end do | ||
end do | ||
|
||
const_tend = 0._kind_phys | ||
|
||
end subroutine apply_constituent_tendencies_run | ||
|
||
end module apply_constituent_tendencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
##################################################################### | ||
[ccpp-table-properties] | ||
name = apply_constituent_tendencies | ||
type = scheme | ||
[ccpp-arg-table] | ||
name = apply_constituent_tendencies_run | ||
type = scheme | ||
[ const_tend ] | ||
standard_name = ccpp_constituent_tendencies | ||
long_name = ccpp constituent tendencies | ||
units = none | ||
type = real | kind = kind_phys | ||
dimensions = (horizontal_loop_extent, vertical_layer_dimension, number_of_ccpp_constituents) | ||
intent = inout | ||
[ const ] | ||
standard_name = ccpp_constituents | ||
long_name = ccpp constituents | ||
units = none | ||
type = real | kind = kind_phys | ||
dimensions = (horizontal_loop_extent, vertical_layer_dimension, number_of_ccpp_constituents) | ||
intent = inout | ||
[ errcode ] | ||
standard_name = ccpp_error_code | ||
long_name = Error flag for error handling in CCPP | ||
units = 1 | ||
type = integer | ||
dimensions = () | ||
intent = out | ||
[ errmsg ] | ||
standard_name = ccpp_error_message | ||
long_name = Error message for error handling in CCPP | ||
units = none | ||
type = character | kind = len=512 | ||
dimensions = () | ||
intent = out | ||
######################################################### |
Oops, something went wrong.