1 |
C $Header: /u/gcmpack/models/MITgcmUV/pkg/monitor/mon_advcfl.F,v 1.3 2001/06/18 17:39:59 cnh Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "CPP_OPTIONS.h" |
5 |
|
6 |
SUBROUTINE MON_ADVCFL( |
7 |
I label, U, rDx, dT, |
8 |
I myThid ) |
9 |
C /==========================================================\ |
10 |
C | SUBROUTINE MON_ADVCFL | |
11 |
C | o Calculates maximum CFL number | |
12 |
C |==========================================================| |
13 |
C \==========================================================/ |
14 |
IMPLICIT NONE |
15 |
|
16 |
C === Global data === |
17 |
#include "SIZE.h" |
18 |
#include "EEPARAMS.h" |
19 |
#include "MONITOR.h" |
20 |
|
21 |
C === Routine arguments === |
22 |
CHARACTER*(*) label |
23 |
_RL U(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
24 |
_RS rDx(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
25 |
_RL dT |
26 |
INTEGER myThid |
27 |
|
28 |
C === Local variables ==== |
29 |
INTEGER bi,bj,I,J,K |
30 |
_RL tmpVal,theMax |
31 |
|
32 |
theMax=0. |
33 |
|
34 |
DO bj=myByLo(myThid),myByHi(myThid) |
35 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
36 |
DO K=1,Nr |
37 |
DO J=1,sNy |
38 |
DO I=1,sNx |
39 |
tmpVal=abs(U(I,J,K,bi,bj))*rDx(I,J,BI,BJ)*dT |
40 |
theMax=max(theMax,tmpVal) |
41 |
ENDDO |
42 |
ENDDO |
43 |
ENDDO |
44 |
ENDDO |
45 |
ENDDO |
46 |
_GLOBAL_MAX_R8(theMax,myThid) |
47 |
|
48 |
CALL MON_OUT_RL( label, theMax, mon_foot_max ,myThid) |
49 |
|
50 |
RETURN |
51 |
END |