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 |
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 |
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 |
|
|
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 |
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------------------------------------------------------------------------ |
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 |
|
|
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 ) |
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 |