Changeset 5158 for LMDZ6/branches/Amaury_dev/libf/phylmd/yamada_c.F90
- Timestamp:
- Aug 2, 2024, 2:12:03 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/yamada_c.F90
r5144 r5158 162 162 zt(:, :) = pt(:, :) + zalpha * d_t(:, :) 163 163 164 dok = 1, klev164 DO k = 1, klev 165 165 exner(:, k) = (play(:, k) / plev(:, 1))**RKAPPA 166 166 masse(:, k) = (plev(:, k) - plev(:, k + 1)) / RG … … 170 170 ! Atmospheric mass at layer interfaces, where the TKE is computed 171 171 masseb(:, :) = 0. 172 dok = 1, klev172 DO k = 1, klev 173 173 masseb(:, k) = masseb(:, k) + masse(:, k) 174 174 masseb(:, k + 1) = masseb(:, k + 1) + masse(:, k) … … 178 178 zlev(:, 1) = 0. 179 179 zlay(:, 1) = RCPD * teta(:, 1) * (1. - exner(:, 1)) 180 dok = 1, klev - 1180 DO k = 1, klev - 1 181 181 zlay(:, k + 1) = zlay(:, k) + 0.5 * RCPD * (teta(:, k) + teta(:, k + 1)) * (exner(:, k) - exner(:, k + 1)) / RG 182 182 zlev(:, k) = 0.5 * (zlay(:, k) + zlay(:, k + 1)) ! PASBO … … 187 187 fluxt(:, klev + 1) = 0. 188 188 189 dok = klev, 1, -1189 DO k = klev, 1, -1 190 190 fluxu(:, k) = fluxu(:, k + 1) + masse(:, k) * d_u(:, k) 191 191 fluxv(:, k) = fluxv(:, k + 1) + masse(:, k) * d_v(:, k) … … 197 197 dddt(:, 1) = (exner(:, 1) - 1.) * fluxt(:, 1) 198 198 199 dok = 2, klev199 DO k = 2, klev 200 200 dddu(:, k) = (zu(:, k) - zu(:, k - 1)) * fluxu(:, k) 201 201 dddv(:, k) = (zv(:, k) - zv(:, k - 1)) * fluxv(:, k) … … 263 263 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 264 264 265 dok = 2, klev266 doig = 1, ngrid265 DO k = 2, klev 266 DO ig = 1, ngrid 267 267 dz(ig, k) = zlay(ig, k) - zlay(ig, k - 1) 268 268 m2(ig, k) = ((zu(ig, k) - zu(ig, k - 1))**2 + (zv(ig, k) - zv(ig, k - 1))**2) / (dz(ig, k) * dz(ig, k)) … … 301 301 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 302 302 303 doig = 1, ngrid303 DO ig = 1, ngrid 304 304 sq(ig) = 1.e-10 305 305 sqz(ig) = 1.e-10 306 306 enddo 307 dok = 2, klev - 1308 doig = 1, ngrid307 DO k = 2, klev - 1 308 DO ig = 1, ngrid 309 309 zq = sqrt(q2(ig, k)) 310 310 sqz(ig) = sqz(ig) + zq * zlev(ig, k) * (zlay(ig, k) - zlay(ig, k - 1)) … … 312 312 enddo 313 313 enddo 314 doig = 1, ngrid314 DO ig = 1, ngrid 315 315 l0(ig) = 0.2 * sqz(ig) / sq(ig) 316 316 enddo 317 dok = 2, klev318 doig = 1, ngrid317 DO k = 2, klev 318 DO ig = 1, ngrid 319 319 l(ig, k) = fl(zlev(ig, k), l0(ig), q2(ig, k), n2(ig, k)) 320 320 enddo … … 329 329 330 330 l0(:) = 150. 331 dok = 2, klev332 doig = 1, ngrid331 DO k = 2, klev 332 DO ig = 1, ngrid 333 333 l(ig, k) = fl(zlev(ig, k), l0(ig), q2(ig, k), n2(ig, k)) 334 334 enddo
Note: See TracChangeset
for help on using the changeset viewer.