--- trunk/dyn3d/dteta1.f 2014/03/06 18:10:03 87 +++ trunk/dyn3d/dteta1.f 2014/03/11 15:09:02 88 @@ -1,46 +1,51 @@ -SUBROUTINE dteta1(teta, pbaru, pbarv, dteta) +module dteta1_m - ! From LMDZ4/libf/dyn3d/dteta1.F, version 1.1.1.1 2004/05/19 12:53:06 - ! Auteurs : P. Le Van, F. Forget + IMPLICIT NONE - ! Calcul du terme de convergence horizontale du flux d'enthalpie - ! potentielle. +contains - ! dteta est un argument de sortie pour le s-pg + SUBROUTINE dteta1(teta, pbaru, pbarv, dteta) - use dimens_m - use paramet_m - use conf_gcm_m - use filtreg_m, only: filtreg + ! From LMDZ4/libf/dyn3d/dteta1.F, version 1.1.1.1, 2004/05/19 12:53:06 + ! Authors: P. Le Van, F. Forget - IMPLICIT NONE + ! Calcul du terme de convergence horizontale du flux d'enthalpie + ! potentielle. + + USE dimens_m, ONLY: iim, llm + USE paramet_m, ONLY: iip1, iip2, ip1jm, ip1jmp1, jjp1 + USE filtreg_m, ONLY: filtreg + + REAL, intent(in):: teta(ip1jmp1, llm) + REAL, intent(in):: pbaru(ip1jmp1, llm), pbarv(ip1jm, llm) + REAL, intent(out):: dteta(ip1jmp1, llm) - REAL, intent(in):: teta(ip1jmp1, llm), pbaru(ip1jmp1, llm), pbarv(ip1jm, llm) - REAL dteta(ip1jmp1, llm) - INTEGER l, ij + ! Local: + INTEGER l, ij + REAL hbyv(ip1jm, llm), hbxu(ip1jmp1, llm) - REAL hbyv(ip1jm, llm), hbxu(ip1jmp1, llm) + !---------------------------------------------------------------- - !---------------------------------------------------------------- + DO l = 1, llm + DO ij = iip2, ip1jm - 1 + hbxu(ij, l) = pbaru(ij, l) * 0.5 * (teta(ij, l) + teta(ij + 1, l)) + end DO - DO l = 1, llm - DO ij = iip2, ip1jm - 1 - hbxu(ij, l) = pbaru(ij, l) * 0.5 * (teta(ij, l) + teta(ij + 1, l)) - end DO + DO ij = iip1+ iip1, ip1jm, iip1 + hbxu(ij, l) = hbxu(ij - iim, l) + end DO - DO ij = iip1+ iip1, ip1jm, iip1 - hbxu(ij, l) = hbxu(ij - iim, l) - end DO + DO ij = 1, ip1jm + hbyv(ij, l)= pbarv(ij, l) * 0.5 * (teta(ij, l) + teta(ij + iip1, l)) + end DO + end DO - DO ij = 1, ip1jm - hbyv(ij, l)= pbarv(ij, l) * 0.5 * (teta(ij, l) + teta(ij + iip1, l)) - end DO - end DO + CALL convflu(hbxu, hbyv, llm, dteta) - CALL convflu(hbxu, hbyv, llm, dteta) + ! stockage dans dh de la convergence horizontale filtrée du flux + ! d'enthalpie potentielle + CALL filtreg(dteta, jjp1, llm, 2, 2, .true.) - ! stockage dans dh de la convergence horizont. filtree' du flux - ! d'enthalpie potentielle - CALL filtreg(dteta, jjp1, llm, 2, 2, .true.) + END SUBROUTINE dteta1 -END SUBROUTINE dteta1 +end module dteta1_m