1 |
jmc |
1.3 |
C $Header: /u/gcmpack/MITgcm/pkg/aim_v23/aim_aim2land.F,v 1.2 2004/03/11 14:33:19 jmc Exp $ |
2 |
jmc |
1.1 |
C $Name: $ |
3 |
|
|
|
4 |
|
|
#include "AIM_OPTIONS.h" |
5 |
|
|
#ifdef ALLOW_LAND |
6 |
|
|
#include "LAND_OPTIONS.h" |
7 |
|
|
#endif |
8 |
|
|
|
9 |
|
|
CBOP |
10 |
|
|
C !ROUTINE: AIM_AIM2LAND |
11 |
|
|
C !INTERFACE: |
12 |
|
|
SUBROUTINE AIM_AIM2LAND( |
13 |
|
|
I land_frc, bi, bj, myTime, myIter, myThid) |
14 |
|
|
|
15 |
|
|
C !DESCRIPTION: \bv |
16 |
|
|
C *==========================================================* |
17 |
|
|
C | S/R AIM_AIM2LAND |
18 |
|
|
C | o Export land surface fluxes to Land package |
19 |
|
|
C *==========================================================* |
20 |
|
|
C \ev |
21 |
|
|
|
22 |
|
|
C !USES: |
23 |
|
|
IMPLICIT NONE |
24 |
|
|
|
25 |
|
|
C == Global variables === |
26 |
|
|
C-- size for MITgcm & Physics package : |
27 |
|
|
#include "AIM_SIZE.h" |
28 |
|
|
|
29 |
|
|
#include "EEPARAMS.h" |
30 |
|
|
#include "PARAMS.h" |
31 |
|
|
|
32 |
jmc |
1.2 |
C-- Physics package |
33 |
|
|
#include "AIM_PARAMS.h" |
34 |
jmc |
1.1 |
#include "com_physcon.h" |
35 |
|
|
#include "com_physvar.h" |
36 |
|
|
|
37 |
|
|
#ifdef ALLOW_LAND |
38 |
|
|
#include "LAND_SIZE.h" |
39 |
|
|
#include "LAND_PARAMS.h" |
40 |
|
|
#include "LAND_VARS.h" |
41 |
|
|
#endif |
42 |
|
|
|
43 |
|
|
C !INPUT/OUTPUT PARAMETERS: |
44 |
|
|
C == Routine arguments == |
45 |
|
|
C land_frc :: land fraction [0-1] |
46 |
|
|
C bi,bj :: Tile index |
47 |
|
|
C myTime :: Current time of simulation ( s ) |
48 |
|
|
C myIter :: Current iteration number in simulation |
49 |
|
|
C myThid :: Number of this instance of the routine |
50 |
|
|
_RS land_frc(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
51 |
|
|
INTEGER bi, bj, myIter, myThid |
52 |
|
|
_RL myTime |
53 |
|
|
CEOP |
54 |
|
|
|
55 |
|
|
#ifdef ALLOW_AIM |
56 |
|
|
#ifdef ALLOW_LAND |
57 |
|
|
C == Local variables == |
58 |
jmc |
1.2 |
C i,j,k,I2 :: loop counters |
59 |
|
|
C conv_precip :: conversion factor for precip: from g/m2/s to kg/m2/s |
60 |
jmc |
1.1 |
_RL conv_precip |
61 |
jmc |
1.2 |
INTEGER i,j,k,I2 |
62 |
jmc |
1.1 |
|
63 |
jmc |
1.2 |
C-- Initialisation : |
64 |
|
|
IF ( .NOT.land_impl_grT ) THEN |
65 |
|
|
DO j=1,sNy |
66 |
|
|
DO i=1,sNx |
67 |
|
|
land_Pr_m_Ev(i,j,bi,bj) = 0. _d 0 |
68 |
jmc |
1.3 |
land_EnWFlux(i,j,bi,bj) = 0. _d 0 |
69 |
jmc |
1.2 |
ENDDO |
70 |
|
|
ENDDO |
71 |
|
|
ENDIF |
72 |
|
|
|
73 |
|
|
C-- Atmospheric Physics Fluxes |
74 |
jmc |
1.1 |
|
75 |
|
|
c IF ( useLand ) THEN |
76 |
|
|
|
77 |
jmc |
1.2 |
C from g/m2/s to kg/m2/s : |
78 |
|
|
conv_Precip = 1. _d -3 |
79 |
jmc |
1.1 |
|
80 |
jmc |
1.3 |
IF ( land_calc_grT .AND. .NOT.land_impl_grT ) THEN |
81 |
|
|
C-- Surface heat flux to compute ground temperature explicitely: |
82 |
jmc |
1.2 |
k = 0 |
83 |
|
|
IF (aim_splitSIOsFx) k = 1 |
84 |
|
|
DO j=1,sNy |
85 |
|
|
DO i=1,sNx |
86 |
|
|
I2 = i+(j-1)*sNx |
87 |
|
|
|
88 |
|
|
C- total surface downward heat flux : |
89 |
jmc |
1.3 |
land_HeatFlx(i,j,bi,bj) = |
90 |
jmc |
1.2 |
& SSR(I2,k,myThid) |
91 |
|
|
& - SLR(I2,k,myThid) |
92 |
|
|
& - SHF(I2,1,myThid) |
93 |
|
|
& - EVAP(I2,1,myThid)*ALHC |
94 |
|
|
ENDDO |
95 |
|
|
ENDDO |
96 |
|
|
|
97 |
jmc |
1.3 |
IF ( land_calc_snow ) THEN |
98 |
jmc |
1.2 |
C- Evap of snow: substract Latent Heat of freezing from heatFlux |
99 |
|
|
DO j=1,sNy |
100 |
|
|
DO i=1,sNx |
101 |
|
|
I2 = i+(j-1)*sNx |
102 |
jmc |
1.3 |
IF ( land_skinT(i,j,bi,bj).LT. 0. _d 0 .OR. |
103 |
|
|
& land_hSnow(i,j,bi,bj).GT. 0. _d 0 ) THEN |
104 |
|
|
land_HeatFlx(i,j,bi,bj) = land_HeatFlx(i,j,bi,bj) |
105 |
jmc |
1.2 |
& - EVAP(I2,1,myThid)*ALHF |
106 |
jmc |
1.3 |
land_EnWFlux(i,j,bi,bj) = |
107 |
|
|
& EVAP(I2,1,myThid)*ALHF |
108 |
|
|
ENDIF |
109 |
jmc |
1.2 |
ENDDO |
110 |
|
|
ENDDO |
111 |
|
|
ENDIF |
112 |
|
|
|
113 |
|
|
C-- to compute ground temperature explicitely: end |
114 |
|
|
ENDIF |
115 |
|
|
|
116 |
jmc |
1.3 |
C-- Fresh water fluxes |
117 |
|
|
DO j=1,sNy |
118 |
|
|
DO i=1,sNx |
119 |
|
|
I2 = i+(j-1)*sNx |
120 |
|
|
|
121 |
|
|
C- total Precip minus Evap surface flux : |
122 |
|
|
C convert from g.m-2.s-1 to kg/m2/s |
123 |
|
|
land_Pr_m_Ev(i,j,bi,bj) = land_Pr_m_Ev(i,j,bi,bj) |
124 |
|
|
& + conv_precip*( PRECNV(I2,myThid) |
125 |
|
|
& + PRECLS(I2,myThid) |
126 |
|
|
& - EVAP(I2,1,myThid) |
127 |
|
|
& ) |
128 |
|
|
|
129 |
|
|
ENDDO |
130 |
|
|
ENDDO |
131 |
|
|
|
132 |
|
|
IF ( aim_energPrecip ) THEN |
133 |
|
|
C- Compute energy flux related to Precip. (snow, T_rain) |
134 |
|
|
C Evap of snow: add Latent Heat of freezing |
135 |
|
|
DO j=1,sNy |
136 |
|
|
DO i=1,sNx |
137 |
|
|
I2 = i+(j-1)*sNx |
138 |
|
|
land_EnWFlux(i,j,bi,bj) = land_EnWFlux(i,j,bi,bj) |
139 |
|
|
& + EnPrec(I2,myThid)*( PRECNV(I2,myThid) |
140 |
|
|
& +PRECLS(I2,myThid) ) |
141 |
|
|
ENDDO |
142 |
|
|
ENDDO |
143 |
|
|
ENDIF |
144 |
|
|
|
145 |
jmc |
1.1 |
C- end (if useLand) |
146 |
|
|
c ENDIF |
147 |
|
|
|
148 |
|
|
#endif /* ALLOW_LAND */ |
149 |
|
|
#endif /* ALLOW_AIM */ |
150 |
|
|
|
151 |
|
|
RETURN |
152 |
|
|
END |