1 |
cnh |
1.1 |
C $Header: $ |
2 |
|
|
C $Name: $ |
3 |
|
|
|
4 |
|
|
#include "CPP_OPTIONS.h" |
5 |
|
|
|
6 |
|
|
CBOP |
7 |
|
|
C !ROUTINE: DRIVER_RUN |
8 |
|
|
C !INTERFACE: |
9 |
|
|
SUBROUTINE DRIVER_RUN( |
10 |
|
|
U myCurrentTime, myCurrentIter, |
11 |
|
|
U iLoop, |
12 |
|
|
I nTimeS, myThid) |
13 |
|
|
|
14 |
|
|
C !DESCRIPTION: \bv |
15 |
|
|
C *================================================================== |
16 |
|
|
C | SUBROUTINE driver_run |
17 |
|
|
C | o External driver control routine for MITgcm forward step |
18 |
|
|
C | execution phase. |
19 |
|
|
C *================================================================== |
20 |
|
|
C | |
21 |
|
|
C | DRIVER routines are used to control the MITgcm code from an external |
22 |
|
|
C | driver. This routine invokes the forward phase of code execution. |
23 |
|
|
C | The driver here is written for an ocean configuration and is designed |
24 |
|
|
C | for use with either an argument based call/return interface or with a |
25 |
|
|
C | messaging based "event loop" interface. |
26 |
|
|
C | |
27 |
|
|
C *================================================================== |
28 |
|
|
C \ev |
29 |
|
|
|
30 |
|
|
C !USES: |
31 |
|
|
IMPLICIT NONE |
32 |
|
|
C == Global variables == |
33 |
|
|
#include "SIZE.h" |
34 |
|
|
#include "EEPARAMS.h" |
35 |
|
|
#include "EESUPPORT.h" |
36 |
|
|
#include "PARAMS.h" |
37 |
|
|
|
38 |
|
|
C == Routine arguments == |
39 |
|
|
C myThid :: Thread number for this instance of the routine |
40 |
|
|
INTEGER myThid |
41 |
|
|
INTEGER myCurrentIter |
42 |
|
|
_RL myCurrentTime |
43 |
|
|
INTEGER nTimeS |
44 |
|
|
INTEGER iLoop |
45 |
|
|
C == Local variables == |
46 |
|
|
INTEGER i,j,bi,bj |
47 |
|
|
CHARACTER*(MAX_LEN_MBUF) msgBuf |
48 |
|
|
CHARACTER*13 fNam |
49 |
|
|
INTEGER iStep |
50 |
|
|
CEOP |
51 |
|
|
|
52 |
|
|
C myThid = 1 |
53 |
|
|
C myCurrentTime = startTime+startStep*deltaTClock |
54 |
|
|
C myCurrentIter = nIter0+startStep |
55 |
|
|
C myThid = 1 |
56 |
|
|
C nTimesteps = stopStep-startStep |
57 |
|
|
|
58 |
|
|
CALL MONITOR( myCurrentIter, myCurrentTime, myThid ) |
59 |
|
|
|
60 |
|
|
DO iStep = 1, nTimeS |
61 |
|
|
CALL FORWARD_STEP_EXECUTE( iLoop, myCurrentTime, |
62 |
|
|
& myCurrentIter, myThid ) |
63 |
|
|
iLoop = iLoop+1 |
64 |
|
|
CALL FORWARD_STEP_SETUP( iLoop, myCurrentTime, |
65 |
|
|
& myCurrentIter, myThid ) |
66 |
|
|
ENDDO |
67 |
|
|
|
68 |
|
|
CALL FORWARD_STEP_EXECUTE( iLoop, myCurrentTime, |
69 |
|
|
& myCurrentIter, myThid ) |
70 |
|
|
iLoop = iLoop+1 |
71 |
|
|
CALL FORWARD_STEP_SETUP( iLoop, myCurrentTime, |
72 |
|
|
& myCurrentIter, myThid ) |
73 |
|
|
|
74 |
|
|
RETURN |
75 |
|
|
END |