Changeset 1591 for trunk/LMDZ.COMMON/libf/dyn3d_common
- Timestamp:
- Aug 31, 2016, 4:31:29 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/dyn3d_common/cpdet_mod.F90
r1422 r1591 84 84 REAL,intent(out) :: yteta(npoints) 85 85 86 !---------------------- 87 ! ATMOSPHERE PROFONDE 88 real ypklim,ypklim2,mmm0 89 real ratio_mod(npoints) 90 integer k 91 ! theta_mod = theta * ratio_mod => ratio_mod = mmm0/mmm(p) 92 93 ypklim = cpp*( 6e6/9.2e6)**0.1914 94 ypklim2 = cpp*(8.9e6/9.2e6)**0.1914 95 mmm0 = 43.44 96 97 DO k = 1, npoints 98 ratio_mod(k) = 1. 99 if (ypk(k).gt.ypklim) then 100 ratio_mod(k) = mmm0 / & 101 & (mmm0+0.56*(log(ypklim/cpp)-log(ypk(k)/cpp)) & 102 & /(log(ypklim/cpp)-log(ypklim2/cpp))) 103 ratio_mod(k) = max(ratio_mod(k),mmm0/(mmm0+0.56)) 104 endif 105 ENDDO 106 !---------------------- 107 86 108 if (planet_type.eq."venus") then 87 109 yteta = yt**nu_venus & 88 110 & - nu_venus * t0_venus**nu_venus * log(ypk/cpp) 89 111 yteta = yteta**(1./nu_venus) 112 !---------------------- 113 ! ATMOSPHERE PROFONDE 114 yteta = yteta*ratio_mod 115 !---------------------- 116 90 117 else 91 118 yteta = yt * cpp/ypk … … 117 144 REAL,intent(out) :: yt(npoints) 118 145 119 if (planet_type.eq."venus") then 120 yt = yteta**nu_venus & 146 !---------------------- 147 ! ATMOSPHERE PROFONDE 148 real ypklim,ypklim2,mmm0 149 real ratio_mod(npoints) 150 integer k 151 ! theta_mod = theta * ratio_mod => ratio_mod = mmm0/mmm(p) 152 153 ypklim = cpp*( 6e6/9.2e6)**0.1914 154 ypklim2 = cpp*(8.9e6/9.2e6)**0.1914 155 mmm0 = 43.44 156 157 DO k = 1, npoints 158 ratio_mod(k) = 1. 159 if (ypk(k).gt.ypklim) then 160 ratio_mod(k) = mmm0 / & 161 & (mmm0+0.56*(log(ypklim/cpp)-log(ypk(k)/cpp)) & 162 & /(log(ypklim/cpp)-log(ypklim2/cpp))) 163 ratio_mod(k) = max(ratio_mod(k),mmm0/(mmm0+0.56)) 164 endif 165 ENDDO 166 !---------------------- 167 168 if (planet_type.eq."venus") then 169 170 !---------------------- 171 ! ATMOSPHERE PROFONDE 172 !---------------------- 173 yt = (yteta/ratio_mod)**nu_venus & 174 !---------------------- 121 175 & + nu_venus * t0_venus**nu_venus * log(ypk/cpp) 122 176 yt = yt**(1./nu_venus) … … 150 204 integer :: l 151 205 206 !---------------------- 207 ! ATMOSPHERE PROFONDE 208 real ypklim,ypklim2,mmm0 209 real ratio_mod(nlon,nlev) 210 integer k 211 ! theta_mod = theta * ratio_mod => ratio_mod = mmm0/mmm(p) 212 213 ypklim = cpp*( 6e6/9.2e6)**0.1914 214 ypklim2 = cpp*(8.9e6/9.2e6)**0.1914 215 mmm0 = 43.44 216 217 DO k = 1, nlon 218 DO l = 1, nlev 219 ratio_mod(k,l) = 1. 220 if (ypk(k,l).gt.ypklim) then 221 ratio_mod(k,l) = mmm0 / & 222 & (mmm0+0.56*(log(ypklim/cpp)-log(ypk(k,l)/cpp)) & 223 & /(log(ypklim/cpp)-log(ypklim2/cpp))) 224 ratio_mod(k,l) = max(ratio_mod(k,l),mmm0/(mmm0+0.56)) 225 endif 226 ENDDO 227 ENDDO 228 !---------------------- 229 152 230 if (planet_type.eq."venus") then 153 231 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) … … 157 235 & log(ypk(:,l)/cpp) 158 236 yteta(:,l)=yteta(:,l)**(1./nu_venus) 237 !---------------------- 238 ! ATMOSPHERE PROFONDE 239 yteta(:,l)=yteta(:,l)*ratio_mod(:,l) 240 !---------------------- 159 241 enddo 160 242 !$OMP END DO … … 191 273 integer :: jjb,jje 192 274 275 !---------------------- 276 ! ATMOSPHERE PROFONDE 277 real ypklim,ypklim2,mmm0 278 real ratio_mod(iip1,jjp1,llm) 279 integer i 280 ! theta_mod = theta * ratio_mod => ratio_mod = mmm0/mmm(p) 281 282 ypklim = cpp*( 6e6/9.2e6)**0.1914 283 ypklim2 = cpp*(8.9e6/9.2e6)**0.1914 284 mmm0 = 43.44 285 286 DO i = 1, iip1 287 DO j = 1, jjp1 288 DO l = 1, llm 289 ratio_mod(i,j,l) = 1. 290 if (ypk(i,j,l).gt.ypklim) then 291 ratio_mod(i,j,l) = mmm0 / & 292 & (mmm0+0.56*(log(ypklim/cpp)-log(ypk(i,j,l)/cpp)) & 293 & /(log(ypklim/cpp)-log(ypklim2/cpp))) 294 ratio_mod(i,j,l) = max(ratio_mod(i,j,l),mmm0/(mmm0+0.56)) 295 endif 296 ENDDO 297 ENDDO 298 ENDDO 299 !---------------------- 300 193 301 jjb=jj_begin 194 302 jje=jj_end … … 201 309 & log(ypk(:,jjb:jje,l)/cpp) 202 310 yteta(:,jjb:jje,l)=yteta(:,jjb:jje,l)**(1./nu_venus) 311 !---------------------- 312 ! ATMOSPHERE PROFONDE 313 yteta(:,jjb:jje,l)=yteta(:,jjb:jje,l)*ratio_mod(:,jjb:jje,l) 314 !---------------------- 203 315 enddo 204 316 !$OMP END DO … … 232 344 integer :: l 233 345 346 !---------------------- 347 ! ATMOSPHERE PROFONDE 348 real ypklim,ypklim2,mmm0 349 real ratio_mod(nlon,nlev) 350 integer k 351 ! theta_mod = theta * ratio_mod => ratio_mod = mmm0/mmm(p) 352 353 ypklim = cpp*( 6e6/9.2e6)**0.1914 354 ypklim2 = cpp*(8.9e6/9.2e6)**0.1914 355 mmm0 = 43.44 356 357 DO k = 1, nlon 358 DO l = 1, nlev 359 ratio_mod(k,l) = 1. 360 if (ypk(k,l).gt.ypklim) then 361 ratio_mod(k,l) = mmm0 / & 362 & (mmm0+0.56*(log(ypklim/cpp)-log(ypk(k,l)/cpp)) & 363 & /(log(ypklim/cpp)-log(ypklim2/cpp))) 364 ratio_mod(k,l) = max(ratio_mod(k,l),mmm0/(mmm0+0.56)) 365 endif 366 ENDDO 367 ENDDO 368 !---------------------- 369 234 370 if (planet_type.eq."venus") then 235 371 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 236 372 do l=1,nlev 237 yt(:,l)=yteta(:,l)**nu_venus & 373 !---------------------- 374 ! ATMOSPHERE PROFONDE 375 yt(:,l)=(yteta(:,l)/ratio_mod(:,l))**nu_venus & 376 !---------------------- 238 377 & +nu_venus*t0_venus**nu_venus* & 239 378 & log(ypk(:,l)/cpp) … … 272 411 integer :: jjb,jje 273 412 413 !---------------------- 414 ! ATMOSPHERE PROFONDE 415 real ypklim,ypklim2,mmm0 416 real ratio_mod(iip1,jjp1,llm) 417 integer i 418 ! theta_mod = theta * ratio_mod => ratio_mod = mmm0/mmm(p) 419 420 ypklim = cpp*( 6e6/9.2e6)**0.1914 421 ypklim2 = cpp*(8.9e6/9.2e6)**0.1914 422 mmm0 = 43.44 423 424 DO i = 1, iip1 425 DO j = 1, jjp1 426 DO l = 1, llm 427 ratio_mod(i,j,l) = 1. 428 if (ypk(i,j,l).gt.ypklim) then 429 ratio_mod(i,j,l) = mmm0 / & 430 & (mmm0+0.56*(log(ypklim/cpp)-log(ypk(i,j,l)/cpp)) & 431 & /(log(ypklim/cpp)-log(ypklim2/cpp))) 432 ratio_mod(i,j,l) = max(ratio_mod(i,j,l),mmm0/(mmm0+0.56)) 433 endif 434 ENDDO 435 ENDDO 436 ENDDO 437 !---------------------- 438 274 439 jjb=jj_begin 275 440 jje=jj_end … … 278 443 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 279 444 do l=1,llm 280 yt(:,jjb:jje,l)=yteta(:,jjb:jje,l)**nu_venus & 445 !---------------------- 446 ! ATMOSPHERE PROFONDE 447 yt(:,jjb:jje,l)= & 448 & (yteta(:,jjb:jje,l)/ratio_mod(:,jjb:jje,l))**nu_venus & 449 !---------------------- 281 450 & +nu_venus*t0_venus**nu_venus* & 282 451 & log(ypk(:,jjb:jje,l)/cpp)
Note: See TracChangeset
for help on using the changeset viewer.