--- trunk/libf/dyn3d/exner_hyb.f90 2011/02/22 13:49:36 40 +++ trunk/dyn3d/exner_hyb.f 2014/03/06 15:12:00 83 @@ -6,8 +6,7 @@ SUBROUTINE exner_hyb(ps, p, pks, pk, pkf) - ! From dyn3d/exner_hyb.F, v 1.1.1.1 2004/05/19 12:53:07 - + ! From dyn3d/exner_hyb.F, version 1.1.1.1 2004/05/19 12:53:07 ! Authors: P. Le Van, F. Hourdin ! Calcule la fonction d'Exner : @@ -17,21 +16,21 @@ ! "p(l)" et "p(l+1)", définies aux interfaces des couches. ! Au sommet de l'atmosphère : - ! p(llm+1) = 0. + ! p(llm+1) = 0 ! "ps" et "pks" sont la pression et la fonction d'Exner au sol. ! À partir des relations : !(1) \overline{p * \delta_z pk}^z = kappa * pk * \delta_z p !(2) pk(l) = beta(l) * pk(l-1) ! (cf. documentation), on détermine successivement, du haut vers - ! le bas des couches, les coefficients : beta(llm)..., beta(l)..., + ! le bas des couches, les coefficients : beta(llm), ..., beta(l), ..., ! beta(2) puis "pk(:, :, 1)". Ensuite, on calcule, du bas vers le ! haut des couches, "pk(:, :, l)" donné par la relation (2), pour ! l = 2 à l = llm. use dimens_m, only: iim, jjm, llm use comconst, only: kappa, cpp - use comvert, only: preff + use disvert_m, only: preff use comgeom, only: aire_2d, apoln, apols use filtreg_m, only: filtreg @@ -42,7 +41,7 @@ real, intent(out):: pk(iim + 1, jjm + 1, llm) real, intent(out), optional:: pkf(iim + 1, jjm + 1, llm) - ! Variables locales + ! Variables locales : real beta(iim + 1, jjm + 1, 2:llm) INTEGER l REAL unpl2k @@ -60,16 +59,15 @@ / (p(:, :, l) * unpl2k + p(:, :, l+1) * (beta(:, :, l+1) - unpl2k)) ENDDO - pk(:, :, 1) = p(:, :, 1) * pks & - / (p(:, :, 1) * (1. + kappa) & - + 0.5 * (beta(:, :, 2) - unpl2k) * p(:, :, 2)) + pk(:, :, 1) = ps * pks & + / (ps * (1. + kappa) + 0.5 * (beta(:, :, 2) - unpl2k) * p(:, :, 2)) DO l = 2, llm - pk(:, :, l) = beta(:, :, l) * pk(:, :, l-1) + pk(:, :, l) = beta(:, :, l) * pk(:, :, l - 1) ENDDO if (present(pkf)) then pkf = pk - CALL filtreg(pkf, jjm + 1, llm, 2, 1, .TRUE., 1) + CALL filtreg(pkf, jjm + 1, llm, 2, 1, .TRUE.) end if END SUBROUTINE exner_hyb