Skip to content

Commit

Permalink
Merge pull request NCAR#349 from tanyasmirnova/ruc_land_ice_v1
Browse files Browse the repository at this point in the history
This commit has a fix for a problem of cloud-radiation coupling with the use of MYNN PBL.
  • Loading branch information
climbfuji committed Nov 1, 2019
2 parents 660ede7 + e4d291e commit e0d5f16
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 1 deletion.
7 changes: 7 additions & 0 deletions physics/module_MYNNrad_post.F90
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ end subroutine mynnrad_post_finalize
#endif
SUBROUTINE mynnrad_post_run( &
& ix,im,levs, &
& flag_init,flag_restart, &
& qc,qi, &
& qc_save, qi_save, &
& errmsg, errflg )
Expand All @@ -34,6 +35,7 @@ SUBROUTINE mynnrad_post_run( &
!-------------------------------------------------------------------

integer, intent(in) :: ix, im, levs
logical, intent(in) :: flag_init, flag_restart
real(kind=kind_phys), dimension(im,levs), intent(out) :: qc, qi
real(kind=kind_phys), dimension(im,levs), intent(in) :: qc_save, qi_save
character(len=*), intent(out) :: errmsg
Expand All @@ -48,6 +50,11 @@ SUBROUTINE mynnrad_post_run( &
!write(0,*)"=============================================="
!write(0,*)"in mynn rad post"

if (flag_init .and. (.not. flag_restart)) then
!write (0,*) 'Skip MYNNrad_post flag_init = ', flag_init
return
endif

! Add subgrid cloud information:
do k = 1, levs
do i = 1, im
Expand Down
16 changes: 16 additions & 0 deletions physics/module_MYNNrad_post.meta
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@
type = integer
intent = in
optional = F
[flag_init]
standard_name = flag_for_first_time_step
long_name = flag signaling first time step for time integration loop
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[flag_restart]
standard_name = flag_for_restart
long_name = flag for restart (warmstart) or coldstart
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[qc]
standard_name = cloud_condensed_water_mixing_ratio
long_name = moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate)
Expand Down
8 changes: 7 additions & 1 deletion physics/module_MYNNrad_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ end subroutine mynnrad_pre_finalize
!###===================================================================
SUBROUTINE mynnrad_pre_run( &
& ix,im,levs, &
& flag_init,flag_restart, &
& qc, qi, T3D, &
& qc_save, qi_save, &
& qc_bl,cldfra_bl, &
Expand All @@ -50,6 +51,7 @@ SUBROUTINE mynnrad_pre_run( &
! Interface variables
real (kind=kind_phys), parameter :: gfac=1.0e5/con_g
integer, intent(in) :: ix, im, levs
logical, intent(in) :: flag_init, flag_restart
real(kind=kind_phys), dimension(im,levs), intent(inout) :: qc, qi
real(kind=kind_phys), dimension(im,levs), intent(in) :: T3D,delp
real(kind=kind_phys), dimension(im,levs), intent(inout) :: &
Expand All @@ -71,13 +73,17 @@ SUBROUTINE mynnrad_pre_run( &
!write(0,*)"=============================================="
!write(0,*)"in mynn rad pre"

if (flag_init .and. (.not. flag_restart)) then
!write (0,*) 'Skip MYNNrad_pre flag_init = ', flag_init
return
endif
! Add subgrid cloud information:
do k = 1, levs
do i = 1, im

qc_save(i,k) = qc(i,k)
qi_save(i,k) = qi(i,k)
clouds1(i,k)=CLDFRA_BL(i,k)
clouds1(i,k) = CLDFRA_BL(i,k)

IF (qc(i,k) < 1.E-6 .AND. qi(i,k) < 1.E-8 .AND. CLDFRA_BL(i,k)>0.001) THEN
!Partition the BL clouds into water & ice according to a linear
Expand Down
16 changes: 16 additions & 0 deletions physics/module_MYNNrad_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@
type = integer
intent = in
optional = F
[flag_init]
standard_name = flag_for_first_time_step
long_name = flag signaling first time step for time integration loop
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[flag_restart]
standard_name = flag_for_restart
long_name = flag for restart (warmstart) or coldstart
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[qc]
standard_name = cloud_condensed_water_mixing_ratio
long_name = moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate)
Expand Down

0 comments on commit e0d5f16

Please sign in to comment.