/[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.19 by torge, Fri May 3 18:59:40 2013 UTC revision 1.20 by torge, Fri May 3 20:09:15 2013 UTC
# Line 93  C     number of surface interface layer Line 93  C     number of surface interface layer
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
# Line 369  c parameters needed for variable floe di Line 365  c parameters needed for variable floe di
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)
# Line 716  C    and update AREA, HEFF, and HSNOW Line 708  C    and update AREA, HEFF, and HSNOW
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
# Line 1368  c due to lateral melt Line 1334  c due to lateral melt
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
# Line 1465  C     remove the fusion part for the res Line 1423  C     remove the fusion part for the res
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 ===========================================================
# Line 1536  C          fractional area of each thick Line 1472  C          fractional area of each thick
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 ==================================================================
# Line 1596  Cgf no additional dependency through sno Line 1519  Cgf no additional dependency through sno
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 ====================================================
# Line 1673  C         Limit ice growth by potential Line 1583  C         Limit ice growth by potential
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 =================================================
# Line 1759  Cgf rain to snow is not a surface proces Line 1647  Cgf rain to snow is not a surface proces
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 =================================================================
# Line 1823  Cgf no additional dependency through sno Line 1698  Cgf no additional dependency through sno
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 ===============================
# Line 1897  C needs to be here to allow use also wit Line 1759  C needs to be here to allow use also wit
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 =================================
# Line 1965  CADJ STORE hsnow(:,:,bi,bj) = comlev1_bi Line 1805  CADJ STORE hsnow(:,:,bi,bj) = comlev1_bi
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 =================================================================
# Line 2000  C ====================================== Line 1827  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=========-

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

  ViewVC Help
Powered by ViewVC 1.1.22