| [644] | 1 | SUBROUTINE moyglo_pondaire(nhori, champ, aire, |
|---|
| 2 | . ok_msk, msk, moyglo) |
|---|
| 3 | c |
|---|
| [704] | 4 | USE dimphy |
|---|
| [644] | 5 | IMPLICIT none |
|---|
| 6 | c |
|---|
| 7 | c ================================================================== |
|---|
| 8 | c I. Musat, 07.2004 |
|---|
| 9 | c |
|---|
| 10 | c Calcul moyenne globale ponderee par l'aire totale, avec ou sans masque |
|---|
| 11 | c |
|---|
| 12 | c moyenne = Somme_(champ* aire)/Somme_aire |
|---|
| 13 | c |
|---|
| 14 | c ================================================================== |
|---|
| 15 | c |
|---|
| 16 | #include "dimensions.h" |
|---|
| [704] | 17 | cym#include "dimphy.h" |
|---|
| [644] | 18 | INTEGER i, nhori |
|---|
| 19 | REAL champ(klon), aire(klon), msk(klon) |
|---|
| 20 | LOGICAL ok_msk |
|---|
| 21 | REAL moyglo |
|---|
| 22 | c |
|---|
| 23 | c var locale |
|---|
| 24 | REAL airetot |
|---|
| 25 | c |
|---|
| 26 | c PRINT*,'moyglo_pondaire nhori',nhori |
|---|
| 27 | c |
|---|
| 28 | airetot=0. |
|---|
| 29 | moyglo=0. |
|---|
| 30 | c |
|---|
| 31 | IF(ok_msk) THEN |
|---|
| 32 | DO i=1, nhori |
|---|
| 33 | c IF(msk(i).EQ.1.) THEN |
|---|
| 34 | IF(msk(i).GT.0.) THEN |
|---|
| 35 | c |
|---|
| 36 | c aire totale |
|---|
| 37 | airetot=airetot+aire(i)*msk(i) |
|---|
| 38 | c |
|---|
| 39 | c ponderation par la masse |
|---|
| 40 | moyglo=moyglo+champ(i)* aire(i)*msk(i) |
|---|
| 41 | ENDIF |
|---|
| 42 | ENDDO |
|---|
| 43 | c |
|---|
| 44 | ELSE !ok_msk |
|---|
| 45 | DO i=1, nhori |
|---|
| 46 | c |
|---|
| 47 | c aire totale |
|---|
| 48 | airetot=airetot+aire(i) |
|---|
| 49 | c |
|---|
| 50 | c ponderation par la masse |
|---|
| 51 | moyglo=moyglo+champ(i)* aire(i) |
|---|
| 52 | ENDDO |
|---|
| 53 | c |
|---|
| 54 | ENDIF |
|---|
| 55 | c |
|---|
| 56 | c moyenne ponderee par l'aire |
|---|
| 57 | moyglo=moyglo/airetot |
|---|
| 58 | c |
|---|
| 59 | RETURN |
|---|
| 60 | END |
|---|
| 61 | c |
|---|
| 62 | SUBROUTINE moyglo_pondaima(nhori, nvert, champ, |
|---|
| 63 | . aire, pbord, moyglo) |
|---|
| [704] | 64 | USE dimphy |
|---|
| [644] | 65 | IMPLICIT none |
|---|
| 66 | c ================================================================== |
|---|
| 67 | c I. Musat, 07.2004 |
|---|
| 68 | c |
|---|
| 69 | c Calcul moyenne globale ponderee par la masse d'air, divisee par l'aire |
|---|
| 70 | c totale avec ou sans masque |
|---|
| 71 | c |
|---|
| 72 | c moyenne = Somme_(champ* masse_dair)/Somme_aire |
|---|
| 73 | c |
|---|
| 74 | c ================================================================== |
|---|
| 75 | #include "dimensions.h" |
|---|
| [704] | 76 | cym#include "dimphy.h" |
|---|
| [644] | 77 | #include "YOMCST.h" |
|---|
| 78 | INTEGER i, k, nhori, nvert |
|---|
| 79 | REAL champ(klon,klev), aire(klon) |
|---|
| 80 | REAL pbord(klon,klev+1) |
|---|
| 81 | REAL moyglo |
|---|
| 82 | c |
|---|
| 83 | c var locale |
|---|
| 84 | REAL airetot |
|---|
| 85 | c |
|---|
| 86 | c PRINT*,'moyglo_pondaima RG, nhori, nvert',RG,nhori,nvert |
|---|
| 87 | c |
|---|
| 88 | c ponderation par la masse |
|---|
| 89 | moyglo=0. |
|---|
| 90 | DO k=1, nvert |
|---|
| 91 | DO i=1, nhori |
|---|
| 92 | moyglo=moyglo+ |
|---|
| 93 | . champ(i,k)*(pbord(i,k)-pbord(i,k+1))/RG*aire(i) |
|---|
| 94 | ENDDO |
|---|
| 95 | ENDDO |
|---|
| 96 | c |
|---|
| 97 | c aire totale |
|---|
| 98 | airetot=0. |
|---|
| 99 | DO i=1, nhori |
|---|
| 100 | airetot=airetot+aire(i) |
|---|
| 101 | ENDDO |
|---|
| 102 | c |
|---|
| 103 | c moyenne par mettre carre avec ponderation par la masse |
|---|
| 104 | moyglo=moyglo/airetot |
|---|
| 105 | c |
|---|
| 106 | RETURN |
|---|
| 107 | END |
|---|
| 108 | c |
|---|
| 109 | SUBROUTINE moyglo_pondmass(nhori, nvert, champ, |
|---|
| 110 | . aire, pbord, moyglo) |
|---|
| [704] | 111 | USE dimphy |
|---|
| [644] | 112 | IMPLICIT none |
|---|
| 113 | c ================================================================== |
|---|
| 114 | c I. Musat, 07.2004 |
|---|
| 115 | c |
|---|
| 116 | c Calcul moyenne globale ponderee par la masse d'air, divisee par la |
|---|
| 117 | c masse totale d'air, avec ou sans masque |
|---|
| 118 | c |
|---|
| 119 | c moyenne = Somme_(champ* masse_dair)/Somme_(masse_dair) |
|---|
| 120 | c |
|---|
| 121 | c ================================================================== |
|---|
| 122 | #include "dimensions.h" |
|---|
| [704] | 123 | cym#include "dimphy.h" |
|---|
| [644] | 124 | #include "YOMCST.h" |
|---|
| 125 | INTEGER i, k, nhori, nvert |
|---|
| 126 | REAL champ(klon,klev), aire(klon) |
|---|
| 127 | REAL pbord(klon,klev+1) |
|---|
| 128 | REAL moyglo |
|---|
| 129 | c |
|---|
| 130 | c var locale |
|---|
| 131 | REAL massetot |
|---|
| 132 | c |
|---|
| 133 | c PRINT*,'moyglo_pondmass RG, nhori, nvert',RG,nhori,nvert |
|---|
| 134 | c |
|---|
| 135 | c ponderation par la masse |
|---|
| 136 | moyglo=0. |
|---|
| 137 | DO k=1, nvert |
|---|
| 138 | DO i=1, nhori |
|---|
| 139 | moyglo=moyglo+ |
|---|
| 140 | . champ(i,k)*(pbord(i,k)-pbord(i,k+1))/RG*aire(i) |
|---|
| 141 | ENDDO |
|---|
| 142 | ENDDO |
|---|
| 143 | c |
|---|
| 144 | c masse totale |
|---|
| 145 | massetot=0. |
|---|
| 146 | DO k=1, nvert |
|---|
| 147 | DO i=1, nhori |
|---|
| 148 | massetot=massetot+ |
|---|
| 149 | . (pbord(i,k)-pbord(i,k+1))/RG*aire(i) |
|---|
| 150 | ENDDO |
|---|
| 151 | ENDDO |
|---|
| 152 | c |
|---|
| 153 | c moyenne par mettre carre avec ponderation par la masse |
|---|
| 154 | moyglo=moyglo/massetot |
|---|
| 155 | c |
|---|
| 156 | RETURN |
|---|
| 157 | END |
|---|
| 158 | c |
|---|