-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement diagnostics for global energy fixer, check_energy standard …
…name update (#169) Originator(s): @jimmielin Summary (include the keyword ['closes', 'fixes', 'resolves'] and issue number): * Fixes #161: Add check_energy related history output variables to check_energy_diagnostics * Fixes #166: Need to remove old CAM suite definition files * Fixes #176 (updates `teout` standard name to `vertically_integrated_total_energy_using_dycore_energy_formula_at_end_of_physics_timestep`) Companion PR in SIMA: ESCOMP/CAM-SIMA#339 Describe any changes made to the namelist: N/A List all files eliminated and why: ``` Fix #166 to remove old SDF files from scoping exercise D suites/suite_cam4.xml D suites/suite_cam6.xml D suites/suite_cam6_silhs.xml ``` List all files added and what they do: ``` Add global energy fixer diagnostics (teinp, teout, tefix, efix) A schemes/sima_diagnostics/check_energy_fix_diagnostics.F90 A schemes/sima_diagnostics/check_energy_fix_diagnostics.meta ``` List all existing files that have been modified, and describe the changes: (Helpful git command: `git diff --name-status development...<your_branch_name>`) ``` Move some developments to check_energy_fix_diagnostics so they can be called at right time. M schemes/sima_diagnostics/check_energy_diagnostics.F90 M schemes/sima_diagnostics/check_energy_diagnostics.meta Add call to check_energy_fix_diagnostics in schemes using global energy fixer: M suites/suite_adiabatic.xml M suites/suite_cam7.xml Update teout standard name M doc/NamesNotInDictionary.txt M schemes/check_energy/check_energy_chng.meta M schemes/check_energy/check_energy_gmean/check_energy_gmean.meta M schemes/check_energy/check_energy_save_teout.meta M schemes/sima_diagnostics/check_energy_diagnostics.F90 M schemes/sima_diagnostics/check_energy_diagnostics.meta M schemes/sima_diagnostics/check_energy_gmean_diagnostics.meta ``` List any test failures: N/A Is this a science-changing update? New physics package, algorithm change, tuning changes, etc? N/A (diagnostics change only)
- Loading branch information
Showing
14 changed files
with
358 additions
and
1,180 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,73 @@ | ||
! Diagnostic scheme for check_energy_fix | ||
! This module includes diagnostics that have to be output | ||
! right after the energy fixer has been ran and check_energy_chng has updated energy state | ||
! (before the fluxes for check_energy_chng are zeroed out) | ||
module check_energy_fix_diagnostics | ||
use ccpp_kinds, only: kind_phys | ||
|
||
implicit none | ||
private | ||
save | ||
|
||
public :: check_energy_fix_diagnostics_init | ||
public :: check_energy_fix_diagnostics_run | ||
|
||
contains | ||
|
||
!> \section arg_table_check_energy_fix_diagnostics_init Argument Table | ||
!! \htmlinclude check_energy_fix_diagnostics_init.html | ||
subroutine check_energy_fix_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 | ||
|
||
! History add field calls | ||
call history_add_field('TEINP', 'vertically_integrated_total_energy_using_dycore_energy_formula_at_start_of_physics_timestep', horiz_only, 'inst', 'J m-2') | ||
call history_add_field('TEFIX', 'vertically_integrated_total_energy_using_dycore_energy_formula', horiz_only, 'inst', 'J m-2') | ||
call history_add_field('TEOUT', 'vertically_integrated_total_energy_using_dycore_energy_formula_at_end_of_physics_timestep', horiz_only, 'inst', 'J m-2') | ||
call history_add_field('EFIX', 'net_sensible_heat_flux_through_top_and_bottom_of_atmosphere_column_from_global_total_energy_correction', horiz_only, 'inst', 'J m-2') | ||
|
||
end subroutine check_energy_fix_diagnostics_init | ||
|
||
!> \section arg_table_check_energy_fix_diagnostics_run Argument Table | ||
!! \htmlinclude check_energy_diagnostics_run.html | ||
subroutine check_energy_fix_diagnostics_run( & | ||
te_ini_dyn, te_cur_dyn, & | ||
teout, & | ||
eshflx, & | ||
errmsg, errflg) | ||
|
||
use cam_history, only: history_out_field | ||
!------------------------------------------------ | ||
! Input / output parameters | ||
!------------------------------------------------ | ||
! State variables | ||
real(kind_phys), intent(in) :: te_ini_dyn(:) | ||
real(kind_phys), intent(in) :: te_cur_dyn(:) | ||
real(kind_phys), intent(in) :: teout(:) | ||
real(kind_phys), intent(in) :: eshflx(:) | ||
|
||
|
||
! CCPP error handling variables | ||
character(len=512), intent(out) :: errmsg | ||
integer, intent(out) :: errflg | ||
|
||
errmsg = '' | ||
errflg = 0 | ||
|
||
! History out field calls | ||
call history_out_field('TEINP', te_ini_dyn) | ||
call history_out_field('TEOUT', teout) | ||
call history_out_field('TEFIX', te_cur_dyn) | ||
call history_out_field('EFIX', eshflx) | ||
|
||
end subroutine check_energy_fix_diagnostics_run | ||
|
||
end module check_energy_fix_diagnostics |
59 changes: 59 additions & 0 deletions
59
schemes/sima_diagnostics/check_energy_fix_diagnostics.meta
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,59 @@ | ||
[ccpp-table-properties] | ||
name = check_energy_fix_diagnostics | ||
type = scheme | ||
|
||
[ccpp-arg-table] | ||
name = check_energy_fix_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 = check_energy_fix_diagnostics_run | ||
type = scheme | ||
[ te_ini_dyn ] | ||
standard_name = vertically_integrated_total_energy_using_dycore_energy_formula_at_start_of_physics_timestep | ||
units = J m-2 | ||
type = real | kind = kind_phys | ||
dimensions = (horizontal_dimension) | ||
intent = in | ||
[ te_cur_dyn ] | ||
standard_name = vertically_integrated_total_energy_using_dycore_energy_formula | ||
units = J m-2 | ||
type = real | kind = kind_phys | ||
dimensions = (horizontal_loop_extent) | ||
intent = in | ||
[ teout ] | ||
standard_name = vertically_integrated_total_energy_using_dycore_energy_formula_at_end_of_physics_timestep | ||
units = J m-2 | ||
type = real | kind = kind_phys | ||
dimensions = (horizontal_loop_extent) | ||
intent = in | ||
[ eshflx ] | ||
standard_name = net_sensible_heat_flux_through_top_and_bottom_of_atmosphere_column | ||
units = W m-2 | ||
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 |
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
Oops, something went wrong.