1 |
jscott |
1.1 |
#include "ctrparam.h" |
2 |
|
|
#include "ATM2D_OPTIONS.h" |
3 |
|
|
C !INTERFACE: |
4 |
|
|
SUBROUTINE ATM2OCN_MAIN( iloop, aloop, inMonth, |
5 |
|
|
& myIter, myThid ) |
6 |
|
|
C *==========================================================* |
7 |
jscott |
1.2 |
C | Main call after atmos call; calls routine to convert/get | |
8 |
|
|
C | the atmos fluxes, do ther derivative term calculation, | |
9 |
|
|
C | then add restoring and fixed fluxes, if any. | |
10 |
jscott |
1.1 |
C *==========================================================* |
11 |
|
|
IMPLICIT NONE |
12 |
|
|
|
13 |
|
|
C === Global Atmos/Ocean/Seaice Interface Variables === |
14 |
|
|
#include "ATMSIZE.h" |
15 |
|
|
#include "SIZE.h" |
16 |
|
|
#include "EEPARAMS.h" |
17 |
|
|
#include "ATM2D_VARS.h" |
18 |
|
|
|
19 |
|
|
|
20 |
|
|
C !INPUT/OUTPUT PARAMETERS: |
21 |
|
|
C === Routine arguments === |
22 |
jscott |
1.2 |
C iloop - loop counter for main loop (coupled periods) |
23 |
|
|
C aloop - loop counter for atm time steps (within a coupled per.) |
24 |
jscott |
1.1 |
C inMonth - current month |
25 |
|
|
C myThid - Thread no. that called this routine. |
26 |
jscott |
1.2 |
INTEGER iloop |
27 |
jscott |
1.1 |
INTEGER aloop |
28 |
|
|
INTEGER inMonth |
29 |
|
|
INTEGER myIter |
30 |
|
|
INTEGER myThid |
31 |
|
|
|
32 |
|
|
C LOCAL VARIABLES: |
33 |
|
|
_RL wght0,wght1 |
34 |
|
|
INTEGER intime0,intime1 |
35 |
jscott |
1.2 |
LOGICAL iftime ! comes back true if time to do a file re-load |
36 |
jscott |
1.1 |
_RL curTime ! current time (s) of simulation starting from 0.0 |
37 |
|
|
|
38 |
|
|
curTime = float(iloop-1)*dtcouplo + (float(aloop)-0.5)*dtatmo |
39 |
|
|
|
40 |
|
|
PRINT *,'Executing atm2ocn main',curTime |
41 |
|
|
CALL CALC_FILELOAD( curTime, iloop, aloop, wght0, wght1, |
42 |
|
|
& intime0, intime1, ifTime, myThid) |
43 |
|
|
|
44 |
jscott |
1.2 |
CALL READ_ATMOS( inMonth,myThid) |
45 |
jscott |
1.1 |
|
46 |
|
|
IF ( (atmosTauuFile.NE.' ').OR. |
47 |
|
|
& (atmosTauvFile.NE.' ').OR.(atmosWindFile.NE.' ')) THEN |
48 |
|
|
CALL SUBTRACT_MEANS( wght0, wght1, |
49 |
|
|
& intime0, intime1, myThid) |
50 |
|
|
ENDIF |
51 |
|
|
|
52 |
jscott |
1.2 |
CALL CALC_1DTO2D( myThid) |
53 |
jscott |
1.1 |
|
54 |
jscott |
1.2 |
CALL FIXED_FLUX_ADD( wght0,wght1, |
55 |
jscott |
1.1 |
& intime0,intime1,ifTime,myIter,myThid) |
56 |
|
|
|
57 |
jscott |
1.2 |
CALL RELAX_ADD( wght0,wght1, |
58 |
jscott |
1.1 |
& intime0,intime1,ifTime,myIter,myThid) |
59 |
|
|
|
60 |
|
|
RETURN |
61 |
|
|
END |