/[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.11 by torge, Wed Mar 27 18:59:53 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  
 CToM<<<  
 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
61  #if defined(ALLOW_AUTODIFF_TAMC) || defined(SEAICE_ITD)  #if defined(ALLOW_AUTODIFF_TAMC) || defined(SEAICE_ITD)
 C>>>ToM  
62        INTEGER i, j, bi, bj        INTEGER i, j, bi, bj
63  #endif  #endif
64  #ifdef ALLOW_SITRACER  #ifdef ALLOW_SITRACER
# Line 178  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
 CToM<<<  
 #ifdef SEAICE_ITD  
 #ifdef SEAICE_DEBUG  
 C     ToM: generate some test output  
        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(1,1,bi,bj), HEFF(1,1,bi,bj)  
 c     &       ' SEAICE_MODEL: AREA and HEFF/AREA before advection: ',  
 c     &       AREA(1,1,bi,bj), HEFF(1,1,bi,bj)/AREA(1,1,bi,bj)  
            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &       SQUEEZE_RIGHT , myThid)  
            WRITE(msgBuf,HlimitMsgFormat)  
      &       ' SEAICE_MODEL: HEFFITD       before advection: ',  
      &       HEFFITD(1,1,:,bi,bj)  
 c     &       ' SEAICE_MODEL: HEFFITD/AREAITD before advection: ',  
 c     &       HEFFITD(1,1,:,bi,bj) / AREAITD(1,1,:,bi,bj)  
            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &       SQUEEZE_RIGHT , myThid)  
            WRITE(msgBuf,HlimitMsgFormat)  
      &       ' SEAICE_MODEL: AREAITD       before advection: ',  
      &       AREAITD(1,1,:,bi,bj)  
            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &       SQUEEZE_RIGHT , myThid)  
         ENDDO  
        ENDDO  
 #endif  
 #endif  
 C>>>ToM  
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 )
 CToM<<<  
178  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
 #ifdef SEAICE_DEBUG  
 C     ToM: generate some test output  
        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(1,1,:,bi,bj)  
            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &       SQUEEZE_RIGHT , myThid)  
            WRITE(msgBuf,HlimitMsgFormat)  
      &       ' SEAICE_MODEL: AREAITD        after advection: ',  
      &       AREAITD(1,1,:,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 259  C     to match single category values Line 197  C     to match single category values
197          ENDDO          ENDDO
198         ENDDO         ENDDO
199  #endif  #endif
 C>>>ToM  
200        ENDIF        ENDIF
201  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
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  
 C     ToM: generate some test output  
        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(1,1,:,bi,bj)  
            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &       SQUEEZE_RIGHT , myThid)  
            WRITE(msgBuf,HlimitMsgFormat)  
      &       ' SEAICE_MODEL: AREAITD          before growth: ',  
      &       AREAITD(1,1,:,bi,bj)  
            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &       SQUEEZE_RIGHT , myThid)  
            WRITE(msgBuf,HlimitMsgFormat)  
      &       ' SEAICE_MODEL: HSNOWITD         before growth: ',  
      &       HSNOWITD(1,1,:,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 211  C     because of ugly time level busines
211          IF (debugMode) CALL DEBUG_CALL( 'SEAICE_GROWTH', myThid )          IF (debugMode) CALL DEBUG_CALL( 'SEAICE_GROWTH', myThid )
212  #endif  #endif
213          CALL SEAICE_GROWTH( myTime, myIter, myThid )          CALL SEAICE_GROWTH( myTime, myIter, myThid )
 CToM<<<  
214  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
 #ifdef SEAICE_DEBUG  
 C     ToM: generate some test output  
         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(1,1,:,bi,bj)  
             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &        SQUEEZE_RIGHT , myThid)  
             WRITE(msgBuf,HlimitMsgFormat)  
      &        ' SEAICE_MODEL: AREAITD           after growth: ',  
      &        AREAITD(1,1,:,bi,bj)  
             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &        SQUEEZE_RIGHT , myThid)  
             WRITE(msgBuf,HlimitMsgFormat)  
      &        ' SEAICE_MODEL: HSNOWITD          after growth: ',  
      &        HSNOWITD(1,1,:,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 347  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  
 C     ToM: generate some test output  
         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(1,1,:,bi,bj)  
             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &        SQUEEZE_RIGHT , myThid)  
             WRITE(msgBuf,HlimitMsgFormat)  
      &        ' SEAICE_MODEL: AREAITD    after final sorting: ',  
      &        AREAITD(1,1,:,bi,bj)  
             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,  
      &        SQUEEZE_RIGHT , myThid)  
             WRITE(msgBuf,HlimitMsgFormat)  
      &        ' SEAICE_MODEL: HSNOWITD   after final sorting: ',  
      &        HSNOWITD(1,1,:,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
 C>>>ToM  
234         ENDIF         ENDIF
235  #endif /* DISABLE_SEAICE_GROWTH */  #endif /* DISABLE_SEAICE_GROWTH */
236    

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

  ViewVC Help
Powered by ViewVC 1.1.22