/[MITgcm]/MITgcm/pkg/aim/phy_lscond.F
ViewVC logotype

Diff of /MITgcm/pkg/aim/phy_lscond.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3 by cnh, Tue May 29 19:28:53 2001 UTC revision 1.4 by jmc, Fri Sep 27 20:05:11 2002 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2  C $Name$  C $Name$
3    
4    #include "AIM_OPTIONS.h"
5    
6        SUBROUTINE LSCOND (PSA,QA,QSAT,        SUBROUTINE LSCOND (PSA,QA,QSAT,
7       *                   PRECLS,DTLSC,DQLSC,myThid)       *                   PRECLS,DTLSC,DQLSC,myThid)
8  C--  C--
# Line 17  C--            DTLSC  = temperature tend Line 19  C--            DTLSC  = temperature tend
19  C--            DQLSC  = hum. tendency [g/(kg s)] from l.s. cond (3-dim)  C--            DQLSC  = hum. tendency [g/(kg s)] from l.s. cond (3-dim)
20  C--  C--
21    
22          IMPLICIT NONE
       IMPLICIT rEAL*8 (A-H,O-Z)  
       INTEGER  myThid  
23    
24  C     Resolution parameters  C     Resolution parameters
25  C  
26  #include "atparam.h"  C-- size for MITgcm & Physics package :
27  #include "atparam1.h"  #include "AIM_SIZE.h"
28    
29  #include "EEPARAMS.h"  #include "EEPARAMS.h"
30  #include "Lev_def.h"  
31  C  #include "AIM_GRID.h"
       INTEGER NLAT, NLON, NLEV, NGP  
       PARAMETER ( NLON=IX, NLAT=IL, NLEV=KX, NGP=NLON*NLAT )  
32    
33  C     Physical constants + functions of sigma and latitude  C     Physical constants + functions of sigma and latitude
34    
# Line 39  C     Large-scale condensation constants Line 38  C     Large-scale condensation constants
38    
39  #include "com_lsccon.h"  #include "com_lsccon.h"
40    
41        REAL PSA(NGP), QA(NGP,NLEV), QSAT(NGP,NLEV)  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        REAL PRECLS(NGP), DTLSC(NGP,NLEV), DQLSC(NGP,NLEV)  #ifdef ALLOW_AIM
47    
48    C-- Local variables:  
49        INTEGER J, K        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  C--   1. Initialization
56    
# Line 62  C--   2. Tendencies of temperature and m Line 68  C--   2. Tendencies of temperature and m
68  C  C
69        DO K=2,NLEV        DO K=2,NLEV
70          DO J=1,NGP          DO J=1,NGP
71            DQLSC(J,K) = MIN(0.,(RHLSC*QSAT(J,K)-QA(J,K)))*RTLSC            DQLSC(J,K) = MIN(0. _d 0,(RHLSC*QSAT(J,K)-QA(J,K)))*RTLSC
72            DTLSC(J,K) = -TFACT*DQLSC(J,K)            DTLSC(J,K) = -TFACT*DQLSC(J,K)
73          ENDDO          ENDDO
74        ENDDO        ENDDO
# Line 81  C--   3. Large-scale precipitation Line 87  C--   3. Large-scale precipitation
87        ENDDO        ENDDO
88    
89  C--  C--
90    #endif /* ALLOW_AIM */
91    
92        RETURN        RETURN
93        END        END

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22