1 |
jmc |
1.1 |
C $Header: $ |
2 |
|
|
C $Name: $ |
3 |
|
|
|
4 |
|
|
#include "AIM_OPTIONS.h" |
5 |
|
|
|
6 |
|
|
CBOP |
7 |
|
|
C !ROUTINE: SNOW_PRECIP |
8 |
|
|
C !INTERFACE: |
9 |
|
|
SUBROUTINE SNOW_PRECIP ( |
10 |
|
|
I PSA, dpFac, ThA, |
11 |
|
|
I IDEPTH,PRECNV,DQCNV,PRECLS,DQLSC, |
12 |
|
|
U DTCNV,DTLSC, |
13 |
|
|
O EnPrec, |
14 |
|
|
I kGrd,bi,bj,myThid) |
15 |
|
|
|
16 |
|
|
C !DESCRIPTION: \bv |
17 |
|
|
C *==========================================================* |
18 |
|
|
C | S/R SNOW_PRECIP |
19 |
|
|
C | o Diagnose snow precipitation according to near surface |
20 |
|
|
C | air temperature. |
21 |
|
|
C *==========================================================* |
22 |
|
|
C | Correct condensation heating for energy (rain Temp, snow) |
23 |
|
|
C | of precipication (L.S. cond & convect. precip) |
24 |
|
|
C *==========================================================* |
25 |
|
|
C \ev |
26 |
|
|
|
27 |
|
|
C !USES: |
28 |
|
|
IMPLICIT NONE |
29 |
|
|
|
30 |
|
|
C == Global variables === |
31 |
|
|
|
32 |
|
|
C Resolution parameters |
33 |
|
|
C-- size for MITgcm & Physics package : |
34 |
|
|
#include "AIM_SIZE.h" |
35 |
|
|
#include "EEPARAMS.h" |
36 |
|
|
|
37 |
|
|
C Physical constants + functions of sigma and latitude |
38 |
|
|
#include "com_physcon.h" |
39 |
|
|
|
40 |
|
|
C == Routine Arguments == |
41 |
|
|
C !INPUT PARAMETERS: |
42 |
|
|
C kGrd :: Ground level index (2-dim) |
43 |
|
|
C bi,bj :: tile index |
44 |
|
|
C myThid :: Thread number for this instance of the routine |
45 |
|
|
C PSA :: norm. surface pressure [p/p0] (2-dim) |
46 |
|
|
C dpFac :: cell delta_P fraction (3-dim) |
47 |
|
|
C ThA :: Pot.temperature [K] (3-dim) |
48 |
|
|
C IDEPTH :: convection depth in layers (2-dim) |
49 |
|
|
C PRECNV :: convective precipitation [g/(m^2 s)] (2-dim) |
50 |
|
|
C DQCNV :: hum. tendency [g/(kg s)] from convection (3-dim) |
51 |
|
|
C PRECLS :: large-scale precipitation [g/(m^2 s)] (2-dim) |
52 |
|
|
C DQLSC :: hum. tendency [g/(kg s)] from l.s. cond (3-dim) |
53 |
|
|
C !MODIFIED PARAMETERS: |
54 |
|
|
C DTCNV :: temperature tendency from convection (3-dim) |
55 |
|
|
C DTLSC :: temperature tendency from l.s. cond (3-dim) |
56 |
|
|
C !OUTPUT PARAMETERS: |
57 |
|
|
C EnPrec :: energy of precipitation (snow, rain temp) [J/g] |
58 |
|
|
C-- |
59 |
|
|
_RL PSA(NGP), dpFac(NGP,NLEV), ThA(NGP,NLEV) |
60 |
|
|
_RL PRECLS(NGP), DTLSC(NGP,NLEV), DQLSC(NGP,NLEV) |
61 |
|
|
_RL PRECNV(NGP), DTCNV(NGP,NLEV), DQCNV(NGP,NLEV) |
62 |
|
|
_RL EnPrec(NGP) |
63 |
|
|
INTEGER IDEPTH(NGP) |
64 |
|
|
INTEGER kGrd(NGP) |
65 |
|
|
INTEGER bi,bj,myThid |
66 |
|
|
CEOP |
67 |
|
|
|
68 |
|
|
#ifdef ALLOW_AIM |
69 |
|
|
|
70 |
|
|
C-- Local variables: |
71 |
|
|
INTEGER J, K, Ktop |
72 |
|
|
_RL kappa |
73 |
|
|
_RL T1(NGP) |
74 |
|
|
|
75 |
|
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
76 |
|
|
|
77 |
|
|
C-- 1. Initialization |
78 |
|
|
kappa = RD/CP |
79 |
|
|
|
80 |
|
|
C-- 2. Compute energy of precip, based on near-surface Air temperature: |
81 |
|
|
C note: EnPrec units are J/g since precip is in g/m2 and spec.hum. in g/Kg |
82 |
|
|
DO J=1,NGP |
83 |
|
|
IF ( kGrd(J).NE.0 ) THEN |
84 |
|
|
T1(J) = ThA(J,kGrd(J))*(PSA(J)**kappa) |
85 |
|
|
IF ( T1(J) .GE. tFreeze ) THEN |
86 |
|
|
EnPrec(J) = rainCP*(T1(J)-tFreeze) |
87 |
|
|
ELSE |
88 |
|
|
EnPrec(J) = -ALHF |
89 |
|
|
ENDIF |
90 |
|
|
ELSE |
91 |
|
|
EnPrec(J) = 0. |
92 |
|
|
ENDIF |
93 |
|
|
ENDDO |
94 |
|
|
|
95 |
|
|
C-- 3. Large-scale precipitation: correct condensation Heating |
96 |
|
|
|
97 |
|
|
DO J=1,NGP |
98 |
|
|
DO K=2,kGrd(J) |
99 |
|
|
DTLSC(J,K) = DTLSC(J,K) + EnPrec(J)*DQLSC(J,K)/CP |
100 |
|
|
ENDDO |
101 |
|
|
ENDDO |
102 |
|
|
|
103 |
|
|
C-- 4. Convective precipitation: correct condensation Heating |
104 |
|
|
|
105 |
|
|
DO J=1,NGP |
106 |
|
|
IF (kGrd(J).NE.0 .AND. IDEPTH(J).NE.0 ) THEN |
107 |
|
|
Ktop = kGrd(J) - IDEPTH(J) |
108 |
|
|
DTCNV(J,Ktop) = DTCNV(J,Ktop) |
109 |
|
|
& - EnPrec(J)*PRECNV(J)*GRDSCP(Ktop) |
110 |
|
|
ENDIF |
111 |
|
|
ENDDO |
112 |
|
|
|
113 |
|
|
#endif /* ALLOW_AIM */ |
114 |
|
|
|
115 |
|
|
RETURN |
116 |
|
|
END |