/[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.12 by torge, Fri May 3 18:59:40 2013 UTC
# Line 56  CEndOfInterface Line 56  CEndOfInterface
56  C !LOCAL VARIABLES: ====================================================  C !LOCAL VARIABLES: ====================================================
57  C     i,j,bi,bj :: Loop counters  C     i,j,bi,bj :: Loop counters
58  #ifdef SEAICE_DEBUG  #ifdef SEAICE_DEBUG
59  CToM<<<  C     coordinates for debugging output
60          INTEGER i_dbOut, j_dbOut
61  C     msgBuf      :: Informational/error message buffer  C     msgBuf      :: Informational/error message buffer
62        CHARACTER*(MAX_LEN_MBUF) msgBuf        CHARACTER*(MAX_LEN_MBUF) msgBuf
63        CHARACTER*10 HlimitMsgFormat        CHARACTER*10 HlimitMsgFormat
# Line 65  C     msgBuf      :: Informational/error Line 66  C     msgBuf      :: Informational/error
66        INTEGER IT        INTEGER IT
67  #endif  #endif
68  #if defined(ALLOW_AUTODIFF_TAMC) || defined(SEAICE_ITD)  #if defined(ALLOW_AUTODIFF_TAMC) || defined(SEAICE_ITD)
 C>>>ToM  
69        INTEGER i, j, bi, bj        INTEGER i, j, bi, bj
70  #endif  #endif
71  #ifdef ALLOW_SITRACER  #ifdef ALLOW_SITRACER
72        INTEGER iTr        INTEGER iTr
73  #endif  #endif
74  CEOP  CEOP
75    #ifdef SEAICE_DEBUG
76          i_dbOut = 1
77          j_dbOut = 1
78    #endif
79    
80  #ifdef ALLOW_DEBUG  #ifdef ALLOW_DEBUG
81        IF (debugMode) CALL DEBUG_ENTER( 'SEAICE_MODEL', myThid )        IF (debugMode) CALL DEBUG_ENTER( 'SEAICE_MODEL', myThid )
# Line 178  C--   (called from DO_OCEANIC_PHYSICS) t Line 182  C--   (called from DO_OCEANIC_PHYSICS) t
182  C NOW DO ADVECTION and DIFFUSION  C NOW DO ADVECTION and DIFFUSION
183        IF ( SEAICEadvHeff .OR. SEAICEadvArea .OR. SEAICEadvSnow        IF ( SEAICEadvHeff .OR. SEAICEadvArea .OR. SEAICEadvSnow
184       &        .OR. SEAICEadvSalt ) THEN       &        .OR. SEAICEadvSalt ) THEN
 CToM<<<  
185  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
186  #ifdef SEAICE_DEBUG  #ifdef SEAICE_DEBUG
 C     ToM: generate some test output  
187         WRITE(HlimitMsgFormat,'(A,I2,A)') '(A,',nITD,'F8.4)'         WRITE(HlimitMsgFormat,'(A,I2,A)') '(A,',nITD,'F8.4)'
188         DO bj=myByLo(myThid),myByHi(myThid)         DO bj=myByLo(myThid),myByHi(myThid)
189          DO bi=myBxLo(myThid),myBxHi(myThid)          DO bi=myBxLo(myThid),myBxHi(myThid)
190             WRITE(msgBuf,'(A,F8.4,x,F8.4)')             WRITE(msgBuf,'(A,F8.4,x,F8.4)')
191       &       ' SEAICE_MODEL: AREA and HEFF before advection: ',       &       ' SEAICE_MODEL: AREA and HEFF before advection: ',
192       &       AREA(1,1,bi,bj), HEFF(1,1,bi,bj)       &       AREA(i_dbOut,j_dbOut,bi,bj), HEFF(i_dbOut,j_dbOut,bi,bj)
193  c     &       ' SEAICE_MODEL: AREA and HEFF/AREA before advection: ',  c     &       ' SEAICE_MODEL: AREA and HEFF/AREA before advection: ',
194  c     &       AREA(1,1,bi,bj), HEFF(1,1,bi,bj)/AREA(1,1,bi,bj)  c     &       AREA(i_dbOut,j_dbOut,bi,bj), HEFF(i_dbOut,j_dbOut,bi,bj)
195    c     &                                   /AREA(i_dbOut,j_dbOut,bi,bj)
196             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
197       &       SQUEEZE_RIGHT , myThid)       &       SQUEEZE_RIGHT , myThid)
198             WRITE(msgBuf,HlimitMsgFormat)             WRITE(msgBuf,HlimitMsgFormat)
199       &       ' SEAICE_MODEL: HEFFITD       before advection: ',       &       ' SEAICE_MODEL: HEFFITD       before advection: ',
200       &       HEFFITD(1,1,:,bi,bj)       &       HEFFITD(i_dbOut,j_dbOut,:,bi,bj)
201  c     &       ' SEAICE_MODEL: HEFFITD/AREAITD before advection: ',  c     &       ' SEAICE_MODEL: HEFFITD/AREAITD before advection: ',
202  c     &       HEFFITD(1,1,:,bi,bj) / AREAITD(1,1,:,bi,bj)  c     &       HEFFITD(i_dbOut,j_dbOut,:,bi,bj)
203    c     &      /AREAITD(i_dbOut,j_dbOut,:,bi,bj)
204             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
205       &       SQUEEZE_RIGHT , myThid)       &       SQUEEZE_RIGHT , myThid)
206             WRITE(msgBuf,HlimitMsgFormat)             WRITE(msgBuf,HlimitMsgFormat)
207       &       ' SEAICE_MODEL: AREAITD       before advection: ',       &       ' SEAICE_MODEL: AREAITD       before advection: ',
208       &       AREAITD(1,1,:,bi,bj)       &       AREAITD(i_dbOut,j_dbOut,:,bi,bj)
209             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
210       &       SQUEEZE_RIGHT , myThid)       &       SQUEEZE_RIGHT , myThid)
211          ENDDO          ENDDO
212         ENDDO         ENDDO
213  #endif  #endif
214  #endif  #endif
 C>>>ToM  
215  #ifdef ALLOW_DEBUG  #ifdef ALLOW_DEBUG
216         IF (debugMode) CALL DEBUG_CALL( 'SEAICE_ADVDIFF', myThid )         IF (debugMode) CALL DEBUG_CALL( 'SEAICE_ADVDIFF', myThid )
217  #endif  #endif
218         CALL SEAICE_ADVDIFF( myTime, myIter, myThid )         CALL SEAICE_ADVDIFF( myTime, myIter, myThid )
 CToM<<<  
219  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
220  #ifdef SEAICE_DEBUG  #ifdef SEAICE_DEBUG
 C     ToM: generate some test output  
221         WRITE(HlimitMsgFormat,'(A,I2,A)') '(A,',nITD,'F8.4)'         WRITE(HlimitMsgFormat,'(A,I2,A)') '(A,',nITD,'F8.4)'
222         DO bj=myByLo(myThid),myByHi(myThid)         DO bj=myByLo(myThid),myByHi(myThid)
223          DO bi=myBxLo(myThid),myBxHi(myThid)          DO bi=myBxLo(myThid),myBxHi(myThid)
224             WRITE(msgBuf,HlimitMsgFormat)             WRITE(msgBuf,HlimitMsgFormat)
225       &       ' SEAICE_MODEL: HEFFITD        after advection: ',       &       ' SEAICE_MODEL: HEFFITD        after advection: ',
226       &       HEFFITD(1,1,:,bi,bj)       &       HEFFITD(i_dbOut,j_dbOut,:,bi,bj)
227             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
228       &       SQUEEZE_RIGHT , myThid)       &       SQUEEZE_RIGHT , myThid)
229             WRITE(msgBuf,HlimitMsgFormat)             WRITE(msgBuf,HlimitMsgFormat)
230       &       ' SEAICE_MODEL: AREAITD        after advection: ',       &       ' SEAICE_MODEL: AREAITD        after advection: ',
231       &       AREAITD(1,1,:,bi,bj)       &       AREAITD(i_dbOut,j_dbOut,:,bi,bj)
232             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
233       &       SQUEEZE_RIGHT , myThid)       &       SQUEEZE_RIGHT , myThid)
234              WRITE(msgBuf,'(A)')              WRITE(msgBuf,'(A)')
# Line 259  C     to match single category values Line 260  C     to match single category values
260          ENDDO          ENDDO
261         ENDDO         ENDDO
262  #endif  #endif
 C>>>ToM  
263        ENDIF        ENDIF
264  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
265  CADJ STORE heffm  = comlev1, key=ikey_dynamics, kind=isbyte  CADJ STORE heffm  = comlev1, key=ikey_dynamics, kind=isbyte
# Line 267  CADJ STORE heffm  = comlev1, key=ikey_dy Line 267  CADJ STORE heffm  = comlev1, key=ikey_dy
267    
268  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
269  #ifdef SEAICE_DEBUG  #ifdef SEAICE_DEBUG
 C     ToM: generate some test output  
270         WRITE(HlimitMsgFormat,'(A,I2,A)') '(A,',nITD,'F8.4)'         WRITE(HlimitMsgFormat,'(A,I2,A)') '(A,',nITD,'F8.4)'
271         DO bj=myByLo(myThid),myByHi(myThid)         DO bj=myByLo(myThid),myByHi(myThid)
272          DO bi=myBxLo(myThid),myBxHi(myThid)          DO bi=myBxLo(myThid),myBxHi(myThid)
273             WRITE(msgBuf,HlimitMsgFormat)             WRITE(msgBuf,HlimitMsgFormat)
274       &       ' SEAICE_MODEL: HEFFITD          before growth: ',       &       ' SEAICE_MODEL: HEFFITD          before growth: ',
275       &       HEFFITD(1,1,:,bi,bj)       &       HEFFITD(i_dbOut,j_dbOut,:,bi,bj)
276             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
277       &       SQUEEZE_RIGHT , myThid)       &       SQUEEZE_RIGHT , myThid)
278             WRITE(msgBuf,HlimitMsgFormat)             WRITE(msgBuf,HlimitMsgFormat)
279       &       ' SEAICE_MODEL: AREAITD          before growth: ',       &       ' SEAICE_MODEL: AREAITD          before growth: ',
280       &       AREAITD(1,1,:,bi,bj)       &       AREAITD(i_dbOut,j_dbOut,:,bi,bj)
281             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
282       &       SQUEEZE_RIGHT , myThid)       &       SQUEEZE_RIGHT , myThid)
283             WRITE(msgBuf,HlimitMsgFormat)             WRITE(msgBuf,HlimitMsgFormat)
284       &       ' SEAICE_MODEL: HSNOWITD         before growth: ',       &       ' SEAICE_MODEL: HSNOWITD         before growth: ',
285       &       HSNOWITD(1,1,:,bi,bj)       &       HSNOWITD(i_dbOut,j_dbOut,:,bi,bj)
286             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,             CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
287       &       SQUEEZE_RIGHT , myThid)       &       SQUEEZE_RIGHT , myThid)
288          ENDDO          ENDDO
# Line 300  C     because of ugly time level busines Line 299  C     because of ugly time level busines
299          IF (debugMode) CALL DEBUG_CALL( 'SEAICE_GROWTH', myThid )          IF (debugMode) CALL DEBUG_CALL( 'SEAICE_GROWTH', myThid )
300  #endif  #endif
301          CALL SEAICE_GROWTH( myTime, myIter, myThid )          CALL SEAICE_GROWTH( myTime, myIter, myThid )
 CToM<<<  
302  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
303  #ifdef SEAICE_DEBUG  #ifdef SEAICE_DEBUG
 C     ToM: generate some test output  
304          WRITE(HlimitMsgFormat,'(A,I2,A)') '(A,',nITD,'F8.4)'          WRITE(HlimitMsgFormat,'(A,I2,A)') '(A,',nITD,'F8.4)'
305          DO bj=myByLo(myThid),myByHi(myThid)          DO bj=myByLo(myThid),myByHi(myThid)
306           DO bi=myBxLo(myThid),myBxHi(myThid)           DO bi=myBxLo(myThid),myBxHi(myThid)
307              WRITE(msgBuf,HlimitMsgFormat)              WRITE(msgBuf,HlimitMsgFormat)
308       &        ' SEAICE_MODEL: HEFFITD           after growth: ',       &        ' SEAICE_MODEL: HEFFITD           after growth: ',
309       &        HEFFITD(1,1,:,bi,bj)       &        HEFFITD(i_dbOut,j_dbOut,:,bi,bj)
310              CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,              CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
311       &        SQUEEZE_RIGHT , myThid)       &        SQUEEZE_RIGHT , myThid)
312              WRITE(msgBuf,HlimitMsgFormat)              WRITE(msgBuf,HlimitMsgFormat)
313       &        ' SEAICE_MODEL: AREAITD           after growth: ',       &        ' SEAICE_MODEL: AREAITD           after growth: ',
314       &        AREAITD(1,1,:,bi,bj)       &        AREAITD(i_dbOut,j_dbOut,:,bi,bj)
315              CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,              CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
316       &        SQUEEZE_RIGHT , myThid)       &        SQUEEZE_RIGHT , myThid)
317              WRITE(msgBuf,HlimitMsgFormat)              WRITE(msgBuf,HlimitMsgFormat)
318       &        ' SEAICE_MODEL: HSNOWITD          after growth: ',       &        ' SEAICE_MODEL: HSNOWITD          after growth: ',
319       &        HSNOWITD(1,1,:,bi,bj)       &        HSNOWITD(i_dbOut,j_dbOut,:,bi,bj)
320              CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,              CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
321       &        SQUEEZE_RIGHT , myThid)       &        SQUEEZE_RIGHT , myThid)
322              WRITE(msgBuf,'(A)')              WRITE(msgBuf,'(A)')
# Line 349  C     store the mean ice thickness in HE Line 346  C     store the mean ice thickness in HE
346         ENDDO         ENDDO
347    
348  #ifdef SEAICE_DEBUG  #ifdef SEAICE_DEBUG
 C     ToM: generate some test output  
349          WRITE(HlimitMsgFormat,'(A,I2,A)') '(A,',nITD,'F8.4)'          WRITE(HlimitMsgFormat,'(A,I2,A)') '(A,',nITD,'F8.4)'
350          DO bj=myByLo(myThid),myByHi(myThid)          DO bj=myByLo(myThid),myByHi(myThid)
351           DO bi=myBxLo(myThid),myBxHi(myThid)           DO bi=myBxLo(myThid),myBxHi(myThid)
352              WRITE(msgBuf,HlimitMsgFormat)              WRITE(msgBuf,HlimitMsgFormat)
353       &        ' SEAICE_MODEL: HEFFITD    after final sorting: ',       &        ' SEAICE_MODEL: HEFFITD    after final sorting: ',
354       &        HEFFITD(1,1,:,bi,bj)       &        HEFFITD(i_dbOut,j_dbOut,:,bi,bj)
355              CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,              CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
356       &        SQUEEZE_RIGHT , myThid)       &        SQUEEZE_RIGHT , myThid)
357              WRITE(msgBuf,HlimitMsgFormat)              WRITE(msgBuf,HlimitMsgFormat)
358       &        ' SEAICE_MODEL: AREAITD    after final sorting: ',       &        ' SEAICE_MODEL: AREAITD    after final sorting: ',
359       &        AREAITD(1,1,:,bi,bj)       &        AREAITD(i_dbOut,j_dbOut,:,bi,bj)
360              CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,              CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
361       &        SQUEEZE_RIGHT , myThid)       &        SQUEEZE_RIGHT , myThid)
362              WRITE(msgBuf,HlimitMsgFormat)              WRITE(msgBuf,HlimitMsgFormat)
363       &        ' SEAICE_MODEL: HSNOWITD   after final sorting: ',       &        ' SEAICE_MODEL: HSNOWITD   after final sorting: ',
364       &        HSNOWITD(1,1,:,bi,bj)       &        HSNOWITD(i_dbOut,j_dbOut,:,bi,bj)
365              CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,              CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
366       &        SQUEEZE_RIGHT , myThid)       &        SQUEEZE_RIGHT , myThid)
367              WRITE(msgBuf,'(A)')              WRITE(msgBuf,'(A)')
# Line 377  C     ToM: generate some test output Line 373  C     ToM: generate some test output
373  #endif  #endif
374  #endif  #endif
375  C  C
 C>>>ToM  
376         ENDIF         ENDIF
377  #endif /* DISABLE_SEAICE_GROWTH */  #endif /* DISABLE_SEAICE_GROWTH */
378    

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

  ViewVC Help
Powered by ViewVC 1.1.22