1 |
C $Header: /u/gcmpack/models/MITgcmUV/pkg/monitor/mon_advcflw2.F,v 1.1 2001/07/03 21:34:52 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "MONITOR_OPTIONS.h" |
5 |
|
6 |
SUBROUTINE MON_ADVCFLW2( |
7 |
I label, W, rHFac, rDrF, dT, |
8 |
I myThid ) |
9 |
C /==========================================================\ |
10 |
C | SUBROUTINE MON_ADVCFLW2 | |
11 |
C | o Calculates maximum CFL number in vertical | |
12 |
C | relevant for tracer Adv. Pb. with Partial Cell | |
13 |
C |==========================================================| |
14 |
C \==========================================================/ |
15 |
IMPLICIT NONE |
16 |
|
17 |
C === Global data === |
18 |
#include "SIZE.h" |
19 |
#include "EEPARAMS.h" |
20 |
#include "MONITOR.h" |
21 |
|
22 |
C === Routine arguments === |
23 |
CHARACTER*(*) label |
24 |
_RL W(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
25 |
_RS rHFac(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
26 |
_RS rDrF(Nr) |
27 |
_RL dT |
28 |
INTEGER myThid |
29 |
|
30 |
C === Local variables ==== |
31 |
INTEGER bi,bj,I,J,K |
32 |
_RL tmpVal,theMax |
33 |
|
34 |
theMax=0. |
35 |
|
36 |
DO bj=myByLo(myThid),myByHi(myThid) |
37 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
38 |
DO K=2,Nr |
39 |
DO J=1,sNy |
40 |
DO I=1,sNx |
41 |
tmpVal=abs(W(I,J,K,bi,bj))*dT |
42 |
& *max( rDrF(K)*rHfac(I,J,K,bi,bj), |
43 |
& rDrF(K-1)*rHfac(I,J,K-1,bi,bj) ) |
44 |
theMax=max(theMax,tmpVal) |
45 |
ENDDO |
46 |
ENDDO |
47 |
ENDDO |
48 |
ENDDO |
49 |
ENDDO |
50 |
_GLOBAL_MAX_R8(theMax,myThid) |
51 |
|
52 |
CALL MON_OUT_RL( label, theMax, mon_foot_max ,myThid) |
53 |
|
54 |
RETURN |
55 |
END |