[5186] | 1 | MODULE lmdz_caladvtrac |
---|
| 2 | IMPLICIT NONE; PRIVATE |
---|
| 3 | PUBLIC caladvtrac |
---|
[5099] | 4 | |
---|
[5186] | 5 | CONTAINS |
---|
[5159] | 6 | |
---|
[5186] | 7 | SUBROUTINE caladvtrac(q, pbaru, pbarv, & |
---|
| 8 | p, masse, dq, teta, & |
---|
| 9 | flxw, pk) |
---|
[5159] | 10 | |
---|
[5186] | 11 | USE lmdz_infotrac, ONLY: nqtot |
---|
| 12 | USE control_mod, ONLY: iapp_tracvl, planet_type |
---|
| 13 | USE comconst_mod, ONLY: dtvr |
---|
| 14 | USE lmdz_filtreg, ONLY: filtreg |
---|
| 15 | USE lmdz_ssum_scopy, ONLY: scopy |
---|
[5159] | 16 | |
---|
[5186] | 17 | USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm |
---|
| 18 | USE lmdz_paramet |
---|
| 19 | USE lmdz_advtrac, ONLY: advtrac |
---|
[524] | 20 | |
---|
[5186] | 21 | IMPLICIT NONE |
---|
[5159] | 22 | |
---|
[5186] | 23 | ! Auteurs: F.Hourdin , P.Le Van, F.Forget, F.Codron |
---|
[5159] | 24 | |
---|
[5186] | 25 | ! F.Codron (10/99) : ajout humidite specifique pour eau vapeur |
---|
| 26 | !======================================================================= |
---|
[5159] | 27 | |
---|
[5186] | 28 | ! Shema de Van Leer |
---|
[5159] | 29 | |
---|
[5186] | 30 | !======================================================================= |
---|
[524] | 31 | |
---|
| 32 | |
---|
[5159] | 33 | |
---|
| 34 | |
---|
[5186] | 35 | ! Arguments: |
---|
| 36 | ! ---------- |
---|
| 37 | REAL :: pbaru(ip1jmp1, llm), pbarv(ip1jm, llm), masse(ip1jmp1, llm) |
---|
| 38 | REAL :: p(ip1jmp1, llmp1), q(ip1jmp1, llm, nqtot) |
---|
| 39 | REAL :: dq(ip1jmp1, llm, nqtot) |
---|
| 40 | REAL :: teta(ip1jmp1, llm), pk(ip1jmp1, llm) |
---|
| 41 | REAL :: flxw(ip1jmp1, llm) |
---|
[524] | 42 | |
---|
[5186] | 43 | ! .................................................................. |
---|
[5159] | 44 | |
---|
[5186] | 45 | ! .. dq n'est utilise et dimensionne que pour l'eau vapeur et liqu. |
---|
[5159] | 46 | |
---|
[5186] | 47 | ! .................................................................. |
---|
[5159] | 48 | |
---|
[5186] | 49 | ! Local: |
---|
| 50 | ! ------ |
---|
[524] | 51 | |
---|
[5186] | 52 | EXTERNAL minmaxq, qminimum |
---|
| 53 | INTEGER :: ij, l, iq, iapptrac |
---|
| 54 | REAL :: finmasse(ip1jmp1, llm), dtvrtrac |
---|
[524] | 55 | |
---|
[5186] | 56 | !c |
---|
[5159] | 57 | |
---|
[5186] | 58 | ! Earth-specific stuff for the first 2 tracers (water) |
---|
| 59 | IF (planet_type=="earth") THEN |
---|
| 60 | ! initialisation |
---|
| 61 | ! CRisi: il faut gérer tous les traceurs si on veut pouvoir faire des |
---|
| 62 | ! isotopes |
---|
| 63 | ! dq(:,:,1:2)=q(:,:,1:2) |
---|
| 64 | dq(:, :, 1:nqtot) = q(:, :, 1:nqtot) |
---|
[524] | 65 | |
---|
[5186] | 66 | ! test des valeurs minmax |
---|
| 67 | !c CALL minmaxq(q(1,1,1),1.e33,-1.e33,'Eau vapeur (a) ') |
---|
| 68 | !c CALL minmaxq(q(1,1,2),1.e33,-1.e33,'Eau liquide(a) ') |
---|
| 69 | ENDIF ! of if (planet_type.EQ."earth") |
---|
| 70 | ! advection |
---|
[1454] | 71 | |
---|
[5186] | 72 | CALL advtrac(pbaru, pbarv, & |
---|
| 73 | p, masse, q, iapptrac, teta, & |
---|
| 74 | flxw, pk) |
---|
[524] | 75 | |
---|
[5186] | 76 | ! |
---|
[524] | 77 | |
---|
[5186] | 78 | IF(iapptrac==iapp_tracvl) THEN |
---|
| 79 | IF (planet_type=="earth") THEN |
---|
| 80 | ! Earth-specific treatment for the first 2 tracers (water) |
---|
[5159] | 81 | |
---|
[5186] | 82 | !c CALL minmaxq(q(1,1,1),1.e33,-1.e33,'Eau vapeur ') |
---|
| 83 | !c CALL minmaxq(q(1,1,2),1.e33,-1.e33,'Eau liquide ') |
---|
[524] | 84 | |
---|
[5186] | 85 | !c .... Calcul de deltap qu'on stocke dans finmasse ... |
---|
[5159] | 86 | |
---|
[5186] | 87 | DO l = 1, llm |
---|
| 88 | DO ij = 1, ip1jmp1 |
---|
| 89 | finmasse(ij, l) = p(ij, l) - p(ij, l + 1) |
---|
| 90 | ENDDO |
---|
[5103] | 91 | ENDDO |
---|
[2270] | 92 | |
---|
[5186] | 93 | !WRITE(*,*) 'caladvtrac 87' |
---|
| 94 | CALL qminimum(q, nqtot, finmasse) |
---|
| 95 | !WRITE(*,*) 'caladvtrac 89' |
---|
[524] | 96 | |
---|
[5186] | 97 | CALL SCOPY (ip1jmp1 * llm, masse, 1, finmasse, 1) |
---|
| 98 | CALL filtreg (finmasse, jjp1, llm, -2, 2, .TRUE., 1) |
---|
[5159] | 99 | |
---|
[5186] | 100 | ! ***** Calcul de dq pour l'eau , pour le passer a la physique ****** |
---|
| 101 | ! ******************************************************************** |
---|
[5159] | 102 | |
---|
[5186] | 103 | dtvrtrac = iapp_tracvl * dtvr |
---|
[5159] | 104 | |
---|
[5186] | 105 | DO iq = 1, nqtot |
---|
| 106 | DO l = 1, llm |
---|
| 107 | DO ij = 1, ip1jmp1 |
---|
| 108 | dq(ij, l, iq) = (q(ij, l, iq) - dq(ij, l, iq)) * finmasse(ij, l) & |
---|
| 109 | / dtvrtrac |
---|
| 110 | ENDDO |
---|
[5103] | 111 | ENDDO |
---|
| 112 | ENDDO |
---|
[5159] | 113 | |
---|
[5186] | 114 | endif ! of if (planet_type.EQ."earth") |
---|
| 115 | ELSE |
---|
| 116 | IF (planet_type=="earth") THEN |
---|
| 117 | ! Earth-specific treatment for the first 2 tracers (water) |
---|
| 118 | dq(:, :, 1:nqtot) = 0. |
---|
| 119 | endif ! of if (planet_type.EQ."earth") |
---|
| 120 | ENDIF ! of IF( iapptrac.EQ.iapp_tracvl ) |
---|
[524] | 121 | |
---|
[5186] | 122 | END SUBROUTINE caladvtrac |
---|
[524] | 123 | |
---|
[5103] | 124 | |
---|
[5186] | 125 | END MODULE lmdz_caladvtrac |
---|