-
Notifications
You must be signed in to change notification settings - Fork 33
Add support for energy checker for ZM deep convection scheme #298
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
Open
jimmielin
wants to merge
8
commits into
ESCOMP:development
Choose a base branch
from
jimmielin:hplin/zm_check_energy_chng
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+121
−0
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
94aa6c2
Add support for energy checker for ZM deep convection scheme
jimmielin 09a513e
Add energy checker to CAM4 suite; remove from ZM suite as snapshot is…
jimmielin 1c87fdc
Update schemes/zhang_mcfarlane/zm_prepare_flux_for_check_energy.F90
jimmielin c12b8f4
Update rice standard name in response to review comments.
jimmielin 40805d1
Merge branch 'development' into hplin/zm_check_energy_chng
jimmielin 9cd8384
After removing rice
jimmielin 8124a7c
Revert change to zm_convr.meta: it will not be relevant
jimmielin 6c09d3d
Remove SAVE from module; move kind_phys
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
57 changes: 57 additions & 0 deletions
57
schemes/zhang_mcfarlane/zm_prepare_flux_for_check_energy.F90
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,57 @@ | ||
| ! Prepare flux variables for energy checker after ZM deep convection | ||
| ! Has to run after both zm_convr (provides reserved liquid) | ||
| ! and zm_conv_evap+interstitial to deep (provides snow_dp and prec_dp) have | ||
| ! been ran. | ||
| ! The resulting net liquid and (lwe) ice fluxes are combined and provided to | ||
| ! the check_energy_chng CCPPized scheme. | ||
| module zm_prepare_flux_for_check_energy | ||
| implicit none | ||
| private | ||
|
|
||
| public :: zm_prepare_flux_for_check_energy_run | ||
|
|
||
| contains | ||
|
|
||
| !> \section arg_table_zm_prepare_flux_for_check_energy_run Argument Table | ||
| !! \htmlinclude zm_prepare_flux_for_check_energy_run.html | ||
| subroutine zm_prepare_flux_for_check_energy_run( & | ||
| ncol, & | ||
| prec_dp, rliq, snow_dp, & | ||
| scheme_name, & | ||
| flx_cnd, flx_ice, & | ||
| errmsg, errflg) | ||
|
|
||
| use ccpp_kinds, only: kind_phys | ||
|
|
||
| ! Input arguments | ||
| integer, intent(in) :: ncol | ||
| real(kind_phys), intent(in) :: prec_dp(:) ! Deep convection precipitation rate [m s-1] | ||
| real(kind_phys), intent(in) :: rliq(:) ! Reserved liquid water tendency [m s-1] | ||
| real(kind_phys), intent(in) :: snow_dp(:) ! Deep convection frozen precipitation rate [m s-1] | ||
|
|
||
| ! Output arguments | ||
| character(len=16), intent(out) :: scheme_name ! Scheme name for energy checking | ||
| real(kind_phys), intent(out) :: flx_cnd(:) ! Liquid fluxes [m s-1] | ||
| real(kind_phys), intent(out) :: flx_ice(:) ! Ice fluxes [m s-1] | ||
| character(len=512), intent(out) :: errmsg | ||
| integer, intent(out) :: errflg | ||
|
|
||
| ! Local variables | ||
| integer :: i | ||
|
|
||
| errmsg = '' | ||
| errflg = 0 | ||
|
|
||
| ! Set scheme name for energy checking | ||
| scheme_name = "convect_deep_zm" | ||
|
|
||
| ! Combine precipitation and reserved liquid for total liquid+ice flux | ||
| ! This represents net liquid and ice fluxes through column boundaries | ||
| flx_cnd(:ncol) = prec_dp(:ncol) + rliq(:ncol) | ||
|
|
||
| ! Frozen precipitation represents net ice fluxes through column boundaries | ||
| flx_ice(:ncol) = snow_dp(:ncol) | ||
|
|
||
| end subroutine zm_prepare_flux_for_check_energy_run | ||
|
|
||
| end module zm_prepare_flux_for_check_energy | ||
61 changes: 61 additions & 0 deletions
61
schemes/zhang_mcfarlane/zm_prepare_flux_for_check_energy.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,61 @@ | ||
| [ccpp-table-properties] | ||
| name = zm_prepare_flux_for_check_energy | ||
| type = scheme | ||
|
|
||
| [ccpp-arg-table] | ||
| name = zm_prepare_flux_for_check_energy_run | ||
| type = scheme | ||
| [ ncol ] | ||
| standard_name = horizontal_loop_extent | ||
| units = count | ||
| type = integer | ||
| dimensions = () | ||
| intent = in | ||
| [ prec_dp ] | ||
| standard_name = lwe_precipitation_rate_at_surface_due_to_deep_convection | ||
| units = m s-1 | ||
| type = real | kind = kind_phys | ||
| dimensions = (horizontal_loop_extent) | ||
| intent = in | ||
| [ rliq ] | ||
| standard_name = vertically_integrated_cloud_liquid_water_tendency_due_to_all_convection_to_be_applied_later_in_time_loop | ||
| units = m s-1 | ||
| type = real | kind = kind_phys | ||
| dimensions = (horizontal_loop_extent) | ||
| intent = in | ||
| [ snow_dp ] | ||
| standard_name = lwe_frozen_precipitation_rate_at_surface_due_to_deep_convection | ||
| units = m s-1 | ||
| type = real | kind = kind_phys | ||
| dimensions = (horizontal_loop_extent) | ||
| intent = in | ||
| [ scheme_name ] | ||
| standard_name = scheme_name | ||
| units = none | ||
| type = character | kind = len=16 | ||
| dimensions = () | ||
| intent = out | ||
| [ flx_cnd ] | ||
| standard_name = net_liquid_and_lwe_ice_fluxes_through_top_and_bottom_of_atmosphere_column | ||
| units = m s-1 | ||
| type = real | kind = kind_phys | ||
| dimensions = (horizontal_loop_extent) | ||
| intent = out | ||
| [ flx_ice ] | ||
| standard_name = net_lwe_ice_fluxes_through_top_and_bottom_of_atmosphere_column | ||
| units = m s-1 | ||
| type = real | kind = kind_phys | ||
| dimensions = (horizontal_loop_extent) | ||
| intent = out | ||
| [ 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize this is copying exactly what is in CAM, but is this actually the correct equation? If
flx_cndis supposed to be the total liquid+ice flux, and the reserved condensate values are considered "flux", then shouldn't this equation actually be:I am guessing this is actually a question for @PeterHjortLauritzen and/or @swrneale.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ricehas now been removed from ZM and throughout CAM