| 1 | SUBROUTINE profile(unit,nlev,dzst,pres,temp) |
|---|
| 2 | IMPLICIT NONE |
|---|
| 3 | c======================================================================= |
|---|
| 4 | c Subroutine utilisee dans le modele 1-D "rcm1d" |
|---|
| 5 | c pour l'initialisation du profil atmospherique |
|---|
| 6 | c======================================================================= |
|---|
| 7 | c |
|---|
| 8 | c VERSION VENUS |
|---|
| 9 | c |
|---|
| 10 | c differents profils d'atmospheres. T=f(z) |
|---|
| 11 | c entree: |
|---|
| 12 | c unit unite de lecture de "rcm1d.def" |
|---|
| 13 | c nlev nombre de niveaux (nlev=llm+1, surf + couches 1 a llm) |
|---|
| 14 | c dzst dz/T (avec dz = epaisseur de la couche en m) |
|---|
| 15 | c pres pressure profile |
|---|
| 16 | c ichoice choix de l'atmosphere: |
|---|
| 17 | c 1 Temperature constante |
|---|
| 18 | c 2 profil Huygens lisse |
|---|
| 19 | c 3 |
|---|
| 20 | c 4 |
|---|
| 21 | c 5 |
|---|
| 22 | c 6 T constante + perturbation gauss (level) (christophe 10/98) |
|---|
| 23 | c 7 T constante + perturbation gauss (km) (christophe 10/98) |
|---|
| 24 | c 8 Lecture du profile dans un fichier ASCII (profile) |
|---|
| 25 | c tref temperature de reference |
|---|
| 26 | c isin ajout d'une perturbation (isin=1) |
|---|
| 27 | c pic pic perturbation gauss pour ichoice = 6 ou 7 |
|---|
| 28 | c largeur largeur de la perturbation gauss pour ichoice = 6 ou 7 |
|---|
| 29 | c hauteur hauteur de la perturbation gauss pour ichoice = 6 ou 7 |
|---|
| 30 | c |
|---|
| 31 | c sortie: |
|---|
| 32 | c temp temperatures en K |
|---|
| 33 | c |
|---|
| 34 | c======================================================================= |
|---|
| 35 | c----------------------------------------------------------------------- |
|---|
| 36 | c declarations: |
|---|
| 37 | c ------------- |
|---|
| 38 | |
|---|
| 39 | c arguments: |
|---|
| 40 | c ---------- |
|---|
| 41 | |
|---|
| 42 | INTEGER nlev, unit |
|---|
| 43 | REAL dzst(nlev),pres(nlev),temp(nlev) |
|---|
| 44 | |
|---|
| 45 | c local: |
|---|
| 46 | c ------ |
|---|
| 47 | |
|---|
| 48 | INTEGER il,ichoice,isin,iter |
|---|
| 49 | REAL pi |
|---|
| 50 | REAL tref,t1,t2,t3,ww |
|---|
| 51 | REAL pic,largeur |
|---|
| 52 | REAL hauteur,tmp |
|---|
| 53 | REAL zkm(nlev) ! altitude en km |
|---|
| 54 | real a1,b1,c1,a2,b2,c2 |
|---|
| 55 | |
|---|
| 56 | isin = 0 |
|---|
| 57 | |
|---|
| 58 | c----------------------------------------------------------------------- |
|---|
| 59 | c choix du profil: |
|---|
| 60 | c ---------------- |
|---|
| 61 | |
|---|
| 62 | c la lecture se fait dans le rcm1d.def, ouvert par rcm1d.F |
|---|
| 63 | READ(unit,*) |
|---|
| 64 | READ(unit,*) |
|---|
| 65 | READ(unit,*) |
|---|
| 66 | READ(unit,*) ichoice |
|---|
| 67 | READ(unit,*) tref |
|---|
| 68 | READ(unit,*) isin |
|---|
| 69 | READ(unit,*) pic |
|---|
| 70 | READ(unit,*) largeur |
|---|
| 71 | READ(unit,*) hauteur |
|---|
| 72 | |
|---|
| 73 | c----------------------------------------------------------------------- |
|---|
| 74 | c ichoice=1 temperature constante: |
|---|
| 75 | c -------------------------------- |
|---|
| 76 | |
|---|
| 77 | IF(ichoice.EQ.1) THEN |
|---|
| 78 | temp(1) = tref |
|---|
| 79 | zkm(1) = 0.0 |
|---|
| 80 | DO il=2,nlev |
|---|
| 81 | temp(il)= tref |
|---|
| 82 | zkm(il) = zkm(il-1)+temp(il)*dzst(il)/1000. |
|---|
| 83 | ENDDO |
|---|
| 84 | |
|---|
| 85 | c----------------------------------------------------------------------- |
|---|
| 86 | c ichoice=2 Huygens lisse: |
|---|
| 87 | c ------------------------ |
|---|
| 88 | |
|---|
| 89 | ELSE IF(ichoice.EQ.2) THEN |
|---|
| 90 | a1 = 142.1 |
|---|
| 91 | b1 = -21.45 |
|---|
| 92 | c1 = 40.11 |
|---|
| 93 | a2 = 106.3 |
|---|
| 94 | b2 = 3183. |
|---|
| 95 | c2 = 4737. |
|---|
| 96 | c pres est en Pa => conversion car expression veut p en hPa |
|---|
| 97 | DO il=1,nlev |
|---|
| 98 | temp(il)=a1*exp(-((pres(il)/100.-b1)/c1)**2.) |
|---|
| 99 | . + a2*exp(-((pres(il)/100.-b2)/c2)**2.) |
|---|
| 100 | ENDDO |
|---|
| 101 | zkm(1) = 0.0 |
|---|
| 102 | DO il=2,nlev |
|---|
| 103 | zkm(il) = zkm(il-1)+(temp(il-1)+temp(il))/2.*dzst(il)/1000. |
|---|
| 104 | ENDDO |
|---|
| 105 | |
|---|
| 106 | c----------------------------------------------------------------------- |
|---|
| 107 | c ichoice=3 |
|---|
| 108 | c ---------------------------- |
|---|
| 109 | |
|---|
| 110 | ELSE IF(ichoice.EQ.3) THEN |
|---|
| 111 | print*,"Profil T a faire..." |
|---|
| 112 | stop |
|---|
| 113 | |
|---|
| 114 | c----------------------------------------------------------------------- |
|---|
| 115 | c ichoice=4 : |
|---|
| 116 | c ------------------ |
|---|
| 117 | |
|---|
| 118 | ELSE IF(ichoice.EQ.4) THEN |
|---|
| 119 | print*,"Cas non defini..." |
|---|
| 120 | print*,"Stop dans profile.F" |
|---|
| 121 | STOP |
|---|
| 122 | |
|---|
| 123 | c----------------------------------------------------------------------- |
|---|
| 124 | c ichoice=5 : |
|---|
| 125 | c ---------------- |
|---|
| 126 | |
|---|
| 127 | ELSE IF(ichoice.EQ.5) THEN |
|---|
| 128 | print*,"Cas non defini..." |
|---|
| 129 | print*,"Stop dans profile.F" |
|---|
| 130 | STOP |
|---|
| 131 | |
|---|
| 132 | c----------------------------------------------------------------------- |
|---|
| 133 | c ichoice=6 |
|---|
| 134 | c --------- |
|---|
| 135 | |
|---|
| 136 | ELSE IF(ichoice.EQ.6) THEN |
|---|
| 137 | temp(1) = tref |
|---|
| 138 | zkm(1) = 0.0 |
|---|
| 139 | DO il=2,nlev |
|---|
| 140 | tmp=il-pic |
|---|
| 141 | temp(il)= tref + hauteur*exp(-tmp*tmp/largeur/largeur) |
|---|
| 142 | zkm(il) = zkm(il-1)+temp(il)*dzst(il)/1000. |
|---|
| 143 | ENDDO |
|---|
| 144 | |
|---|
| 145 | |
|---|
| 146 | c----------------------------------------------------------------------- |
|---|
| 147 | c ichoice=7 |
|---|
| 148 | c --------- |
|---|
| 149 | |
|---|
| 150 | ELSE IF(ichoice.EQ.7) THEN |
|---|
| 151 | temp(1) = tref |
|---|
| 152 | zkm(1) = 0.0 |
|---|
| 153 | DO il=2,nlev |
|---|
| 154 | zkm(il) = zkm(il-1)+tref*dzst(il)/1000. ! approx |
|---|
| 155 | tmp=zkm(il)-pic |
|---|
| 156 | temp(il)= tref + hauteur*exp(-tmp*tmp*4/largeur/largeur) |
|---|
| 157 | zkm(il) = zkm(il-1)+(temp(il-1)+temp(il))/2.*dzst(il)/1000. |
|---|
| 158 | ENDDO |
|---|
| 159 | |
|---|
| 160 | c----------------------------------------------------------------------- |
|---|
| 161 | c ichoice=8 |
|---|
| 162 | c --------- |
|---|
| 163 | |
|---|
| 164 | ELSE IF(ichoice.GE.8) THEN |
|---|
| 165 | OPEN(11,file='profile',status='old',form='formatted',err=101) |
|---|
| 166 | DO il=1,nlev |
|---|
| 167 | READ (11,*) temp(il) |
|---|
| 168 | ENDDO |
|---|
| 169 | zkm(1) = 0.0 |
|---|
| 170 | DO il=2,nlev |
|---|
| 171 | zkm(il) = zkm(il-1)+(temp(il-1)+temp(il))/2.*dzst(il)/1000. |
|---|
| 172 | ENDDO |
|---|
| 173 | |
|---|
| 174 | GOTO 201 |
|---|
| 175 | 101 STOP'fichier profile inexistant' |
|---|
| 176 | 201 CONTINUE |
|---|
| 177 | CLOSE(10) |
|---|
| 178 | |
|---|
| 179 | c----------------------------------------------------------------------- |
|---|
| 180 | |
|---|
| 181 | ENDIF |
|---|
| 182 | |
|---|
| 183 | c----------------------------------------------------------------------- |
|---|
| 184 | c rajout eventuel d'une perturbation: |
|---|
| 185 | c ----------------------------------- |
|---|
| 186 | |
|---|
| 187 | IF(isin.EQ.1) THEN |
|---|
| 188 | pi=2.*ASIN(1.) |
|---|
| 189 | DO il=1,nlev |
|---|
| 190 | temp(il)=temp(il)+(1.-1000./(1000+zkm(il)*zkm(il)))*( |
|---|
| 191 | s 6.*SIN(zkm(il)*pi/6.)+9.*SIN(zkm(il)*pi/10.3) ) |
|---|
| 192 | ENDDO |
|---|
| 193 | ENDIF |
|---|
| 194 | |
|---|
| 195 | |
|---|
| 196 | c----------------------------------------------------------------------- |
|---|
| 197 | c Ecriture du profil de temperature dans un fichier profile.out |
|---|
| 198 | c ------------------------------------------------------------- |
|---|
| 199 | |
|---|
| 200 | |
|---|
| 201 | c OPEN(12,file='profile.out') |
|---|
| 202 | c DO il=1,nlev |
|---|
| 203 | c write(12,*) temp(il) |
|---|
| 204 | c write(12,*) temp(il),zkm(il) |
|---|
| 205 | c ENDDO |
|---|
| 206 | c CLOSE(12) |
|---|
| 207 | |
|---|
| 208 | RETURN |
|---|
| 209 | END |
|---|