/[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.10 by mlosch, Mon Jun 5 22:33:50 2006 UTC revision 1.12 by jmc, Wed Apr 4 02:40:42 2007 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 67  C-     needs new Ice Fraction in halo re Line 67  C-     needs new Ice Fraction in halo re
67         jMin = 1-OLy         jMin = 1-OLy
68         jMax = sNy+OLy-1         jMax = sNy+OLy-1
69  #ifdef ATMOSPHERIC_LOADING  #ifdef ATMOSPHERIC_LOADING
70        ELSEIF ( useRealFreshWaterFlux ) THEN        ELSEIF ( useRealFreshWaterFlux .AND. .NOT.useSEAICE ) THEN
71  C-     needs sea-ice loading in part of the halo regions for grad.Phi0surf  C-     needs sea-ice loading in part of the halo regions for grad.Phi0surf
72  C      to be valid at the boundaries ( d/dx 1:sNx+1 ; d/dy 1:sNy+1 )  C      to be valid at the boundaries ( d/dx 1:sNx+1 ; d/dy 1:sNy+1 )
73         iMin = 0         iMin = 0
# Line 114  C--     Mixed layer thickness: take the Line 114  C--     Mixed layer thickness: take the
114              IF ( ksurfC(i,j,bi,bj).EQ.1 ) THEN              IF ( ksurfC(i,j,bi,bj).EQ.1 ) THEN
115               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)
116              ELSE              ELSE
117               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)
118              ENDIF              ENDIF
119             ENDDO             ENDDO
120            ENDDO            ENDDO
# Line 125  C--     Mixed layer thickness: take the Line 125  C--     Mixed layer thickness: take the
125  #endif /* NONLIN_FRSURF */  #endif /* NONLIN_FRSURF */
126            DO j = jMin, jMax            DO j = jMin, jMax
127             DO i = iMin, iMax             DO i = iMin, iMax
128               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)
129             ENDDO             ENDDO
130            ENDDO            ENDDO
131          ENDIF          ENDIF
# Line 176  CADJ STORE empmr   = comlev1, key = iice Line 176  CADJ STORE empmr   = comlev1, key = iice
176  CADJ STORE qnet    = comlev1, key = iicekey  CADJ STORE qnet    = comlev1, key = iicekey
177  #endif  #endif
178    
179    C-      do sea-ice advection before getting surface fluxes
180    C Note: will inline this S/R once thSIce in Atmos. set-up is settled
181            IF ( thSIceAdvScheme.GT.0 )
182         &   CALL THSICE_DO_ADVECT(
183         I                   bi,bj, myTime, myIter, myThid )
184    
185  #ifdef ALLOW_BULK_FORCE  #ifdef ALLOW_BULK_FORCE
186          IF ( useBulkforce ) THEN          IF ( useBulkforce ) THEN
187           CALL THSICE_GET_PRECIP(           CALL THSICE_GET_PRECIP(
# Line 211  CADJ STORE qnet    = comlev1, key = iice Line 217  CADJ STORE qnet    = comlev1, key = iice
217  c      ENDDO  c      ENDDO
218  c     ENDDO  c     ENDDO
219    
220  #ifdef ALLOW_SEAICE          C--   note: If useSEAICE=.true., the stress is computed in seaice_model,
221  C--   If useSEAICE=.true., the stress is computed in seaice_model,  C--   and stressReduction is always set to zero
 C--   so that it does not need any further reduction  
         IF ( .NOT. useSEAICE ) THEN  
 #endif /* ALLOW_SEAICE */  
222  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
223  CADJ STORE fu(:,:,bi,bj) = comlev1_bibj, key=iicekey, byte=isbyte  CADJ STORE fu(:,:,bi,bj) = comlev1_bibj, key=iicekey, byte=isbyte
224  CADJ STORE fv(:,:,bi,bj) = comlev1_bibj, key=iicekey, byte=isbyte  CADJ STORE fv(:,:,bi,bj) = comlev1_bibj, key=iicekey, byte=isbyte
225  #endif  #endif
226           IF ( stressReduction.GT. 0. _d 0 ) THEN          IF ( stressReduction.GT. 0. _d 0 ) THEN
227            DO j = jMin, jMax            DO j = jMin, jMax
228             DO i = iMin+1,iMax             DO i = iMin+1,iMax
229              tauFac = stressReduction              tauFac = stressReduction
# Line 235  CADJ STORE fv(:,:,bi,bj) = comlev1_bibj, Line 238  CADJ STORE fv(:,:,bi,bj) = comlev1_bibj,
238              fv(i,j,bi,bj) = (1. _d 0 - tauFac)*fv(i,j,bi,bj)              fv(i,j,bi,bj) = (1. _d 0 - tauFac)*fv(i,j,bi,bj)
239             ENDDO             ENDDO
240            ENDDO            ENDDO
          ENDIF  
 #ifdef ALLOW_SEAICE          
 C     not useSEAICE  
241          ENDIF          ENDIF
 #endif /* ALLOW_SEAICE */  
242    
243  C--  end bi,bj loop  C--  end bi,bj loop
244         ENDDO         ENDDO
245        ENDDO        ENDDO
246    
 #ifdef ATMOSPHERIC_LOADING  
 c     IF (useRealFreshWaterFlux) _EXCH_XY_RS(sIceLoad, myThid)  
 #endif  
247    
248  #ifdef ALLOW_SEAICE                IF ( useSEAICE .OR. thSIceAdvScheme.GT.0 ) THEN
       IF ( useSEAICE ) THEN  
249  C--   Exchange fields that are advected by seaice dynamics  C--   Exchange fields that are advected by seaice dynamics
250        _EXCH_XY_R8( iceMask, myThid )          _EXCH_XY_R8( iceMask, myThid )
251        _EXCH_XY_R8( iceHeight, myThid )          _EXCH_XY_R8( iceHeight, myThid )
252        _EXCH_XY_R8( snowHeight, myThid )          _EXCH_XY_R8( snowHeight, myThid )
253        _EXCH_XY_R8( Qice1, myThid )          _EXCH_XY_R8( Qice1, myThid )
254        _EXCH_XY_R8( Qice2, myThid )          _EXCH_XY_R8( Qice2, myThid )
255    #ifdef ATMOSPHERIC_LOADING
256            IF (useRealFreshWaterFlux)
257         &  _EXCH_XY_RS( sIceLoad, myThid )
258    #endif
259        ENDIF        ENDIF
260  #endif /* ALLOW_SEAICE */  
261  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
262  #endif  /*ALLOW_THSICE*/  #endif  /*ALLOW_THSICE*/
263    

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.22