1 |
jmc |
1.1 |
C $Header: $ |
2 |
|
|
C $Name: $ |
3 |
|
|
|
4 |
|
|
#include "CPP_OPTIONS.h" |
5 |
|
|
|
6 |
|
|
CStartOfInterface |
7 |
|
|
SUBROUTINE ATM_EXPORT_TAUY( myThid ) |
8 |
|
|
C /==========================================================\ |
9 |
|
|
C | SUBROUTINE ATM_EXPORT_TAUY | |
10 |
|
|
C | o Routine for exporting atmos. meridional momentum flux | |
11 |
|
|
C | at lower boundary to coupling layer. | |
12 |
|
|
C |==========================================================| |
13 |
|
|
C | This version talks to the MIT Coupler. It uses the MIT | |
14 |
|
|
C | Coupler "checkpoint1" library calls. | |
15 |
|
|
C \==========================================================/ |
16 |
|
|
IMPLICIT NONE |
17 |
|
|
|
18 |
|
|
C == Global variables == |
19 |
|
|
#include "SIZE.h" |
20 |
|
|
#include "EEPARAMS.h" |
21 |
|
|
#include "ATMCPL.h" |
22 |
|
|
#include "ATMIDS.h" |
23 |
|
|
|
24 |
|
|
C == Routine arguments == |
25 |
|
|
C myThid - Thread number for this instance of the routine |
26 |
|
|
INTEGER myThid |
27 |
|
|
CEndOfInterface |
28 |
|
|
|
29 |
|
|
C == Local variables == |
30 |
|
|
C recipAvT :: Temp. for holding reciprocal of averaging period. |
31 |
|
|
C I,J,K,II :: Loop counters |
32 |
|
|
C bi, bj :: |
33 |
|
|
_RL recipAvT |
34 |
|
|
INTEGER I |
35 |
|
|
INTEGER J |
36 |
|
|
INTEGER K |
37 |
|
|
INTEGER II |
38 |
|
|
INTEGER bi |
39 |
|
|
INTEGER bj |
40 |
|
|
|
41 |
|
|
C Convert time integrated flux to mean value ready for |
42 |
|
|
C export. |
43 |
|
|
DO bj=myByLo(myThid),myByHi(myThid) |
44 |
|
|
DO bi=myBxLo(myThid),myBxHi(myThid) |
45 |
|
|
IF ( ABS(tauYTime(bi,bj) -1. _d 0).GT. 1. _d -12 |
46 |
|
|
& .AND. tauYTime(bi,bj) .NE. 0. ) THEN |
47 |
|
|
recipAvT = 1. _d 0/tauYTime(bi,bj) |
48 |
|
|
DO J=1,sNy |
49 |
|
|
DO I=1,sNx |
50 |
|
|
tauY(I,J,bi,bj) = tauY(I,J,bi,bj)*recipAvT |
51 |
|
|
ENDDO |
52 |
|
|
ENDDO |
53 |
|
|
WRITE(errorMessageUnit,*)'ATM_EXPORT_TAUY: 1-CountTime=', |
54 |
|
|
& bi,bj,1.-tauYTime(bi,bj) |
55 |
|
|
ENDIF |
56 |
|
|
ENDDO |
57 |
|
|
ENDDO |
58 |
|
|
|
59 |
|
|
C o Send meridional momentum flux to coupling layer. |
60 |
|
|
CALL COMPSEND_R8TILES( atmTauYName, |
61 |
|
|
I sNx, OLx, sNy, OLy, 1, nSx, nSy, tauY ) |
62 |
|
|
|
63 |
|
|
C Reset flux to start accumulating again. |
64 |
|
|
DO bj=myByLo(myThid),myByHi(myThid) |
65 |
|
|
DO bi=myBxLo(myThid),myBxHi(myThid) |
66 |
|
|
tauYTime(bi,bj) = 0. |
67 |
|
|
DO J=1,sNy |
68 |
|
|
DO I=1,sNx |
69 |
|
|
tauY(I,J,bi,bj) = 0. |
70 |
|
|
ENDDO |
71 |
|
|
ENDDO |
72 |
|
|
ENDDO |
73 |
|
|
ENDDO |
74 |
|
|
|
75 |
|
|
RETURN |
76 |
|
|
END |