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

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

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

revision 1.4 by heimbach, Mon Nov 13 16:37:02 2000 UTC revision 1.5 by heimbach, Mon Jan 29 20:09:23 2001 UTC
# Line 653  c     fRi, fcon             function of Line 653  c     fRi, fcon             function of
653        integer i, ki, mr        integer i, ki, mr
654        _KPP_RL c1, c0        _KPP_RL c1, c0
655    
656    #ifdef ALLOW_KPP_VERTICALLY_SMOOTH
657    CADJ INIT kpp_ri_tape_mr = common, 1
658    #endif
659    
660  c constants  c constants
661        c1 = 1.0        c1 = 1.0
662        c0 = 0.0        c0 = 0.0
# Line 662  c     compute interior gradient Ri at al Line 666  c     compute interior gradient Ri at al
666  c     use diffus(*,*,1) as temporary storage of Ri to be smoothed  c     use diffus(*,*,1) as temporary storage of Ri to be smoothed
667  c     use diffus(*,*,2) as temporary storage for Brunt-Vaisala squared  c     use diffus(*,*,2) as temporary storage for Brunt-Vaisala squared
668  c     set values at bottom and below to nearest value above bottom  c     set values at bottom and below to nearest value above bottom
669    #ifdef ALLOW_AUTODIFF_TAMC
670    C     break data flow dependence on diffus
671          diffus(1,1,1) = 0.0
672    #endif
673    
674        do ki = 1, Nr        do ki = 1, Nr
675           do i = 1, imt           do i = 1, imt
# Line 681  c     set values at bottom and below to Line 689  c     set values at bottom and below to
689    
690  c-----------------------------------------------------------------------  c-----------------------------------------------------------------------
691  c     vertically smooth Ri  c     vertically smooth Ri
692    #ifdef ALLOW_KPP_VERTICALLY_SMOOTH
693        do mr = 1, num_v_smooth_Ri        do mr = 1, num_v_smooth_Ri
694    
695  CADJ store diffus(:,:,1) = comlev1_kpp_sm  CADJ store diffus(:,:,1) = kpp_ri_tape_mr
696  CADJ &  , key = ikey, shape = (/ (sNx+2*OLx)*(sNy+2*OLy),Nr+2 /)  CADJ &  , key=mr, shape=(/ (sNx+2*OLx)*(sNy+2*OLy),Nr+2 /)
697    
698           call z121 (           call z121 (
699       U     diffus(1,0,1))       U     diffus(1,0,1))
700        end do        end do
701    #endif
 CADJ store diffus = comlev1_kpp  
 CADJ &  , key = ikey, shape = (/ (sNx+2*OLx)*(sNy+2*OLy),Nr+2,3 /)  
702    
703  c-----------------------------------------------------------------------  c-----------------------------------------------------------------------
704  c                           after smoothing loop  c                           after smoothing loop

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

  ViewVC Help
Powered by ViewVC 1.1.22