1 |
C $Header: /u/gcmpack/MITgcm/pkg/aim/aim_aim2dyn.F,v 1.1 2001/05/29 19:28:53 cnh Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "AIM_OPTIONS.h" |
5 |
|
6 |
CStartOfInterface |
7 |
SUBROUTINE AIM_AIM2DYN( |
8 |
I bi,bj, myCurrentTime,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 |
IMPLICIT NONE |
24 |
|
25 |
C == Global data == |
26 |
C-- size for MITgcm & Physics package : |
27 |
#include "AIM_SIZE.h" |
28 |
|
29 |
#include "EEPARAMS.h" |
30 |
#include "PARAMS.h" |
31 |
#include "GRID.h" |
32 |
#include "DYNVARS.h" |
33 |
|
34 |
#include "AIM2DYN.h" |
35 |
#include "com_physvar.h" |
36 |
|
37 |
C == Routine arguments == |
38 |
INTEGER bi, bj |
39 |
_RL myCurrentTime |
40 |
INTEGER myThid |
41 |
CEndOfInterface |
42 |
|
43 |
#ifdef ALLOW_AIM |
44 |
C == Local variables == |
45 |
C Loop counters |
46 |
INTEGER I, J |
47 |
INTEGER I2, kAtm, kLev |
48 |
|
49 |
C-- Forcing term |
50 |
_RL pGround,CPAIR,RD |
51 |
_RL conv_T2theta |
52 |
|
53 |
pGround = 1. _d 5 |
54 |
RD = 287. _d 0 |
55 |
CPAIR = 1004. _d 0 |
56 |
DO kLev=1,Nr |
57 |
conv_T2theta = (pGround/rC(kLev))**(RD/CPAIR) |
58 |
C-- for Energy consistency, need to use same value as in calc_phi_hyd: |
59 |
c conv_T2theta = (atm_po/rC(kLev))**atm_kappa |
60 |
DO J=1,sNy |
61 |
DO I=1,sNx |
62 |
I2 = sNx*(J-1)+I |
63 |
Katm = _KD2KA( Klev ) |
64 |
C Planetary boundary layer drag coeff. |
65 |
aim_drag(i,j,bi,bj) = DRAG(I2,myThid) |
66 |
|
67 |
C Net temperature tendency |
68 |
aim_dTdt(i,j,kLev,bi,bj) = ( TT_PBL(I2,katm,myThid) |
69 |
& +TT_CNV(I2,katm,myThid) |
70 |
& +TT_LSC(I2,katm,myThid) |
71 |
& +TT_RSW(I2,katm,myThid) |
72 |
& +TT_RLW(I2,katm,myThid) |
73 |
& )*conv_T2theta |
74 |
|
75 |
C Net water vapor tendency |
76 |
aim_dSdt(i,j,kLev,bi,bj) = QT_PBL(I2,katm,myThid) |
77 |
& +QT_CNV(I2,katm,myThid) |
78 |
& +QT_LSC(I2,katm,myThid) |
79 |
|
80 |
ENDDO |
81 |
ENDDO |
82 |
ENDDO |
83 |
|
84 |
#endif /* ALLOW_AIM */ |
85 |
|
86 |
RETURN |
87 |
END |