/[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.12 by torge, Wed Oct 31 23:04:51 2012 UTC revision 1.13 by torge, Fri Nov 2 19:15:42 2012 UTC
# Line 62  C     === Local variables === Line 62  C     === Local variables ===
62  c ToM<<< debug seaice_growth  c ToM<<< debug seaice_growth
63  C     msgBuf      :: Informational/error message buffer  C     msgBuf      :: Informational/error message buffer
64        CHARACTER*(MAX_LEN_MBUF) msgBuf        CHARACTER*(MAX_LEN_MBUF) msgBuf
65          CHARACTER*12 msgBufForm
66  c ToM>>>  c ToM>>>
67  #endif  #endif
68  C  C
# Line 721  C    which includes ridging as in item 2 Line 722  C    which includes ridging as in item 2
722  C    and update AREA, HEFF, and HSNOW  C    and update AREA, HEFF, and HSNOW
723          CALL SEAICE_ITD_REDIST(bi, bj, myTime, myIter, myThid)          CALL SEAICE_ITD_REDIST(bi, bj, myTime, myIter, myThid)
724          CALL SEAICE_ITD_SUM(bi, bj, myTime, myIter, myThid)          CALL SEAICE_ITD_SUM(bi, bj, myTime, myIter, myThid)
725    #endif /* SEAICE_ITD */
726    
727  #ifdef SEAICE_DEBUG  #ifdef SEAICE_DEBUG
728  c ToM<<< debug seaice_growth  #ifdef SEAICE_ITD
729          WRITE(msgBuf,'(A,7F8.4)')          WRITE(msgBufForm,'(A,I2,A)') '(A,',nITD,'F14.10)'
      &    ' SEAICE_GROWTH: Heff increments 0, HEFFITD = ',  
      &     HEFFITD(1,1,:,bi,bj)  
         CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &    SQUEEZE_RIGHT , myThid)  
         WRITE(msgBuf,'(A,7F8.4)')  
      &    ' SEAICE_GROWTH: Area increments 0, AREAITD = ',  
      &     AREAITD(1,1,:,bi,bj)  
         CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &    SQUEEZE_RIGHT , myThid)  
 #endif  
730  #else  #else
731  #ifdef SEAICE_DEBUG          WRITE(msgBufForm,'(A,I2,A)') '(A,  F14.10)'
732          WRITE(msgBuf,'(A,7F8.4)')  #endif
733            WRITE(msgBuf,msgBufForm)
734       &    ' SEAICE_GROWTH: Heff increments 0, HEFF = ',       &    ' SEAICE_GROWTH: Heff increments 0, HEFF = ',
735    #ifdef SEAICE_ITD
736         &     HEFFITD(1,1,:,bi,bj)
737    #else
738       &     HEFF(1,1,bi,bj)       &     HEFF(1,1,bi,bj)
739    #endif
740          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
741       &    SQUEEZE_RIGHT , myThid)       &    SQUEEZE_RIGHT , myThid)
742          WRITE(msgBuf,'(A,7F8.4)')          WRITE(msgBuf,msgBufForm)
743       &    ' SEAICE_GROWTH: Area increments 0, AREA = ',       &    ' SEAICE_GROWTH: Area increments 0, AREA = ',
744    #ifdef SEAICE_ITD
745         &     AREAITD(1,1,:,bi,bj)
746    #else
747       &     AREA(1,1,bi,bj)       &     AREA(1,1,bi,bj)
748    #endif
749          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
750       &    SQUEEZE_RIGHT , myThid)       &    SQUEEZE_RIGHT , myThid)
 c ToM>>>  
751  #endif  #endif
752  #endif /* SEAICE_ITD */  
753  #if (defined ALLOW_AUTODIFF_TAMC && defined SEAICE_MODIFY_GROWTH_ADJ)  #if (defined ALLOW_AUTODIFF_TAMC && defined SEAICE_MODIFY_GROWTH_ADJ)
754  C        end SEAICEadjMODE.EQ.0 statement:  C        end SEAICEadjMODE.EQ.0 statement:
755          ENDIF          ENDIF
# Line 1443  C       end IT loop Line 1443  C       end IT loop
1443  #endif  #endif
1444  #ifdef SEAICE_DEBUG  #ifdef SEAICE_DEBUG
1445  c ToM<<< debug seaice_growth  c ToM<<< debug seaice_growth
1446          WRITE(msgBuf,'(A,7F8.4)')          WRITE(msgBuf,msgBufForm)
1447       &    ' SEAICE_GROWTH: Heff increments 1, d_HSNWySublim = ',       &    ' SEAICE_GROWTH: Hsnow increments 1, d_HSNWySublim = ',
1448  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
1449       &     d_HSNWbySublim_ITD(1,1,:)       &     d_HSNWbySublim_ITD(1,1,:)
1450  #else  #else
# Line 1452  c ToM<<< debug seaice_growth Line 1452  c ToM<<< debug seaice_growth
1452  #endif  #endif
1453          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
1454       &    SQUEEZE_RIGHT , myThid)       &    SQUEEZE_RIGHT , myThid)
1455          WRITE(msgBuf,'(A,7F8.4)')          WRITE(msgBuf,msgBufForm)
1456       &    ' SEAICE_GROWTH: Heff increments 1, d_HEFFbySublim = ',       &    ' SEAICE_GROWTH: Heff increments 1, d_HEFFbySublim = ',
1457  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
1458       &     d_HEFFbySublim_ITD(1,1,:)       &     d_HEFFbySublim_ITD(1,1,:)
# Line 1490  C          fractional area of each thick Line 1490  C          fractional area of each thick
1490          DO J=1,sNy          DO J=1,sNy
1491           DO I=1,sNx           DO I=1,sNx
1492            SItrHEFF(I,J,bi,bj,2) = HEFFpreTH(I,J)            SItrHEFF(I,J,bi,bj,2) = HEFFpreTH(I,J)
1493       &                          - d_HEFFbySublim(I,J)       &                          + d_HEFFbySublim(I,J)
1494       &                          + d_HEFFbyOCNonICE(I,J)       &                          + d_HEFFbyOCNonICE(I,J)
1495           ENDDO           ENDDO
1496          ENDDO          ENDDO
# Line 1514  C          fractional area of each thick Line 1514  C          fractional area of each thick
1514  #endif /* SEAICE_ITD */  #endif /* SEAICE_ITD */
1515  #ifdef SEAICE_DEBUG  #ifdef SEAICE_DEBUG
1516  c ToM<<< debug seaice_growth  c ToM<<< debug seaice_growth
1517          WRITE(msgBuf,'(A,7F8.4)')          WRITE(msgBuf,msgBufForm)
1518       &    ' SEAICE_GROWTH: Heff increments 2, d_HEFFbyOCNonICE = ',       &    ' SEAICE_GROWTH: Heff increments 2, d_HEFFbyOCNonICE = ',
1519  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
1520       &     d_HEFFbyOCNonICE_ITD(1,1,:)       &     d_HEFFbyOCNonICE_ITD(1,1,:)
# Line 1574  Cgf no additional dependency through sno Line 1574  Cgf no additional dependency through sno
1574  #endif /* SEAICE_ITD */  #endif /* SEAICE_ITD */
1575  #ifdef SEAICE_DEBUG  #ifdef SEAICE_DEBUG
1576  c ToM<<< debug seaice_growth  c ToM<<< debug seaice_growth
1577          WRITE(msgBuf,'(A,7F8.4)')          WRITE(msgBuf,msgBufForm)
1578       &    ' SEAICE_GROWTH: Heff increments 3, d_HSNWbyATMonSNW = ',       &    ' SEAICE_GROWTH: Hsnow increments 3, d_HSNWbyATMonSNW = ',
1579  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
1580       &    d_HSNWbyATMonSNW_ITD(1,1,:)       &    d_HSNWbyATMonSNW_ITD(1,1,:)
1581  #else  #else
# Line 1603  Cgf warming conditions, the lab_sea resu Line 1603  Cgf warming conditions, the lab_sea resu
1603          DO IT=1,nITD          DO IT=1,nITD
1604           DO J=1,sNy           DO J=1,sNy
1605            DO I=1,sNx            DO I=1,sNx
1606               tmpscal1 = HEFFITDpreTH(I,J,IT)
1607         &              + d_HEFFbySublim_ITD(I,J,IT)
1608         &              + d_HEFFbyOCNonICE_ITD(I,J,IT)
1609  #ifdef SEAICE_GROWTH_LEGACY  #ifdef SEAICE_GROWTH_LEGACY
1610             tmpscal2 = MAX(-HEFFITD(I,J,IT,bi,bj),             tmpscal2 = MAX(-tmpscal1,
1611       &                     r_QbyATMmult_cover(I,J,IT))       &                     r_QbyATMmult_cover(I,J,IT))
1612  #else  #else
1613             tmpscal2 = MAX(-HEFFITD(I,J,IT,bi,bj),             tmpscal2 = MAX(-tmpscal1,
1614       &                     r_QbyATMmult_cover(I,J,IT)       &                     r_QbyATMmult_cover(I,J,IT)
1615  c         Limit ice growth by potential melt by ocean  c         Limit ice growth by potential melt by ocean
1616       &              + AREAITDpreTH(I,J,IT) * r_QbyOCN(I,J))       &              + AREAITDpreTH(I,J,IT) * r_QbyOCN(I,J))
# Line 1657  C         Limit ice growth by potential Line 1660  C         Limit ice growth by potential
1660  #endif /* SEAICE_ITD */  #endif /* SEAICE_ITD */
1661  #ifdef SEAICE_DEBUG  #ifdef SEAICE_DEBUG
1662  c ToM<<< debug seaice_growth  c ToM<<< debug seaice_growth
1663          WRITE(msgBuf,'(A,7F8.4)')          WRITE(msgBuf,msgBufForm)
1664       &   ' SEAICE_GROWTH: Heff increments 4, d_HEFFbyATMonOCN_cover = ',       &   ' SEAICE_GROWTH: Heff increments 4, d_HEFFbyATMonOCN_cover = ',
1665  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
1666       &     d_HEFFbyATMonOCN_cover_ITD(1,1,:)       &     d_HEFFbyATMonOCN_cover_ITD(1,1,:)
# Line 1666  c ToM<<< debug seaice_growth Line 1669  c ToM<<< debug seaice_growth
1669  #endif  #endif
1670          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
1671       &    SQUEEZE_RIGHT , myThid)       &    SQUEEZE_RIGHT , myThid)
1672          WRITE(msgBuf,'(A,7F8.4)')          WRITE(msgBuf,msgBufForm)
1673       &    ' SEAICE_GROWTH: Heff increments 4, d_HEFFbyATMonOCN = ',       &    ' SEAICE_GROWTH: Heff increments 4, d_HEFFbyATMonOCN = ',
1674  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
1675       &     d_HEFFbyATMonOCN_ITD(1,1,:)       &     d_HEFFbyATMonOCN_ITD(1,1,:)
# Line 1743  C end of IF statement snowPrecipFile: Line 1746  C end of IF statement snowPrecipFile:
1746  #endif /* ALLOW_ATM_TEMP */  #endif /* ALLOW_ATM_TEMP */
1747  #ifdef SEAICE_DEBUG  #ifdef SEAICE_DEBUG
1748  c ToM<<< debug seaice_growth  c ToM<<< debug seaice_growth
1749          WRITE(msgBuf,'(A,7F8.4)')          WRITE(msgBuf,msgBufForm)
1750       &    ' SEAICE_GROWTH: Hsnow increments 5, d_HSNWbyRAIN = ',       &    ' SEAICE_GROWTH: Hsnow increments 5, d_HSNWbyRAIN = ',
1751  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
1752       &     d_HSNWbyRAIN_ITD(1,1,:)       &     d_HSNWbyRAIN_ITD(1,1,:)
# Line 1771  CADJ STORE r_QbyOCN = comlev1_bibj,key=i Line 1774  CADJ STORE r_QbyOCN = comlev1_bibj,key=i
1774           DO J=1,sNy           DO J=1,sNy
1775            DO I=1,sNx            DO I=1,sNx
1776             tmpscal4 = HSNWITDpreTH(I,J,IT)             tmpscal4 = HSNWITDpreTH(I,J,IT)
1777       &              - d_HSNWbySublim_ITD(I,J,IT)       &              + d_HSNWbySublim_ITD(I,J,IT)
1778       &              + d_HSNWbyATMonSNW_ITD(I,J,IT)       &              + d_HSNWbyATMonSNW_ITD(I,J,IT)
1779       &              + d_HSNWbyRAIN_ITD(I,J,IT)       &              + d_HSNWbyRAIN_ITD(I,J,IT)
1780             tmpscal1=MAX(r_QbyOCN(i,j)*ICE2SNOW*areaFracFactor(I,J,IT),             tmpscal1=MAX(r_QbyOCN(i,j)*ICE2SNOW*areaFracFactor(I,J,IT),
# Line 1807  Cgf no additional dependency through sno Line 1810  Cgf no additional dependency through sno
1810  Cph)  Cph)
1811  #ifdef SEAICE_DEBUG  #ifdef SEAICE_DEBUG
1812  c ToM<<< debug seaice_growth  c ToM<<< debug seaice_growth
1813          WRITE(msgBuf,'(A,7F8.4)')          WRITE(msgBuf,msgBufForm)
 #ifdef SEAICE_ITD  
1814       &    ' SEAICE_GROWTH: Hsnow increments 6, d_HSNWbyOCNonSNW = ',       &    ' SEAICE_GROWTH: Hsnow increments 6, d_HSNWbyOCNonSNW = ',
1815    #ifdef SEAICE_ITD
1816       &     d_HSNWbyOCNonSNW_ITD(1,1,:)       &     d_HSNWbyOCNonSNW_ITD(1,1,:)
1817  #else  #else
1818       &     d_HSNWbyOCNonSNW(1,1)       &     d_HSNWbyOCNonSNW(1,1)
# Line 1835  CADJ STORE a_QSWbyATM_open = comlev1_bib Line 1838  CADJ STORE a_QSWbyATM_open = comlev1_bib
1838  C         HEFF will be updated at the end of PART 3,  C         HEFF will be updated at the end of PART 3,
1839  C         hence sum of tendencies so far is needed  C         hence sum of tendencies so far is needed
1840            tmpscal4 = HEFFpreTH(I,J)            tmpscal4 = HEFFpreTH(I,J)
1841       &             - d_HEFFbySublim(I,J)       &             + d_HEFFbySublim(I,J)
1842       &             + d_HEFFbyOCNonICE(I,J)       &             + d_HEFFbyOCNonICE(I,J)
1843       &             + d_HEFFbyATMonOCN(I,J)       &             + d_HEFFbyATMonOCN(I,J)
1844  #else  #else
# Line 1881  C needs to be here to allow use also wit Line 1884  C needs to be here to allow use also wit
1884  #endif /* ALLOW_SITRACER */  #endif /* ALLOW_SITRACER */
1885  #ifdef SEAICE_DEBUG  #ifdef SEAICE_DEBUG
1886  c ToM<<< debug seaice_growth  c ToM<<< debug seaice_growth
1887          WRITE(msgBuf,'(A,7F8.4)')          WRITE(msgBuf,msgBufForm)
1888       &    ' SEAICE_GROWTH: Heff increments 7, d_HEFFbyATMonOCN_open = ',       &    ' SEAICE_GROWTH: Heff increments 7, d_HEFFbyATMonOCN_open = ',
1889  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
1890       &     d_HEFFbyATMonOCN_open_ITD(1,1,:)       &     d_HEFFbyATMonOCN_open_ITD(1,1,:)
# Line 1890  c ToM<<< debug seaice_growth Line 1893  c ToM<<< debug seaice_growth
1893  #endif  #endif
1894          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
1895       &    SQUEEZE_RIGHT , myThid)       &    SQUEEZE_RIGHT , myThid)
1896          WRITE(msgBuf,'(A,7F8.4)')          WRITE(msgBuf,msgBufForm)
1897       &    ' SEAICE_GROWTH: Heff increments 7, d_HEFFbyATMonOCN = ',       &    ' SEAICE_GROWTH: Heff increments 7, d_HEFFbyATMonOCN = ',
1898  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
1899       &     d_HEFFbyATMonOCN_ITD(1,1,:)       &     d_HEFFbyATMonOCN_ITD(1,1,:)
# Line 1917  CADJ STORE hsnow(:,:,bi,bj) = comlev1_bi Line 1920  CADJ STORE hsnow(:,:,bi,bj) = comlev1_bi
1920            DO J=1,sNy            DO J=1,sNy
1921             DO I=1,sNx             DO I=1,sNx
1922              tmpscal3 = HEFFITDpreTH(I,J,IT)              tmpscal3 = HEFFITDpreTH(I,J,IT)
1923       &               - d_HEFFbySublim_ITD(I,J,IT)       &               + d_HEFFbySublim_ITD(I,J,IT)
1924       &               + d_HEFFbyOCNonICE_ITD(I,J,IT)       &               + d_HEFFbyOCNonICE_ITD(I,J,IT)
1925       &               + d_HEFFbyATMonOCN_ITD(I,J,IT)       &               + d_HEFFbyATMonOCN_ITD(I,J,IT)
1926              tmpscal4 = HSNWITDpreTH(I,J,IT)              tmpscal4 = HSNWITDpreTH(I,J,IT)
1927       &               - d_HSNWbySublim_ITD(I,J,IT)       &               + d_HSNWbySublim_ITD(I,J,IT)
1928       &               + d_HSNWbyATMonSNW_ITD(I,J,IT)       &               + d_HSNWbyATMonSNW_ITD(I,J,IT)
1929       &               + d_HSNWbyRAIN_ITD(I,J,IT)       &               + d_HSNWbyRAIN_ITD(I,J,IT)
1930              tmpscal0 = (tmpscal4*SEAICE_rhoSnow              tmpscal0 = (tmpscal4*SEAICE_rhoSnow
# Line 1950  CADJ STORE hsnow(:,:,bi,bj) = comlev1_bi Line 1953  CADJ STORE hsnow(:,:,bi,bj) = comlev1_bi
1953  #endif /* SEAICE_GROWTH_LEGACY */  #endif /* SEAICE_GROWTH_LEGACY */
1954  #ifdef SEAICE_DEBUG  #ifdef SEAICE_DEBUG
1955  c ToM<<< debug seaice_growth  c ToM<<< debug seaice_growth
1956          WRITE(msgBuf,'(A,7F8.4)')          WRITE(msgBuf,msgBufForm)
1957       &    ' SEAICE_GROWTH: Heff increments 8, d_HEFFbyFLOODING = ',       &    ' SEAICE_GROWTH: Heff increments 8, d_HEFFbyFLOODING = ',
1958  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
1959       &     d_HEFFbyFLOODING_ITD(1,1,:)       &     d_HEFFbyFLOODING_ITD(1,1,:)
# Line 1968  C ====================================== Line 1971  C ======================================
1971            DO J=1,sNy            DO J=1,sNy
1972             DO I=1,sNx             DO I=1,sNx
1973              HEFFITD(I,J,IT,bi,bj) = HEFFITD(I,J,IT,bi,bj)              HEFFITD(I,J,IT,bi,bj) = HEFFITD(I,J,IT,bi,bj)
1974       &                            - d_HEFFbySublim_ITD(I,J,IT)       &                            + d_HEFFbySublim_ITD(I,J,IT)
1975       &                            + d_HEFFbyOCNonICE_ITD(I,J,IT)       &                            + d_HEFFbyOCNonICE_ITD(I,J,IT)
1976       &                            + d_HEFFbyATMonOCN_ITD(I,J,IT)       &                            + d_HEFFbyATMonOCN_ITD(I,J,IT)
1977       &                            + d_HEFFbyFLOODING_ITD(I,J,IT)       &                            + d_HEFFbyFLOODING_ITD(I,J,IT)
1978              HSNOWITD(I,J,IT,bi,bj) = HSNOWITD(I,J,IT,bi,bj)              HSNOWITD(I,J,IT,bi,bj) = HSNOWITD(I,J,IT,bi,bj)
1979       &                            - d_HSNWbySublim_ITD(I,J,IT)       &                            + d_HSNWbySublim_ITD(I,J,IT)
1980       &                            + d_HSNWbyATMonSNW_ITD(I,J,IT)       &                            + d_HSNWbyATMonSNW_ITD(I,J,IT)
1981       &                            + d_HSNWbyRAIN_ITD(I,J,IT)       &                            + d_HSNWbyRAIN_ITD(I,J,IT)
1982       &                            + d_HSNWbyOCNonSNW_ITD(I,J,IT)       &                            + d_HSNWbyOCNonSNW_ITD(I,J,IT)
# Line 1984  C ====================================== Line 1987  C ======================================
1987           ENDDO           ENDDO
1988  #endif  #endif
1989  c ToM<<< debug seaice_growth  c ToM<<< debug seaice_growth
1990          WRITE(msgBuf,'(A,7F8.4)')          WRITE(msgBuf,msgBufForm)
1991       &    ' SEAICE_GROWTH: Heff increments 9, HEFF = ',       &    ' SEAICE_GROWTH: Heff increments 9, HEFF = ',
1992  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
1993       &     HEFFITD(1,1,:,bi,bj)       &     HEFFITD(1,1,:,bi,bj)
# Line 1993  c ToM<<< debug seaice_growth Line 1996  c ToM<<< debug seaice_growth
1996  #endif  #endif
1997          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
1998       &    SQUEEZE_RIGHT , myThid)       &    SQUEEZE_RIGHT , myThid)
1999          WRITE(msgBuf,'(A,7F8.4)')          WRITE(msgBuf,msgBufForm)
2000       &    ' SEAICE_GROWTH: Heff increments 9, AREA = ',       &    ' SEAICE_GROWTH: Area increments 9, AREA = ',
2001  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
2002       &     AREAITD(1,1,:,bi,bj)       &     AREAITD(1,1,:,bi,bj)
2003  #else  #else

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

  ViewVC Help
Powered by ViewVC 1.1.22