1 |
C $Header: /u/gcmpack/models/MITgcmUV/pkg/aim/phy_lscond.F,v 1.2 2001/02/02 21:36:29 adcroft Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
SUBROUTINE LSCOND (PSA,QA,QSAT, |
5 |
* PRECLS,DTLSC,DQLSC,myThid) |
6 |
C-- |
7 |
C-- SUBROUTINE LSCOND (PSA,QA,QSAT, |
8 |
C-- * PRECLS,DTLSC,DQLSC) |
9 |
C-- |
10 |
C-- Purpose: Compute large-scale precipitation and |
11 |
C-- associated tendencies of temperature and moisture |
12 |
C-- Input: PSA = norm. surface pressure [p/p0] (2-dim) |
13 |
C-- QA = specific humidity [g/kg] (3-dim) |
14 |
C-- QSAT = saturation spec. hum. [g/kg] (3-dim) |
15 |
C-- Output: PRECLS = large-scale precipitation [g/(m^2 s)] (2-dim) |
16 |
C-- DTLSC = temperature tendency from l.s. cond (3-dim) |
17 |
C-- DQLSC = hum. tendency [g/(kg s)] from l.s. cond (3-dim) |
18 |
C-- |
19 |
|
20 |
|
21 |
IMPLICIT rEAL*8 (A-H,O-Z) |
22 |
INTEGER myThid |
23 |
|
24 |
C Resolution parameters |
25 |
C |
26 |
#include "atparam.h" |
27 |
#include "atparam1.h" |
28 |
#include "EEPARAMS.h" |
29 |
#include "Lev_def.h" |
30 |
C |
31 |
INTEGER NLAT, NLON, NLEV, NGP |
32 |
PARAMETER ( NLON=IX, NLAT=IL, NLEV=KX, NGP=NLON*NLAT ) |
33 |
|
34 |
C Physical constants + functions of sigma and latitude |
35 |
|
36 |
#include "com_physcon.h" |
37 |
|
38 |
C Large-scale condensation constants |
39 |
|
40 |
#include "com_lsccon.h" |
41 |
|
42 |
REAL PSA(NGP), QA(NGP,NLEV), QSAT(NGP,NLEV) |
43 |
|
44 |
REAL PRECLS(NGP), DTLSC(NGP,NLEV), DQLSC(NGP,NLEV) |
45 |
|
46 |
INTEGER J, K |
47 |
|
48 |
|
49 |
C-- 1. Initialization |
50 |
|
51 |
RTLSC = 1./(TRLSC*3600) |
52 |
TFACT = ALHC/CP |
53 |
PRG = P0/GG |
54 |
|
55 |
DO J=1,NGP |
56 |
DTLSC(J,1) = 0. |
57 |
DQLSC(J,1) = 0. |
58 |
PRECLS(J) = 0. |
59 |
ENDDO |
60 |
|
61 |
C-- 2. Tendencies of temperature and moisture |
62 |
C |
63 |
DO K=2,NLEV |
64 |
DO J=1,NGP |
65 |
DQLSC(J,K) = MIN(0.,(RHLSC*QSAT(J,K)-QA(J,K)))*RTLSC |
66 |
DTLSC(J,K) = -TFACT*DQLSC(J,K) |
67 |
ENDDO |
68 |
ENDDO |
69 |
|
70 |
C-- 3. Large-scale precipitation |
71 |
|
72 |
DO J=1,NGP |
73 |
DO K=2,NLEVxy(J,myThid) |
74 |
PFACT = DSIG(K)*PRG |
75 |
PRECLS(J) = PRECLS(J)-PFACT*DQLSC(J,K) |
76 |
ENDDO |
77 |
ENDDO |
78 |
|
79 |
DO J=1,NGP |
80 |
PRECLS(J) = PRECLS(J)*PSA(J) |
81 |
ENDDO |
82 |
|
83 |
C-- |
84 |
RETURN |
85 |
END |