-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from peverwhee/diagnostics
Add CAM diagnostic schemes
- Loading branch information
Showing
14 changed files
with
786 additions
and
113 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
module kessler_diagnostics | ||
! | ||
! Diagnostics for use by the Kessler physics suite only | ||
! | ||
|
||
use ccpp_kinds, only: kind_phys | ||
|
||
implicit none | ||
private | ||
save | ||
|
||
public :: kessler_diagnostics_init ! init routine | ||
public :: kessler_diagnostics_run ! main routine | ||
|
||
CONTAINS | ||
|
||
!> \section arg_table_kessler_diagnostics_init Argument Table | ||
!! \htmlinclude kessler_diagnostics_init.html | ||
subroutine kessler_diagnostics_init(errmsg, errflg) | ||
use cam_history, only: history_add_field | ||
use cam_history_support, only: horiz_only | ||
|
||
character(len=512), intent(out) :: errmsg | ||
integer, intent(out) :: errflg | ||
|
||
! Local variables: | ||
|
||
errmsg = '' | ||
errflg = 0 | ||
|
||
call history_add_field('PRECT', 'total_precipitation_rate_at_surface', horiz_only, 'avg', 'm s-1') | ||
|
||
end subroutine kessler_diagnostics_init | ||
|
||
!> \section arg_table_kessler_diagnostics_run Argument Table | ||
!! \htmlinclude kessler_diagnostics_run.html | ||
subroutine kessler_diagnostics_run(precl, errmsg, errflg) | ||
|
||
use cam_history, only: history_out_field | ||
!------------------------------------------------ | ||
! Input / output parameters | ||
!------------------------------------------------ | ||
! State variables | ||
real(kind_phys), intent(in) :: precl(:) ! Total precipitation | ||
! CCPP error handling variables | ||
character(len=512), intent(out) :: errmsg | ||
integer, intent(out) :: errflg | ||
|
||
errmsg = '' | ||
errflg = 0 | ||
|
||
call history_out_field('PRECT', precl) | ||
|
||
end subroutine kessler_diagnostics_run | ||
|
||
!======================================================================= | ||
|
||
end module kessler_diagnostics |
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,41 @@ | ||
[ccpp-table-properties] | ||
name = kessler_diagnostics | ||
type = scheme | ||
|
||
[ccpp-arg-table] | ||
name = kessler_diagnostics_init | ||
type = scheme | ||
[ errmsg ] | ||
standard_name = ccpp_error_message | ||
units = none | ||
type = character | kind = len=512 | ||
dimensions = () | ||
intent = out | ||
[ errflg ] | ||
standard_name = ccpp_error_code | ||
units = 1 | ||
type = integer | ||
dimensions = () | ||
intent = out | ||
|
||
[ccpp-arg-table] | ||
name = kessler_diagnostics_run | ||
type = scheme | ||
[ precl ] | ||
standard_name = total_precipitation_rate_at_surface | ||
units = m s-1 | ||
type = real | kind = kind_phys | ||
dimensions = (horizontal_loop_extent) | ||
intent = in | ||
[ errmsg ] | ||
standard_name = ccpp_error_message | ||
units = none | ||
type = character | kind = len=512 | ||
dimensions = () | ||
intent = out | ||
[ errflg ] | ||
standard_name = ccpp_error_code | ||
units = 1 | ||
type = integer | ||
dimensions = () | ||
intent = out |
Oops, something went wrong.