7 |
C !ROUTINE: DRIVER_RUN |
C !ROUTINE: DRIVER_RUN |
8 |
C !INTERFACE: |
C !INTERFACE: |
9 |
SUBROUTINE DRIVER_RUN( |
SUBROUTINE DRIVER_RUN( |
10 |
U myCurrentTime, myCurrentIter, |
I atm_HeatFlux, atm_TauX, atm_TauY, |
11 |
U iLoop, |
I atm_Qlatent, atm_Qsensible, atm_Qlongwave, |
12 |
I nTimeS, myThid) |
I atm_Qshortwave, |
13 |
|
I atm_uVelGround, atm_vVelGround, |
14 |
|
I atm_FWFlux, |
15 |
|
I atm_Hatm, |
16 |
|
O ocn_SSTocn, ocn_Hocn, |
17 |
|
U myCurrentTime, myCurrentIter, |
18 |
|
U iLoop, |
19 |
|
I nTimeS, myThid) |
20 |
|
|
21 |
C !DESCRIPTION: \bv |
C !DESCRIPTION: \bv |
22 |
C *================================================================== |
C *================================================================== |
41 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
42 |
#include "EESUPPORT.h" |
#include "EESUPPORT.h" |
43 |
#include "PARAMS.h" |
#include "PARAMS.h" |
44 |
|
#include "GRID.h" |
45 |
|
#include "OCNCPL.h" |
46 |
|
|
47 |
C == Routine arguments == |
C == Routine arguments == |
48 |
C myThid :: Thread number for this instance of the routine |
_RL atm_HeatFlux( 1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
49 |
|
_RL atm_TauX( 1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
50 |
|
_RL atm_TauY( 1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
51 |
|
_RL atm_Qlatent( 1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
52 |
|
_RL atm_Qsensible( 1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
53 |
|
_RL atm_Qlongwave( 1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
54 |
|
_RL atm_Qshortwave( 1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
55 |
|
_RL atm_uVelGround( 1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
56 |
|
_RL atm_vVelGround( 1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
57 |
|
_RL atm_FWFlux( 1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
58 |
|
_RL atm_Hatm( 1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
59 |
|
_RL ocn_SSTocn( 1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
60 |
|
_RL ocn_Hocn( 1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
61 |
|
C myThid :: Thread number for this instance of the routine |
62 |
INTEGER myThid |
INTEGER myThid |
63 |
INTEGER myCurrentIter |
INTEGER myCurrentIter |
64 |
_RL myCurrentTime |
_RL myCurrentTime |
71 |
INTEGER iStep |
INTEGER iStep |
72 |
CEOP |
CEOP |
73 |
|
|
74 |
|
CALL COMP_OCN_PUSH_CONTEXT(1) |
75 |
|
|
76 |
|
myThid = 1 |
77 |
|
!cnhdbg CLOSE(errorMessageUnit) |
78 |
|
!cnhdbg CLOSE(standardMessageUnit) |
79 |
|
! myProcessStr = '0000' |
80 |
|
!cnhdbg WRITE(fNam,'(A,A)') 'STDOUT.', myProcessStr(1:4) |
81 |
|
!cnhdbg OPEN(standardMessageUnit,FILE=fNam,STATUS='old',POSITION='append') |
82 |
|
!cnhdbg WRITE(fNam,'(A,A)') 'STDERR.', myProcessStr(1:4) |
83 |
|
!cnhdbg OPEN(errorMessageUnit,FILE=fNam,STATUS='old',POSITION='append') |
84 |
|
!cnhdbg WRITE(msgBuf,*) 'Entering OCN driver_run' |
85 |
|
!cnhdbg CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
86 |
|
!cnhdbg & SQUEEZE_RIGHT , 1) |
87 |
|
|
88 |
|
C Extract the import fields |
89 |
|
DO bj=myByLo(myThid),myByHi(myThid) |
90 |
|
DO bi=myBxLo(myThid),myBxHi(myThid) |
91 |
|
DO j=1-OLy,sNy+OLy |
92 |
|
DO i=1-OLx,sNx+OLx |
93 |
|
HeatFlux( i,j,bi,bj)=atm_HeatFlux( i,j,bi,bj) |
94 |
|
TauX( i,j,bi,bj)=atm_tauX( i,j,bi,bj) |
95 |
|
TauY( i,j,bi,bj)=atm_tauY( i,j,bi,bj) |
96 |
|
Qlatent( i,j,bi,bj)=atm_qLatent( i,j,bi,bj) |
97 |
|
Qsensible( i,j,bi,bj)=atm_qSensible( i,j,bi,bj) |
98 |
|
Qlongwave( i,j,bi,bj)=atm_qLongwave( i,j,bi,bj) |
99 |
|
Qshortwave( i,j,bi,bj)=atm_qShortwave(i,j,bi,bj) |
100 |
|
uVelGround( i,j,bi,bj)=atm_uVelGround(i,j,bi,bj) |
101 |
|
vVelGround( i,j,bi,bj)=atm_vVelGround(i,j,bi,bj) |
102 |
|
FWFlux( i,j,bi,bj)=atm_FWFlux( i,j,bi,bj) |
103 |
|
Hatm( i,j,bi,bj)=atm_Hatm( i,j,bi,bj) |
104 |
|
ENDDO |
105 |
|
ENDDO |
106 |
|
ENDDO |
107 |
|
ENDDO |
108 |
|
|
109 |
|
|
110 |
C myThid = 1 |
C myThid = 1 |
111 |
C myCurrentTime = startTime+startStep*deltaTClock |
myCurrentTime = startTime |
112 |
C myCurrentIter = nIter0+startStep |
myCurrentIter = nIter0 |
113 |
C myThid = 1 |
C myThid = 1 |
114 |
C nTimesteps = stopStep-startStep |
C nTimesteps = 1 |
115 |
|
|
116 |
CALL MONITOR( myCurrentIter, myCurrentTime, myThid ) |
CALL MONITOR( myCurrentIter, myCurrentTime, myThid ) |
117 |
|
|
129 |
CALL FORWARD_STEP_SETUP( iLoop, myCurrentTime, |
CALL FORWARD_STEP_SETUP( iLoop, myCurrentTime, |
130 |
& myCurrentIter, myThid ) |
& myCurrentIter, myThid ) |
131 |
|
|
132 |
|
C Fill the export fields |
133 |
|
DO bj=myByLo(myThid),myByHi(myThid) |
134 |
|
DO bi=myBxLo(myThid),myBxHi(myThid) |
135 |
|
DO j=1-OLy,sNy+OLy |
136 |
|
DO i=1-OLx,sNx+OLx |
137 |
|
ocn_SSTocn(i,j,bi,bj) = SSTocn2cpl(i,j,bi,bj) |
138 |
|
ocn_Hocn( i,j,bi,bj) = R_low( i,j,bi,bj) |
139 |
|
ENDDO |
140 |
|
ENDDO |
141 |
|
ENDDO |
142 |
|
ENDDO |
143 |
|
|
144 |
|
!cnhdbg CLOSE(errorMessageUnit) |
145 |
|
!cnhdbg CLOSE(standardMessageUnit) |
146 |
|
CALL COMP_OCN_POP_CONTEXT(1) |
147 |
|
|
148 |
RETURN |
RETURN |
149 |
END |
END |