Changeset 1657 for LMDZ5/trunk/libf/dyn3dmem/iniacademic.F
- Timestamp:
- Oct 2, 2012, 5:57:45 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/dyn3dmem/iniacademic.F
r1632 r1657 1 1 ! 2 ! $Id: iniacademic.F 1 299 2010-01-20 14:27:21Z fairhead$2 ! $Id: iniacademic.F 1363 2010-04-16 09:50:10Z emillour $ 3 3 ! 4 4 c … … 8 8 USE filtreg_mod 9 9 USE infotrac, ONLY : nqtot 10 USE control_mod 11 10 12 11 13 c%W% %G% … … 31 33 c 32 34 c======================================================================= 33 USE control_mod34 35 IMPLICIT NONE 35 36 c----------------------------------------------------------------------- … … 46 47 #include "temps.h" 47 48 #include "iniprint.h" 49 #include "logic.h" 48 50 49 51 c Arguments: … … 55 57 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) ! vents covariants 56 58 REAL teta(ip1jmp1,llm) ! temperature potentielle 57 REAL q(ip1jmp1,llm,nqtot) ! champs advectes59 REAL q(ip1jmp1,llm,nqtot) ! champs advectes 58 60 REAL ps(ip1jmp1) ! pression au sol 59 61 REAL masse(ip1jmp1,llm) ! masse d'air … … 84 86 time_0=0. 85 87 day_ref=0 86 88 annee_ref=0 87 89 88 90 im = iim … … 105 107 ang0 = 0. 106 108 109 if (llm.eq.1) then 110 ! specific initializations for the shallow water case 111 kappa=1 112 endif 113 107 114 CALL iniconst 108 115 CALL inigeom 109 116 CALL inifilr 110 117 111 ps=0. 112 phis=0. 118 if (llm.eq.1) then 119 ! initialize fields for the shallow water case, if required 120 if (.not.read_start) then 121 phis(:)=0. 122 q(:,:,1)=1.e-10 123 q(:,:,2)=1.e-15 124 q(:,:,3:nqtot)=0. 125 CALL sw_case_williamson91_6(vcov,ucov,teta,masse,ps) 126 endif 127 endif 128 129 if (iflag_phys.eq.2) then 130 ! initializations for the academic case 131 ps(:)=1.e5 132 phis(:)=0. 113 133 c--------------------------------------------------------------------- 114 134 115 taurappel=10.*daysec135 taurappel=10.*daysec 116 136 117 137 c--------------------------------------------------------------------- … … 119 139 c -------------------------------------- 120 140 121 DO l=1,llm122 zsig=ap(l)/preff+bp(l)123 if (zsig.gt.0.3) then124 lsup=l125 tetarappell=1./8.*(-log(zsig)-.5)126 DO j=1,jjp1141 DO l=1,llm 142 zsig=ap(l)/preff+bp(l) 143 if (zsig.gt.0.3) then 144 lsup=l 145 tetarappell=1./8.*(-log(zsig)-.5) 146 DO j=1,jjp1 127 147 ddsin=sin(rlatu(j))-sin(pi/20.) 128 148 tetajl(j,l)=300.*(1+1./18.*(1.-3.*ddsin*ddsin)+tetarappell) 129 ENDDO130 else149 ENDDO 150 else 131 151 c Choix isotherme au-dessus de 300 mbar 132 do j=1,jjp1133 tetajl(j,l)=tetajl(j,lsup)*(0.3/zsig)**kappa134 enddo135 endif ! of if (zsig.gt.0.3)136 ENDDO ! of DO l=1,llm137 138 do l=1,llm139 do j=1,jjp1152 do j=1,jjp1 153 tetajl(j,l)=tetajl(j,lsup)*(0.3/zsig)**kappa 154 enddo 155 endif ! of if (zsig.gt.0.3) 156 ENDDO ! of DO l=1,llm 157 158 do l=1,llm 159 do j=1,jjp1 140 160 do i=1,iip1 141 161 ij=(j-1)*iip1+i 142 162 tetarappel(ij,l)=tetajl(j,l) 143 163 enddo 144 enddo145 enddo164 enddo 165 enddo 146 166 147 167 c call dump2d(jjp1,llm,tetajl,'TEQ ') 148 168 149 ps=1.e5 150 phis=0. 151 CALL pression ( ip1jmp1, ap, bp, ps, p ) 152 CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf ) 153 CALL massdair(p,masse) 169 CALL pression ( ip1jmp1, ap, bp, ps, p ) 170 CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf ) 171 CALL massdair(p,masse) 154 172 155 173 c intialisation du vent et de la temperature 156 teta(:,:)=tetarappel(:,:)157 CALL geopot(ip1jmp1,teta,pk,pks,phis,phi)158 call ugeostr(phi,ucov)159 vcov=0.160 q(:,:,1 )=1.e-10161 q(:,:,2 )=1.e-15162 q(:,:,3:nqtot)=0.174 teta(:,:)=tetarappel(:,:) 175 CALL geopot(ip1jmp1,teta,pk,pks,phis,phi) 176 call ugeostr(phi,ucov) 177 vcov=0. 178 q(:,:,1 )=1.e-10 179 q(:,:,2 )=1.e-15 180 q(:,:,3:nqtot)=0. 163 181 164 182 165 183 c perturbation aleatoire sur la temperature 166 idum = -1167 zz = ran1(idum)168 idum = 0169 do l=1,llm170 do ij=iip2,ip1jm184 idum = -1 185 zz = ran1(idum) 186 idum = 0 187 do l=1,llm 188 do ij=iip2,ip1jm 171 189 teta(ij,l)=teta(ij,l)*(1.+0.005*ran1(idum)) 172 enddo173 enddo174 175 do l=1,llm176 do ij=1,ip1jmp1,iip1190 enddo 191 enddo 192 193 do l=1,llm 194 do ij=1,ip1jmp1,iip1 177 195 teta(ij+iim,l)=teta(ij,l) 178 enddo179 enddo196 enddo 197 enddo 180 198 181 199 … … 187 205 188 206 c initialisation d'un traceur sur une colonne 189 j=jjp1*3/4 190 i=iip1/2 191 ij=(j-1)*iip1+i 192 q(ij,:,3)=1. 193 207 j=jjp1*3/4 208 i=iip1/2 209 ij=(j-1)*iip1+i 210 q(ij,:,3)=1. 211 endif ! of if (iflag_phys.eq.2) 212 194 213 else 195 214 write(lunout,*)"iniacademic: planet types other than earth",
Note: See TracChangeset
for help on using the changeset viewer.