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