Skip to content

Commit 787c32c

Browse files
author
Haipeng Lin
committed
Port low stratiform cloud fraction optics limiter from CAM micro_pumas_cam
1 parent 4656a6b commit 787c32c

2 files changed

Lines changed: 137 additions & 0 deletions

File tree

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
module micro_pumas_ccpp_optics_limiter
2+
3+
use ccpp_kinds, only: kind_phys
4+
5+
implicit none
6+
private
7+
8+
public :: micro_pumas_ccpp_optics_limiter_run
9+
10+
!Convective size distribution parameters, used in place of the stratiform
11+
!parameters where the stratiform cloud fraction is negligible.
12+
!Mirrors CAM micro_pumas_cam.F90.
13+
real(kind_phys), parameter :: dcon = 25.e-6_kind_phys !Convective size distribution effective radius (m)
14+
real(kind_phys), parameter :: mucon = 5.3_kind_phys !Convective size distribution shape parameter (1)
15+
real(kind_phys), parameter :: deicon = 50._kind_phys !Convective ice effective diameter (um)
16+
17+
!Stratiform cloud fraction below which the stratiform size distribution is
18+
!discarded. PUMAS divides cloud water by the cloud fraction to obtain the
19+
!in-cloud values these parameters are derived from, so as the cloud fraction
20+
!vanishes the slope and diameters it produces grow without bound.
21+
real(kind_phys), parameter :: cldfrc_min = 1.e-4_kind_phys
22+
23+
contains
24+
!> \section arg_table_micro_pumas_ccpp_optics_limiter_run Argument Table
25+
!! \htmlinclude micro_pumas_ccpp_optics_limiter_run.html
26+
subroutine micro_pumas_ccpp_optics_limiter_run(ncol, nlev, trop_cloud_top_lev, &
27+
strat_cldfrc, pgamrad, lamcrad, deffi, errmsg, errcode)
28+
29+
integer, intent(in) :: ncol !Number of horizontal columns (count)
30+
integer, intent(in) :: nlev !Number of vertical layers (count)
31+
integer, intent(in) :: trop_cloud_top_lev !Index of the top model level for which
32+
!tropospheric cloud physics is run (index)
33+
real(kind_phys), intent(in) :: strat_cldfrc(:, :) !Stratiform cloud area fraction (fraction)
34+
real(kind_phys), intent(inout) :: pgamrad(:, :) !Size distribution shape parameter (1)
35+
real(kind_phys), intent(inout) :: lamcrad(:, :) !Slope of droplet distribution (m-1)
36+
real(kind_phys), intent(inout) :: deffi(:, :) !Effective diameter of cloud ice particle (um)
37+
character(len=512), intent(out) :: errmsg !CCPP error message (none)
38+
integer, intent(out) :: errcode !CCPP error code (1)
39+
40+
integer :: i, k
41+
42+
errmsg = ''
43+
errcode = 0
44+
45+
!lamcrad is an inverse length; it is declared dimensionless in the metadata
46+
!to match the RRTMGP and host declarations, so dcon must stay in meters for
47+
!the value handed to radiation to be consistent with CAM.
48+
do k = trop_cloud_top_lev, nlev
49+
do i = 1, ncol
50+
if (strat_cldfrc(i, k) < cldfrc_min) then
51+
pgamrad(i, k) = mucon
52+
lamcrad(i, k) = (mucon + 1._kind_phys) / dcon
53+
deffi(i, k) = deicon
54+
end if
55+
end do
56+
end do
57+
58+
end subroutine micro_pumas_ccpp_optics_limiter_run
59+
60+
end module micro_pumas_ccpp_optics_limiter
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
[ccpp-table-properties]
2+
name = micro_pumas_ccpp_optics_limiter
3+
type = scheme
4+
########################################################################
5+
[ccpp-arg-table]
6+
name = micro_pumas_ccpp_optics_limiter_run
7+
type = scheme
8+
9+
##### Run Arguments
10+
[ncol]
11+
standard_name = horizontal_loop_extent
12+
long_name = number of horizontal columns
13+
units = count
14+
dimensions = ()
15+
type = integer
16+
intent = in
17+
[nlev]
18+
standard_name = vertical_layer_dimension
19+
long_name = vertical layer dimension
20+
units = count
21+
dimensions = ()
22+
type = integer
23+
intent = in
24+
[trop_cloud_top_lev]
25+
standard_name = vertical_layer_index_of_troposphere_cloud_physics_top
26+
long_name = vertical layer index of troposphere cloud physics top
27+
units = index
28+
dimensions = ()
29+
type = integer
30+
intent = in
31+
[strat_cldfrc]
32+
standard_name = stratiform_cloud_area_fraction
33+
long_name = stratiform cloud area fraction
34+
units = fraction
35+
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
36+
type = real
37+
kind = kind_phys
38+
intent = in
39+
[pgamrad]
40+
standard_name = size_distribution_shape_parameter_for_microphysics
41+
long_name = cloud particle size distribution shape (gamma) parameter
42+
units = 1
43+
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
44+
type = real
45+
kind = kind_phys
46+
intent = inout
47+
[lamcrad]
48+
standard_name = slope_of_droplet_distribution_for_optics
49+
long_name = cloud particle size distribution slope (lambda) parameter
50+
units = 1
51+
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
52+
type = real
53+
kind = kind_phys
54+
intent = inout
55+
[deffi]
56+
standard_name = effective_diameter_of_stratiform_cloud_ice_particle_for_radiation
57+
long_name = effective diameter of stratiform cloud ice particles for radiation
58+
units = um
59+
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
60+
type = real
61+
kind = kind_phys
62+
intent = inout
63+
[errmsg]
64+
standard_name = ccpp_error_message
65+
long_name = error message for error handling in CCPP
66+
units = none
67+
dimensions = ()
68+
type = character
69+
kind = len=512
70+
intent = out
71+
[errcode]
72+
standard_name = ccpp_error_code
73+
long_name = error code for error handling in CCPP
74+
units = 1
75+
dimensions = ()
76+
type = integer
77+
intent = out

0 commit comments

Comments
 (0)