-
Notifications
You must be signed in to change notification settings - Fork 93
Add code for cloud-top height diagnostic #485
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,13 +26,14 @@ module cld_diags_kernel_mod | |
| !> | ||
| type, public, extends(kernel_type) :: cld_diags_kernel_type | ||
| private | ||
| type(arg_type) :: meta_args(20) = (/ & | ||
| type(arg_type) :: meta_args(21) = (/ & | ||
| arg_type(GH_FIELD, GH_REAL, GH_READ, WTHETA), & ! combined_cld_amount_wth | ||
| arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1), & ! cld_amount_max | ||
| arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1), & ! cld_amount_rnd | ||
| arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1), & ! cld_amount_maxrnd | ||
| arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1), & ! ceil_cld_amount_maxrnd | ||
| arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1), & ! cld_base_altitude | ||
| arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1), & ! cld_top_altitude | ||
| arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1), & ! low_cld_base_altitude | ||
| arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1), & ! very_low_cld_amount | ||
| arg_type(GH_FIELD, GH_REAL, GH_WRITE, ANY_DISCONTINUOUS_SPACE_1), & ! low_cld_amount | ||
|
|
@@ -67,6 +68,7 @@ module cld_diags_kernel_mod | |
| !> @param[in,out] cld_amount_maxrnd Cloud amount maximum-random overlap | ||
| !> @param[in,out] ceil_cld_amount_maxrnd Ceilometer filtered cloud amount maximum-random overlap | ||
| !> @param[in,out] cld_base_altitude Cloud base altitude wrt sea level | ||
| !> @param[in,out] cld_top_altitude Cloud top altitude wrt sea level | ||
| !> @param[in,out] low_cld_base_altitude Cloud base altitude wrt sea level for very low amount of cloud | ||
| !> @param[in,out] very_low_cld_amount Maximum cloud amount below 111m | ||
| !> @param[in,out] low_cld_amount Maximum cloud amount between 111 and 1949m above sea level | ||
|
|
@@ -102,6 +104,7 @@ subroutine cld_diags_code( nlayers, & | |
| cld_amount_maxrnd, & | ||
| ceil_cld_amount_maxrnd, & | ||
| cld_base_altitude, & | ||
| cld_top_altitude, & | ||
| low_cld_base_altitude, & | ||
| very_low_cld_amount, & | ||
| low_cld_amount, & | ||
|
|
@@ -127,6 +130,7 @@ subroutine cld_diags_code( nlayers, & | |
| map_w3 ) | ||
|
|
||
| use science_conversions_mod, only: feet_to_metres | ||
| use missing_data_mod, only: rmdi | ||
|
|
||
| implicit none | ||
|
|
||
|
|
@@ -145,6 +149,7 @@ subroutine cld_diags_code( nlayers, & | |
| real(kind=r_def), pointer, intent(inout) :: cld_amount_maxrnd(:) | ||
| real(kind=r_def), pointer, intent(inout) :: ceil_cld_amount_maxrnd(:) | ||
| real(kind=r_def), pointer, intent(inout) :: cld_base_altitude(:) | ||
| real(kind=r_def), pointer, intent(inout) :: cld_top_altitude(:) | ||
| real(kind=r_def), pointer, intent(inout) :: low_cld_base_altitude(:) | ||
| real(kind=r_def), pointer, intent(inout) :: very_low_cld_amount(:) | ||
| real(kind=r_def), pointer, intent(inout) :: low_cld_amount(:) | ||
|
|
@@ -181,8 +186,8 @@ subroutine cld_diags_code( nlayers, & | |
| real(kind=r_def), parameter :: medium_to_high = 5574.0_r_def ! metres | ||
| ! ... 150 hPa: | ||
| real(kind=r_def), parameter :: high_to_very_high = 13608.0_r_def ! metres | ||
| ! When looking for cloud base: how much cloud cover defines cloud base. | ||
| real(kind=r_def), parameter :: cld_cover_for_cld_base = 2.5_r_def/8.0_r_def | ||
| ! When looking for cloud base or top: how much cloud cover defines cloud boundary. | ||
| real(kind=r_def), parameter :: cld_cover_for_cld_bdry = 2.5_r_def/8.0_r_def | ||
| ! When looking for cloud base sometimes want much smaller amount of cloud. | ||
| real(kind=r_def), parameter :: low_cld_cover_for_cld_base = 0.05_r_def | ||
| ! For tracking whether cloud has been found. | ||
|
|
@@ -306,6 +311,7 @@ subroutine cld_diags_code( nlayers, & | |
|
|
||
| ! Find heights above sea level (asl) if required. | ||
| if (.not. associated(cld_base_altitude, empty_real_data) .or. & | ||
| .not. associated(cld_top_altitude, empty_real_data) .or. & | ||
| .not. associated(low_cld_base_altitude, empty_real_data) .or. & | ||
| .not. associated(very_low_cld_amount, empty_real_data) .or. & | ||
| .not. associated(low_cld_amount, empty_real_data) .or. & | ||
|
|
@@ -331,13 +337,26 @@ subroutine cld_diags_code( nlayers, & | |
| m_to_kfeet | ||
|
|
||
| do k = 1, nlayers | ||
| if ( combined_cld_amount(k) >= cld_cover_for_cld_base ) then | ||
| if ( combined_cld_amount(k) >= cld_cover_for_cld_bdry ) then | ||
| cld_base_altitude(map_2d(1)) = z_asl_base_of_levels(k) * m_to_kfeet | ||
| exit | ||
| end if | ||
| end do | ||
| end if | ||
|
|
||
| ! cld_top_altitude (in kilofeet) | ||
| if (.not. associated(cld_top_altitude, empty_real_data) ) then | ||
| ! As a default, set cloud-top to missing data | ||
| cld_top_altitude(map_2d(1)) = rmdi | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should this setting of data to missing be replicated elsewhere in this routine?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, possibly something to revisit in a separate PR - I can't remember what Cyril's reasoning was for doing it how he did originally! |
||
|
|
||
| do k = nlayers-1, 1, -1 | ||
| if ( combined_cld_amount(k) >= cld_cover_for_cld_bdry ) then | ||
| cld_top_altitude(map_2d(1)) = z_asl_base_of_levels(k+1) * m_to_kfeet | ||
| exit | ||
| end if | ||
| end do | ||
| end if | ||
|
|
||
| ! low_cld_base_altitude (in feet) for low threshold cloud amounts | ||
| if (.not. associated(low_cld_base_altitude, empty_real_data) ) then | ||
| ! As a default, set cloud-base to beyond top of model | ||
|
|
||
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.
surprised to see this is the first instance of rmdi in this set of diags. Should we be extending this to be used in other output in a separate PR?