Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:37:26 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
b3097ed02d Jean*0001 #include "AIM_OPTIONS.h"
                0002 
                0003 CBOP
                0004 C     !ROUTINE: SNOW_PRECIP
                0005 C     !INTERFACE:
                0006       SUBROUTINE SNOW_PRECIP (
                0007      I                   PSA, dpFac, ThA,
                0008      I                   IDEPTH,PRECNV,DQCNV,PRECLS,DQLSC,
                0009      U                   DTCNV,DTLSC,
                0010      O                   EnPrec,
                0011      I                   kGrd,bi,bj,myThid)
                0012 
                0013 C     !DESCRIPTION: \bv
                0014 C     *==========================================================*
                0015 C     | S/R SNOW_PRECIP
                0016 C     | o Diagnose snow precipitation according to near surface 
                0017 C     |   air temperature. 
                0018 C     *==========================================================*
                0019 C     | Correct condensation heating for energy (rain Temp, snow) 
                0020 C     |  of precipication (L.S. cond & convect. precip)
                0021 C     *==========================================================*
                0022 C     \ev
                0023 
                0024 C     !USES:
                0025       IMPLICIT NONE
                0026 
                0027 C     == Global variables ===
                0028 
                0029 C     Resolution parameters
                0030 C-- size for MITgcm & Physics package :
                0031 #include "AIM_SIZE.h" 
                0032 #include "EEPARAMS.h"
                0033 
                0034 C     Physical constants + functions of sigma and latitude
                0035 #include "com_physcon.h"
                0036 
                0037 C     == Routine Arguments ==
                0038 C     !INPUT PARAMETERS:
                0039 C       kGrd   :: Ground level index                       (2-dim)
                0040 C       bi,bj  :: tile index
                0041 C       myThid :: Thread number for this instance of the routine
                0042 C       PSA    :: norm. surface pressure [p/p0]            (2-dim)
                0043 C       dpFac  :: cell delta_P fraction                    (3-dim)
                0044 C       ThA    :: Pot.temperature    [K]                   (3-dim)
                0045 C       IDEPTH :: convection depth in layers               (2-dim)
                0046 C       PRECNV :: convective precipitation [g/(m^2 s)]     (2-dim)
                0047 C       DQCNV  :: hum. tendency [g/(kg s)] from convection (3-dim)
                0048 C       PRECLS :: large-scale precipitation [g/(m^2 s)]    (2-dim)
                0049 C       DQLSC  :: hum. tendency [g/(kg s)] from l.s. cond  (3-dim)
                0050 C     !MODIFIED PARAMETERS:
                0051 C       DTCNV  :: temperature tendency from convection     (3-dim)
                0052 C       DTLSC  :: temperature tendency from l.s. cond      (3-dim)
                0053 C     !OUTPUT PARAMETERS:
                0054 C       EnPrec :: energy of precipitation (snow, rain temp) [J/g]
                0055 C--
                0056       _RL PSA(NGP), dpFac(NGP,NLEV), ThA(NGP,NLEV)
                0057       _RL PRECLS(NGP), DTLSC(NGP,NLEV), DQLSC(NGP,NLEV)
                0058       _RL PRECNV(NGP), DTCNV(NGP,NLEV), DQCNV(NGP,NLEV)
                0059       _RL EnPrec(NGP)
                0060       INTEGER  IDEPTH(NGP)
                0061       INTEGER  kGrd(NGP)
                0062       INTEGER  bi,bj,myThid
                0063 CEOP
                0064 
                0065 #ifdef ALLOW_AIM
                0066 
                0067 C-- Local variables:  
                0068       INTEGER J, K, Ktop
                0069       _RL kappa
                0070       _RL T1(NGP)
                0071 
                0072 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0073 
                0074 C--   1. Initialization
                0075       kappa = RD/CP
                0076 
                0077 C--   2. Compute energy of precip, based on near-surface Air temperature:
                0078 C     note: EnPrec units are J/g since precip is in g/m2 and spec.hum. in g/Kg
                0079       DO J=1,NGP
                0080        IF ( kGrd(J).NE.0 ) THEN
                0081         T1(J) = ThA(J,kGrd(J))*(PSA(J)**kappa)
                0082         IF ( T1(J) .GE. tFreeze ) THEN
                0083          EnPrec(J) = rainCP*(T1(J)-tFreeze)
                0084         ELSE
                0085          EnPrec(J) = -ALHF
                0086         ENDIF
                0087        ELSE
                0088         EnPrec(J) = 0.
                0089        ENDIF
                0090       ENDDO
                0091 
                0092 C--   3. Large-scale precipitation: correct condensation Heating
                0093 
                0094       DO J=1,NGP
                0095         DO K=2,kGrd(J)
                0096           DTLSC(J,K) = DTLSC(J,K) + EnPrec(J)*DQLSC(J,K)/CP
                0097         ENDDO
                0098       ENDDO
                0099 
                0100 C--   4. Convective precipitation: correct condensation Heating
                0101 
                0102       DO J=1,NGP
                0103         IF (kGrd(J).NE.0 .AND. IDEPTH(J).NE.0 ) THEN
                0104           Ktop = kGrd(J) - IDEPTH(J)
                0105           DTCNV(J,Ktop) = DTCNV(J,Ktop) 
                0106      &                  - EnPrec(J)*PRECNV(J)*GRDSCP(Ktop)
                0107         ENDIF
                0108       ENDDO
                0109 
                0110 #endif /* ALLOW_AIM */ 
                0111 
                0112       RETURN
                0113       END