93 |
INTEGER kSurface |
INTEGER kSurface |
94 |
C IT :: ice thickness category index (MULTICATEGORIES and ITD code) |
C IT :: ice thickness category index (MULTICATEGORIES and ITD code) |
95 |
INTEGER IT |
INTEGER IT |
|
#ifdef SEAICE_DEBUG |
|
|
C coordinates for debugging output |
|
|
INTEGER i_dbOut, j_dbOut |
|
|
#endif |
|
96 |
C msgBuf :: Informational/error message buffer |
C msgBuf :: Informational/error message buffer |
97 |
#ifdef ALLOW_BALANCE_FLUXES |
#ifdef ALLOW_BALANCE_FLUXES |
98 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
365 |
floeDiameterMin = 8. _d 0 |
floeDiameterMin = 8. _d 0 |
366 |
floeDiameterMax = 300. _d 0 |
floeDiameterMax = 300. _d 0 |
367 |
#endif |
#endif |
|
#ifdef SEAICE_DEBUG |
|
|
i_dbOut = 1 |
|
|
j_dbOut = 1 |
|
|
#endif |
|
368 |
|
|
369 |
DO bj=myByLo(myThid),myByHi(myThid) |
DO bj=myByLo(myThid),myByHi(myThid) |
370 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
DO bi=myBxLo(myThid),myBxHi(myThid) |
708 |
CALL SEAICE_ITD_SUM(bi, bj, myTime, myIter, myThid) |
CALL SEAICE_ITD_SUM(bi, bj, myTime, myIter, myThid) |
709 |
#endif /* SEAICE_ITD */ |
#endif /* SEAICE_ITD */ |
710 |
|
|
|
#ifdef SEAICE_DEBUG |
|
|
#ifdef SEAICE_ITD |
|
|
WRITE(msgBufForm,'(A,I2,A)') '(A,',nITD,'F14.10)' |
|
|
#else |
|
|
WRITE(msgBufForm,'(A,A)') '(A, F14.10)' |
|
|
#endif |
|
|
WRITE(msgBuf,msgBufForm) |
|
|
& ' SEAICE_GROWTH: Heff increments 0, HEFF = ', |
|
|
#ifdef SEAICE_ITD |
|
|
& HEFFITD(i_dbOut,j_dbOut,:,bi,bj) |
|
|
#else |
|
|
& HEFF(i_dbOut,j_dbOut,bi,bj) |
|
|
#endif |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
|
|
& SQUEEZE_RIGHT , myThid) |
|
|
WRITE(msgBuf,msgBufForm) |
|
|
& ' SEAICE_GROWTH: Area increments 0, AREA = ', |
|
|
#ifdef SEAICE_ITD |
|
|
& AREAITD(i_dbOut,j_dbOut,:,bi,bj) |
|
|
#else |
|
|
& AREA(i_dbOut,j_dbOut,bi,bj) |
|
|
#endif |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
|
|
& SQUEEZE_RIGHT , myThid) |
|
|
#endif /* SEAICE_DEBUG */ |
|
|
|
|
711 |
#if (defined ALLOW_AUTODIFF_TAMC && defined SEAICE_MODIFY_GROWTH_ADJ) |
#if (defined ALLOW_AUTODIFF_TAMC && defined SEAICE_MODIFY_GROWTH_ADJ) |
712 |
C end SEAICEadjMODE.EQ.0 statement: |
C end SEAICEadjMODE.EQ.0 statement: |
713 |
ENDIF |
ENDIF |
1334 |
& latMeltRate(i,j,it)*SEAICE_deltaTtherm*PI / |
& latMeltRate(i,j,it)*SEAICE_deltaTtherm*PI / |
1335 |
& (floeAlpha * floeDiameter) |
& (floeAlpha * floeDiameter) |
1336 |
latMeltFrac(i,j,it)=max(ZERO, min(latMeltFrac(i,j,it),ONE)) |
latMeltFrac(i,j,it)=max(ZERO, min(latMeltFrac(i,j,it),ONE)) |
|
c if (i.eq.i_dbOut.and.j.eq.j_dbOut) then |
|
|
c print*,'latMelt',it,tmpscal1,latMeltRate(i,j,it), |
|
|
c & areaitd(i,j,it,bi,bj),latMeltFrac(i,j,it) |
|
|
c endif |
|
1337 |
ELSE |
ELSE |
1338 |
latMeltRate(i,j,it)=0.0 _d 0 |
latMeltRate(i,j,it)=0.0 _d 0 |
1339 |
latMeltFrac(i,j,it)=0.0 _d 0 |
latMeltFrac(i,j,it)=0.0 _d 0 |
|
c if (i.eq.i_dbOut.and.j.eq.j_dbOut) then |
|
|
c print*,'latMelt',it,' 0.0 0.0 ', |
|
|
c & areaitd(i,j,it,bi,bj),latMeltFrac(i,j,it) |
|
|
c endif |
|
1340 |
ENDIF |
ENDIF |
1341 |
ENDDO |
ENDDO |
1342 |
ENDDO |
ENDDO |
1423 |
C end IT loop |
C end IT loop |
1424 |
ENDDO |
ENDDO |
1425 |
#endif |
#endif |
|
#ifdef SEAICE_DEBUG |
|
|
c <<< debug seaice_growth |
|
|
WRITE(msgBuf,msgBufForm) |
|
|
& ' SEAICE_GROWTH: Hsnow increments 1, d_HSNWySublim = ', |
|
|
#ifdef SEAICE_ITD |
|
|
& d_HSNWbySublim_ITD(i_dbOut,j_dbOut,:) |
|
|
#else |
|
|
& d_HSNWbySublim(i_dbOut,j_dbOut) |
|
|
#endif |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
|
|
& SQUEEZE_RIGHT , myThid) |
|
|
WRITE(msgBuf,msgBufForm) |
|
|
& ' SEAICE_GROWTH: Heff increments 1, d_HEFFbySublim = ', |
|
|
#ifdef SEAICE_ITD |
|
|
& d_HEFFbySublim_ITD(i_dbOut,j_dbOut,:) |
|
|
#else |
|
|
& d_HEFFbySublim(i_dbOut,j_dbOut) |
|
|
#endif |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
|
|
& SQUEEZE_RIGHT , myThid) |
|
|
c >>> debug seaice_growth |
|
|
#endif /* SEAICE_DEBUG */ |
|
1426 |
|
|
1427 |
C compute ice thickness tendency due to ice-ocean interaction |
C compute ice thickness tendency due to ice-ocean interaction |
1428 |
C =========================================================== |
C =========================================================== |
1472 |
ENDDO |
ENDDO |
1473 |
ENDDO |
ENDDO |
1474 |
#endif /* SEAICE_ITD */ |
#endif /* SEAICE_ITD */ |
|
#ifdef SEAICE_DEBUG |
|
|
c <<< debug seaice_growth |
|
|
WRITE(msgBuf,msgBufForm) |
|
|
& ' SEAICE_GROWTH: Heff increments 2, d_HEFFbyOCNonICE = ', |
|
|
#ifdef SEAICE_ITD |
|
|
& d_HEFFbyOCNonICE_ITD(i_dbOut,j_dbOut,:) |
|
|
#else |
|
|
& d_HEFFbyOCNonICE(i_dbOut,j_dbOut) |
|
|
#endif |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
|
|
& SQUEEZE_RIGHT , myThid) |
|
|
c >>> debug seaice_growth |
|
|
#endif /* SEAICE_DEBUG */ |
|
1475 |
|
|
1476 |
C compute snow melt tendency due to snow-atmosphere interaction |
C compute snow melt tendency due to snow-atmosphere interaction |
1477 |
C ================================================================== |
C ================================================================== |
1519 |
ENDDO |
ENDDO |
1520 |
ENDDO |
ENDDO |
1521 |
#endif /* SEAICE_ITD */ |
#endif /* SEAICE_ITD */ |
|
#ifdef SEAICE_DEBUG |
|
|
c <<< debug seaice_growth |
|
|
WRITE(msgBuf,msgBufForm) |
|
|
& ' SEAICE_GROWTH: Hsnow increments 3, d_HSNWbyATMonSNW = ', |
|
|
#ifdef SEAICE_ITD |
|
|
& d_HSNWbyATMonSNW_ITD(i_dbOut,j_dbOut,:) |
|
|
#else |
|
|
& d_HSNWbyATMonSNW(i_dbOut,j_dbOut) |
|
|
#endif |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
|
|
& SQUEEZE_RIGHT , myThid) |
|
|
c >>> debug seaice_growth |
|
|
#endif /* SEAICE_DEBUG */ |
|
1522 |
|
|
1523 |
C compute ice thickness tendency due to the atmosphere |
C compute ice thickness tendency due to the atmosphere |
1524 |
C ==================================================== |
C ==================================================== |
1583 |
ENDDO |
ENDDO |
1584 |
ENDDO |
ENDDO |
1585 |
#endif /* SEAICE_ITD */ |
#endif /* SEAICE_ITD */ |
|
#ifdef SEAICE_DEBUG |
|
|
c <<< debug seaice_growth |
|
|
WRITE(msgBuf,msgBufForm) |
|
|
& ' SEAICE_GROWTH: Heff increments 4, d_HEFFbyATMonOCN_cover = ', |
|
|
#ifdef SEAICE_ITD |
|
|
& d_HEFFbyATMonOCN_cover_ITD(i_dbOut,j_dbOut,:) |
|
|
#else |
|
|
& d_HEFFbyATMonOCN_cover(i_dbOut,j_dbOut) |
|
|
#endif |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
|
|
& SQUEEZE_RIGHT , myThid) |
|
|
WRITE(msgBuf,msgBufForm) |
|
|
& ' SEAICE_GROWTH: Heff increments 4, d_HEFFbyATMonOCN = ', |
|
|
#ifdef SEAICE_ITD |
|
|
& d_HEFFbyATMonOCN_ITD(i_dbOut,j_dbOut,:) |
|
|
#else |
|
|
& d_HEFFbyATMonOCN(i_dbOut,j_dbOut) |
|
|
#endif |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
|
|
& SQUEEZE_RIGHT , myThid) |
|
|
c >>> debug seaice_growth |
|
|
#endif /* SEAICE_DEBUG */ |
|
1586 |
|
|
1587 |
C add snow precipitation to HSNOW. |
C add snow precipitation to HSNOW. |
1588 |
C ================================================= |
C ================================================= |
1647 |
C end of IF statement snowPrecipFile: |
C end of IF statement snowPrecipFile: |
1648 |
ENDIF |
ENDIF |
1649 |
#endif /* ALLOW_ATM_TEMP */ |
#endif /* ALLOW_ATM_TEMP */ |
|
#ifdef SEAICE_DEBUG |
|
|
c <<< debug seaice_growth |
|
|
WRITE(msgBuf,msgBufForm) |
|
|
& ' SEAICE_GROWTH: Hsnow increments 5, d_HSNWbyRAIN = ', |
|
|
#ifdef SEAICE_ITD |
|
|
& d_HSNWbyRAIN_ITD(i_dbOut,j_dbOut,:) |
|
|
#else |
|
|
& d_HSNWbyRAIN(i_dbOut,j_dbOut) |
|
|
#endif |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
|
|
& SQUEEZE_RIGHT , myThid) |
|
|
c >>> debug seaice_growth |
|
|
#endif /* SEAICE_DEBUG */ |
|
1650 |
|
|
1651 |
C compute snow melt due to heat available from ocean. |
C compute snow melt due to heat available from ocean. |
1652 |
C ================================================================= |
C ================================================================= |
1698 |
#endif /* SEAICE_ITD */ |
#endif /* SEAICE_ITD */ |
1699 |
#endif /* SEAICE_EXCLUDE_FOR_EXACT_AD_TESTING */ |
#endif /* SEAICE_EXCLUDE_FOR_EXACT_AD_TESTING */ |
1700 |
Cph) |
Cph) |
|
#ifdef SEAICE_DEBUG |
|
|
c <<< debug seaice_growth |
|
|
WRITE(msgBuf,msgBufForm) |
|
|
& ' SEAICE_GROWTH: Hsnow increments 6, d_HSNWbyOCNonSNW = ', |
|
|
#ifdef SEAICE_ITD |
|
|
& d_HSNWbyOCNonSNW_ITD(i_dbOut,j_dbOut,:) |
|
|
#else |
|
|
& d_HSNWbyOCNonSNW(i_dbOut,j_dbOut) |
|
|
#endif |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
|
|
& SQUEEZE_RIGHT , myThid) |
|
|
c >>> debug seaice_growth |
|
|
#endif /* SEAICE_DEBUG */ |
|
1701 |
|
|
1702 |
C gain of new ice over open water |
C gain of new ice over open water |
1703 |
C =============================== |
C =============================== |
1759 |
ENDDO |
ENDDO |
1760 |
ENDDO |
ENDDO |
1761 |
#endif /* ALLOW_SITRACER */ |
#endif /* ALLOW_SITRACER */ |
|
#ifdef SEAICE_DEBUG |
|
|
c <<< debug seaice_growth |
|
|
WRITE(msgBuf,msgBufForm) |
|
|
& ' SEAICE_GROWTH: Heff increments 7, d_HEFFbyATMonOCN_open = ', |
|
|
#ifdef SEAICE_ITD |
|
|
& d_HEFFbyATMonOCN_open_ITD(i_dbOut,j_dbOut,:) |
|
|
#else |
|
|
& d_HEFFbyATMonOCN_open(i_dbOut,j_dbOut) |
|
|
#endif |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
|
|
& SQUEEZE_RIGHT , myThid) |
|
|
WRITE(msgBuf,msgBufForm) |
|
|
& ' SEAICE_GROWTH: Heff increments 7, d_HEFFbyATMonOCN = ', |
|
|
#ifdef SEAICE_ITD |
|
|
& d_HEFFbyATMonOCN_ITD(i_dbOut,j_dbOut,:) |
|
|
#else |
|
|
& d_HEFFbyATMonOCN(i_dbOut,j_dbOut) |
|
|
#endif |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
|
|
& SQUEEZE_RIGHT , myThid) |
|
|
c >>> debug seaice_growth |
|
|
#endif /* SEAICE_DEBUG */ |
|
1762 |
|
|
1763 |
C convert snow to ice if submerged. |
C convert snow to ice if submerged. |
1764 |
C ================================= |
C ================================= |
1805 |
#endif |
#endif |
1806 |
ENDIF |
ENDIF |
1807 |
|
|
|
#ifdef SEAICE_DEBUG |
|
|
c <<< debug seaice_growth |
|
|
WRITE(msgBuf,msgBufForm) |
|
|
& ' SEAICE_GROWTH: Heff increments 8, d_HEFFbyFLOODING = ', |
|
|
#ifdef SEAICE_ITD |
|
|
& d_HEFFbyFLOODING_ITD(i_dbOut,j_dbOut,:) |
|
|
#else |
|
|
& d_HEFFbyFLOODING(i_dbOut,j_dbOut) |
|
|
#endif |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
|
|
& SQUEEZE_RIGHT , myThid) |
|
|
c >>> debug seaice_growth |
|
|
#endif /* SEAICE_DEBUG */ |
|
1808 |
#ifdef SEAICE_ITD |
#ifdef SEAICE_ITD |
1809 |
C apply ice and snow thickness changes |
C apply ice and snow thickness changes |
1810 |
C ================================================================= |
C ================================================================= |
1827 |
ENDDO |
ENDDO |
1828 |
ENDDO |
ENDDO |
1829 |
#endif |
#endif |
|
#ifdef SEAICE_DEBUG |
|
|
c <<< debug seaice_growth |
|
|
WRITE(msgBuf,msgBufForm) |
|
|
& ' SEAICE_GROWTH: Heff increments 9, HEFF = ', |
|
|
#ifdef SEAICE_ITD |
|
|
& HEFFITD(i_dbOut,j_dbOut,:,bi,bj) |
|
|
#else |
|
|
& HEFF(i_dbOut,j_dbOut,bi,bj) |
|
|
#endif |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
|
|
& SQUEEZE_RIGHT , myThid) |
|
|
WRITE(msgBuf,msgBufForm) |
|
|
& ' SEAICE_GROWTH: Area increments 9, AREA = ', |
|
|
#ifdef SEAICE_ITD |
|
|
& AREAITD(i_dbOut,j_dbOut,:,bi,bj) |
|
|
#else |
|
|
& AREA(i_dbOut,j_dbOut,bi,bj) |
|
|
#endif |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
|
|
& SQUEEZE_RIGHT , myThid) |
|
|
c >>> debug seaice_growth |
|
|
#endif /* SEAICE_DEBUG */ |
|
1830 |
|
|
1831 |
C =================================================================== |
C =================================================================== |
1832 |
C ==========PART 4: determine ice cover fraction increments=========- |
C ==========PART 4: determine ice cover fraction increments=========- |