/[MITgcm]/MITgcm/pkg/aim_v23/aim_land2aim.F
ViewVC logotype

Contents of /MITgcm/pkg/aim_v23/aim_land2aim.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.6 - (show annotations) (download)
Fri May 21 17:27:22 2004 UTC (19 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint58l_post, checkpoint64z, checkpoint57t_post, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint57o_post, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint58e_post, checkpoint57v_post, checkpoint53d_post, checkpoint58u_post, checkpoint58w_post, checkpoint54a_pre, checkpoint57m_post, checkpoint55c_post, checkpoint54e_post, checkpoint57s_post, checkpoint54a_post, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint53c_post, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint57k_post, checkpoint55d_pre, checkpoint57d_post, checkpoint57g_post, checkpoint64, checkpoint65, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint57b_post, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, checkpoint56b_post, checkpoint57i_post, checkpoint57y_post, checkpoint57e_post, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint55h_post, checkpoint58n_post, checkpoint58x_post, checkpoint57g_pre, checkpoint54b_post, checkpoint55b_post, checkpoint58t_post, checkpoint58h_post, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint54d_post, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint56c_post, checkpoint57y_pre, checkpoint55, checkpoint57f_pre, checkpoint57a_post, checkpoint54, checkpoint58q_post, checkpoint54f_post, checkpoint59q, checkpoint59p, checkpoint55g_post, checkpoint59r, checkpoint58j_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint55f_post, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, eckpoint57e_pre, checkpoint57h_done, checkpoint58f_post, checkpoint53g_post, checkpoint57x_post, checkpoint57n_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint57f_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, checkpoint58g_post, checkpoint58o_post, checkpoint57z_post, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint57c_post, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint58y_post, checkpoint55e_post, checkpoint58k_post, checkpoint58v_post, checkpoint53f_post, checkpoint55a_post, checkpoint53d_pre, checkpoint54c_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint57j_post, checkpoint61z, checkpoint61x, checkpoint61y, checkpoint58b_post, checkpoint57h_pre, checkpoint58m_post, checkpoint57l_post, checkpoint57h_post, checkpoint56a_post, checkpoint55d_post, HEAD
Changes since 1.5: +3 -3 lines
soil water availability (SWA) always positive (even if groundW < 0)

1 C $Header: /u/gcmpack/MITgcm/pkg/aim_v23/aim_land2aim.F,v 1.5 2004/05/15 20:32:04 jmc Exp $
2 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_LAND2AIM
11 C !INTERFACE:
12 SUBROUTINE AIM_LAND2AIM(
13 I land_frc, land_veg, grnd_alb, snowFld,
14 U aimTld, aimSWA, aimAlb,
15 I myTime, myIter, bi, bj, myThid )
16
17 C !DESCRIPTION: \bv
18 C *================================================================*
19 C | S/R AIM_LAND2AIM
20 C | provide surface Boundary Conditions over land (from land pkg)
21 C | to atmospheric physics package AIM
22 C *================================================================*
23 C | note: by default, use AIM surf.B.C. fields as initial state
24 C | (myIter=0) for the land model
25 C *================================================================*
26 C \ev
27
28 C !USES:
29 IMPLICIT NONE
30
31 C == Global variables ===
32 C-- size for MITgcm & Physics package :
33 #include "AIM_SIZE.h"
34
35 C-- MITgcm
36 #include "EEPARAMS.h"
37 #include "PARAMS.h"
38
39 C-- Physics package
40 #include "AIM_PARAMS.h"
41 #include "com_forcon.h"
42
43 #ifdef ALLOW_LAND
44 C-- Land package
45 #include "LAND_SIZE.h"
46 #include "LAND_PARAMS.h"
47 #include "LAND_VARS.h"
48 #endif
49
50 C == Routine arguments ==
51 C land_frc :: land fraction [0-1]
52 C land_veg :: vegetation fraction [0-1]
53 C grnd_alb :: ground albedo [0-1]
54 C aimTld :: land surface temp (K), used in AIM
55 C snowFld :: prescribed snow thickness (from AIM input data) [m]
56 C aimSWA :: soil wetness availability [0-1], used in AIM
57 C aimAlb :: land albedo [0-1], used in AIM
58 C myTime :: Current time of simulation ( s )
59 C myIter :: Current iteration number in simulation
60 C bi,bj :: Tile index
61 C myThid :: Number of this instance of the routine
62 _RS land_frc(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
63 _RS land_veg(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
64 _RS grnd_alb(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
65 _RL snowFld(sNx,sNy)
66 _RL aimTld(sNx,sNy)
67 _RL aimSWA(sNx,sNy)
68 _RL aimAlb(sNx,sNy)
69 INTEGER myIter, bi, bj, myThid
70 _RL myTime
71 CEOP
72
73 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
74
75 #ifdef ALLOW_AIM
76 #ifdef ALLOW_LAND
77
78 C == Local variables ==
79 C i,j,k :: Loop counters
80 C grd_HeatCp :: Heat capacity of the ground [J/m3/K]
81 C mWater :: water content of the ground [kg/m3]
82 C recip_hSnWet :: reciprol effective snow depth for wetness (m^-1)
83 C recip_mSnWet :: reciprol effective snow cover for wetness (mm^-1)
84 INTEGER i,j,k
85 INTEGER kFillW
86 _RL grd_HeatCp, mWater
87 _RL RSD
88 _RL recip_hSnWet, recip_mSnWet
89
90 c IF (useLand) THEN
91
92 IF ( land_calc_grT ) THEN
93 C- Use land-pkg output instead of prescribed ground Temp
94 DO j=1,sNy
95 DO i=1,sNx
96 aimTld(i,j) = land_skinT(i,j,bi,bj)+celsius2K
97 ENDDO
98 ENDDO
99 ELSE
100 C- Fill in land-pkg ground Temp. using AIM surf. fields
101 DO k=1,land_nLev
102 DO j=1,sNy
103 DO i=1,sNx
104 land_groundT(i,j,k,bi,bj) = aimTld(i,j)-celsius2K
105 ENDDO
106 ENDDO
107 ENDDO
108 DO j=1,sNy
109 DO i=1,sNx
110 land_skinT(i,j,bi,bj) = land_groundT(i,j,1,bi,bj)
111 ENDDO
112 ENDDO
113 ENDIF
114
115 IF (land_calc_grW) THEN
116 C- Use land-pkg output instead of prescribed soil moisture
117 IF ( land_calc_snow ) THEN
118 C Units: hSnow & hSnowWetness are in meter (of snow)
119 recip_hSnWet = 0. _d 0
120 IF ( hSnowWetness .NE. 0. _d 0 )
121 & recip_hSnWet = 1. _d 0 / hSnowWetness
122 DO j=1,sNy
123 DO i=1,sNx
124 aimSWA(i,j) = land_groundW(i,j,1,bi,bj)
125 & + land_hSnow(i,j,bi,bj)*recip_hSnWet
126 aimSWA(i,j) = MIN( MAX(0. _d 0, aimSWA(i,j)), 1. _d 0 )
127 ENDDO
128 ENDDO
129 ELSE
130 C Units: snowFld is in milimeter of equivalent liquid water
131 recip_mSnWet = 0. _d 0
132 IF ( hSnowWetness .NE. 0. _d 0 )
133 & recip_mSnWet = land_rhoLiqW
134 & / (land_rhoSnow*hSnowWetness*1000. _d 0)
135 DO j=1,sNy
136 DO i=1,sNx
137 aimSWA(i,j) = land_groundW(i,j,1,bi,bj)
138 & + snowFld(i,j)*recip_mSnWet
139 aimSWA(i,j) = MIN( MAX(0. _d 0, aimSWA(i,j)), 1. _d 0 )
140 ENDDO
141 ENDDO
142 ENDIF
143 ELSE
144 C- Fill in land-pkg soil moisture using AIM surf. fields
145 kFillW = land_nLev
146 IF (land_calc_grT) kFillW = 1
147 DO k=1,kFillW
148 DO j=1,sNy
149 DO i=1,sNx
150 land_groundW(i,j,k,bi,bj) = aimSWA(i,j)
151 ENDDO
152 ENDDO
153 ENDDO
154 c IF ( land_calc_grT ) THEN
155 C- needs to recompute enthalpy since grdW has changed:
156 C not a good idea: frozen water in the ground will be lost !
157 IF ( .FALSE. ) THEN
158 DO j=1,sNy
159 DO i=1,sNx
160 c IF ( land_frc(i,j,bi,bj).GT.0. ) THEN
161 DO k=1,land_nLev
162 mWater = land_rhoLiqW*land_waterCap
163 & *land_groundW(i,j,k,bi,bj)
164 grd_HeatCp = land_heatCs + land_CpWater*mWater
165
166 land_enthalp(i,j,k,bi,bj) =
167 & grd_HeatCp*land_groundT(i,j,k,bi,bj)
168 ENDDO
169 c ENDIF
170 ENDDO
171 ENDDO
172 ENDIF
173
174 C- end: if land_calc_grW
175 ENDIF
176
177 IF (land_calc_snow) THEN
178
179 IF (land_calc_alb) THEN
180 C- Compute albedo of snow ; and replace albedo of land.
181 CALL LAND_ALBEDO(
182 I land_frc, grnd_alb,
183 O aimAlb,
184 I bi,bj, myTime, myIter, myThid )
185
186 ELSE
187 C- Surface Albedo : (from F.M. FORDATE S/R)
188 RSD = 1. _d 0/SDALB
189 DO j=1,sNy
190 DO i=1,sNx
191 aimAlb(i,j) = grnd_alb(i,j,bi,bj)
192 & + MAX( 0. _d 0, ALBSN-grnd_alb(i,j,bi,bj) )
193 & *MIN( 1. _d 0, RSD*snowFld(i,j) )
194 ENDDO
195 ENDDO
196 ENDIF
197
198 ENDIF
199
200 c ENDIF
201
202 #endif /* ALLOW_LAND */
203 #endif /* ALLOW_AIM */
204
205 RETURN
206 END

  ViewVC Help
Powered by ViewVC 1.1.22