/[MITgcm]/MITgcm_contrib/torge/itd/code/seaice_growth.F
ViewVC logotype

Diff of /MITgcm_contrib/torge/itd/code/seaice_growth.F

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

revision 1.5 by torge, Tue Oct 2 16:47:41 2012 UTC revision 1.7 by torge, Fri Oct 5 22:41:30 2012 UTC
# Line 115  C     a_QSWbyATM_open   - short wave hea Line 115  C     a_QSWbyATM_open   - short wave hea
115  C     a_QSWbyATM_cover  - short wave heat flux under ice in W/m^2  C     a_QSWbyATM_cover  - short wave heat flux under ice in W/m^2
116        _RL a_QSWbyATM_open     (1:sNx,1:sNy)        _RL a_QSWbyATM_open     (1:sNx,1:sNy)
117        _RL a_QSWbyATM_cover    (1:sNx,1:sNy)        _RL a_QSWbyATM_cover    (1:sNx,1:sNy)
118  C     a_QbyOCN :: available heat (in in W/m^2) due to the  C     a_QbyOCN :: available heat (in W/m^2) due to the
119  C             interaction of the ice pack and the ocean surface  C             interaction of the ice pack and the ocean surface
120  C     r_QbyOCN :: residual of a_QbyOCN after freezing/melting  C     r_QbyOCN :: residual of a_QbyOCN after freezing/melting
121  C             processes have been accounted for  C             processes have been accounted for
# Line 177  C                     as EVAP (positive Line 177  C                     as EVAP (positive
177  #ifdef SEAICE_CAP_SUBLIM  #ifdef SEAICE_CAP_SUBLIM
178  C     The latent heat flux which will sublimate all snow and ice  C     The latent heat flux which will sublimate all snow and ice
179  C     over one time step  C     over one time step
 #ifdef SEAICE_ITD  
       _RL latentHeatFluxMaxMult  (1:sNx,1:sNy,MULTDIM)  
 #else  
180        _RL latentHeatFluxMax   (1:sNx,1:sNy)        _RL latentHeatFluxMax   (1:sNx,1:sNy)
181  #endif        _RL latentHeatFluxMaxMult  (1:sNx,1:sNy,MULTDIM)
182  #endif  #endif
183    
184  C     actual ice thickness (with upper and lower limit)  C     actual ice thickness (with upper and lower limit)
# Line 204  C     AREA_PRE :: hold sea-ice fraction Line 201  C     AREA_PRE :: hold sea-ice fraction
201        _RL HEFFITDpreTH        (1:sNx,1:sNy,1:nITD)        _RL HEFFITDpreTH        (1:sNx,1:sNy,1:nITD)
202        _RL HSNWITDpreTH        (1:sNx,1:sNy,1:nITD)        _RL HSNWITDpreTH        (1:sNx,1:sNy,1:nITD)
203        _RL areaFracFactor      (1:sNx,1:sNy,1:nITD)        _RL areaFracFactor      (1:sNx,1:sNy,1:nITD)
       _RL heffFracFactor      (1:sNx,1:sNy,1:nITD)  
204  #endif  #endif
205    
206  C     wind speed  C     wind speed
# Line 379  C ===================== Line 375  C =====================
375            d_HEFFbySublim(I,J)        = 0.0 _d 0            d_HEFFbySublim(I,J)        = 0.0 _d 0
376            d_HSNWbySublim(I,J)        = 0.0 _d 0            d_HSNWbySublim(I,J)        = 0.0 _d 0
377  #ifdef SEAICE_CAP_SUBLIM  #ifdef SEAICE_CAP_SUBLIM
 #ifdef SEAICE_ITD  
           DO IT=1,SEAICE_multDim  
            latentHeatFluxMaxMult(I,J,IT) = 0.0 _d 0  
           ENDDO  
 #else  
378            latentHeatFluxMax(I,J)     = 0.0 _d 0            latentHeatFluxMax(I,J)     = 0.0 _d 0
379  #endif  #endif
 #endif  
380  c  c
381            d_HFRWbyRAIN(I,J)          = 0.0 _d 0            d_HFRWbyRAIN(I,J)          = 0.0 _d 0
382    
# Line 401  c Line 391  c
391              a_QbyATMmult_cover(I,J,IT)    = 0.0 _d 0              a_QbyATMmult_cover(I,J,IT)    = 0.0 _d 0
392              a_QSWbyATMmult_cover(I,J,IT)  = 0.0 _d 0              a_QSWbyATMmult_cover(I,J,IT)  = 0.0 _d 0
393              a_FWbySublimMult(I,J,IT)      = 0.0 _d 0              a_FWbySublimMult(I,J,IT)      = 0.0 _d 0
394    #ifdef SEAICE_CAP_SUBLIM
395                latentHeatFluxMaxMult(I,J,IT) = 0.0 _d 0
396    #endif
397  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
398              r_QbyATMmult_cover (I,J,IT)   = 0.0 _d 0              r_QbyATMmult_cover (I,J,IT)   = 0.0 _d 0
399              r_FWbySublimMult(I,J,IT)      = 0.0 _d 0              r_FWbySublimMult(I,J,IT)      = 0.0 _d 0
# Line 508  CADJ STORE area(:,:,bi,bj) = comlev1_bib Line 501  CADJ STORE area(:,:,bi,bj) = comlev1_bib
501             tmpscal3=MAX(-HSNOWITD(I,J,IT,bi,bj),0. _d 0)             tmpscal3=MAX(-HSNOWITD(I,J,IT,bi,bj),0. _d 0)
502             HSNOWITD(I,J,IT,bi,bj)=HSNOWITD(I,J,IT,bi,bj)+tmpscal3             HSNOWITD(I,J,IT,bi,bj)=HSNOWITD(I,J,IT,bi,bj)+tmpscal3
503             d_HSNWbyNEG(I,J)=d_HSNWbyNEG(I,J)+tmpscal3             d_HSNWbyNEG(I,J)=d_HSNWbyNEG(I,J)+tmpscal3
504             AREAITD(I,J,IT,bi,bj)=MAX(-AREAITD(I,J,IT,bi,bj),0. _d 0)             AREAITD(I,J,IT,bi,bj)=MAX(AREAITD(I,J,IT,bi,bj),0. _d 0)
505            ENDDO            ENDDO
506  CToM      AREA, HEFF, and HSNOW will be updated at end of PART 1  CToM      AREA, HEFF, and HSNOW will be updated at end of PART 1
507  C         by calling SEAICE_ITD_SUM  C         by calling SEAICE_ITD_SUM
# Line 668  C    and update AREA, HEFF, and HSNOW Line 661  C    and update AREA, HEFF, and HSNOW
661          CALL SEAICE_ITD_REDIST(bi, bj, myTime, myIter, myThid)          CALL SEAICE_ITD_REDIST(bi, bj, myTime, myIter, myThid)
662          CALL SEAICE_ITD_SUM(bi, bj, myTime, myIter, myThid)          CALL SEAICE_ITD_SUM(bi, bj, myTime, myIter, myThid)
663    
664  #endif  c ToM<<< debug seaice_growth
665            WRITE(msgBuf,'(A,7F6.2)')
666         &    ' SEAICE_GROWTH: Heff increments 0, HEFFITD = ',
667         &     HEFFITD(20,20,:,bi,bj)
668            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
669         &    SQUEEZE_RIGHT , myThid)
670            WRITE(msgBuf,'(A,7F6.2)')
671         &    ' SEAICE_GROWTH: Area increments 0, AREAITD = ',
672         &     AREAITD(20,20,:,bi,bj)
673            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
674         &    SQUEEZE_RIGHT , myThid)
675    #else
676            WRITE(msgBuf,'(A,7F6.2)')
677         &    ' SEAICE_GROWTH: Heff increments 0, HEFF = ',
678         &     HEFF(20,20,bi,bj)
679            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
680         &    SQUEEZE_RIGHT , myThid)
681            WRITE(msgBuf,'(A,7F6.2)')
682         &    ' SEAICE_GROWTH: Area increments 0, AREA = ',
683         &     AREA(20,20,bi,bj)
684            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
685         &    SQUEEZE_RIGHT , myThid)
686    c ToM>>>
687    #endif /* SEAICE_ITD */
688  #if (defined ALLOW_AUTODIFF_TAMC && defined SEAICE_MODIFY_GROWTH_ADJ)  #if (defined ALLOW_AUTODIFF_TAMC && defined SEAICE_MODIFY_GROWTH_ADJ)
689  C        end SEAICEadjMODE.EQ.0 statement:  C        end SEAICEadjMODE.EQ.0 statement:
690          ENDIF          ENDIF
# Line 703  C memorize areal and volume fraction of Line 719  C memorize areal and volume fraction of
719             IF (AREA(I,J,bi,bj).GT.0) THEN             IF (AREA(I,J,bi,bj).GT.0) THEN
720              areaFracFactor(I,J,IT)=AREAITD(I,J,IT,bi,bj)/AREA(I,J,bi,bj)              areaFracFactor(I,J,IT)=AREAITD(I,J,IT,bi,bj)/AREA(I,J,bi,bj)
721             ELSE             ELSE
722              areaFracFactor(I,J,IT)=ZERO  C           if there's no ice, potential growth starts in 1st category
723             ENDIF              IF (IT .EQ. 1) THEN
724             IF (HEFF(I,J,bi,bj).GT.0) THEN               areaFracFactor(I,J,IT)=ONE
725              heffFracFactor(I,J,IT)=HEFFITD(I,J,IT,bi,bj)/HEFF(I,J,bi,bj)              ELSE
726             ELSE               areaFracFactor(I,J,IT)=ZERO
727              heffFracFactor(I,J,IT)=ZERO              ENDIF
728             ENDIF             ENDIF
729            ENDDO            ENDDO
730           ENDDO           ENDDO
# Line 1072  C     update TICE & TICES Line 1088  C     update TICE & TICES
1088  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
1089  C     calculate area weighted mean  C     calculate area weighted mean
1090  C     (although the ice's temperature relates to its energy content  C     (although the ice's temperature relates to its energy content
1091  C      and hence should be averaged weighted by ice volume [heffFracFactor],  C      and hence should be averaged weighted by ice volume,
1092  C      the temperature here is a result of the fluxes through the ice surface  C      the temperature here is a result of the fluxes through the ice surface
1093  C      computed individually for each single category in SEAICE_SOLVE4TEMP  C      computed individually for each single category in SEAICE_SOLVE4TEMP
1094  C      and hence is averaged area weighted [areaFracFactor])  C      and hence is averaged area weighted [areaFracFactor])
# Line 1385  CADJ STORE r_QbyOCN = comlev1_bibj,key=i Line 1401  CADJ STORE r_QbyOCN = comlev1_bibj,key=i
1401          DO IT=1,nITD          DO IT=1,nITD
1402           DO J=1,sNy           DO J=1,sNy
1403            DO I=1,sNx            DO I=1,sNx
1404  C          ice growth/melt due to ocean heat is equally distributed under the ice  C          ice growth/melt due to ocean heat r_QbyOCN (W/m^2) is
1405  C          and hence weighted by fractional area of each thickness category  C          equally distributed under the ice and hence weighted by
1406    C          fractional area of each thickness category
1407             tmpscal1=MAX(r_QbyOCN(i,j)*areaFracFactor(I,J,IT),             tmpscal1=MAX(r_QbyOCN(i,j)*areaFracFactor(I,J,IT),
1408       &                               -HEFFITD(I,J,IT,bi,bj))       &                               -HEFFITD(I,J,IT,bi,bj))
1409             d_HEFFbyOCNonICE(I,J)= d_HEFFbyOCNonICE(I,J) + tmpscal1             d_HEFFbyOCNonICE(I,J) = d_HEFFbyOCNonICE(I,J) + tmpscal1
1410             r_QbyOCN(I,J)        = r_QbyOCN(I,J)         - tmpscal1             HEFFITD(I,J,IT,bi,bj) = HEFFITD(I,J,IT,bi,bj) + tmpscal1
            HEFFITD(I,J,IT,bi,bj) = HEFFITD(I,J,IT,bi,bj)  + tmpscal1  
1411  #ifdef ALLOW_SITRACER  #ifdef ALLOW_SITRACER
1412             SItrHEFF(I,J,bi,bj,2) = SItrHEFF(I,J,bi,bj,2)             SItrHEFF(I,J,bi,bj,2) = SItrHEFF(I,J,bi,bj,2)
1413       &                           + HEFFITD(I,J,IT,bi,bj)       &                           + HEFFITD(I,J,IT,bi,bj)
# Line 1399  C          and hence weighted by fractio Line 1415  C          and hence weighted by fractio
1415            ENDDO            ENDDO
1416           ENDDO           ENDDO
1417          ENDDO          ENDDO
1418            DO J=1,sNy
1419             DO I=1,sNx
1420              r_QbyOCN(I,J)=r_QbyOCN(I,J)-d_HEFFbyOCNonICE(I,J)
1421             ENDDO
1422            ENDDO
1423  #else /* SEAICE_ITD */  #else /* SEAICE_ITD */
1424          DO J=1,sNy          DO J=1,sNy
1425           DO I=1,sNx           DO I=1,sNx
# Line 1813  c ToM<<< debug seaice_growth Line 1834  c ToM<<< debug seaice_growth
1834  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
1835       &    ' SEAICE_GROWTH: Heff increments 8, HEFFITD = ',       &    ' SEAICE_GROWTH: Heff increments 8, HEFFITD = ',
1836       &     HEFFITD(20,20,:,bi,bj)       &     HEFFITD(20,20,:,bi,bj)
1837            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
1838         &    SQUEEZE_RIGHT , myThid)
1839            WRITE(msgBuf,'(A,7F6.2)')
1840         &    ' SEAICE_GROWTH: Area increments 8, AREAITD = ',
1841         &     AREAITD(20,20,:,bi,bj)
1842  #else  #else
1843       &    ' SEAICE_GROWTH: Heff increments 8, HEFF = ',       &    ' SEAICE_GROWTH: Heff increments 8, HEFF = ',
1844       &     HEFF(20,20,bi,bj)       &     HEFF(20,20,bi,bj)
1845            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
1846         &    SQUEEZE_RIGHT , myThid)
1847            WRITE(msgBuf,'(A,7F6.2)')
1848         &    ' SEAICE_GROWTH: Area increments 8, AREA = ',
1849         &     AREA(20,20,bi,bj)
1850  #endif  #endif
1851          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
1852       &    SQUEEZE_RIGHT , myThid)       &    SQUEEZE_RIGHT , myThid)

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

  ViewVC Help
Powered by ViewVC 1.1.22