/[MITgcm]/MITgcm_contrib/atnguyen/code_21Dec2012_saltplume/kpp_routines.F
ViewVC logotype

Diff of /MITgcm_contrib/atnguyen/code_21Dec2012_saltplume/kpp_routines.F

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

revision 1.4 by atn, Thu May 1 21:30:48 2014 UTC revision 1.5 by atn, Fri May 2 05:46:01 2014 UTC
# Line 72  c     dvsq   (imt,Nr)  - (velocity shear Line 72  c     dvsq   (imt,Nr)  - (velocity shear
72  c     ustar  (imt)     - surface friction velocity                        (m/s)  c     ustar  (imt)     - surface friction velocity                        (m/s)
73  c     bo     (imt)     - surface turbulent buoy. forcing              (m^2/s^3)  c     bo     (imt)     - surface turbulent buoy. forcing              (m^2/s^3)
74  c     bosol  (imt)     - radiative buoyancy forcing                   (m^2/s^3)  c     bosol  (imt)     - radiative buoyancy forcing                   (m^2/s^3)
75  c     boplume(imt,Nr)  - haline buoyancy forcing                      (m^2/s^3)  c     boplume(imt,Nrp1)- haline buoyancy forcing                      (m^2/s^3)
76  c     dbloc  (imt,Nr)  - local delta buoyancy across interfaces         (m/s^2)  c     dbloc  (imt,Nr)  - local delta buoyancy across interfaces         (m/s^2)
77  c     dblocSm(imt,Nr)  - horizontally smoothed dbloc                    (m/s^2)  c     dblocSm(imt,Nr)  - horizontally smoothed dbloc                    (m/s^2)
78  c                          stored in ghat to save space  c                          stored in ghat to save space
# Line 95  c           where hbl(i,j) -> hbl((j-1)* Line 95  c           where hbl(i,j) -> hbl((j-1)*
95        _RL bo       (imt   )        _RL bo       (imt   )
96        _RL bosol    (imt   )        _RL bosol    (imt   )
97  #ifdef ALLOW_SALT_PLUME  #ifdef ALLOW_SALT_PLUME
98        _RL boplume  (imt,Nr)        _RL boplume  (imt,0:Nr)
99        _RL SPDepth  (imt   )        _RL SPDepth  (imt   )
100  #endif /* ALLOW_SALT_PLUME */  #endif /* ALLOW_SALT_PLUME */
101        _RL dbloc    (imt,Nr)        _RL dbloc    (imt,Nr)
# Line 339  c coriol    : Coriolis parameter Line 339  c coriol    : Coriolis parameter
339        _RL coriol  (imt)        _RL coriol  (imt)
340        integer ikppkey        integer ikppkey
341  #ifdef ALLOW_SALT_PLUME  #ifdef ALLOW_SALT_PLUME
342        _RL boplume (imt,Nr)        _RL boplume (imt,0:Nr)
343        _RL SPDepth (imt)        _RL SPDepth (imt)
344  #endif /* ALLOW_SALT_PLUME */  #endif /* ALLOW_SALT_PLUME */
345    
# Line 458  catn: in original way: accumulate all fr Line 458  catn: in original way: accumulate all fr
458  catn: in vol way: need to integrate down to hbl, so first locate  catn: in vol way: need to integrate down to hbl, so first locate
459  c     k level associated with this hbl, then sum up all SPforc[T,S]  c     k level associated with this hbl, then sum up all SPforc[T,S]
460             DO i = 1, imt             DO i = 1, imt
461              DO k = 1, kl  c            DO k = 1, kl
462               IF (abs(worka(i)).GE.abs( zgrid(k)-hwide(k)/2.0 )) THEN  c             IF (abs(worka(i)).GE.(abs(zgrid(k))-hwide(k)/2.0) THEN
463                bfsfc(i) = bfsfc(i) + boplume(i,k)  c              bfsfc(i) = bfsfc(i) + boplume(i,k)
464               ENDIF  c             ENDIF
465              ENDDO  c            ENDDO
466                 bfsfc(i) = bfsfc(i) + boplume(i,kbl(i))
467             ENDDO             ENDDO
468  #endif /* ndef SALT_PLUME_VOLUME */  #endif /* ndef SALT_PLUME_VOLUME */
469           ENDIF           ENDIF
# Line 602  CADJ &     shape = (/ (sNx+2*OLx)*(sNy+2 Line 603  CADJ &     shape = (/ (sNx+2*OLx)*(sNy+2
603          enddo          enddo
604  #else /* def SALT_PLUME_VOLUME */  #else /* def SALT_PLUME_VOLUME */
605          DO i = 1, imt          DO i = 1, imt
606           DO k = 1, Nr  c         DO k = 1, Nr
607            IF (hbl(i).GE.abs( zgrid(k)-hwide(k)/2.0 )) THEN  c          IF (hbl(i).GE.(abs(zgrid(k))-hwide(k)/2.0) THEN
608             bfsfc(i) = bfsfc(i) + boplume(i,k)  c           bfsfc(i) = bfsfc(i) + boplume(i,k)
609            ENDIF  c          ENDIF
610           ENDDO  c         ENDDO
611               bfsfc(i) = bfsfc(i) + boplume(i,kbl(i))
612          ENDDO          ENDDO
613  #endif /* ndef SALT_PLUME_VOLUME */  #endif /* ndef SALT_PLUME_VOLUME */
614        ENDIF        ENDIF
# Line 708  CADJ &     shape = (/ (sNx+2*OLx)*(sNy+2 Line 710  CADJ &     shape = (/ (sNx+2*OLx)*(sNy+2
710          enddo          enddo
711  #else /* def SALT_PLUME_VOLUME */  #else /* def SALT_PLUME_VOLUME */
712          DO i = 1, imt          DO i = 1, imt
713           DO k = 1, Nr  C         DO k = 1, Nr
714            IF (hbl(i).GE.abs( zgrid(k)-hwide(k)/2.0 )) THEN  C          IF (hbl(i).GE.(abs(zgrid(k))-hwide(k)/2.0) THEN
715             bfsfc(i) = bfsfc(i) + boplume(i,k)  C           bfsfc(i) = bfsfc(i) + boplume(i,k)
716            ENDIF  C          ENDIF
717           ENDDO  C         ENDDO
718              bfsfc(i) = bfsfc(i) + boplume(i,kbl(i))
719          ENDDO          ENDDO
720  #endif /* ndef SALT_PLUME_VOLUME */  #endif /* ndef SALT_PLUME_VOLUME */
721        ENDIF        ENDIF

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

  ViewVC Help
Powered by ViewVC 1.1.22