/[MITgcm]/MITgcm/pkg/seaice/seaice_growth.F
ViewVC logotype

Diff of /MITgcm/pkg/seaice/seaice_growth.F

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

revision 1.146 by mlosch, Mon Jan 30 15:30:31 2012 UTC revision 1.147 by gforget, Fri Feb 3 13:34:31 2012 UTC
# Line 439  CADJ STORE heff(:,:,bi,bj)  = comlev1_bi Line 439  CADJ STORE heff(:,:,bi,bj)  = comlev1_bi
439              tmpscal2=-HEFF(I,J,bi,bj)              tmpscal2=-HEFF(I,J,bi,bj)
440              tmpscal3=-HSNOW(I,J,bi,bj)              tmpscal3=-HSNOW(I,J,bi,bj)
441              TICE(I,J,bi,bj)=celsius2K              TICE(I,J,bi,bj)=celsius2K
 #ifdef SEAICE_AGE  
             IceAgeTr(i,j,bi,bj,2)=0. _d 0  
 #endif /* SEAICE_AGE */  
442            endif            endif
443            HEFF(I,J,bi,bj)=HEFF(I,J,bi,bj)+tmpscal2            HEFF(I,J,bi,bj)=HEFF(I,J,bi,bj)+tmpscal2
444            d_HEFFbyNEG(I,J)=d_HEFFbyNEG(I,J)+tmpscal2            d_HEFFbyNEG(I,J)=d_HEFFbyNEG(I,J)+tmpscal2
# Line 472  CADJ STORE area(:,:,bi,bj)  = comlev1_bi Line 469  CADJ STORE area(:,:,bi,bj)  = comlev1_bi
469          DO J=1,sNy          DO J=1,sNy
470           DO I=1,sNx           DO I=1,sNx
471            IF ((HEFF(i,j,bi,bj).GT.0).OR.(HSNOW(i,j,bi,bj).GT.0)) THEN            IF ((HEFF(i,j,bi,bj).GT.0).OR.(HSNOW(i,j,bi,bj).GT.0)) THEN
 #ifdef SEAICE_AGE  
            IF (AREA(I,J,bi,bj).LT.SEAICE_area_floor) THEN  
             IceAgeTr(i,j,bi,bj,1)=IceAgeTr(i,j,bi,bj,1)  
      &       + IceAgeTr(i,j,bi,bj,1)  
      &       *(SEAICE_area_floor-AREA(I,J,bi,bj)) / SEAICE_area_floor  
            ENDIF  
 #endif /* SEAICE_AGE */  
472             AREA(I,J,bi,bj)=MAX(AREA(I,J,bi,bj),SEAICE_area_floor)             AREA(I,J,bi,bj)=MAX(AREA(I,J,bi,bj),SEAICE_area_floor)
473            ENDIF            ENDIF
474           ENDDO           ENDDO
# Line 498  CADJ STORE area(:,:,bi,bj)  = comlev1_bi Line 488  CADJ STORE area(:,:,bi,bj)  = comlev1_bi
488  #ifdef ALLOW_SITRACER  #ifdef ALLOW_SITRACER
489            SItrAREA(I,J,bi,bj,1)=AREA(I,J,bi,bj)            SItrAREA(I,J,bi,bj,1)=AREA(I,J,bi,bj)
490  #endif  #endif
 #ifdef SEAICE_AGE  
           IF (AREA(I,J,bi,bj).GT.SEAICE_area_max) THEN  
            IceAgeTr(i,j,bi,bj,1)=IceAgeTr(i,j,bi,bj,1)  
      &      - IceAgeTr(i,j,bi,bj,1)  
      &      *(AREA(I,J,bi,bj)-SEAICE_area_max) / SEAICE_area_max  
           ENDIF  
 #endif /* SEAICE_AGE */  
491            AREA(I,J,bi,bj)=MIN(AREA(I,J,bi,bj),SEAICE_area_max)            AREA(I,J,bi,bj)=MIN(AREA(I,J,bi,bj),SEAICE_area_max)
492           ENDDO           ENDDO
493          ENDDO          ENDDO
# Line 549  CADJ STORE heff(:,:,bi,bj)  = comlev1_bi Line 532  CADJ STORE heff(:,:,bi,bj)  = comlev1_bi
532          ENDDO          ENDDO
533  #endif /* SEAICE_VARIABLE_SALINITY */  #endif /* SEAICE_VARIABLE_SALINITY */
534    
 C 5) treat sea ice age pathological cases  
 C ...  
   
 #ifdef SEAICE_AGE  
   
 #ifdef ALLOW_AUTODIFF_TAMC  
 CADJ STORE IceAgeTr(:,:,bi,bj,1)  = comlev1_bibj,  
 CADJ &     key = iicekey,byte=isbyte  
 CADJ STORE IceAgeTr(:,:,bi,bj,2)  = comlev1_bibj,  
 CADJ &     key = iicekey,byte=isbyte  
 CADJ STORE heff(:,:,bi,bj)  = comlev1_bibj,  
 CADJ &     key = iicekey,byte=isbyte  
 #endif /* ALLOW_AUTODIFF_TAMC */  
         DO J=1,sNy  
          DO I=1,sNx  
           IF (HEFF(i,j,bi,bj).EQ.0.) THEN  
             IceAgeTr(i,j,bi,bj,1)=0. _d 0  
             IceAgeTr(i,j,bi,bj,2)=0. _d 0  
           ENDIF  
           IF (IceAgeTr(i,j,bi,bj,1).LT.0.) IceAgeTr(i,j,bi,bj,1)=0. _d 0  
           IF (IceAgeTr(i,j,bi,bj,2).LT.0.) IceAgeTr(i,j,bi,bj,2)=0. _d 0  
          ENDDO  
         ENDDO  
 #endif /* SEAICE_AGE */  
   
535  #endif /* SEAICE_GROWTH_LEGACY */  #endif /* SEAICE_GROWTH_LEGACY */
536    
537  #ifdef ALLOW_DIAGNOSTICS  #ifdef ALLOW_DIAGNOSTICS
# Line 1437  C set HSALT = 0 if HEFF = 0 and compute Line 1395  C set HSALT = 0 if HEFF = 0 and compute
1395    
1396    
1397  C =======================================================================  C =======================================================================
1398  C =====LEGACY PART 5.5: treat pathological cases, then do flooding ======  C ==LEGACY PART 6 (LEGACY) treat pathological cases, then do flooding ===
1399  C =======================================================================  C =======================================================================
1400    
1401  #ifdef SEAICE_GROWTH_LEGACY  #ifdef SEAICE_GROWTH_LEGACY
# Line 1526  c needs to be here to allow use also wit Line 1484  c needs to be here to allow use also wit
1484  #endif  #endif
1485    
1486  C ===================================================================  C ===================================================================
 C ===============PART 6: determine ice age increments================  
 C ===================================================================  
   
 #ifdef SEAICE_AGE  
 C     Sources and sinks for sea ice age:  
 C     assume that a) freezing: new ice fraction forms with zero age  
 C                 b) melting: ice fraction vanishes with current age  
         DO J=1,sNy  
          DO I=1,sNx  
 C--   increase age as time passes  
                 IceAgeTr(i,j,bi,bj,1)=IceAgeTr(i,j,bi,bj,1)  
      &            +SEAICE_deltaTtherm*AREApreTH(i,j)  
                 IceAgeTr(i,j,bi,bj,2)=IceAgeTr(i,j,bi,bj,2)  
      &            +SEAICE_deltaTtherm*HEFFpreTH(i,j)  
 C--   account for ice melt  
                IF (AREApreTH(i,j).GT.AREA(i,j,bi,bj)) THEN  
                     IceAgeTr(i,j,bi,bj,1)=IceAgeTr(i,j,bi,bj,1)  
      &              *AREA(i,j,bi,bj)/AREApreTH(i,j)  
                ENDIF  
                IF (HEFFpreTH(i,j).GT.HEFF(i,j,bi,bj)) THEN  
                     IceAgeTr(i,j,bi,bj,2)=IceAgeTr(i,j,bi,bj,2)  
      &              *HEFF(i,j,bi,bj)/HEFFpreTH(i,j)  
                ENDIF  
          ENDDO  
         ENDDO  
 #endif /* SEAICE_AGE */  
   
   
 C ===================================================================  
1487  C ==============PART 7: determine ocean model forcing================  C ==============PART 7: determine ocean model forcing================
1488  C ===================================================================  C ===================================================================
1489    

Legend:
Removed from v.1.146  
changed lines
  Added in v.1.147

  ViewVC Help
Powered by ViewVC 1.1.22