Changeset 142 for palm/trunk
- Timestamp:
- Dec 4, 2007 12:36:44 PM (17 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/CURRENT_MODIFICATIONS
r139 r142 12 12 ------ 13 13 14 Bugfix: remove IF statement in plant_canopy_model_ij 15 Bugfix: divide sums(k,8) (e) and sums(k,34) (e*) by ngp_2dh_s_inner(k,sr) 16 (like other scalars) 14 17 18 flow_statistics, plant_canopy_model 19 -
palm/trunk/SOURCE/flow_statistics.f90
r139 r142 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Bugfix: divide sums(k,8) (e) and sums(k,34) (e*) by ngp_2dh_s_inner(k,sr) 7 ! (like other scalars) 7 8 ! 8 9 ! Former revisions: … … 785 786 DO k = nzb, nzt+1 786 787 sums(k,3) = sums(k,3) / ngp_2dh(sr) 787 sums(k, 9:11) = sums(k,9:11) / ngp_2dh_s_inner(k,sr)788 sums(k,8:11) = sums(k,8:11) / ngp_2dh_s_inner(k,sr) 788 789 sums(k,12:22) = sums(k,12:22) / ngp_2dh(sr) 789 790 sums(k,23:29) = sums(k,23:29) / ngp_2dh_s_inner(k,sr) 790 791 sums(k,30:32) = sums(k,30:32) / ngp_2dh(sr) 791 sums(k,33 ) = sums(k,33)/ ngp_2dh_s_inner(k,sr)792 sums(k,3 4:39) = sums(k,34:39) / ngp_2dh(sr)792 sums(k,33:34) = sums(k,33:34) / ngp_2dh_s_inner(k,sr) 793 sums(k,35:39) = sums(k,35:39) / ngp_2dh(sr) 793 794 sums(k,40) = sums(k,40) / ngp_2dh_s_inner(k,sr) 794 795 sums(k,45:53) = sums(k,45:53) / ngp_2dh(sr) -
palm/trunk/SOURCE/plant_canopy_model.f90
r139 r142 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Bugfix: remove IF statement in plant_canopy_model_ij 7 7 ! 8 8 ! Former revisions: … … 166 166 INTEGER :: component, i, j, k 167 167 168 IF ( drag_coefficient /= 0.0 ) THEN 169 170 ! 171 !-- Compute drag for the three velocity components 172 SELECT CASE ( component ) 173 174 ! 175 !-- u-component 176 CASE ( 1 ) 177 DO k = nzb_u_inner(j,i)+1, pch_index 178 tend(k,j,i) = tend(k,j,i) - & 179 cdc(k,j,i) * lad_u(k,j,i) * & 180 SQRT( u(k,j,i)**2 + & 181 ( ( v(k,j,i-1) + & 182 v(k,j,i) + & 183 v(k,j+1,i) + & 184 v(k,j+1,i+1) ) & 185 / 4.0 )**2 + & 186 ( ( w(k-1,j,i-1) + & 187 w(k-1,j,i) + & 188 w(k,j,i-1) + & 189 w(k,j,i) ) & 190 / 4.0 )**2 ) * & 191 u(k,j,i) 192 ENDDO 193 194 ! 195 !-- v-component 196 CASE ( 2 ) 197 DO k = nzb_v_inner(j,i)+1, pch_index 198 tend(k,j,i) = tend(k,j,i) - & 199 cdc(k,j,i) * lad_v(k,j,i) * & 200 SQRT( ( ( u(k,j-1,i) + & 201 u(k,j-1,i+1) + & 202 u(k,j,i) + & 203 u(k,j,i+1) ) & 204 / 4.0 )**2 + & 205 v(k,j,i)**2 + & 206 ( ( w(k-1,j-1,i) + & 207 w(k-1,j,i) + & 208 w(k,j-1,i) + & 209 w(k,j,i) ) & 210 / 4.0 )**2 ) * & 211 v(k,j,i) 212 ENDDO 213 214 ! 215 !-- w-component 216 CASE ( 3 ) 217 DO k = nzb_w_inner(j,i)+1, pch_index 218 tend(k,j,i) = tend(k,j,i) - & 219 cdc(k,j,i) * lad_w(k,j,i) * & 220 SQRT( ( ( u(k,j,i) + & 221 u(k,j,i+1) + & 222 u(k+1,j,i) + & 223 u(k+1,j,i+1) ) & 224 / 4.0 )**2 + & 225 ( ( v(k,j,i) + & 226 v(k,j+1,i) + & 227 v(k+1,j,i) + & 228 v(k+1,j+1,i) ) & 229 / 4.0 )**2 + & 230 w(k,j,i)**2 ) * & 231 w(k,j,i) 168 ! 169 !-- Compute drag for the three velocity components 170 SELECT CASE ( component ) 171 172 ! 173 !-- u-component 174 CASE ( 1 ) 175 DO k = nzb_u_inner(j,i)+1, pch_index 176 tend(k,j,i) = tend(k,j,i) - & 177 cdc(k,j,i) * lad_u(k,j,i) * & 178 SQRT( u(k,j,i)**2 + & 179 ( ( v(k,j,i-1) + & 180 v(k,j,i) + & 181 v(k,j+1,i) + & 182 v(k,j+1,i+1) ) & 183 / 4.0 )**2 + & 184 ( ( w(k-1,j,i-1) + & 185 w(k-1,j,i) + & 186 w(k,j,i-1) + & 187 w(k,j,i) ) & 188 / 4.0 )**2 ) * & 189 u(k,j,i) 190 ENDDO 191 192 ! 193 !-- v-component 194 CASE ( 2 ) 195 DO k = nzb_v_inner(j,i)+1, pch_index 196 tend(k,j,i) = tend(k,j,i) - & 197 cdc(k,j,i) * lad_v(k,j,i) * & 198 SQRT( ( ( u(k,j-1,i) + & 199 u(k,j-1,i+1) + & 200 u(k,j,i) + & 201 u(k,j,i+1) ) & 202 / 4.0 )**2 + & 203 v(k,j,i)**2 + & 204 ( ( w(k-1,j-1,i) + & 205 w(k-1,j,i) + & 206 w(k,j-1,i) + & 207 w(k,j,i) ) & 208 / 4.0 )**2 ) * & 209 v(k,j,i) 210 ENDDO 211 212 ! 213 !-- w-component 214 CASE ( 3 ) 215 DO k = nzb_w_inner(j,i)+1, pch_index 216 tend(k,j,i) = tend(k,j,i) - & 217 cdc(k,j,i) * lad_w(k,j,i) * & 218 SQRT( ( ( u(k,j,i) + & 219 u(k,j,i+1) + & 220 u(k+1,j,i) + & 221 u(k+1,j,i+1) ) & 222 / 4.0 )**2 + & 223 ( ( v(k,j,i) + & 224 v(k,j+1,i) + & 225 v(k+1,j,i) + & 226 v(k+1,j+1,i) ) & 227 / 4.0 )**2 + & 228 w(k,j,i)**2 ) * & 229 w(k,j,i) 232 230 233 ENDDO 234 235 ! 236 !-- sgs-tke 237 CASE ( 4 ) 238 DO k = nzb_s_inner(j,i)+1, pch_index 239 tend(k,j,i) = tend(k,j,i) - & 240 2.0 * cdc(k,j,i) * lad_s(k,j,i) * & 241 SQRT( ( ( u(k,j,i) + & 242 u(k,j,i+1) ) & 243 / 2.0 )**2 + & 244 ( ( v(k,j,i) + & 245 v(k,j+1,i) ) & 246 / 2.0 )**2 + & 247 ( ( w(k,j,i) + & 248 w(k+1,j,i) ) & 249 / 2.0 )**2 ) * & 250 e(k,j,i) 251 252 ENDDO 253 254 CASE DEFAULT 255 256 IF ( myid == 0 ) PRINT*,'+++ pcm: wrong component: ', & 257 component 258 CALL local_stop 259 260 END SELECT 261 262 ENDIF 231 ENDDO 232 233 ! 234 !-- sgs-tke 235 CASE ( 4 ) 236 DO k = nzb_s_inner(j,i)+1, pch_index 237 tend(k,j,i) = tend(k,j,i) - & 238 2.0 * cdc(k,j,i) * lad_s(k,j,i) * & 239 SQRT( ( ( u(k,j,i) + & 240 u(k,j,i+1) ) & 241 / 2.0 )**2 + & 242 ( ( v(k,j,i) + & 243 v(k,j+1,i) ) & 244 / 2.0 )**2 + & 245 ( ( w(k,j,i) + & 246 w(k+1,j,i) ) & 247 / 2.0 )**2 ) * & 248 e(k,j,i) 249 ENDDO 250 251 CASE DEFAULT 252 253 IF ( myid == 0 ) PRINT*,'+++ pcm: wrong component: ', & 254 component 255 CALL local_stop 256 257 END SELECT 263 258 264 259 END SUBROUTINE plant_canopy_model_ij
Note: See TracChangeset
for help on using the changeset viewer.