/[MITgcm]/MITgcm/pkg/kpp/kpp_calc.F
ViewVC logotype

Diff of /MITgcm/pkg/kpp/kpp_calc.F

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

revision 1.15 by heimbach, Fri Mar 7 04:19:01 2003 UTC revision 1.16 by heimbach, Fri Mar 21 23:18:28 2003 UTC
# Line 108  c     to OLx=1, OLy=1. Line 108  c     to OLx=1, OLy=1.
108  #include "tamc.h"  #include "tamc.h"
109  #include "tamc_keys.h"  #include "tamc_keys.h"
110  #else /* ALLOW_AUTODIFF_TAMC */  #else /* ALLOW_AUTODIFF_TAMC */
111        integer ikey        integer ikppkey
112  #endif /* ALLOW_AUTODIFF_TAMC */  #endif /* ALLOW_AUTODIFF_TAMC */
113    
114        EXTERNAL DIFFERENT_MULTIPLE        EXTERNAL DIFFERENT_MULTIPLE
# Line 191  c     vRef   (nx,ny)       - Reference m Line 191  c     vRef   (nx,ny)       - Reference m
191        _KPP_RL tempvar1, dBdz1, dBdz2, ustarX, ustarY        _KPP_RL tempvar1, dBdz1, dBdz2, ustarX, ustarY
192  #endif  #endif
193    
194    #ifdef ALLOW_AUTODIFF_TAMC
195              act1 = bi - myBxLo(myThid)
196              max1 = myBxHi(myThid) - myBxLo(myThid) + 1
197              act2 = bj - myByLo(myThid)
198              max2 = myByHi(myThid) - myByLo(myThid) + 1
199              act3 = myThid - 1
200              max3 = nTx*nTy
201              act4 = ikey_dynamics - 1
202              ikppkey = (act1 + 1) + act2*max1
203         &                      + act3*max1*max2
204         &                      + act4*max1*max2*max3
205    #endif /* ALLOW_AUTODIFF_TAMC */
206    
207  c     Check to see if new vertical mixing coefficient should be computed now?  c     Check to see if new vertical mixing coefficient should be computed now?
208        IF ( DIFFERENT_MULTIPLE(kpp_freq,myTime,myTime-deltaTClock) .OR.        IF ( DIFFERENT_MULTIPLE(kpp_freq,myTime,myTime-deltaTClock) .OR.
209       1     myTime .EQ. startTime ) THEN       1     myTime .EQ. startTime ) THEN
# Line 306  c     so that the subroutine "bldepth" w Line 319  c     so that the subroutine "bldepth" w
319    
320  cph(  cph(
321  cph  this avoids a single or double recomp./call of statekpp  cph  this avoids a single or double recomp./call of statekpp
322  CADJ store work2              = comlev1_kpp, key = ikey  CADJ store work2              = comlev1_kpp, key = ikppkey
323  #ifdef ALLOW_AUTODIFF_KPP_EXTENSIVE_STORE  #ifdef ALLOW_AUTODIFF_KPP_EXTENSIVE_STORE
324  CADJ store dbloc, Ritop, ghat = comlev1_kpp, key = ikey  CADJ store dbloc, Ritop, ghat = comlev1_kpp, key = ikppkey
325  CADJ store vddiff             = comlev1_kpp, key = ikey  CADJ store vddiff             = comlev1_kpp, key = ikppkey
326  #endif  #endif
327  cph)  cph)
328    
# Line 345  c initialize arrays to zero Line 358  c initialize arrays to zero
358         END DO         END DO
359        END DO        END DO
360  cph(  cph(
361  CADJ store work3 = comlev1_kpp, key = ikey  CADJ store work3 = comlev1_kpp, key = ikppkey
362  cph)  cph)
363        DO j = jmin, jmax        DO j = jmin, jmax
364         jp1 = j + 1         jp1 = j + 1
# Line 384  cph) Line 397  cph)
397        END DO        END DO
398    
399  cph(  cph(
400  CADJ store ustar = comlev1_kpp, key = ikey  CADJ store ustar = comlev1_kpp, key = ikppkey
401  cph)  cph)
402    
403  c------------------------------------------------------------------------  c------------------------------------------------------------------------
# Line 624  c     shsq computation Line 637  c     shsq computation
637    
638  cph(  cph(
639  #ifdef ALLOW_AUTODIFF_KPP_EXTENSIVE_STORE  #ifdef ALLOW_AUTODIFF_KPP_EXTENSIVE_STORE
640  CADJ store dvsq, shsq = comlev1_kpp, key = ikey  CADJ store dvsq, shsq = comlev1_kpp, key = ikppkey
641  #endif  #endif
642  cph)  cph)
643    
# Line 643  c--------------------------------------- Line 656  c---------------------------------------
656       I       mytime, mythid       I       mytime, mythid
657       I     , work1, shsq, dVsq, ustar       I     , work1, shsq, dVsq, ustar
658       I     , bo, bosol, dbloc, Ritop, work2       I     , bo, bosol, dbloc, Ritop, work2
659       I     , ikey       I     , ikppkey
660       O     , vddiff       O     , vddiff
661       U     , ghat       U     , ghat
662       O     , hbl )       O     , hbl )
# Line 699  c     horizontal smoothing of vertical d Line 712  c     horizontal smoothing of vertical d
712    
713  cph(  cph(
714  cph  crucial: this avoids full recomp./call of kppmix  cph  crucial: this avoids full recomp./call of kppmix
715  CADJ store KPPhbl = comlev1_kpp, key = ikey  CADJ store KPPhbl = comlev1_kpp, key = ikppkey
716  cph)  cph)
717    
718  C     Compute fraction of solar short-wave flux penetrating to  C     Compute fraction of solar short-wave flux penetrating to

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.22