[524] | 1 | ! |
---|
[1299] | 2 | ! $Id: iniacademic.F 1299 2010-01-20 14:27:21Z fairhead $ |
---|
[524] | 3 | ! |
---|
| 4 | c |
---|
| 5 | c |
---|
[1146] | 6 | SUBROUTINE iniacademic(vcov,ucov,teta,q,masse,ps,phis,time_0) |
---|
[524] | 7 | |
---|
[1146] | 8 | USE filtreg_mod |
---|
| 9 | USE infotrac, ONLY : nqtot |
---|
[1299] | 10 | USE control_mod |
---|
| 11 | |
---|
[1146] | 12 | |
---|
[524] | 13 | c%W% %G% |
---|
| 14 | c======================================================================= |
---|
| 15 | c |
---|
| 16 | c Author: Frederic Hourdin original: 15/01/93 |
---|
| 17 | c ------- |
---|
| 18 | c |
---|
| 19 | c Subject: |
---|
| 20 | c ------ |
---|
| 21 | c |
---|
| 22 | c Method: |
---|
| 23 | c -------- |
---|
| 24 | c |
---|
| 25 | c Interface: |
---|
| 26 | c ---------- |
---|
| 27 | c |
---|
| 28 | c Input: |
---|
| 29 | c ------ |
---|
| 30 | c |
---|
| 31 | c Output: |
---|
| 32 | c ------- |
---|
| 33 | c |
---|
| 34 | c======================================================================= |
---|
| 35 | IMPLICIT NONE |
---|
| 36 | c----------------------------------------------------------------------- |
---|
| 37 | c Declararations: |
---|
| 38 | c --------------- |
---|
| 39 | |
---|
| 40 | #include "dimensions.h" |
---|
| 41 | #include "paramet.h" |
---|
| 42 | #include "comvert.h" |
---|
| 43 | #include "comconst.h" |
---|
| 44 | #include "comgeom.h" |
---|
| 45 | #include "academic.h" |
---|
| 46 | #include "ener.h" |
---|
| 47 | #include "temps.h" |
---|
[1146] | 48 | #include "iniprint.h" |
---|
[524] | 49 | |
---|
| 50 | c Arguments: |
---|
| 51 | c ---------- |
---|
| 52 | |
---|
| 53 | real time_0 |
---|
| 54 | |
---|
| 55 | c variables dynamiques |
---|
| 56 | REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) ! vents covariants |
---|
| 57 | REAL teta(ip1jmp1,llm) ! temperature potentielle |
---|
[1146] | 58 | REAL q(ip1jmp1,llm,nqtot) ! champs advectes |
---|
[524] | 59 | REAL ps(ip1jmp1) ! pression au sol |
---|
| 60 | REAL masse(ip1jmp1,llm) ! masse d'air |
---|
[1146] | 61 | REAL phis(ip1jmp1) ! geopotentiel au sol |
---|
| 62 | |
---|
| 63 | c Local: |
---|
| 64 | c ------ |
---|
| 65 | |
---|
[524] | 66 | REAL p (ip1jmp1,llmp1 ) ! pression aux interfac.des couches |
---|
| 67 | REAL pks(ip1jmp1) ! exner au sol |
---|
| 68 | REAL pk(ip1jmp1,llm) ! exner au milieu des couches |
---|
| 69 | REAL pkf(ip1jmp1,llm) ! exner filt.au milieu des couches |
---|
| 70 | REAL phi(ip1jmp1,llm) ! geopotentiel |
---|
| 71 | REAL ddsin,tetarappelj,tetarappell,zsig |
---|
| 72 | real tetajl(jjp1,llm) |
---|
| 73 | INTEGER i,j,l,lsup,ij |
---|
| 74 | |
---|
| 75 | real zz,ran1 |
---|
| 76 | integer idum |
---|
| 77 | |
---|
| 78 | REAL alpha(ip1jmp1,llm),beta(ip1jmp1,llm),zdtvr |
---|
| 79 | |
---|
| 80 | c----------------------------------------------------------------------- |
---|
[1146] | 81 | ! 1. Initializations for Earth-like case |
---|
| 82 | ! -------------------------------------- |
---|
| 83 | if (planet_type=="earth") then |
---|
[524] | 84 | c |
---|
[1146] | 85 | time_0=0. |
---|
[1279] | 86 | day_ref=0 |
---|
| 87 | annee_ref=0 |
---|
[524] | 88 | |
---|
[1146] | 89 | im = iim |
---|
| 90 | jm = jjm |
---|
| 91 | day_ini = 0 |
---|
| 92 | omeg = 4.*asin(1.)/86400. |
---|
| 93 | rad = 6371229. |
---|
| 94 | g = 9.8 |
---|
| 95 | daysec = 86400. |
---|
[1299] | 96 | dtvr = daysec/REAL(day_step) |
---|
[1146] | 97 | zdtvr=dtvr |
---|
| 98 | kappa = 0.2857143 |
---|
| 99 | cpp = 1004.70885 |
---|
| 100 | preff = 101325. |
---|
| 101 | pa = 50000. |
---|
| 102 | etot0 = 0. |
---|
| 103 | ptot0 = 0. |
---|
| 104 | ztot0 = 0. |
---|
| 105 | stot0 = 0. |
---|
| 106 | ang0 = 0. |
---|
[524] | 107 | |
---|
[1146] | 108 | CALL iniconst |
---|
| 109 | CALL inigeom |
---|
| 110 | CALL inifilr |
---|
[524] | 111 | |
---|
[1146] | 112 | ps=0. |
---|
| 113 | phis=0. |
---|
[524] | 114 | c--------------------------------------------------------------------- |
---|
| 115 | |
---|
[1146] | 116 | taurappel=10.*daysec |
---|
[524] | 117 | |
---|
| 118 | c--------------------------------------------------------------------- |
---|
| 119 | c Calcul de la temperature potentielle : |
---|
| 120 | c -------------------------------------- |
---|
| 121 | |
---|
[1146] | 122 | DO l=1,llm |
---|
| 123 | zsig=ap(l)/preff+bp(l) |
---|
| 124 | if (zsig.gt.0.3) then |
---|
| 125 | lsup=l |
---|
| 126 | tetarappell=1./8.*(-log(zsig)-.5) |
---|
| 127 | DO j=1,jjp1 |
---|
| 128 | ddsin=sin(rlatu(j))-sin(pi/20.) |
---|
| 129 | tetajl(j,l)=300.*(1+1./18.*(1.-3.*ddsin*ddsin)+tetarappell) |
---|
| 130 | ENDDO |
---|
| 131 | else |
---|
[524] | 132 | c Choix isotherme au-dessus de 300 mbar |
---|
[1146] | 133 | do j=1,jjp1 |
---|
| 134 | tetajl(j,l)=tetajl(j,lsup)*(0.3/zsig)**kappa |
---|
| 135 | enddo |
---|
| 136 | endif ! of if (zsig.gt.0.3) |
---|
| 137 | ENDDO ! of DO l=1,llm |
---|
[524] | 138 | |
---|
[1146] | 139 | do l=1,llm |
---|
| 140 | do j=1,jjp1 |
---|
| 141 | do i=1,iip1 |
---|
| 142 | ij=(j-1)*iip1+i |
---|
| 143 | tetarappel(ij,l)=tetajl(j,l) |
---|
| 144 | enddo |
---|
| 145 | enddo |
---|
| 146 | enddo |
---|
[524] | 147 | |
---|
[1146] | 148 | c call dump2d(jjp1,llm,tetajl,'TEQ ') |
---|
[524] | 149 | |
---|
[1146] | 150 | ps=1.e5 |
---|
| 151 | phis=0. |
---|
| 152 | CALL pression ( ip1jmp1, ap, bp, ps, p ) |
---|
| 153 | CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf ) |
---|
| 154 | CALL massdair(p,masse) |
---|
[524] | 155 | |
---|
| 156 | c intialisation du vent et de la temperature |
---|
[1146] | 157 | teta(:,:)=tetarappel(:,:) |
---|
| 158 | CALL geopot(ip1jmp1,teta,pk,pks,phis,phi) |
---|
| 159 | call ugeostr(phi,ucov) |
---|
| 160 | vcov=0. |
---|
| 161 | q(:,:,1 )=1.e-10 |
---|
| 162 | q(:,:,2 )=1.e-15 |
---|
| 163 | q(:,:,3:nqtot)=0. |
---|
[524] | 164 | |
---|
| 165 | |
---|
[1146] | 166 | c perturbation aleatoire sur la temperature |
---|
| 167 | idum = -1 |
---|
| 168 | zz = ran1(idum) |
---|
| 169 | idum = 0 |
---|
| 170 | do l=1,llm |
---|
| 171 | do ij=iip2,ip1jm |
---|
| 172 | teta(ij,l)=teta(ij,l)*(1.+0.005*ran1(idum)) |
---|
| 173 | enddo |
---|
| 174 | enddo |
---|
[524] | 175 | |
---|
[1146] | 176 | do l=1,llm |
---|
| 177 | do ij=1,ip1jmp1,iip1 |
---|
| 178 | teta(ij+iim,l)=teta(ij,l) |
---|
| 179 | enddo |
---|
| 180 | enddo |
---|
[524] | 181 | |
---|
| 182 | |
---|
| 183 | |
---|
| 184 | c PRINT *,' Appel test_period avec tetarappel ' |
---|
| 185 | c CALL test_period ( ucov,vcov,tetarappel,q,p,phis ) |
---|
| 186 | c PRINT *,' Appel test_period avec teta ' |
---|
| 187 | c CALL test_period ( ucov,vcov,teta,q,p,phis ) |
---|
| 188 | |
---|
| 189 | c initialisation d'un traceur sur une colonne |
---|
[1146] | 190 | j=jjp1*3/4 |
---|
| 191 | i=iip1/2 |
---|
| 192 | ij=(j-1)*iip1+i |
---|
| 193 | q(ij,:,3)=1. |
---|
| 194 | |
---|
| 195 | else |
---|
| 196 | write(lunout,*)"iniacademic: planet types other than earth", |
---|
| 197 | & " not implemented (yet)." |
---|
| 198 | stop |
---|
| 199 | endif ! of if (planet_type=="earth") |
---|
[524] | 200 | return |
---|
| 201 | END |
---|
| 202 | c----------------------------------------------------------------------- |
---|