1 |
C $Header: /u/gcmpack/MITgcm/pkg/aim/phy_lscond.F,v 1.3 2001/05/29 19:28:53 cnh Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "AIM_OPTIONS.h" |
5 |
|
6 |
SUBROUTINE LSCOND (PSA,QA,QSAT, |
7 |
* PRECLS,DTLSC,DQLSC,myThid) |
8 |
C-- |
9 |
C-- SUBROUTINE LSCOND (PSA,QA,QSAT, |
10 |
C-- * PRECLS,DTLSC,DQLSC) |
11 |
C-- |
12 |
C-- Purpose: Compute large-scale precipitation and |
13 |
C-- associated tendencies of temperature and moisture |
14 |
C-- Input: PSA = norm. surface pressure [p/p0] (2-dim) |
15 |
C-- QA = specific humidity [g/kg] (3-dim) |
16 |
C-- QSAT = saturation spec. hum. [g/kg] (3-dim) |
17 |
C-- Output: PRECLS = large-scale precipitation [g/(m^2 s)] (2-dim) |
18 |
C-- DTLSC = temperature tendency from l.s. cond (3-dim) |
19 |
C-- DQLSC = hum. tendency [g/(kg s)] from l.s. cond (3-dim) |
20 |
C-- |
21 |
|
22 |
IMPLICIT NONE |
23 |
|
24 |
C Resolution parameters |
25 |
|
26 |
C-- size for MITgcm & Physics package : |
27 |
#include "AIM_SIZE.h" |
28 |
|
29 |
#include "EEPARAMS.h" |
30 |
|
31 |
#include "AIM_GRID.h" |
32 |
|
33 |
C Physical constants + functions of sigma and latitude |
34 |
|
35 |
#include "com_physcon.h" |
36 |
|
37 |
C Large-scale condensation constants |
38 |
|
39 |
#include "com_lsccon.h" |
40 |
|
41 |
C-- Routine arguments: |
42 |
INTEGER myThid |
43 |
_RL PSA(NGP), QA(NGP,NLEV), QSAT(NGP,NLEV) |
44 |
_RL PRECLS(NGP), DTLSC(NGP,NLEV), DQLSC(NGP,NLEV) |
45 |
|
46 |
#ifdef ALLOW_AIM |
47 |
|
48 |
C-- Local variables: |
49 |
INTEGER J, K |
50 |
|
51 |
C- jmc: declare all local variables: |
52 |
_RL RTLSC, TFACT, PRG, PFACT |
53 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
54 |
|
55 |
C-- 1. Initialization |
56 |
|
57 |
RTLSC = 1./(TRLSC*3600) |
58 |
TFACT = ALHC/CP |
59 |
PRG = P0/GG |
60 |
|
61 |
DO J=1,NGP |
62 |
DTLSC(J,1) = 0. |
63 |
DQLSC(J,1) = 0. |
64 |
PRECLS(J) = 0. |
65 |
ENDDO |
66 |
|
67 |
C-- 2. Tendencies of temperature and moisture |
68 |
C |
69 |
DO K=2,NLEV |
70 |
DO J=1,NGP |
71 |
DQLSC(J,K) = MIN(0. _d 0,(RHLSC*QSAT(J,K)-QA(J,K)))*RTLSC |
72 |
DTLSC(J,K) = -TFACT*DQLSC(J,K) |
73 |
ENDDO |
74 |
ENDDO |
75 |
|
76 |
C-- 3. Large-scale precipitation |
77 |
|
78 |
DO J=1,NGP |
79 |
DO K=2,NLEVxy(J,myThid) |
80 |
PFACT = DSIG(K)*PRG |
81 |
PRECLS(J) = PRECLS(J)-PFACT*DQLSC(J,K) |
82 |
ENDDO |
83 |
ENDDO |
84 |
|
85 |
DO J=1,NGP |
86 |
PRECLS(J) = PRECLS(J)*PSA(J) |
87 |
ENDDO |
88 |
|
89 |
C-- |
90 |
#endif /* ALLOW_AIM */ |
91 |
|
92 |
RETURN |
93 |
END |