1 |
C $Header: /u/u3/gcmpack/MITgcm/pkg/aim_v23/aim_aim2dyn.F,v 1.2 2003/10/31 20:35:32 edhill Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "AIM_OPTIONS.h" |
5 |
|
6 |
CStartOfInterface |
7 |
SUBROUTINE AIM_AIM2DYN( |
8 |
I bi, bj, myTime, myIter, myThid) |
9 |
C *==========================================================* |
10 |
C | S/R AIM_AIM2DYN | |
11 |
C | o Remap AIM outputs to dynamics conforming arrays. | |
12 |
C |==========================================================* |
13 |
C | Currently AIM exports to the dynmaics | |
14 |
C | - PBL drag coefficient | |
15 |
C | - Net tendency for temperature | |
16 |
C | - Net tendency for water vapor | |
17 |
C | Exporting drag has the nice property that it is a scalar.| |
18 |
C | This means that the exchanges on the AIM exported fields | |
19 |
C | do not need special piaring on the cube. It may not be | |
20 |
C | a good idea in the long term as it makes assumptions | |
21 |
C | about the momentum schemes within AIM. | |
22 |
C *==========================================================* |
23 |
C------- |
24 |
C Note: Except LSC tendency, all others need to be /dpFac. |
25 |
C------- |
26 |
IMPLICIT NONE |
27 |
|
28 |
C == Global data == |
29 |
C-- size for MITgcm & Physics package : |
30 |
#include "AIM_SIZE.h" |
31 |
|
32 |
#include "EEPARAMS.h" |
33 |
#include "PARAMS.h" |
34 |
#include "GRID.h" |
35 |
#include "DYNVARS.h" |
36 |
|
37 |
#include "AIM2DYN.h" |
38 |
#include "com_physvar.h" |
39 |
|
40 |
C == Routine arguments == |
41 |
C bi,bj - Tile index |
42 |
C myTime - Current time of simulation ( s ) |
43 |
C myIter - Current iteration number in simulation |
44 |
C myThid - Number of this instance of the routine |
45 |
INTEGER bi, bj, myIter, myThid |
46 |
_RL myTime |
47 |
CEndOfInterface |
48 |
|
49 |
#ifdef ALLOW_AIM |
50 |
C == Local variables == |
51 |
C i,j,k :: loop counters |
52 |
C I2,Katm :: loop counters |
53 |
C conv_T2theta :: conversion factor from (absolute) Temp. to Pot.Temp. |
54 |
_RL conv_T2theta |
55 |
INTEGER i,j,k |
56 |
INTEGER I2, Katm |
57 |
|
58 |
C-- Physics tendency term |
59 |
|
60 |
DO k=1,Nr |
61 |
conv_T2theta = (atm_po/rC(k))**atm_kappa |
62 |
DO j=1,sNy |
63 |
DO i=1,sNx |
64 |
I2 = i+(j-1)*sNx |
65 |
Katm = _KD2KA( k ) |
66 |
C Planetary boundary layer drag coeff. |
67 |
aim_drag(i,j,bi,bj) = DRAG(I2,3,myThid) |
68 |
|
69 |
C Net temperature tendency |
70 |
aim_dTdt(i,j,k,bi,bj) = TT_LSC(I2,Katm,myThid) |
71 |
& + ( TT_CNV(I2,Katm,myThid) |
72 |
& +TT_PBL(I2,Katm,myThid) |
73 |
& +TT_RSW(I2,Katm,myThid) |
74 |
& +TT_RLW(I2,Katm,myThid) |
75 |
& )*recip_hFacC(i,j,k,bi,bj) |
76 |
aim_dTdt(i,j,k,bi,bj) = aim_dTdt(i,j,k,bi,bj)*conv_T2theta |
77 |
|
78 |
C Net water vapor tendency |
79 |
aim_dSdt(i,j,k,bi,bj) = QT_LSC(I2,Katm,myThid) |
80 |
& + ( QT_CNV(I2,Katm,myThid) |
81 |
& +QT_PBL(I2,Katm,myThid) |
82 |
& )*recip_hFacC(i,j,k,bi,bj) |
83 |
|
84 |
ENDDO |
85 |
ENDDO |
86 |
ENDDO |
87 |
|
88 |
#endif /* ALLOW_AIM */ |
89 |
|
90 |
RETURN |
91 |
END |