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

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

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

revision 1.12 by torge, Fri May 3 18:59:40 2013 UTC revision 1.13 by torge, Fri May 3 19:21:20 2013 UTC
# Line 55  CEndOfInterface Line 55  CEndOfInterface
55    
56  C !LOCAL VARIABLES: ====================================================  C !LOCAL VARIABLES: ====================================================
57  C     i,j,bi,bj :: Loop counters  C     i,j,bi,bj :: Loop counters
 #ifdef SEAICE_DEBUG  
 C     coordinates for debugging output  
       INTEGER i_dbOut, j_dbOut  
 C     msgBuf      :: Informational/error message buffer  
       CHARACTER*(MAX_LEN_MBUF) msgBuf  
       CHARACTER*10 HlimitMsgFormat  
 #endif  
58  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
59        INTEGER IT        INTEGER IT
60  #endif  #endif
# Line 72  C     msgBuf      :: Informational/error Line 65  C     msgBuf      :: Informational/error
65        INTEGER iTr        INTEGER iTr
66  #endif  #endif
67  CEOP  CEOP
 #ifdef SEAICE_DEBUG  
       i_dbOut = 1  
       j_dbOut = 1  
 #endif  
68    
69  #ifdef ALLOW_DEBUG  #ifdef ALLOW_DEBUG
70        IF (debugMode) CALL DEBUG_ENTER( 'SEAICE_MODEL', myThid )        IF (debugMode) CALL DEBUG_ENTER( 'SEAICE_MODEL', myThid )
# Line 182  C--   (called from DO_OCEANIC_PHYSICS) t Line 171  C--   (called from DO_OCEANIC_PHYSICS) t
171  C NOW DO ADVECTION and DIFFUSION  C NOW DO ADVECTION and DIFFUSION
172        IF ( SEAICEadvHeff .OR. SEAICEadvArea .OR. SEAICEadvSnow        IF ( SEAICEadvHeff .OR. SEAICEadvArea .OR. SEAICEadvSnow
173       &        .OR. SEAICEadvSalt ) THEN       &        .OR. SEAICEadvSalt ) THEN
 #ifdef SEAICE_ITD  
 #ifdef SEAICE_DEBUG  
        WRITE(HlimitMsgFormat,'(A,I2,A)') '(A,',nITD,'F8.4)'  
        DO bj=myByLo(myThid),myByHi(myThid)  
         DO bi=myBxLo(myThid),myBxHi(myThid)  
            WRITE(msgBuf,'(A,F8.4,x,F8.4)')  
      &       ' SEAICE_MODEL: AREA and HEFF before advection: ',  
      &       AREA(i_dbOut,j_dbOut,bi,bj), HEFF(i_dbOut,j_dbOut,bi,bj)  
 c     &       ' SEAICE_MODEL: AREA and HEFF/AREA before advection: ',  
 c     &       AREA(i_dbOut,j_dbOut,bi,bj), HEFF(i_dbOut,j_dbOut,bi,bj)  
 c     &                                   /AREA(i_dbOut,j_dbOut,bi,bj)  
            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &       SQUEEZE_RIGHT , myThid)  
            WRITE(msgBuf,HlimitMsgFormat)  
      &       ' SEAICE_MODEL: HEFFITD       before advection: ',  
      &       HEFFITD(i_dbOut,j_dbOut,:,bi,bj)  
 c     &       ' SEAICE_MODEL: HEFFITD/AREAITD before advection: ',  
 c     &       HEFFITD(i_dbOut,j_dbOut,:,bi,bj)  
 c     &      /AREAITD(i_dbOut,j_dbOut,:,bi,bj)  
            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &       SQUEEZE_RIGHT , myThid)  
            WRITE(msgBuf,HlimitMsgFormat)  
      &       ' SEAICE_MODEL: AREAITD       before advection: ',  
      &       AREAITD(i_dbOut,j_dbOut,:,bi,bj)  
            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &       SQUEEZE_RIGHT , myThid)  
         ENDDO  
        ENDDO  
 #endif  
 #endif  
174  #ifdef ALLOW_DEBUG  #ifdef ALLOW_DEBUG
175         IF (debugMode) CALL DEBUG_CALL( 'SEAICE_ADVDIFF', myThid )         IF (debugMode) CALL DEBUG_CALL( 'SEAICE_ADVDIFF', myThid )
176  #endif  #endif
177         CALL SEAICE_ADVDIFF( myTime, myIter, myThid )         CALL SEAICE_ADVDIFF( myTime, myIter, myThid )
178  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
 #ifdef SEAICE_DEBUG  
        WRITE(HlimitMsgFormat,'(A,I2,A)') '(A,',nITD,'F8.4)'  
        DO bj=myByLo(myThid),myByHi(myThid)  
         DO bi=myBxLo(myThid),myBxHi(myThid)  
            WRITE(msgBuf,HlimitMsgFormat)  
      &       ' SEAICE_MODEL: HEFFITD        after advection: ',  
      &       HEFFITD(i_dbOut,j_dbOut,:,bi,bj)  
            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &       SQUEEZE_RIGHT , myThid)  
            WRITE(msgBuf,HlimitMsgFormat)  
      &       ' SEAICE_MODEL: AREAITD        after advection: ',  
      &       AREAITD(i_dbOut,j_dbOut,:,bi,bj)  
            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &       SQUEEZE_RIGHT , myThid)  
             WRITE(msgBuf,'(A)')  
      &        ' --------------------------------------------- '  
             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &        SQUEEZE_RIGHT , myThid)  
         ENDDO  
        ENDDO  
 #endif  
 C  
179  C     check that all ice thickness categories meet their limits  C     check that all ice thickness categories meet their limits
180  C     (includes Hibler-type ridging)  C     (includes Hibler-type ridging)
181  #ifdef ALLOW_DEBUG  #ifdef ALLOW_DEBUG
# Line 265  C     to match single category values Line 202  C     to match single category values
202  CADJ STORE heffm  = comlev1, key=ikey_dynamics, kind=isbyte  CADJ STORE heffm  = comlev1, key=ikey_dynamics, kind=isbyte
203  #endif /* ALLOW_AUTODIFF_TAMC */  #endif /* ALLOW_AUTODIFF_TAMC */
204    
 #ifdef SEAICE_ITD  
 #ifdef SEAICE_DEBUG  
        WRITE(HlimitMsgFormat,'(A,I2,A)') '(A,',nITD,'F8.4)'  
        DO bj=myByLo(myThid),myByHi(myThid)  
         DO bi=myBxLo(myThid),myBxHi(myThid)  
            WRITE(msgBuf,HlimitMsgFormat)  
      &       ' SEAICE_MODEL: HEFFITD          before growth: ',  
      &       HEFFITD(i_dbOut,j_dbOut,:,bi,bj)  
            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &       SQUEEZE_RIGHT , myThid)  
            WRITE(msgBuf,HlimitMsgFormat)  
      &       ' SEAICE_MODEL: AREAITD          before growth: ',  
      &       AREAITD(i_dbOut,j_dbOut,:,bi,bj)  
            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &       SQUEEZE_RIGHT , myThid)  
            WRITE(msgBuf,HlimitMsgFormat)  
      &       ' SEAICE_MODEL: HSNOWITD         before growth: ',  
      &       HSNOWITD(i_dbOut,j_dbOut,:,bi,bj)  
            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &       SQUEEZE_RIGHT , myThid)  
         ENDDO  
        ENDDO  
 #endif  
 #endif  
   
205  #ifndef DISABLE_SEAICE_GROWTH  #ifndef DISABLE_SEAICE_GROWTH
206  C     thermodynamics growth  C     thermodynamics growth
207  C     must call growth after calling advection  C     must call growth after calling advection
# Line 300  C     because of ugly time level busines Line 212  C     because of ugly time level busines
212  #endif  #endif
213          CALL SEAICE_GROWTH( myTime, myIter, myThid )          CALL SEAICE_GROWTH( myTime, myIter, myThid )
214  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
 #ifdef SEAICE_DEBUG  
         WRITE(HlimitMsgFormat,'(A,I2,A)') '(A,',nITD,'F8.4)'  
         DO bj=myByLo(myThid),myByHi(myThid)  
          DO bi=myBxLo(myThid),myBxHi(myThid)  
             WRITE(msgBuf,HlimitMsgFormat)  
      &        ' SEAICE_MODEL: HEFFITD           after growth: ',  
      &        HEFFITD(i_dbOut,j_dbOut,:,bi,bj)  
             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &        SQUEEZE_RIGHT , myThid)  
             WRITE(msgBuf,HlimitMsgFormat)  
      &        ' SEAICE_MODEL: AREAITD           after growth: ',  
      &        AREAITD(i_dbOut,j_dbOut,:,bi,bj)  
             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &        SQUEEZE_RIGHT , myThid)  
             WRITE(msgBuf,HlimitMsgFormat)  
      &        ' SEAICE_MODEL: HSNOWITD          after growth: ',  
      &        HSNOWITD(i_dbOut,j_dbOut,:,bi,bj)  
             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &        SQUEEZE_RIGHT , myThid)  
             WRITE(msgBuf,'(A)')  
      &        ' --------------------------------------------- '  
             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &        SQUEEZE_RIGHT , myThid)  
          ENDDO  
         ENDDO  
 #endif  
 C  
215  C     redistribute sea ice into proper sea ice category after growth/melt  C     redistribute sea ice into proper sea ice category after growth/melt
216  C     in case model runs with ice thickness distribution  C     in case model runs with ice thickness distribution
217  C---+-|--1----+----2----+----3----+----4----+----5----+----6----+----7-|  C---+-|--1----+----2----+----3----+----4----+----5----+----6----+----7-|
# Line 344  C     store the mean ice thickness in HE Line 229  C     store the mean ice thickness in HE
229           CALL SEAICE_ITD_SUM(bi, bj, myTime, myIter, myThid)           CALL SEAICE_ITD_SUM(bi, bj, myTime, myIter, myThid)
230          ENDDO          ENDDO
231         ENDDO         ENDDO
   
 #ifdef SEAICE_DEBUG  
         WRITE(HlimitMsgFormat,'(A,I2,A)') '(A,',nITD,'F8.4)'  
         DO bj=myByLo(myThid),myByHi(myThid)  
          DO bi=myBxLo(myThid),myBxHi(myThid)  
             WRITE(msgBuf,HlimitMsgFormat)  
      &        ' SEAICE_MODEL: HEFFITD    after final sorting: ',  
      &        HEFFITD(i_dbOut,j_dbOut,:,bi,bj)  
             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &        SQUEEZE_RIGHT , myThid)  
             WRITE(msgBuf,HlimitMsgFormat)  
      &        ' SEAICE_MODEL: AREAITD    after final sorting: ',  
      &        AREAITD(i_dbOut,j_dbOut,:,bi,bj)  
             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &        SQUEEZE_RIGHT , myThid)  
             WRITE(msgBuf,HlimitMsgFormat)  
      &        ' SEAICE_MODEL: HSNOWITD   after final sorting: ',  
      &        HSNOWITD(i_dbOut,j_dbOut,:,bi,bj)  
             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &        SQUEEZE_RIGHT , myThid)  
             WRITE(msgBuf,'(A)')  
      &        ' ============================================= '  
             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &        SQUEEZE_RIGHT , myThid)  
          ENDDO  
         ENDDO  
 #endif  
232  #endif  #endif
233  C  C
234         ENDIF         ENDIF

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

  ViewVC Help
Powered by ViewVC 1.1.22