1 |
jmc |
1.1 |
C $Header: $ |
2 |
|
|
C $Name: $ |
3 |
|
|
|
4 |
|
|
#include "AIM_OPTIONS.h" |
5 |
|
|
|
6 |
|
|
SUBROUTINE LSCOND (PSA,dpFac,QA,QSAT, |
7 |
|
|
O PRECLS,DTLSC,DQLSC, |
8 |
|
|
I kGrd,bi,bj,myThid) |
9 |
|
|
C-- |
10 |
|
|
C-- SUBROUTINE LSCOND (PSA,QA,QSAT, |
11 |
|
|
C-- * PRECLS,DTLSC,DQLSC) |
12 |
|
|
C-- |
13 |
|
|
C-- Purpose: Compute large-scale precipitation and |
14 |
|
|
C-- associated tendencies of temperature and moisture |
15 |
|
|
C-- Input: PSA = norm. surface pressure [p/p0] (2-dim) |
16 |
|
|
C dpFac = cell delta_P fraction (3-dim) |
17 |
|
|
C-- QA = specific humidity [g/kg] (3-dim) |
18 |
|
|
C-- QSAT = saturation spec. hum. [g/kg] (3-dim) |
19 |
|
|
C-- Output: PRECLS = large-scale precipitation [g/(m^2 s)] (2-dim) |
20 |
|
|
C-- DTLSC = temperature tendency from l.s. cond (3-dim) |
21 |
|
|
C-- DQLSC = hum. tendency [g/(kg s)] from l.s. cond (3-dim) |
22 |
|
|
C Input: kGrd = Ground level index (2-dim) |
23 |
|
|
C bi,bj = tile index |
24 |
|
|
C myThid = Thread number for this instance of the routine |
25 |
|
|
C-- |
26 |
|
|
|
27 |
|
|
IMPLICIT NONE |
28 |
|
|
|
29 |
|
|
C Resolution parameters |
30 |
|
|
|
31 |
|
|
C-- size for MITgcm & Physics package : |
32 |
|
|
#include "AIM_SIZE.h" |
33 |
|
|
|
34 |
|
|
#include "EEPARAMS.h" |
35 |
|
|
|
36 |
|
|
C Physical constants + functions of sigma and latitude |
37 |
|
|
|
38 |
|
|
#include "com_physcon.h" |
39 |
|
|
|
40 |
|
|
C Large-scale condensation constants |
41 |
|
|
|
42 |
|
|
#include "com_lsccon.h" |
43 |
|
|
|
44 |
|
|
C-- Routine arguments: |
45 |
|
|
_RL PSA(NGP), dpFac(NGP,NLEV), QA(NGP,NLEV), QSAT(NGP,NLEV) |
46 |
|
|
_RL PRECLS(NGP), DTLSC(NGP,NLEV), DQLSC(NGP,NLEV) |
47 |
|
|
INTEGER kGrd(NGP) |
48 |
|
|
INTEGER bi,bj,myThid |
49 |
|
|
|
50 |
|
|
#ifdef ALLOW_AIM |
51 |
|
|
|
52 |
|
|
C-- Local variables: |
53 |
|
|
INTEGER J, K |
54 |
|
|
_RL PSA2(NGP) |
55 |
|
|
|
56 |
|
|
C- jmc: declare all local variables: |
57 |
|
|
_RL RTLSC, TFACT, PRG |
58 |
|
|
_RL SIG2, RHREF, DQMAX, PFACT |
59 |
|
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
60 |
|
|
|
61 |
|
|
C-- 1. Initialization |
62 |
|
|
|
63 |
|
|
c_FM QSMAX = 50. |
64 |
|
|
|
65 |
|
|
RTLSC = 1./(TRLSC*3600.) |
66 |
|
|
TFACT = ALHC/CP |
67 |
|
|
PRG = P0/GG |
68 |
|
|
|
69 |
|
|
DO J=1,NGP |
70 |
|
|
DTLSC(J,1) = 0. |
71 |
|
|
DQLSC(J,1) = 0. |
72 |
|
|
PRECLS(J) = 0. |
73 |
|
|
PSA2(J) = PSA(J)*PSA(J) |
74 |
|
|
ENDDO |
75 |
|
|
|
76 |
|
|
C-- 2. Tendencies of temperature and moisture |
77 |
|
|
C NB. A maximum heating rate is imposed to avoid |
78 |
|
|
C grid-point-storm instability |
79 |
|
|
C-jmc: this breaks heat conservation !! |
80 |
|
|
C for checking the heat budget, set a very large QSMAX (e.g. 1.e+9) |
81 |
|
|
C or use the simplyfied form below. |
82 |
|
|
|
83 |
|
|
DO K=2,NLEV |
84 |
|
|
SIG2=SIG(K)*SIG(K) |
85 |
|
|
c_FM RHREF = RHLSC+DRHLSC*(SIG2-1.) |
86 |
|
|
c_FM DQMAX = (1.1-RHREF)*QSMAX*SIG2*RTLSC |
87 |
|
|
DO J=1,NGP |
88 |
|
|
RHREF = RHLSC+DRHLSC*(SIG2/PSA2(J) - 1. _d 0) |
89 |
|
|
DQMAX = (1.1 _d 0-RHREF)*QSMAX*SIG2*RTLSC |
90 |
|
|
DQLSC(J,K) = MIN(0. _d 0,(RHREF*QSAT(J,K)-QA(J,K)))*RTLSC |
91 |
|
|
c_FM DTLSC(J,K) = TFACT*MIN(-DQLSC(J,K),DQMAX*PSA2(J)) |
92 |
|
|
DTLSC(J,K) = TFACT*MIN(-DQLSC(J,K),DQMAX) |
93 |
|
|
C-jmc: Heat_Conserve: |
94 |
|
|
c DTLSC(J,K) = -TFACT*DQLSC(J,K) |
95 |
|
|
ENDDO |
96 |
|
|
ENDDO |
97 |
|
|
|
98 |
|
|
C-- 3. Large-scale precipitation |
99 |
|
|
|
100 |
|
|
DO J=1,NGP |
101 |
|
|
DO K=2,kGrd(J) |
102 |
|
|
PFACT = DSIG(K)*PRG*dpFac(J,K) |
103 |
|
|
PRECLS(J) = PRECLS(J)-PFACT*DQLSC(J,K) |
104 |
|
|
ENDDO |
105 |
|
|
ENDDO |
106 |
|
|
|
107 |
|
|
c_FM DO J=1,NGP |
108 |
|
|
c_FM PRECLS(J) = PRECLS(J)*PSA(J) |
109 |
|
|
c_FM ENDDO |
110 |
|
|
|
111 |
|
|
C-- |
112 |
|
|
#endif /* ALLOW_AIM */ |
113 |
|
|
|
114 |
|
|
RETURN |
115 |
|
|
END |