1 |
C $Header: $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "AIM_OPTIONS.h" |
5 |
|
6 |
SUBROUTINE AIM_INITIALISE( myThid ) |
7 |
C *==================================================================* |
8 |
C | S/R AIM_INITIALISE |
9 |
C *==================================================================* |
10 |
C | Initialisation of AIM atmospheric physics package : |
11 |
C | 1) call iniphys (=> set parameters to default value) |
12 |
C | 2) read AIM parameters |
13 |
C | 3) initialisation of AIM arrays (time-ave) |
14 |
C *==================================================================* |
15 |
IMPLICIT NONE |
16 |
|
17 |
C -------------- Global variables ------------------------------------ |
18 |
#include "SIZE.h" |
19 |
#include "EEPARAMS.h" |
20 |
#include "PARAMS.h" |
21 |
#include "DYNVARS.h" |
22 |
#include "GRID.h" |
23 |
#include "AIM_DIAGS.h" |
24 |
|
25 |
C == Routine arguments == |
26 |
C myThid - Number of this instance |
27 |
INTEGER myThid |
28 |
|
29 |
#ifdef ALLOW_AIM |
30 |
C == Local variables == |
31 |
C HSG - Cell face in vertical |
32 |
C pGround - Lower boundary pressure |
33 |
C I, J, K, bi,bj - Loop counters |
34 |
_RL HSG(0:Nr) |
35 |
_RL pGround |
36 |
INTEGER K, bi, bj |
37 |
INTEGER Katm |
38 |
|
39 |
pGround = atm_po |
40 |
DO K=1,Nr |
41 |
Katm = _KD2KA( K ) |
42 |
HSG(Katm) = rF(K)/pGround |
43 |
ENDDO |
44 |
K=Nr+1 |
45 |
Katm = _KD2KA( K ) |
46 |
HSG(Katm) = rF(K)/pGround |
47 |
|
48 |
c DO bj = myByLo(myThid), myByHi(myThid) |
49 |
c DO bi = myBxLo(myThid), myBxHi(myThid) |
50 |
|
51 |
C-- set default value for all atmos. physics parameter: |
52 |
CALL INPHYS( HSG, myThid ) |
53 |
|
54 |
c ENDDO |
55 |
c ENDDO |
56 |
|
57 |
C-- set energy fractions in LW bands as a function of temperature: |
58 |
C initialize common block RADFIX (originally called from FORDATE in SPEEDY) |
59 |
_BEGIN_MASTER(myThid) |
60 |
CALL RADSET( myThid) |
61 |
_END_MASTER ( myThid) |
62 |
|
63 |
CALL AIM_READPARMS( myThid ) |
64 |
|
65 |
#ifdef ALLOW_TIMEAVE |
66 |
C Initialise diagnostic counters (these are cleared on model start |
67 |
C i.e. not loaded from history file for now ). |
68 |
DO bj = myByLo(myThid), myByHi(myThid) |
69 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
70 |
CALL TIMEAVE_RESET(USTRtave, 1, bi, bj, myThid) |
71 |
CALL TIMEAVE_RESET(VSTRtave, 1, bi, bj, myThid) |
72 |
CALL TIMEAVE_RESET(TSRtave, 1, bi, bj, myThid) |
73 |
CALL TIMEAVE_RESET(OLRtave, 1, bi, bj, myThid) |
74 |
CALL TIMEAVE_RESET(SSRtave, 1, bi, bj, myThid) |
75 |
CALL TIMEAVE_RESET(SLRtave, 1, bi, bj, myThid) |
76 |
CALL TIMEAVE_RESET(SHFtave, 1, bi, bj, myThid) |
77 |
CALL TIMEAVE_RESET(EVAPtave, 1, bi, bj, myThid) |
78 |
CALL TIMEAVE_RESET(PRECNVtave, 1, bi, bj, myThid) |
79 |
CALL TIMEAVE_RESET(PRECLStave, 1, bi, bj, myThid) |
80 |
CALL TIMEAVE_RESET(CLOUDCtave, 1, bi, bj, myThid) |
81 |
AIM_TimeAve(1,bi,bj) = 0. |
82 |
ENDDO |
83 |
ENDDO |
84 |
#endif /* ALLOW_TIMEAVE */ |
85 |
|
86 |
#endif /* ALLOW_AIM */ |
87 |
|
88 |
RETURN |
89 |
END |