1 |
C $Header: /u/gcmpack/MITgcm/pkg/aim/aim_dyn2aim.F,v 1.4 2002/09/27 20:05:11 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "AIM_OPTIONS.h" |
5 |
|
6 |
CStartOfInterface |
7 |
SUBROUTINE AIM_DYN2AIM( |
8 |
I bi,bj, myCurrentTime,myThid) |
9 |
C /==========================================================\ |
10 |
C | S/R AIM_DYN2AIM | |
11 |
C | o Map dynamics conforming arrays to AIM internal arrays. | |
12 |
C |==========================================================| |
13 |
C | Currently this routine transfers grid information to | |
14 |
C | AIM. Other information needs to be included from | |
15 |
C | aim_do_atmos_physics(). | |
16 |
C \==========================================================/ |
17 |
IMPLICIT NONE |
18 |
|
19 |
C == Global data == |
20 |
C-- size for MITgcm & Physics package : |
21 |
#include "AIM_SIZE.h" |
22 |
|
23 |
#include "EEPARAMS.h" |
24 |
#include "PARAMS.h" |
25 |
#include "GRID.h" |
26 |
#include "DYNVARS.h" |
27 |
|
28 |
#include "AIM_GRID.h" |
29 |
#include "com_physvar.h" |
30 |
#include "com_physcon.h" |
31 |
|
32 |
C == Routine arguments == |
33 |
INTEGER bi, bj |
34 |
_RL myCurrentTime |
35 |
INTEGER myThid |
36 |
CEndOfInterface |
37 |
|
38 |
#ifdef ALLOW_AIM |
39 |
C == Local variables == |
40 |
C Loop counters |
41 |
INTEGER I, J, I2, K |
42 |
|
43 |
C Legendre polynomials |
44 |
DO J=1,NLAT |
45 |
DO I=1,NLON |
46 |
I2=J |
47 |
I2=NLON*(J-1)+I |
48 |
FMU(I2,1,myThid)=SIN(yC(I,J,bi,bj)*deg2rad) |
49 |
FMU(I2,2,myThid)=1.5 _d 0*FMU(I2,1,myThid)**2-0.5 _d 0 |
50 |
ENDDO |
51 |
ENDDO |
52 |
C DO J=1,NLAT |
53 |
C FMU(J,1,myThid)=SIN(yC(1,J,bi,bj)*deg2rad) |
54 |
C FMU(J,2,myThid)=1.5 _d 0*FMU(J,1,myThid)**2-0.5 _d 0 |
55 |
C ENDDO |
56 |
|
57 |
C Depth in levels |
58 |
I2=0 |
59 |
DO J=1,NLAT |
60 |
DO I=1,NLON |
61 |
I2=I2+1 |
62 |
NLEVxy(I2,myThid) =0 |
63 |
NLEVxyU(I2,myThid)=0 |
64 |
NLEVxyV(I2,myThid)=0 |
65 |
DO k=1,NLEV |
66 |
NLEVxy(I2,myThid) = NLEVxy(I2,myThid) |
67 |
& + INT( maskC(I,J,K,bi,bj) ) |
68 |
NLEVxyU(I2,myThid)= NLEVxyU(I2,myThid) |
69 |
& + INT( maskW(I,J,K,bi,bj) ) |
70 |
NLEVxyV(I2,myThid)= NLEVxyV(I2,myThid) |
71 |
& + INT( maskS(I,J,K,bi,bj) ) |
72 |
ENDDO |
73 |
ENDDO |
74 |
ENDDO |
75 |
|
76 |
#endif /* ALLOW_AIM */ |
77 |
|
78 |
RETURN |
79 |
END |