/[MITgcm]/MITgcm/pkg/thsice/thsice_slab_ocean.F
ViewVC logotype

Diff of /MITgcm/pkg/thsice/thsice_slab_ocean.F

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

revision 1.5 by heimbach, Sun Apr 9 14:47:25 2006 UTC revision 1.6 by jmc, Wed Oct 18 21:07:03 2006 UTC
# Line 6  C $Name$ Line 6  C $Name$
6  CBOP  CBOP
7  C     !ROUTINE: THSICE_SLAB_OCEAN  C     !ROUTINE: THSICE_SLAB_OCEAN
8  C     !INTERFACE:  C     !INTERFACE:
9        SUBROUTINE THSICE_SLAB_OCEAN(        SUBROUTINE THSICE_SLAB_OCEAN(
10         I                      aim_sWght0, aim_sWght1,
11       O                      dTsurf,       O                      dTsurf,
12       I                      bi, bj, myThid )       I                      bi, bj, myTime, myIter, myThid )
13  C     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
14  C     *==========================================================*  C     *==========================================================*
15  C     | S/R  THSICE_SLAB_OCEAN  C     | S/R  THSICE_SLAB_OCEAN
16  C     | o Slab ocean for atmosphere (and sea-ice) model  C     | o Slab ocean for atmosphere (and sea-ice) model
17  C     *==========================================================*  C     *==========================================================*
18  C     | o add ocean-surface fluxes + restoring term  C     | o add ocean-surface fluxes + restoring term
19  C     |   and step forward ocean mixed-layer Temp. & Salinity  C     |   and step forward ocean mixed-layer Temp. & Salinity
# Line 40  C-- Physics package Line 41  C-- Physics package
41    
42  C     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
43  C     == Routine Arguments ==  C     == Routine Arguments ==
44        _RL dTsurf(sNx,sNy)  C     aim_sWght0 :: weight for time interpolation of surface BC
45    C     aim_sWght1 :: 0/1 = time period before/after the current time
46    C     dTsurf     :: diagnostics of slab-ocean temperature change [K/iter]
47    C     bi,bj      :: tile indices
48    C     myTime     :: Current time of simulation ( s )
49    C     myIter     :: Current iteration number in simulation
50    C     myThid     :: my Thread number Id.
51          _RL     aim_sWght0, aim_sWght1
52          _RL     dTsurf(sNx,sNy)
53          _RL     myTime
54        INTEGER bi,bj        INTEGER bi,bj
55        INTEGER myThid        INTEGER myIter, myThid
56  CEOP  CEOP
57    
58  #ifdef ALLOW_THSICE  #ifdef ALLOW_THSICE
# Line 77  C--    add heat flux and fresh-water + s Line 87  C--    add heat flux and fresh-water + s
87         ENDDO         ENDDO
88    
89  #ifdef ALLOW_AIM  #ifdef ALLOW_AIM
90        IF ( tauRelax_MxL .GT. 0. _d 0 ) THEN         IF ( tauRelax_MxL .GT. 0. _d 0 ) THEN
91  C--    add restoring (backward) toward climatological Temp. & fixed Salinity  C--    add restoring (backward) toward climatological Temp. & fixed Salinity
92         dtFac   = ocean_deltaT/tauRelax_MxL          dtFac   = ocean_deltaT/tauRelax_MxL
93         dtFacR  = 1. _d 0 /(1. _d 0 + dtFac)          dtFacR  = 1. _d 0 /(1. _d 0 + dtFac)
94         oceTfreez = - 1.9 _d 0          oceTfreez = - 1.9 _d 0
95         DO j=1,sNy          DO j=1,sNy
96          DO i=1,sNx           DO i=1,sNx
97           IF ( hOceMxL(i,j,bi,bj).NE.0. _d 0 ) THEN            IF ( hOceMxL(i,j,bi,bj).NE.0. _d 0 ) THEN
98            sOceMxL(i,j,bi,bj) =             sOceMxL(i,j,bi,bj) =
99       &         (sOceMxL(i,j,bi,bj) + dtFac*sMxL_default)*dtFacR       &         (sOceMxL(i,j,bi,bj) + dtFac*sMxL_default)*dtFacR
100            oceTfreez = -mu_Tf*sOceMxL(i,j,bi,bj)             oceTfreez = -mu_Tf*sOceMxL(i,j,bi,bj)
101            locTemp = ( aim_sWght0*aim_sst0(i,j,bi,bj)             locTemp = ( aim_sWght0*aim_sst0(i,j,bi,bj)
102       &              + aim_sWght1*aim_sst1(i,j,bi,bj)       &               + aim_sWght1*aim_sst1(i,j,bi,bj)
103       &              ) - celsius2K       &               ) - celsius2K
104            locTemp = MAX( locTemp , oceTfreez )             locTemp = MAX( locTemp , oceTfreez )
105            tOceMxL(i,j,bi,bj) =             tOceMxL(i,j,bi,bj) =
106       &         (tOceMxL(i,j,bi,bj) + dtFac*locTemp)*dtFacR       &         (tOceMxL(i,j,bi,bj) + dtFac*locTemp)*dtFacR
107           ENDIF            ENDIF
108             ENDDO
109          ENDDO          ENDDO
110         ENDDO         ENDIF
       ENDIF  
111  #endif /* ALLOW_AIM */  #endif /* ALLOW_AIM */
112    
113  C-    Diagnose surf. temp. change  C-    Diagnose surf. temp. change

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

  ViewVC Help
Powered by ViewVC 1.1.22