1 |
C $Header: /u/gcmpack/models/MITgcmUV/pkg/aim/aim_do_inphys.F,v 1.3.2.1 2001/04/05 03:58:19 jamous Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "AIM_OPTIONS.h" |
5 |
|
6 |
SUBROUTINE AIM_INIT( myThid ) |
7 |
C /==================================================================\ |
8 |
C | S/R AIM_INIT | |
9 |
C |==================================================================| |
10 |
C | Interface between AIM atmospheric physics package and the | |
11 |
C | dynamical model for initialisation. | |
12 |
C \==================================================================/ |
13 |
IMPLICIT rEAL*8 (A-H,O-Z) |
14 |
|
15 |
C -------------- Global variables ------------------------------------ |
16 |
#include "SIZE.h" |
17 |
#include "EEPARAMS.h" |
18 |
#include "PARAMS.h" |
19 |
#include "DYNVARS.h" |
20 |
#include "GRID.h" |
21 |
#include "AIM_DIAGS.h" |
22 |
|
23 |
C == Routine arguments == |
24 |
C myThid - Number of this instance |
25 |
INTEGER myThid |
26 |
|
27 |
#ifdef ALLOW_AIM |
28 |
C == Local variables == |
29 |
C FSG - Cell mid-point in vertical |
30 |
C HSG - Cell face in vertical |
31 |
C RLAT - Call mid-point latitude |
32 |
C pGround - Lower boundary pressure |
33 |
C J, K, bi,bj - Loop counters |
34 |
REAL FSG( Nr) |
35 |
REAL HSG( Nr+1) |
36 |
REAL RLAT(sNy) |
37 |
INTEGER J, K |
38 |
INTEGER Katm |
39 |
INTEGER bi,bj |
40 |
|
41 |
pground = 1. _d 5 |
42 |
DO K=1,Nr |
43 |
Katm = _KD2KA( K ) |
44 |
FSG(Katm ) = rC(K)/pGround |
45 |
HSG(Katm+1) = rF(K)/pGround |
46 |
ENDDO |
47 |
HSG(1) = rF(Nr+1)/pGround |
48 |
|
49 |
DO bj = myByLo(myThid), myByHi(myThid) |
50 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
51 |
DO J=1,sNy |
52 |
RLAT(J) = yC(1,J,bi,bj)*deg2rad |
53 |
ENDDO |
54 |
CALL INPHYS( FSG, HSG, RLAT, myThid ) |
55 |
ENDDO |
56 |
ENDDO |
57 |
|
58 |
#ifdef ALLOW_TIMEAVE |
59 |
C Initialise diagnostic counters ( these are cleared on model starti i.e. not |
60 |
C loaded from history file for now ). |
61 |
DO bj = myByLo(myThid), myByHi(myThid) |
62 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
63 |
CALL TIMEAVE_RESET(USTRtave, 1, bi, bj, myThid) |
64 |
CALL TIMEAVE_RESET(VSTRtave, 1, bi, bj, myThid) |
65 |
CALL TIMEAVE_RESET(TSRtave, 1, bi, bj, myThid) |
66 |
CALL TIMEAVE_RESET(OLRtave, 1, bi, bj, myThid) |
67 |
CALL TIMEAVE_RESET(SSRtave, 1, bi, bj, myThid) |
68 |
CALL TIMEAVE_RESET(SLRtave, 1, bi, bj, myThid) |
69 |
CALL TIMEAVE_RESET(SHFtave, 1, bi, bj, myThid) |
70 |
CALL TIMEAVE_RESET(EVAPtave, 1, bi, bj, myThid) |
71 |
CALL TIMEAVE_RESET(PRECNVtave, 1, bi, bj, myThid) |
72 |
CALL TIMEAVE_RESET(PRECLStave, 1, bi, bj, myThid) |
73 |
CALL TIMEAVE_RESET(CLOUDCtave, 1, bi, bj, myThid) |
74 |
AIM_TimeAve(1,bi,bj) = 0. |
75 |
ENDDO |
76 |
ENDDO |
77 |
#endif /* ALLOW_TIMEAVE */ |
78 |
|
79 |
#endif /* ALLOW_AIM */ |
80 |
|
81 |
RETURN |
82 |
END |