Ignore:
Timestamp:
06/09/16 02:20:07 (8 years ago)
Author:
ymipsl
Message:

adapt dcmip 2016 kessler physic
YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/trunk/src/dcmip2016_kessler_physic.f90

    r381 r411  
    3939!     z      - heights of thermodynamic levels in the grid column (m) 
    4040!     nz     - number of thermodynamic levels in the column 
    41 !     rainnc - accumulated precip beneath the grid column (mm) 
     41!     precl  - Precipitation rate (m_water/s) 
    4242! 
    4343! Output variables: 
     
    6666!======================================================================= 
    6767 
    68 SUBROUTINE KESSLER(theta, qv, qc, qr, rho, pk, dt, z, nz, rainnc) & 
    69   BIND(c, name = "kessler") 
     68SUBROUTINE KESSLER(theta, qv, qc, qr, rho, pk, dt, z, nz, precl) 
    7069 
    7170  IMPLICIT NONE 
     
    7978            qv      ,     & ! Water vapor mixing ratio (gm/gm) 
    8079            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) :: & 
    8283            rho             ! Dry air density (not mean state as in KW) (kg/m^3) 
    8384 
    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) 
    8687 
    8788  REAL(8), DIMENSION(nz), INTENT(IN) :: & 
     
    123124 
    124125  ! 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 
    125131  dt_max = dt 
    126132  do k=1,nz-1 
     
    135141 
    136142  ! Subcycle through rain process 
     143  precl = 0.d0 
     144 
    137145  do nt=1,rainsplit 
    138146 
    139     ! Precipitation accumulated beneath the column (mm rain) 
    140     rainnc = rainnc + 1000.d0*rho(1)*qr(1)*velqr(1)*dt0/rhoqr 
     147    ! Precipitation rate (m/s) 
     148    precl = precl + rho(1) * qr(1) * velqr(1) / rhoqr 
    141149 
    142150    ! Sedimentation term using upstream differencing 
     
    180188  end do 
    181189 
     190  precl = precl / dble(rainsplit) 
     191 
    182192END SUBROUTINE KESSLER 
    183193 
    184194!======================================================================= 
    185195 
     196 
     197 
    186198END MODULE dcmip2016_kessler_physic_mod 
Note: See TracChangeset for help on using the changeset viewer.