/[MITgcm]/MITgcm/pkg/fizhi/fizhi_moist.F
ViewVC logotype

Diff of /MITgcm/pkg/fizhi/fizhi_moist.F

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

revision 1.21 by molod, Thu Dec 2 19:06:17 2004 UTC revision 1.26 by jmc, Tue Mar 1 15:25:11 2005 UTC
# Line 16  C $Name$ Line 16  C $Name$
16    
17  #ifdef ALLOW_DIAGNOSTICS  #ifdef ALLOW_DIAGNOSTICS
18  #include "SIZE.h"  #include "SIZE.h"
19  #include "diagnostics_SIZE.h"  #include "DIAGNOSTICS_SIZE.h"
20  #include "diagnostics.h"  #include "DIAGNOSTICS.h"
21  #endif  #endif
22    
23  c Input Variables  c Input Variables
# Line 196  C Threshold for Cloud Liquid Water Memor Line 196  C Threshold for Cloud Liquid Water Memor
196    
197  c Determine Total number of Random Clouds to Check  c Determine Total number of Random Clouds to Check
198  c ---------------------------------------------  c ---------------------------------------------
199  C     ncrnd = (lm-nltop+1)/2        ncrnd = (lm-nltop+1)/2
       ncrnd = 0  
200    
201        if(first .and. myid.eq.1 .and. bi.eq.1 ) then        if(first .and. myid.eq.1 .and. bi.eq.1 ) then
202         print *         print *
# Line 371  C ************************************** Line 370  C **************************************
370         endif         endif
371        enddo        enddo
372    
   
373  C Initiate a do-loop around RAS for the number of different  C Initiate a do-loop around RAS for the number of different
374  C    sub-cloud layer depths in this strip  C    sub-cloud layer depths in this strip
375  C --If all subcloud depths are the same, execute loop once  C --If all subcloud depths are the same, execute loop once
# Line 821  C Remove pi-weighting for u and v tenden Line 819  C Remove pi-weighting for u and v tenden
819        do j = 1,jm        do j = 1,jm
820        do i = 1,im        do i = 1,im
821         dumoist(i,j,L) = dumoist(i,j,L) * tmpimjm(i,j)         dumoist(i,j,L) = dumoist(i,j,L) * tmpimjm(i,j)
822         dumoist(i,j,L) = dumoist(i,j,L) * tmpimjm(i,j)         dvmoist(i,j,L) = dvmoist(i,j,L) * tmpimjm(i,j)
823        enddo        enddo
824        enddo        enddo
825        enddo        enddo
826    
827    
828        endif        endif
829    
830  C **********************************************************************  C **********************************************************************
# Line 1158  C ************************************** Line 1157  C **************************************
1157    
1158         ndtls  = ndtls  + 1         ndtls  = ndtls  + 1
1159         ndqls  = ndqls  + 1         ndqls  = ndqls  + 1
1160    
1161           nudiag1  = nudiag1  + 1
1162           nudiag2  = nudiag2  + 1
1163    
1164         endif         endif
1165  #endif  #endif
1166    
# Line 1213  C Local Variables Line 1216  C Local Variables
1216        integer IC(ICM),   IRND(icm)        integer IC(ICM),   IRND(icm)
1217        _RL cmass(lng,K)        _RL cmass(lng,K)
1218        LOGICAL SETRAS        LOGICAL SETRAS
1219          integer ifound
1220          _RL temp
1221          _RL thbef(lng,K)
1222    
1223        integer i,L,nc,ib,nt        integer i,L,nc,ib,nt
1224        integer km1,kp1,kprv,kcr,kfx,ncmx        integer km1,kp1,kprv,kcr,kfx,ncmx
# Line 1231  C The numerator here is the fraction of Line 1237  C The numerator here is the fraction of
1237  C      allowed to entrain into the cloud  C      allowed to entrain into the cloud
1238    
1239  CCC   FRAC = 1./dt  CCC   FRAC = 1./dt
1240    CCC   FRAC = 0.5/dt
1241        FRAC = 0.5/dt        FRAC = 0.5/dt
1242    
1243        KM1    = K  - 1        KM1    = K  - 1
# Line 1241  C Line 1248  C
1248         KPRV  = KM1         KPRV  = KM1
1249  C Removed KRMAX parameter  C Removed KRMAX parameter
1250         KCR   = MIN(KM1,nlayr-2)             KCR   = MIN(KM1,nlayr-2)    
1251  CCC    KFX   = KM1 - KCR         KFX   = KM1 - KCR
        KFX   = KM1  
1252         NCMX  = KFX + NCRND         NCMX  = KFX + NCRND
1253  C  C
1254         IF (KFX .GT. 0) THEN         IF (KFX .GT. 0) THEN
# Line 1322  c ***************************** Line 1328  c *****************************
1328    
1329        DO L=IB,K        DO L=IB,K
1330         DO I=1,LENC         DO I=1,LENC
1331            thbef(I,L) = POI(I,L)
1332          POI(I,L) = POI(I,L) + TCU(I,L) * DT * rhfrac(i)          POI(I,L) = POI(I,L) + TCU(I,L) * DT * rhfrac(i)
1333          QOI(I,L) = QOI(I,L) + QCU(I,L) * DT * rhfrac(i)          QOI(I,L) = QOI(I,L) + QCU(I,L) * DT * rhfrac(i)
1334         ENDDO         ENDDO
# Line 1337  c ***************************** Line 1344  c *****************************
1344         rains(I,ib) = rains(I,ib) + PCU(I)*dt * rhfrac(i)         rains(I,ib) = rains(I,ib) + PCU(I)*dt * rhfrac(i)
1345        ENDDO        ENDDO
1346    
1347          do i = 1,lenc
1348           ifound = 0
1349           do L = 1,k
1350            if(tcu(i,L).ne.0.)ifound = ifound + 1
1351           enddo
1352           if(ifound.ne.0) then
1353    c       print *,i,' made a cloud detraining at ',ib
1354            do L = 1,k
1355             temp = TCU(I,L) * DT * rhfrac(i)
1356    c        write(6,122)L,thbef(i,L),poi(i,L),temp
1357            enddo
1358           endif
1359          enddo
1360    
1361    100 CONTINUE    100 CONTINUE
1362    
1363     122  format(' ',i3,' TH B ',e10.3,' TH A ',e10.3,' DTH ',e10.3)
1364    
1365  c Fill Convective Cloud Fractions based on 3-D Rain Amounts  c Fill Convective Cloud Fractions based on 3-D Rain Amounts
1366  c ---------------------------------------------------------  c ---------------------------------------------------------
# Line 1377  c -------------------------------------- Line 1400  c --------------------------------------
1400    
1401  c First Time In From a Continuing RESTART (IRAS.GT.1) or Reading a New RESTART  c First Time In From a Continuing RESTART (IRAS.GT.1) or Reading a New RESTART
1402  c ----------------------------------------------------------------------------  c ----------------------------------------------------------------------------
1403    c     print *,' RNDCLOUD: first ',first,' iras ',iras,' iras0 ',iras0
1404    c     print *,' RNDCLOUD: irm,nrnd,mcheck=',irm,nrnd,mcheck
1405        if( first.and.(iras.gt.1) .or. iras.ne.iras0+1 )then        if( first.and.(iras.gt.1) .or. iras.ne.iras0+1 )then
1406         print *,' first ',first,' iras ',iras,' iras0 ',iras0         print *,' first ',first,' iras ',iras,' iras0 ',iras0
1407         if( myid.eq.1 ) print *, 'Recreating Rand Numb Array in RNDCLOUD'         if( myid.eq.1 ) print *, 'Recreating Rand Numb Array in RNDCLOUD'
# Line 1422  c -------------------------------------- Line 1447  c --------------------------------------
1447        integer iseed        integer iseed
1448        real *8 seed,port_rand        real *8 seed,port_rand
1449        _RL random_numbx        _RL random_numbx
       random_numbx = 0  
1450  #ifdef CRAY  #ifdef CRAY
1451        _RL ranf        _RL ranf
1452        random_numbx = ranf()        random_numbx = ranf()
# Line 1430  c -------------------------------------- Line 1454  c --------------------------------------
1454  #ifdef SGI  #ifdef SGI
1455        _RL rand        _RL rand
1456        random_numbx = rand()        random_numbx = rand()
1457  #endif  #else
1458          seed = iseed
1459        random_numbx = port_rand(seed)        random_numbx = port_rand(seed)
1460  #endif  #endif
1461    #endif
1462        return        return
1463        end        end
1464        subroutine random_seedx (iseed)        subroutine random_seedx (iseed)
# Line 1591  C Argument List declarations Line 1617  C Argument List declarations
1617        _RL POI(lng,K),QOI(lng,K),PRS(lng,K+1),PRJ(lng,K+1)        _RL POI(lng,K),QOI(lng,K),PRS(lng,K+1),PRJ(lng,K+1)
1618        _RL uoi(lng,nlayr,ntracedim)        _RL uoi(lng,nlayr,ntracedim)
1619        _RL PCU(LENC), CLN(lng)        _RL PCU(LENC), CLN(lng)
1620        _RL TCU(lng,K),  QCU(lng,K),  ucu(lng,k,ntracedim), CMASS(lng,K)        _RL TCU(lng,K),QCU(lng,K),ucu(lng,k,ntracedim),CMASS(lng,K)
1621        _RL ALF(lng,K), BET(lng,K),  GAM(lng,K), PRH(lng,K), PRI(lng,K)        _RL ALF(lng,K), BET(lng,K),  GAM(lng,K), PRH(lng,K), PRI(lng,K)
1622        _RL HOL(LENC,K), ETA(LENC,K), HST(LENC,K), QOL(LENC,K)        _RL HOL(LENC,K), ETA(LENC,K), HST(LENC,K), QOL(LENC,K)
1623        _RL GMH(LENC,K)        _RL GMH(LENC,K)
# Line 2174  c ----------------------------------- Line 2200  c -----------------------------------
2200        II = I1(I)        II = I1(I)
2201        ucu(II,L,nt) = TX3(I)        ucu(II,L,nt) = TX3(I)
2202   1020 CONTINUE   1020 CONTINUE
2203    
2204        DO 1030 I=1,LENB        DO 1030 I=1,LENB
2205        II = I1(I)        II = I1(I)
2206        IF (TX6(I) .GE. 1.0) THEN        IF (TX6(I) .GE. 1.0) THEN

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.26

  ViewVC Help
Powered by ViewVC 1.1.22