[524] | 1 | ! |
---|
| 2 | ! $Header$ |
---|
| 3 | ! |
---|
| 4 | SUBROUTINE inidissip ( lstardis,nitergdiv,nitergrot,niterh , |
---|
| 5 | * tetagdiv,tetagrot,tetatemp ) |
---|
| 6 | c======================================================================= |
---|
| 7 | c initialisation de la dissipation horizontale |
---|
| 8 | c======================================================================= |
---|
| 9 | c----------------------------------------------------------------------- |
---|
| 10 | c declarations: |
---|
| 11 | c ------------- |
---|
| 12 | |
---|
| 13 | IMPLICIT NONE |
---|
| 14 | #include "dimensions.h" |
---|
| 15 | #include "paramet.h" |
---|
| 16 | #include "comdissipn.h" |
---|
| 17 | #include "comconst.h" |
---|
| 18 | #include "comvert.h" |
---|
| 19 | #include "control.h" |
---|
| 20 | |
---|
| 21 | LOGICAL lstardis |
---|
| 22 | INTEGER nitergdiv,nitergrot,niterh |
---|
| 23 | REAL tetagdiv,tetagrot,tetatemp |
---|
| 24 | REAL fact,zvert(llm),zz |
---|
| 25 | REAL zh(ip1jmp1),zu(ip1jmp1),zv(ip1jm),deltap(ip1jmp1,llm) |
---|
| 26 | REAL ullm,vllm,umin,vmin,zhmin,zhmax |
---|
| 27 | REAL zllm,z1llm |
---|
| 28 | |
---|
| 29 | INTEGER l,ij,idum,ii |
---|
| 30 | REAL tetamin |
---|
| 31 | |
---|
| 32 | REAL ran1 |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | c----------------------------------------------------------------------- |
---|
| 36 | c |
---|
| 37 | c calcul des valeurs propres des operateurs par methode iterrative: |
---|
| 38 | c ----------------------------------------------------------------- |
---|
| 39 | |
---|
| 40 | crot = -1. |
---|
| 41 | cdivu = -1. |
---|
| 42 | cdivh = -1. |
---|
| 43 | |
---|
| 44 | c calcul de la valeur propre de divgrad: |
---|
| 45 | c -------------------------------------- |
---|
| 46 | idum = 0 |
---|
| 47 | DO l = 1, llm |
---|
| 48 | DO ij = 1, ip1jmp1 |
---|
| 49 | deltap(ij,l) = 1. |
---|
| 50 | ENDDO |
---|
| 51 | ENDDO |
---|
| 52 | |
---|
| 53 | idum = -1 |
---|
| 54 | zh(1) = RAN1(idum)-.5 |
---|
| 55 | idum = 0 |
---|
| 56 | DO ij = 2, ip1jmp1 |
---|
| 57 | zh(ij) = RAN1(idum) -.5 |
---|
| 58 | ENDDO |
---|
| 59 | |
---|
| 60 | CALL filtreg (zh,jjp1,1,2,1,.TRUE.,1) |
---|
| 61 | |
---|
| 62 | CALL minmax(iip1*jjp1,zh,zhmin,zhmax ) |
---|
| 63 | |
---|
| 64 | IF ( zhmin .GE. zhmax ) THEN |
---|
| 65 | PRINT*,' Inidissip zh min max ',zhmin,zhmax |
---|
| 66 | STOP'probleme generateur alleatoire dans inidissip' |
---|
| 67 | ENDIF |
---|
| 68 | |
---|
| 69 | zllm = ABS( zhmax ) |
---|
| 70 | DO l = 1,50 |
---|
| 71 | IF(lstardis) THEN |
---|
| 72 | CALL divgrad2(1,zh,deltap,niterh,zh) |
---|
| 73 | ELSE |
---|
| 74 | CALL divgrad (1,zh,niterh,zh) |
---|
| 75 | ENDIF |
---|
| 76 | |
---|
| 77 | CALL minmax(iip1*jjp1,zh,zhmin,zhmax ) |
---|
| 78 | |
---|
| 79 | zllm = ABS( zhmax ) |
---|
| 80 | z1llm = 1./zllm |
---|
| 81 | DO ij = 1,ip1jmp1 |
---|
| 82 | zh(ij) = zh(ij)* z1llm |
---|
| 83 | ENDDO |
---|
| 84 | ENDDO |
---|
| 85 | |
---|
| 86 | IF(lstardis) THEN |
---|
| 87 | cdivh = 1./ zllm |
---|
| 88 | ELSE |
---|
| 89 | cdivh = zllm ** ( -1./niterh ) |
---|
| 90 | ENDIF |
---|
| 91 | |
---|
| 92 | c calcul des valeurs propres de gradiv (ii =1) et nxgrarot(ii=2) |
---|
| 93 | c ----------------------------------------------------------------- |
---|
| 94 | print*,'calcul des valeurs propres' |
---|
| 95 | |
---|
| 96 | DO 20 ii = 1, 2 |
---|
| 97 | c |
---|
| 98 | DO ij = 1, ip1jmp1 |
---|
| 99 | zu(ij) = RAN1(idum) -.5 |
---|
| 100 | ENDDO |
---|
| 101 | CALL filtreg (zu,jjp1,1,2,1,.TRUE.,1) |
---|
| 102 | DO ij = 1, ip1jm |
---|
| 103 | zv(ij) = RAN1(idum) -.5 |
---|
| 104 | ENDDO |
---|
| 105 | CALL filtreg (zv,jjm,1,2,1,.FALSE.,1) |
---|
| 106 | |
---|
| 107 | CALL minmax(iip1*jjp1,zu,umin,ullm ) |
---|
| 108 | CALL minmax(iip1*jjm, zv,vmin,vllm ) |
---|
| 109 | |
---|
| 110 | ullm = ABS ( ullm ) |
---|
| 111 | vllm = ABS ( vllm ) |
---|
| 112 | |
---|
| 113 | DO 5 l = 1, 50 |
---|
| 114 | IF(ii.EQ.1) THEN |
---|
| 115 | ccccc CALL covcont( 1,zu,zv,zu,zv ) |
---|
| 116 | IF(lstardis) THEN |
---|
| 117 | CALL gradiv2( 1,zu,zv,nitergdiv,zu,zv ) |
---|
| 118 | ELSE |
---|
| 119 | CALL gradiv ( 1,zu,zv,nitergdiv,zu,zv ) |
---|
| 120 | ENDIF |
---|
| 121 | ELSE |
---|
| 122 | IF(lstardis) THEN |
---|
| 123 | CALL nxgraro2( 1,zu,zv,nitergrot,zu,zv ) |
---|
| 124 | ELSE |
---|
| 125 | CALL nxgrarot( 1,zu,zv,nitergrot,zu,zv ) |
---|
| 126 | ENDIF |
---|
| 127 | ENDIF |
---|
| 128 | |
---|
| 129 | CALL minmax(iip1*jjp1,zu,umin,ullm ) |
---|
| 130 | CALL minmax(iip1*jjm, zv,vmin,vllm ) |
---|
| 131 | |
---|
| 132 | ullm = ABS ( ullm ) |
---|
| 133 | vllm = ABS ( vllm ) |
---|
| 134 | |
---|
| 135 | zllm = MAX( ullm,vllm ) |
---|
| 136 | z1llm = 1./ zllm |
---|
| 137 | DO ij = 1, ip1jmp1 |
---|
| 138 | zu(ij) = zu(ij)* z1llm |
---|
| 139 | ENDDO |
---|
| 140 | DO ij = 1, ip1jm |
---|
| 141 | zv(ij) = zv(ij)* z1llm |
---|
| 142 | ENDDO |
---|
| 143 | 5 CONTINUE |
---|
| 144 | |
---|
| 145 | IF ( ii.EQ.1 ) THEN |
---|
| 146 | IF(lstardis) THEN |
---|
| 147 | cdivu = 1./zllm |
---|
| 148 | ELSE |
---|
| 149 | cdivu = zllm **( -1./nitergdiv ) |
---|
| 150 | ENDIF |
---|
| 151 | ELSE |
---|
| 152 | IF(lstardis) THEN |
---|
| 153 | crot = 1./ zllm |
---|
| 154 | ELSE |
---|
| 155 | crot = zllm **( -1./nitergrot ) |
---|
| 156 | ENDIF |
---|
| 157 | ENDIF |
---|
| 158 | |
---|
| 159 | 20 CONTINUE |
---|
| 160 | |
---|
| 161 | c petit test pour les operateurs non star: |
---|
| 162 | c ---------------------------------------- |
---|
| 163 | |
---|
| 164 | c IF(.NOT.lstardis) THEN |
---|
| 165 | fact = rad*24./float(jjm) |
---|
| 166 | fact = fact*fact |
---|
| 167 | PRINT*,'coef u ', fact/cdivu, 1./cdivu |
---|
| 168 | PRINT*,'coef r ', fact/crot , 1./crot |
---|
| 169 | PRINT*,'coef h ', fact/cdivh, 1./cdivh |
---|
| 170 | c ENDIF |
---|
| 171 | |
---|
| 172 | c----------------------------------------------------------------------- |
---|
| 173 | c variation verticale du coefficient de dissipation: |
---|
| 174 | c -------------------------------------------------- |
---|
| 175 | |
---|
| 176 | DO l=1,llm |
---|
| 177 | zvert(l)=1. |
---|
| 178 | ENDDO |
---|
| 179 | |
---|
| 180 | fact=2. |
---|
| 181 | c |
---|
| 182 | DO l = 1, llm |
---|
| 183 | zz = 1. - preff/presnivs(l) |
---|
| 184 | zvert(l)= fact -( fact-1.)/( 1.+zz*zz ) |
---|
| 185 | ENDDO |
---|
| 186 | |
---|
| 187 | |
---|
| 188 | PRINT*,'Constantes de temps de la diffusion horizontale' |
---|
| 189 | |
---|
| 190 | tetamin = 1.e+6 |
---|
| 191 | |
---|
| 192 | DO l=1,llm |
---|
| 193 | tetaudiv(l) = zvert(l)/tetagdiv |
---|
| 194 | tetaurot(l) = zvert(l)/tetagrot |
---|
| 195 | tetah(l) = zvert(l)/tetatemp |
---|
| 196 | |
---|
| 197 | IF( tetamin.GT. (1./tetaudiv(l)) ) tetamin = 1./ tetaudiv(l) |
---|
| 198 | IF( tetamin.GT. (1./tetaurot(l)) ) tetamin = 1./ tetaurot(l) |
---|
| 199 | IF( tetamin.GT. (1./ tetah(l)) ) tetamin = 1./ tetah(l) |
---|
| 200 | ENDDO |
---|
| 201 | |
---|
| 202 | PRINT *,' INIDI tetamin dtvr ',tetamin,dtvr,iperiod |
---|
| 203 | idissip = INT( tetamin/( 2.*dtvr*iperiod) ) * iperiod |
---|
| 204 | PRINT *,' INIDI tetamin idissip ',tetamin,idissip |
---|
| 205 | idissip = MAX(iperiod,idissip) |
---|
| 206 | dtdiss = idissip * dtvr |
---|
| 207 | PRINT *,' INIDI idissip dtdiss ',idissip,dtdiss |
---|
| 208 | |
---|
| 209 | DO l = 1,llm |
---|
| 210 | PRINT*,zvert(l),dtdiss*tetaudiv(l),dtdiss*tetaurot(l), |
---|
| 211 | * dtdiss*tetah(l) |
---|
| 212 | ENDDO |
---|
| 213 | |
---|
| 214 | c |
---|
| 215 | RETURN |
---|
| 216 | END |
---|