[57] | 1 | SUBROUTINE profile(unit,nlev,zkm,temp) |
---|
| 2 | IMPLICIT NONE |
---|
| 3 | c======================================================================= |
---|
| 4 | c Subroutine utilisee dans le modele 1-D "testphys1d" |
---|
| 5 | c pour l'initialisation du profil atmospherique |
---|
| 6 | c======================================================================= |
---|
| 7 | c |
---|
| 8 | c differents profils d'atmospheres. T=f(z) |
---|
| 9 | c entree: |
---|
| 10 | c unit unite de lecture de "testphys1d.def" |
---|
| 11 | c nlev nombre de niveaux |
---|
| 12 | c zkm alititudes en km |
---|
| 13 | c ichoice choix de l'atmosphere: |
---|
| 14 | c 1 Temperature constante |
---|
| 15 | c 2 profil Savidjari |
---|
| 16 | c 3 Lindner (profil polaire) |
---|
| 17 | c 4 Inversion pour Francois |
---|
| 18 | c 5 Seiff (moyen) |
---|
| 19 | c 6 T constante + perturbation gauss (level) (christophe 10/98) |
---|
| 20 | c 7 T constante + perturbation gauss (km) (christophe 10/98) |
---|
| 21 | c 8 Lecture du profile dans un fichier ASCII (profile) |
---|
| 22 | c tref temperature de reference |
---|
| 23 | c isin ajout d'une perturbation (isin=1) |
---|
| 24 | c pic pic perturbation gauss pour ichoice = 6 ou 7 |
---|
| 25 | c largeur largeur de la perturbation gauss pour ichoice = 6 ou 7 |
---|
| 26 | c hauteur hauteur de la perturbation gauss pour ichoice = 6 ou 7 |
---|
| 27 | c |
---|
| 28 | c sortie: |
---|
| 29 | c temp temperatures en K |
---|
| 30 | c |
---|
| 31 | c======================================================================= |
---|
| 32 | c----------------------------------------------------------------------- |
---|
| 33 | c declarations: |
---|
| 34 | c ------------- |
---|
| 35 | |
---|
| 36 | c arguments: |
---|
| 37 | c ---------- |
---|
| 38 | |
---|
| 39 | INTEGER nlev, unit |
---|
| 40 | REAL zkm(nlev),temp(nlev) |
---|
| 41 | |
---|
| 42 | c local: |
---|
| 43 | c ------ |
---|
| 44 | |
---|
| 45 | INTEGER il,ichoice,nseiff,iseiff,isin,iter |
---|
| 46 | REAL pi |
---|
| 47 | PARAMETER(nseiff=37) |
---|
| 48 | REAL tref,t1,t2,t3,ww |
---|
| 49 | REAL tseiff(nseiff) |
---|
| 50 | DATA tseiff/214.,213.8,213.4,212.4,209.3,205.,201.4,197.8, |
---|
| 51 | $ 194.6,191.4,188.2,185.2,182.5,180.,177.5,175, |
---|
| 52 | $ 172.5,170.,167.5,164.8,162.4,160.,158.,156., |
---|
| 53 | $ 154.1,152.2,150.3,148.7,147.2,145.7,144.2,143., |
---|
| 54 | $ 142.,141.,140,139.5,139./ |
---|
| 55 | REAL pic,largeur |
---|
| 56 | REAL hauteur,tmp |
---|
| 57 | |
---|
| 58 | c----------------------------------------------------------------------- |
---|
| 59 | c choix du profile: |
---|
| 60 | c ----------------- |
---|
| 61 | |
---|
| 62 | READ(unit,*) |
---|
| 63 | READ(unit,*) |
---|
| 64 | READ(unit,*) |
---|
| 65 | READ(unit,*) ichoice |
---|
| 66 | READ(unit,*) tref |
---|
| 67 | READ(unit,*,ERR=200) isin |
---|
| 68 | READ(unit,*) pic |
---|
| 69 | READ(unit,*) largeur |
---|
| 70 | READ(unit,*) hauteur |
---|
| 71 | GOTO 200 |
---|
| 72 | 100 STOP'fichier profile.def inexistant' |
---|
| 73 | 200 CONTINUE |
---|
| 74 | CLOSE(unit) |
---|
| 75 | c----------------------------------------------------------------------- |
---|
| 76 | c ichoice=1 temperature constante: |
---|
| 77 | c -------------------------------- |
---|
| 78 | |
---|
| 79 | IF(ichoice.EQ.1) THEN |
---|
| 80 | DO il=1,nlev |
---|
| 81 | temp(il)=tref |
---|
| 82 | ENDDO |
---|
| 83 | |
---|
| 84 | c----------------------------------------------------------------------- |
---|
| 85 | c ichoice=2 savidjari: |
---|
| 86 | c -------------------- |
---|
| 87 | |
---|
| 88 | ELSE IF(ichoice.EQ.2) THEN |
---|
| 89 | DO il=1,nlev |
---|
| 90 | temp(il)=AMAX1(219.-2.5*zkm(il),140.) |
---|
| 91 | ENDDO |
---|
| 92 | |
---|
| 93 | c----------------------------------------------------------------------- |
---|
| 94 | c ichoice=3 Lindner: |
---|
| 95 | c ------------------ |
---|
| 96 | |
---|
| 97 | ELSE IF(ichoice.EQ.3) THEN |
---|
| 98 | DO il=1,nlev |
---|
| 99 | IF(zkm(il).LT.2.5) THEN |
---|
| 100 | temp(il)=150.+30.*zkm(il)/2.5 |
---|
| 101 | ELSE IF(zkm(il).LT.5.) THEN |
---|
| 102 | temp(il)=180. |
---|
| 103 | ELSE |
---|
| 104 | temp(il)=AMAX1(180.-2.*(zkm(il)-5.),130.) |
---|
| 105 | ENDIF |
---|
| 106 | ENDDO |
---|
| 107 | |
---|
| 108 | c----------------------------------------------------------------------- |
---|
| 109 | c ichoice=4 Inversion pour Francois: |
---|
| 110 | c ------------------ |
---|
| 111 | |
---|
| 112 | ELSE IF(ichoice.EQ.4) THEN |
---|
| 113 | DO il=1,nlev |
---|
| 114 | IF(zkm(il).LT.20.) THEN |
---|
| 115 | temp(il)=135. |
---|
| 116 | ELSE |
---|
| 117 | temp(il)=AMIN1(135.+5.*(zkm(il)-20.),200.) |
---|
| 118 | ENDIF |
---|
| 119 | ENDDO |
---|
| 120 | |
---|
| 121 | |
---|
| 122 | c----------------------------------------------------------------------- |
---|
| 123 | c ichoice=5 Seiff: |
---|
| 124 | c ---------------- |
---|
| 125 | |
---|
| 126 | ELSE IF(ichoice.EQ.5) THEN |
---|
| 127 | DO il=1,nlev |
---|
| 128 | iseiff=INT(zkm(il)/2.)+1 |
---|
| 129 | IF(iseiff.LT.nseiff-1) THEN |
---|
| 130 | temp(il)=tseiff(iseiff)+(zkm(il)-2.*(iseiff-1))* |
---|
| 131 | $ (tseiff(iseiff+1)-tseiff(iseiff))/2. |
---|
| 132 | ELSE |
---|
| 133 | temp(il)=tseiff(nseiff) |
---|
| 134 | ENDIF |
---|
| 135 | ENDDO |
---|
| 136 | c IF(ichoice.EQ.6) THEN |
---|
| 137 | c DO iter=1,6 |
---|
| 138 | c t2=temp(1) |
---|
| 139 | c t3=temp(2) |
---|
| 140 | c DO il=2,nlev-1 |
---|
| 141 | c t1=t2 |
---|
| 142 | c t2=t3 |
---|
| 143 | c t3=temp(il+1) |
---|
| 144 | c ww=tanh(zkm(il)/20.) |
---|
| 145 | c ww=ww*ww*ww |
---|
| 146 | c temp(il)=t2+ww*.5*(t1-2.*t2+t3) |
---|
| 147 | c ENDDO |
---|
| 148 | c ENDDO |
---|
| 149 | c ENDIF |
---|
| 150 | |
---|
| 151 | c----------------------------------------------------------------------- |
---|
| 152 | c ichoice=6 |
---|
| 153 | c --------- |
---|
| 154 | |
---|
| 155 | ELSE IF(ichoice.EQ.6) THEN |
---|
| 156 | DO il=1,nlev |
---|
| 157 | tmp=il-pic |
---|
| 158 | temp(il)=tref + hauteur*exp(-tmp*tmp/largeur/largeur) |
---|
| 159 | ENDDO |
---|
| 160 | |
---|
| 161 | |
---|
| 162 | c----------------------------------------------------------------------- |
---|
| 163 | c ichoice=7 |
---|
| 164 | c --------- |
---|
| 165 | |
---|
| 166 | ELSE IF(ichoice.EQ.7) THEN |
---|
| 167 | DO il=1,nlev |
---|
| 168 | tmp=zkm(il)-pic |
---|
| 169 | temp(il)=tref + hauteur*exp(-tmp*tmp*4/largeur/largeur) |
---|
| 170 | ENDDO |
---|
| 171 | |
---|
| 172 | c----------------------------------------------------------------------- |
---|
| 173 | c ichoice=8 |
---|
| 174 | c --------- |
---|
| 175 | |
---|
| 176 | ELSE IF(ichoice.GE.8) THEN |
---|
| 177 | OPEN(11,file='profile',status='old',form='formatted',err=101) |
---|
| 178 | DO il=1,nlev |
---|
| 179 | READ (11,*) temp(il) |
---|
| 180 | ENDDO |
---|
| 181 | |
---|
| 182 | GOTO 201 |
---|
| 183 | 101 STOP'fichier profile inexistant' |
---|
| 184 | 201 CONTINUE |
---|
| 185 | CLOSE(10) |
---|
| 186 | |
---|
| 187 | c----------------------------------------------------------------------- |
---|
| 188 | |
---|
| 189 | ENDIF |
---|
| 190 | |
---|
| 191 | c----------------------------------------------------------------------- |
---|
| 192 | c rajout eventuel d'une perturbation: |
---|
| 193 | c ----------------------------------- |
---|
| 194 | |
---|
| 195 | IF(isin.EQ.1) THEN |
---|
| 196 | pi=2.*ASIN(1.) |
---|
| 197 | DO il=1,nlev |
---|
| 198 | c if (nlev.EQ.501) then |
---|
| 199 | c if (zkm(il).LE.70.5) then |
---|
| 200 | c temp(il)=temp(il)+(1.-1000./(1000+zkm(il)*zkm(il)))*( |
---|
| 201 | c s 6.*SIN(zkm(il)*pi/6.)+9.*SIN(zkm(il)*pi/10.3) ) |
---|
| 202 | c endif |
---|
| 203 | c else |
---|
| 204 | temp(il)=temp(il)+(1.-1000./(1000+zkm(il)*zkm(il)))*( |
---|
| 205 | s 6.*SIN(zkm(il)*pi/6.)+9.*SIN(zkm(il)*pi/10.3) ) |
---|
| 206 | c endif |
---|
| 207 | ENDDO |
---|
| 208 | ENDIF |
---|
| 209 | |
---|
| 210 | |
---|
| 211 | c----------------------------------------------------------------------- |
---|
| 212 | c Ecriture du profil de temperature dans un fichier profile.out |
---|
| 213 | c ------------------------------------------------------------- |
---|
| 214 | |
---|
| 215 | |
---|
| 216 | OPEN(12,file='profile.out',form='formatted') |
---|
| 217 | DO il=1,nlev |
---|
| 218 | write(12,*) temp(il) |
---|
| 219 | ENDDO |
---|
| 220 | CLOSE(12) |
---|
| 221 | |
---|
| 222 | RETURN |
---|
| 223 | END |
---|