/[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.15 by heimbach, Fri Mar 7 23:51:02 2003 UTC revision 1.16 by heimbach, Fri Mar 21 23:18:28 2003 UTC
# Line 23  c*************************************** Line 23  c***************************************
23       I       mytime, mythid       I       mytime, mythid
24       I     , kmtj, shsq, dvsq, ustar       I     , kmtj, shsq, dvsq, ustar
25       I     , bo, bosol, dbloc, Ritop, coriol       I     , bo, bosol, dbloc, Ritop, coriol
26       I     , ikey       I     , ikppkey
27       O     , diffus       O     , diffus
28       U     , ghat       U     , ghat
29       O     , hbl )       O     , hbl )
# Line 82  c           where hbl(i,j) -> hbl((j-1)* Line 82  c           where hbl(i,j) -> hbl((j-1)*
82        _KPP_RL Ritop (imt,Nr)        _KPP_RL Ritop (imt,Nr)
83        _KPP_RL coriol(imt   )        _KPP_RL coriol(imt   )
84    
85        integer ikey        integer ikppkey
86    
87  c output  c output
88  c     diffus (imt,1)  - vertical viscosity coefficient                  (m^2/s)  c     diffus (imt,1)  - vertical viscosity coefficient                  (m^2/s)
# Line 127  c--------------------------------------- Line 127  c---------------------------------------
127    
128  cph(  cph(
129  cph these storings avoid recomp. of Ri_iwmix  cph these storings avoid recomp. of Ri_iwmix
130  CADJ STORE ghat  = comlev1_kpp, key = ikey  CADJ STORE ghat  = comlev1_kpp, key = ikppkey
131  CADJ STORE dbloc = comlev1_kpp, key = ikey  CADJ STORE dbloc = comlev1_kpp, key = ikppkey
132  cph)  cph)
133        call Ri_iwmix (        call Ri_iwmix (
134       I       kmtj, shsq, dbloc, ghat       I       kmtj, shsq, dbloc, ghat
135       I     , ikey       I     , ikppkey
136       O     , diffus )       O     , diffus )
137    
138  cph(  cph(
139  cph these storings avoid recomp. of Ri_iwmix  cph these storings avoid recomp. of Ri_iwmix
140  cph DESPITE TAFs 'not necessary' warning!  cph DESPITE TAFs 'not necessary' warning!
141  CADJ STORE dbloc  = comlev1_kpp, key = ikey  CADJ STORE dbloc  = comlev1_kpp, key = ikppkey
142  CADJ STORE shsq   = comlev1_kpp, key = ikey  CADJ STORE shsq   = comlev1_kpp, key = ikppkey
143  CADJ STORE ghat   = comlev1_kpp, key = ikey  CADJ STORE ghat   = comlev1_kpp, key = ikppkey
144  CADJ STORE diffus = comlev1_kpp, key = ikey  CADJ STORE diffus = comlev1_kpp, key = ikppkey
145  cph)  cph)
146    
147  c-----------------------------------------------------------------------  c-----------------------------------------------------------------------
# Line 167  c--------------------------------------- Line 167  c---------------------------------------
167       I       mytime, mythid       I       mytime, mythid
168       I     , kmtj       I     , kmtj
169       I     , dvsq, dbloc, Ritop, ustar, bo, bosol, coriol       I     , dvsq, dbloc, Ritop, ustar, bo, bosol, coriol
170       I     , ikey       I     , ikppkey
171       O     , hbl, bfsfc, stable, casea, kbl, Rib, sigma       O     , hbl, bfsfc, stable, casea, kbl, Rib, sigma
172       &     )       &     )
173    
174  CADJ STORE hbl,bfsfc,stable,casea,kbl = comlev1_kpp, key = ikey  CADJ STORE hbl,bfsfc,stable,casea,kbl = comlev1_kpp, key = ikppkey
175    
176  c-----------------------------------------------------------------------  c-----------------------------------------------------------------------
177  c compute boundary layer diffusivities  c compute boundary layer diffusivities
# Line 179  c--------------------------------------- Line 179  c---------------------------------------
179    
180        call blmix (        call blmix (
181       I       ustar, bfsfc, hbl, stable, casea, diffus, kbl       I       ustar, bfsfc, hbl, stable, casea, diffus, kbl
182       O     , dkm1, blmc, ghat, sigma, ikey       O     , dkm1, blmc, ghat, sigma, ikppkey
183       &     )       &     )
184  cph(  cph(
185  CADJ STORE dkm1,blmc,ghat = comlev1_kpp, key = ikey  CADJ STORE dkm1,blmc,ghat = comlev1_kpp, key = ikppkey
186  CADJ STORE hbl, kbl, diffus, casea = comlev1_kpp, key = ikey  CADJ STORE hbl, kbl, diffus, casea = comlev1_kpp, key = ikppkey
187  cph)  cph)
188    
189  c-----------------------------------------------------------------------  c-----------------------------------------------------------------------
# Line 197  c--------------------------------------- Line 197  c---------------------------------------
197    
198  cph(  cph(
199  cph avoids recomp. of enhance  cph avoids recomp. of enhance
200  CADJ STORE blmc = comlev1_kpp, key = ikey  CADJ STORE blmc = comlev1_kpp, key = ikppkey
201  cph)  cph)
202    
203  c-----------------------------------------------------------------------  c-----------------------------------------------------------------------
# Line 229  c*************************************** Line 229  c***************************************
229       I       mytime, mythid       I       mytime, mythid
230       I     , kmtj       I     , kmtj
231       I     , dvsq, dbloc, Ritop, ustar, bo, bosol, coriol       I     , dvsq, dbloc, Ritop, ustar, bo, bosol, coriol
232       I     , ikey       I     , ikppkey
233       O     , hbl, bfsfc, stable, casea, kbl, Rib, sigma       O     , hbl, bfsfc, stable, casea, kbl, Rib, sigma
234       &     )       &     )
235    
# Line 286  c coriol    : Coriolis parameter Line 286  c coriol    : Coriolis parameter
286        _KPP_RL bo    (imt)        _KPP_RL bo    (imt)
287        _KPP_RL bosol (imt)        _KPP_RL bosol (imt)
288        _KPP_RL coriol(imt)        _KPP_RL coriol(imt)
289        integer ikey        integer ikppkey
290    
291  c  output  c  output
292  c--------  c--------
# Line 411  cph( Line 411  cph(
411  cph  without this store, there's a recomputation error for  cph  without this store, there's a recomputation error for
412  cph  rib in adbldepth (probably partial recomputation problem)      cph  rib in adbldepth (probably partial recomputation problem)    
413  CADJ store Rib = comlev1_kpp  CADJ store Rib = comlev1_kpp
414  CADJ &   , key = ikey, shape = (/ (sNx+2*OLx)*(sNy+2*OLy),Nr /)  CADJ &   , key = ikppkey, shape = (/ (sNx+2*OLx)*(sNy+2*OLy),Nr /)
415  cph)  cph)
416    
417        do kl = 2, Nr        do kl = 2, Nr
# Line 421  cph) Line 421  cph)
421        end do        end do
422    
423  CADJ store kbl = comlev1_kpp  CADJ store kbl = comlev1_kpp
424  CADJ &   , key = ikey, shape = (/ (sNx+2*OLx)*(sNy+2*OLy) /)  CADJ &   , key = ikppkey, shape = (/ (sNx+2*OLx)*(sNy+2*OLy) /)
425    
426        do i = 1, imt        do i = 1, imt
427           kl = kbl(i)           kl = kbl(i)
# Line 434  c     linearly interpolate to find hbl w Line 434  c     linearly interpolate to find hbl w
434        end do        end do
435    
436  CADJ store hbl = comlev1_kpp  CADJ store hbl = comlev1_kpp
437  CADJ &   , key = ikey, shape = (/ (sNx+2*OLx)*(sNy+2*OLy) /)  CADJ &   , key = ikppkey, shape = (/ (sNx+2*OLx)*(sNy+2*OLy) /)
438    
439  c-----------------------------------------------------------------------  c-----------------------------------------------------------------------
440  c     find stability and buoyancy forcing for boundary layer  c     find stability and buoyancy forcing for boundary layer
# Line 452  c--------------------------------------- Line 452  c---------------------------------------
452           bfsfc(i)  = bo(i) + bosol(i) * (1. - worka(i))           bfsfc(i)  = bo(i) + bosol(i) * (1. - worka(i))
453        end do        end do
454  CADJ store bfsfc = comlev1_kpp  CADJ store bfsfc = comlev1_kpp
455  CADJ &   , key = ikey, shape = (/ (sNx+2*OLx)*(sNy+2*OLy) /)  CADJ &   , key = ikppkey, shape = (/ (sNx+2*OLx)*(sNy+2*OLy) /)
456    
457  c--   ensure bfsfc is never 0  c--   ensure bfsfc is never 0
458        do i = 1, imt        do i = 1, imt
# Line 463  c--   ensure bfsfc is never 0 Line 463  c--   ensure bfsfc is never 0
463  cph(  cph(
464  cph  added stable to store list to avoid extensive recomp.  cph  added stable to store list to avoid extensive recomp.
465  CADJ store bfsfc, stable = comlev1_kpp  CADJ store bfsfc, stable = comlev1_kpp
466  CADJ &   , key = ikey, shape = (/ (sNx+2*OLx)*(sNy+2*OLy) /)  CADJ &   , key = ikppkey, shape = (/ (sNx+2*OLx)*(sNy+2*OLy) /)
467  cph)  cph)
468    
469  c-----------------------------------------------------------------------  c-----------------------------------------------------------------------
# Line 482  c--------------------------------------- Line 482  c---------------------------------------
482           end if           end if
483        end do        end do
484  CADJ store hbl = comlev1_kpp  CADJ store hbl = comlev1_kpp
485  CADJ &   , key = ikey, shape = (/ (sNx+2*OLx)*(sNy+2*OLy) /)  CADJ &   , key = ikppkey, shape = (/ (sNx+2*OLx)*(sNy+2*OLy) /)
486    
487        do i = 1, imt        do i = 1, imt
488           hbl(i) = max(hbl(i),minKPPhbl)           hbl(i) = max(hbl(i),minKPPhbl)
# Line 490  CADJ &   , key = ikey, shape = (/ (sNx+2 Line 490  CADJ &   , key = ikey, shape = (/ (sNx+2
490        end do        end do
491    
492  CADJ store hbl = comlev1_kpp  CADJ store hbl = comlev1_kpp
493  CADJ &   , key = ikey, shape = (/ (sNx+2*OLx)*(sNy+2*OLy) /)  CADJ &   , key = ikppkey, shape = (/ (sNx+2*OLx)*(sNy+2*OLy) /)
494    
495  c-----------------------------------------------------------------------  c-----------------------------------------------------------------------
496  c      find new kbl  c      find new kbl
# Line 520  c--------------------------------------- Line 520  c---------------------------------------
520           bfsfc(i) = bo(i) + bosol(i) * (1. - worka(i))           bfsfc(i) = bo(i) + bosol(i) * (1. - worka(i))
521        end do        end do
522  CADJ store bfsfc = comlev1_kpp  CADJ store bfsfc = comlev1_kpp
523  CADJ &   , key = ikey, shape = (/ (sNx+2*OLx)*(sNy+2*OLy) /)  CADJ &   , key = ikppkey, shape = (/ (sNx+2*OLx)*(sNy+2*OLy) /)
524    
525  c--   ensures bfsfc is never 0  c--   ensures bfsfc is never 0
526        do i = 1, imt        do i = 1, imt
# Line 642  c*************************************** Line 642  c***************************************
642    
643        subroutine Ri_iwmix (        subroutine Ri_iwmix (
644       I       kmtj, shsq, dbloc, dblocSm       I       kmtj, shsq, dbloc, dblocSm
645       I     , ikey       I     , ikppkey
646       O     , diffus )       O     , diffus )
647    
648  c     compute interior viscosity diffusivity coefficients due  c     compute interior viscosity diffusivity coefficients due
# Line 666  c     dblocSm(imt,Nr)      horizontally Line 666  c     dblocSm(imt,Nr)      horizontally
666        _KPP_RL shsq   (imt,Nr)        _KPP_RL shsq   (imt,Nr)
667        _KPP_RL dbloc  (imt,Nr)        _KPP_RL dbloc  (imt,Nr)
668        _KPP_RL dblocSm(imt,Nr)        _KPP_RL dblocSm(imt,Nr)
669        integer ikey        integer ikppkey
670    
671  c output  c output
672  c     diffus(imt,0:Nrp1,1)  vertical viscosivity coefficient        (m^2/s)  c     diffus(imt,0:Nrp1,1)  vertical viscosivity coefficient        (m^2/s)
# Line 1024  c*************************************** Line 1024  c***************************************
1024    
1025        subroutine blmix (        subroutine blmix (
1026       I       ustar, bfsfc, hbl, stable, casea, diffus, kbl       I       ustar, bfsfc, hbl, stable, casea, diffus, kbl
1027       O     , dkm1, blmc, ghat, sigma, ikey       O     , dkm1, blmc, ghat, sigma, ikppkey
1028       &     )       &     )
1029    
1030  c     mixing coefficients within boundary layer depend on surface  c     mixing coefficients within boundary layer depend on surface
# Line 1065  c     sigma(imt)                  normal Line 1065  c     sigma(imt)                  normal
1065        _KPP_RL blmc (imt,Nr,mdiff)        _KPP_RL blmc (imt,Nr,mdiff)
1066        _KPP_RL ghat (imt,Nr)        _KPP_RL ghat (imt,Nr)
1067        _KPP_RL sigma(imt)        _KPP_RL sigma(imt)
1068        integer ikey        integer ikppkey
1069    
1070  #ifdef ALLOW_KPP  #ifdef ALLOW_KPP
1071    
# Line 1102  c--------------------------------------- Line 1102  c---------------------------------------
1102           wm(i) = sign(eins,wm(i))*max(phepsi,abs(wm(i)))           wm(i) = sign(eins,wm(i))*max(phepsi,abs(wm(i)))
1103           ws(i) = sign(eins,ws(i))*max(phepsi,abs(ws(i)))           ws(i) = sign(eins,ws(i))*max(phepsi,abs(ws(i)))
1104        end do        end do
1105  CADJ STORE wm = comlev1_kpp, key = ikey  CADJ STORE wm = comlev1_kpp, key = ikppkey
1106  CADJ STORE ws = comlev1_kpp, key = ikey  CADJ STORE ws = comlev1_kpp, key = ikppkey
1107    
1108        do i = 1, imt        do i = 1, imt
1109    

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

  ViewVC Help
Powered by ViewVC 1.1.22