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

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

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

revision 1.4 by adcroft, Thu Sep 6 13:28:01 2001 UTC revision 1.5 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 SHTORH (IMODE,NGP,TA,PS,SIG,QA,RH,QSAT,myThid)        SUBROUTINE SHTORH (IMODE,NGP,TA,PS,SIG,QA,RH,QSAT,myThid)
7  C--  C--
8  C--   SUBROUTINE SHTORH (IMODE,NGP,TA,PS,SIG,QA,RH,QSAT)  C--   SUBROUTINE SHTORH (IMODE,NGP,TA,PS,SIG,QA,RH,QSAT)
# Line 20  C--   Output:  RH     : relative humidit Line 22  C--   Output:  RH     : relative humidit
22  C--            QA     : specific humidity in g/kg [if IMODE < 0]  C--            QA     : specific humidity in g/kg [if IMODE < 0]
23  C--          C--        
24    
25          IMPLICIT NONE
26    
27        IMPLICIT rEAL*8 (A-H,O-Z)  C-- Routine arguments:
28        INTEGER IMODE,NGP,J        INTEGER IMODE, NGP
29        INTEGER  myThid        INTEGER  myThid
30          _RL TA(NGP), PS(NGP), QA(NGP), RH(NGP), QSAT(NGP)
31    
32    C- jmc: declare all routine arguments:
33          _RL SIG
34    
35    #ifdef ALLOW_AIM
36    
37    C-- Local variables:
38          INTEGER  J
39    
40    C- jmc: declare all local variables:
41          _RL E0, C1, C2, T0, T1, T2
42    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
43    
 CcnhDebugStarts  
 #include "SIZE.h"  
 CcnhDebugEnds  
       REAL TA(NGP), PS(NGP), QA(NGP), RH(NGP), QSAT(NGP)  
 C  
44  C---  1. Compute Qsat (g/kg) from T (degK) and normalized pres. P (= p/1000_hPa)  C---  1. Compute Qsat (g/kg) from T (degK) and normalized pres. P (= p/1000_hPa)
45  C        If SIG > 0, P = Ps * sigma, otherwise P = Ps(1) = const.  C        If SIG > 0, P = Ps * sigma, otherwise P = Ps(1) = const.
46  C  C
# Line 81  chh      write(0,*) 'MAXVAL(QA)=',MAXVAL Line 91  chh      write(0,*) 'MAXVAL(QA)=',MAXVAL
91  chh      write(0,*) 'MINVAL(QA)=',MINVAL(QA)  chh      write(0,*) 'MINVAL(QA)=',MINVAL(QA)
92  chh      write(0,*) 'MAXVAL(RH)=',MAXVAL(RH)  chh      write(0,*) 'MAXVAL(RH)=',MAXVAL(RH)
93  chh      write(0,*) 'MINVAL(RH)=',MINVAL(RH)  chh      write(0,*) 'MINVAL(RH)=',MINVAL(RH)
94  C                                
95    #endif /* ALLOW_AIM */
96        RETURN        RETURN
97        END        END
98    
99        SUBROUTINE ZMEDDY (NLON,NLAT,FF,ZM,EDDY)        SUBROUTINE ZMEDDY (NLON,NLAT,FF,ZM,EDDY)
100    
101          IMPLICIT NONE
102    
103        IMPLICIT rEAL*8 (A-H,O-Z)  C *** Decompose a field into zonal-mean and eddy component
       INTEGER NLON,NLAT,I,J  
104    
105    C-- Routine arguments:
106          INTEGER NLON, NLAT
107          _RL FF(NLON,NLAT), ZM(NLAT), EDDY(NLON,NLAT)
108    
109    #ifdef ALLOW_AIM
110    
111    C-- Local variables:
112          INTEGER I,J
113    
114    C- jmc: declare all local variables:
115          _RL RNLON
116    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
117    
 C  
 C *** Decompose a field into zonal-mean and eddy component  
 C  
       REAL FF(NLON,NLAT), ZM(NLAT), EDDY(NLON,NLAT)  
 C  
118        RNLON=1./NLON        RNLON=1./NLON
119  C  C
120        DO 130 J=1,NLAT        DO 130 J=1,NLAT
# Line 114  C Line 132  C
132   130  CONTINUE   130  CONTINUE
133  C  C
134  C--  C--
135    #endif /* ALLOW_AIM */
136    
137        RETURN        RETURN
138        END        END
 C  

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

  ViewVC Help
Powered by ViewVC 1.1.22