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