Skip to content

Commit

Permalink
Clean up code
Browse files Browse the repository at this point in the history
Fix definition of xland1
  • Loading branch information
hannahcbarnes committed Aug 19, 2021
1 parent 897f8aa commit 9bf6335
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion physics/GFS_rrtmg_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
intent = inout
intent = in
optional = F
[kd]
standard_name = vertical_index_difference_between_inout_and_local
Expand Down
10 changes: 6 additions & 4 deletions physics/cu_gf_deep.F90
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,9 @@ subroutine cu_gf_deep_run( &
! Set cloud water to rain water conversion rate (c0)
do i=its,itf
c0(i)=0.004
xland1(i)=int(xland(i)+.0001) ! 1.
if(xland1(i).eq.1)c0(i)=0.002

if(imid.eq.1)then
c0(i)=0.002
endif
Expand Down Expand Up @@ -435,7 +437,6 @@ subroutine cu_gf_deep_run( &
!
! for water or ice
!
xland1(i)=int(xland(i)+.0001) ! 1.
if(xland(i).gt.1.5 .or. xland(i).lt.0.5)then
xland1(i)=0
! if(imid.eq.0)cap_max(i)=cap_maxs-25.
Expand Down Expand Up @@ -3973,8 +3974,11 @@ subroutine cup_up_moisture(name,ierr,z_cup,qc,qrc,pw,pwav, &
real(kind=kind_phys), dimension (its:ite,kts:kte) &
,intent (out ) :: &
qc,qrc,pw,clw_all
real(kind=kind_phys), dimension (its:ite,kts:kte) &
,intent (inout) :: &
c1d
real(kind=kind_phys), dimension (its:ite,kts:kte) :: &
qch,qrcb,pwh,clw_allh,c1d,c1d_b,t
qch,qrcb,pwh,clw_allh,c1d_b,t
real(kind=kind_phys), dimension (its:ite) :: &
pwavh
real(kind=kind_phys), dimension (its:ite) &
Expand Down Expand Up @@ -4137,8 +4141,6 @@ subroutine cup_up_moisture(name,ierr,z_cup,qc,qrc,pw,pwav, &
endif
if(k.gt.kbcon(i)+1)c1d(i,k)=clwdet*up_massdetr(i,k-1)
if(k.gt.kbcon(i)+1)c1d_b(i,k)=clwdet*up_massdetr(i,k-1)
clw_all(i,k)=max(0.,qc(i,k)-qrch)
clw_allh(i,k)=max(0.,qch(i,k)-qrch)

if(autoconv.eq.2) then
!
Expand Down
4 changes: 4 additions & 0 deletions physics/cu_gf_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,&
rand_mom(:) = 0.
rand_vmas(:) = 0.
rand_clos(:,:) = 0.

cnvwtm(:,:) = 0.
cnvwts(:,:) = 0.
cnvwt(:,:) = 0.
!
its=1
ite=im
Expand Down

0 comments on commit 9bf6335

Please sign in to comment.