Changeset 411 for codes/icosagcm/trunk/src
- Timestamp:
- 06/09/16 02:20:07 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/trunk/src/dcmip2016_kessler_physic.f90
r381 r411 39 39 ! z - heights of thermodynamic levels in the grid column (m) 40 40 ! nz - number of thermodynamic levels in the column 41 ! rainnc - accumulated precip beneath the grid column (mm)41 ! precl - Precipitation rate (m_water/s) 42 42 ! 43 43 ! Output variables: … … 66 66 !======================================================================= 67 67 68 SUBROUTINE KESSLER(theta, qv, qc, qr, rho, pk, dt, z, nz, rainnc) & 69 BIND(c, name = "kessler") 68 SUBROUTINE KESSLER(theta, qv, qc, qr, rho, pk, dt, z, nz, precl) 70 69 71 70 IMPLICIT NONE … … 79 78 qv , & ! Water vapor mixing ratio (gm/gm) 80 79 qc , & ! Cloud water mixing ratio (gm/gm) 81 qr , & ! Rain water mixing ratio (gm/gm) 80 qr ! Rain water mixing ratio (gm/gm) 81 82 REAL(8), DIMENSION(nz), INTENT(IN) :: & 82 83 rho ! Dry air density (not mean state as in KW) (kg/m^3) 83 84 84 REAL(8), INTENT( INOUT) :: &85 rainnc ! Accumulated precip beneath the grid column (mm)85 REAL(8), INTENT(OUT) :: & 86 precl ! Precipitation rate (m_water / s) 86 87 87 88 REAL(8), DIMENSION(nz), INTENT(IN) :: & … … 123 124 124 125 ! Maximum time step size in accordance with CFL condition 126 if (dt .le. 0.d0) then 127 write(*,*) 'kessler.f90 called with nonpositive dt' 128 stop 129 end if 130 125 131 dt_max = dt 126 132 do k=1,nz-1 … … 135 141 136 142 ! Subcycle through rain process 143 precl = 0.d0 144 137 145 do nt=1,rainsplit 138 146 139 ! Precipitation accumulated beneath the column (mm rain)140 rainnc = rainnc + 1000.d0*rho(1)*qr(1)*velqr(1)*dt0/rhoqr147 ! Precipitation rate (m/s) 148 precl = precl + rho(1) * qr(1) * velqr(1) / rhoqr 141 149 142 150 ! Sedimentation term using upstream differencing … … 180 188 end do 181 189 190 precl = precl / dble(rainsplit) 191 182 192 END SUBROUTINE KESSLER 183 193 184 194 !======================================================================= 185 195 196 197 186 198 END MODULE dcmip2016_kessler_physic_mod
Note: See TracChangeset
for help on using the changeset viewer.