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

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

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

revision 1.11 by jmc, Sun Jun 25 22:31:02 2006 UTC revision 1.20 by jmc, Thu Jun 11 19:23:54 2009 UTC
# Line 36  C     === Global variables === Line 36  C     === Global variables ===
36    
37  C     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
38  C     === Routine arguments ===  C     === Routine arguments ===
39  C     myIter :: iteration counter for this thread  C     myTime    :: Current time in simulation (s)
40  C     myTime :: time counter for this thread  C     myIter    :: Current iteration number
41  C     myThid :: thread number for this instance of the routine.  C     myThid    :: My Thread Id. number
42        _RL  myTime        _RL     myTime
43        INTEGER myIter        INTEGER myIter
44        INTEGER myThid        INTEGER myThid
45  CEOP  CEOP
# Line 98  C      to be valid at the boundaries ( d Line 98  C      to be valid at the boundaries ( d
98       &                         + act4*max1*max2*max3       &                         + act4*max1*max2*max3
99  #endif /* ALLOW_AUTODIFF_TAMC */  #endif /* ALLOW_AUTODIFF_TAMC */
100    
101    #ifdef ALLOW_AUTODIFF_TAMC
102    CADJ STORE ocefwfx(:,:,bi,bj) = comlev1_bibj, key=iicekey, byte=isbyte
103    CADJ STORE oceqnet(:,:,bi,bj) = comlev1_bibj, key=iicekey, byte=isbyte
104    CADJ STORE ocesflx(:,:,bi,bj) = comlev1_bibj, key=iicekey, byte=isbyte
105    # ifdef ALLOW_EXF
106    CADJ STORE qsw(:,:,bi,bj) = comlev1_bibj, key=iicekey, byte=isbyte
107    # endif
108    #endif
109    
110  C--     Mixed layer thickness: take the 1rst layer  C--     Mixed layer thickness: take the 1rst layer
111  #ifdef NONLIN_FRSURF  #ifdef NONLIN_FRSURF
112          IF ( staggerTimeStep .AND. nonlinFreeSurf.GT.0 ) THEN          IF ( staggerTimeStep .AND. nonlinFreeSurf.GT.0 ) THEN
113           IF ( select_rStar.GT.0 ) THEN           IF ( select_rStar.GT.0 ) THEN
114            DO j = jMin, jMax            DO j=1-OLy,sNy+OLy
115             DO i = iMin, iMax             DO i=1-OLx,sNx+OLx
116               hOceMxL(i,j,bi,bj) = drF(1)*h0FacC(i,j,1,bi,bj)               hOceMxL(i,j,bi,bj) = drF(1)*h0FacC(i,j,1,bi,bj)
117       &                                  *rStarFacC(i,j,bi,bj)       &                                  *rStarFacC(i,j,bi,bj)
118             ENDDO             ENDDO
119            ENDDO            ENDDO
120           ELSE           ELSE
121            DO j = jMin, jMax            DO j=1-OLy,sNy+OLy
122             DO i = iMin, iMax             DO i=1-OLx,sNx+OLx
123              IF ( ksurfC(i,j,bi,bj).EQ.1 ) THEN              IF ( ksurfC(i,j,bi,bj).EQ.1 ) THEN
124               hOceMxL(i,j,bi,bj) = drF(1)*hFac_surfC(i,j,bi,bj)               hOceMxL(i,j,bi,bj) = drF(1)*hFac_surfC(i,j,bi,bj)
125              ELSE              ELSE
126               hOceMxL(i,j,bi,bj) = drF(1)*hfacC(i,j,1,bi,bj)               hOceMxL(i,j,bi,bj) = drF(1)*hFacC(i,j,1,bi,bj)
127              ENDIF              ENDIF
128             ENDDO             ENDDO
129            ENDDO            ENDDO
# Line 123  C--     Mixed layer thickness: take the Line 132  C--     Mixed layer thickness: take the
132  #else /* ndef NONLIN_FRSURF */  #else /* ndef NONLIN_FRSURF */
133          IF (.TRUE.) THEN          IF (.TRUE.) THEN
134  #endif /* NONLIN_FRSURF */  #endif /* NONLIN_FRSURF */
135            DO j = jMin, jMax            DO j=1-OLy,sNy+OLy
136             DO i = iMin, iMax             DO i=1-OLx,sNx+OLx
137               hOceMxL(i,j,bi,bj) = drF(1)*hfacC(i,j,1,bi,bj)               hOceMxL(i,j,bi,bj) = drF(1)*hFacC(i,j,1,bi,bj)
138             ENDDO             ENDDO
139            ENDDO            ENDDO
140          ENDIF          ENDIF
# Line 162  CADJ STORE Tsrf    = comlev1, key = iice Line 171  CADJ STORE Tsrf    = comlev1, key = iice
171  CADJ STORE Qice1   = comlev1, key = iicekey  CADJ STORE Qice1   = comlev1, key = iicekey
172  CADJ STORE Qice2   = comlev1, key = iicekey  CADJ STORE Qice2   = comlev1, key = iicekey
173  CADJ STORE snowAge = comlev1, key = iicekey  CADJ STORE snowAge = comlev1, key = iicekey
   
 CADJ STORE sHeating = comlev1, key = iicekey  
 CADJ STORE flxCndBt = comlev1, key = iicekey  
174  CADJ STORE snowPrc  = comlev1, key = iicekey  CADJ STORE snowPrc  = comlev1, key = iicekey
175    
176  CADJ STORE hOceMxL = comlev1, key = iicekey  CADJ STORE hOceMxL = comlev1, key = iicekey
# Line 176  CADJ STORE empmr   = comlev1, key = iice Line 182  CADJ STORE empmr   = comlev1, key = iice
182  CADJ STORE qnet    = comlev1, key = iicekey  CADJ STORE qnet    = comlev1, key = iicekey
183  #endif  #endif
184    
185    C-      do sea-ice advection before getting surface fluxes
186    C Note: will inline this S/R once thSIce in Atmos. set-up is settled
187            IF ( thSIceAdvScheme.GT.0 )
188         &   CALL THSICE_DO_ADVECT(
189         I                   bi,bj, myTime, myIter, myThid )
190    
191  #ifdef ALLOW_BULK_FORCE  #ifdef ALLOW_BULK_FORCE
192          IF ( useBulkforce ) THEN          IF ( useBulkforce ) THEN
193           CALL THSICE_GET_PRECIP(           CALL THSICE_GET_PRECIP(
# Line 195  CADJ STORE qnet    = comlev1, key = iice Line 207  CADJ STORE qnet    = comlev1, key = iice
207          ENDIF          ENDIF
208  #endif  #endif
209    
   
210          CALL THSICE_STEP_TEMP(          CALL THSICE_STEP_TEMP(
211       I                     bi, bj, iMin, iMax, jMin, jMax,       I                     bi, bj, iMin, iMax, jMin, jMax,
212       I                     myTime, myIter, myThid )       I                     myTime, myIter, myThid )
213    
214    #ifdef ALLOW_AUTODIFF_TAMC
215    CADJ STORE empmr, qnet = comlev1, key = iicekey
216    CADJ STORE iceMask = comlev1, key = iicekey
217    CADJ STORE iceHeight  = comlev1, key = iicekey
218    CADJ STORE snowHeight = comlev1, key = iicekey
219    CADJ STORE Tsrf    = comlev1, key = iicekey
220    CADJ STORE Qice1   = comlev1, key = iicekey
221    CADJ STORE Qice2   = comlev1, key = iicekey
222    CADJ STORE snowAge = comlev1, key = iicekey
223    #endif
224    
225          CALL THSICE_STEP_FWD(          CALL THSICE_STEP_FWD(
226       I                     bi, bj, iMin, iMax, jMin, jMax,       I                     bi, bj, iMin, iMax, jMin, jMax,
227       I                     prcAtm,       I                     prcAtm,
# Line 238  C--  end bi,bj loop Line 260  C--  end bi,bj loop
260         ENDDO         ENDDO
261        ENDDO        ENDDO
262    
263    C     add a small piece of code to check AddFluid implementation:
264    c#include "thsice_test_addfluid.h"
265    
266  #ifdef ALLOW_SEAICE        IF ( useSEAICE .OR. thSIceAdvScheme.GT.0 ) THEN
       IF ( useSEAICE ) THEN  
267  C--   Exchange fields that are advected by seaice dynamics  C--   Exchange fields that are advected by seaice dynamics
268          _EXCH_XY_R8( iceMask, myThid )          _EXCH_XY_RL( iceMask, myThid )
269          _EXCH_XY_R8( iceHeight, myThid )          _EXCH_XY_RL( iceHeight, myThid )
270          _EXCH_XY_R8( snowHeight, myThid )          _EXCH_XY_RL( snowHeight, myThid )
271          _EXCH_XY_R8( Qice1, myThid )          _EXCH_XY_RL( Qice1, myThid )
272          _EXCH_XY_R8( Qice2, myThid )          _EXCH_XY_RL( Qice2, myThid )
273  #ifdef ATMOSPHERIC_LOADING  #ifdef ATMOSPHERIC_LOADING
274          IF (useRealFreshWaterFlux)          IF (useRealFreshWaterFlux)
275       &  _EXCH_XY_RS( sIceLoad, myThid )       &  _EXCH_XY_RS( sIceLoad, myThid )
276  #endif  #endif
277        ENDIF        ENDIF
 #endif /* ALLOW_SEAICE */  
278    
279  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
280  #endif  /*ALLOW_THSICE*/  #endif  /*ALLOW_THSICE*/

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.20

  ViewVC Help
Powered by ViewVC 1.1.22