-
Notifications
You must be signed in to change notification settings - Fork 28
Implement diagnostics for global energy fixer, check_energy standard name update #169
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
Merged
jimmielin
merged 10 commits into
ESCOMP:development
from
jimmielin:hplin/check_energy_diags
Feb 14, 2025
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e024cc9
Initial commit for check_energy diagnostic updates
jimmielin 11ec3e0
Add check_energy_fix_diagnostics - global energy fixer diagnostics
jimmielin 26fbbff
Remove old suite definition files #166
jimmielin 2a083dc
Merge branch 'development' into hplin/check_energy_diags
jimmielin 4a0473d
Update teout standard name
jimmielin 93d5257
Merge branch 'development' into hplin/check_energy_diags
jimmielin d810a48
Merge branch 'development' into hplin/check_energy_diags
jimmielin c16c784
Merge branch 'development' into hplin/check_energy_diags
jimmielin 3369e32
Change diagnostic names to uppercase.
jimmielin ebc119c
Merge branch 'development' into hplin/check_energy_diags
jimmielin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.