Changeset 1363 for LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3d
- Timestamp:
- Apr 16, 2010, 11:50:10 AM (15 years ago)
- Location:
- LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3d
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3d/calfis.F
r1320 r1363 98 98 #include "comvert.h" 99 99 #include "comgeom2.h" 100 #include "iniprint.h" 100 101 101 102 c Arguments : … … 188 189 debut = .TRUE. 189 190 IF (ngridmx.NE.2+(jjm-1)*iim) THEN 190 PRINT*,'STOP dans calfis' 191 PRINT*,'La dimension ngridmx doit etre egale a 2 + (jjm-1)*iim' 192 PRINT*,' ngridmx jjm iim ' 193 PRINT*,ngridmx,jjm,iim 191 write(lunout,*) 'STOP dans calfis' 192 write(lunout,*) 193 & 'La dimension ngridmx doit etre egale a 2 + (jjm-1)*iim' 194 write(lunout,*) ' ngridmx jjm iim ' 195 write(lunout,*) ngridmx,jjm,iim 194 196 STOP 195 197 ENDIF … … 315 317 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,pphis,zphis) 316 318 DO l=1,llm 317 318 319 319 DO ig=1,ngridmx 320 zphi(ig,l)=zphi(ig,l)-zphis(ig) 321 ENDDO 320 322 ENDDO 321 323 … … 415 417 z1(i) =(rlonu(i)-rlonu(i-1))*pvcov(i,jjm,l)/cv(i,jjm) 416 418 z1bis(i)=(rlonu(i)-rlonu(i-1))*pdvcov(i,jjm,l)/cv(i,jjm) 417 419 ENDDO 418 420 419 421 DO i=1,iim … … 422 424 zsin(i) = SIN(rlonv(i))*z1(i) 423 425 zsinbis(i) = SIN(rlonv(i))*z1bis(i) 424 426 ENDDO 425 427 426 428 zufi(ngridmx,l) = SSUM(iim,zcos,1)/pi … … 449 451 450 452 if (planet_type=="earth") then 451 452 print*,'PHYSIQUE AVEC NSPLIT_PHYS=',nsplit_phys 453 #ifdef CPP_EARTH 454 455 write(lunout,*) 'PHYSIQUE AVEC NSPLIT_PHYS=',nsplit_phys 453 456 zdt_split=dtphys/nsplit_phys 454 457 zdufic(:,:)=0. … … 463 466 lafin_split=lafin.and.isplit==nsplit_phys 464 467 465 #ifdef CPP_EARTH466 468 CALL physiq (ngridmx, 467 469 . llm, -
LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3d/exner_hyb.F
r524 r1363 1 1 ! 2 ! $ Header$2 ! $Id $ 3 3 ! 4 4 SUBROUTINE exner_hyb ( ngrid, ps, p,alpha,beta, pks, pk, pkf ) … … 51 51 REAL SSUM 52 52 c 53 54 if (llm.eq.1) then 55 ! Specific behaviour for Shallow Water (1 vertical layer) case 53 56 57 ! Sanity checks 58 if (kappa.ne.1) then 59 call abort_gcm("exner_hyb", 60 & "kappa!=1 , but running in Shallow Water mode!!",42) 61 endif 62 if (cpp.ne.r) then 63 call abort_gcm("exner_hyb", 64 & "cpp!=r , but running in Shallow Water mode!!",42) 65 endif 66 67 ! Compute pks(:),pk(:),pkf(:) 68 69 DO ij = 1, ngrid 70 pks(ij) = (cpp/preff) * ps(ij) 71 pk(ij,1) = .5*pks(ij) 72 ENDDO 73 74 CALL SCOPY ( ngrid * llm, pk, 1, pkf, 1 ) 75 CALL filtreg ( pkf, jmp1, llm, 2, 1, .TRUE., 1 ) 76 77 ! our work is done, exit routine 78 return 79 endif ! of if (llm.eq.1) 80 81 54 82 unpl2k = 1.+ 2.* kappa 55 83 c -
LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3d/iniacademic.F
r1299 r1363 47 47 #include "temps.h" 48 48 #include "iniprint.h" 49 #include "logic.h" 49 50 50 51 c Arguments: … … 85 86 time_0=0. 86 87 day_ref=0 87 88 annee_ref=0 88 89 89 90 im = iim … … 106 107 ang0 = 0. 107 108 109 if (llm.eq.1) then 110 ! specific initializations for the shallow water case 111 kappa=1 112 endif 113 108 114 CALL iniconst 109 115 CALL inigeom 110 116 CALL inifilr 111 117 112 ps=0. 113 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. 114 133 c--------------------------------------------------------------------- 115 134 116 taurappel=10.*daysec135 taurappel=10.*daysec 117 136 118 137 c--------------------------------------------------------------------- … … 120 139 c -------------------------------------- 121 140 122 DO l=1,llm123 zsig=ap(l)/preff+bp(l)124 if (zsig.gt.0.3) then125 lsup=l126 tetarappell=1./8.*(-log(zsig)-.5)127 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 128 147 ddsin=sin(rlatu(j))-sin(pi/20.) 129 148 tetajl(j,l)=300.*(1+1./18.*(1.-3.*ddsin*ddsin)+tetarappell) 130 ENDDO131 else149 ENDDO 150 else 132 151 c Choix isotherme au-dessus de 300 mbar 133 do j=1,jjp1134 tetajl(j,l)=tetajl(j,lsup)*(0.3/zsig)**kappa135 enddo136 endif ! of if (zsig.gt.0.3)137 ENDDO ! of DO l=1,llm138 139 do l=1,llm140 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 141 160 do i=1,iip1 142 161 ij=(j-1)*iip1+i 143 162 tetarappel(ij,l)=tetajl(j,l) 144 163 enddo 145 enddo146 enddo164 enddo 165 enddo 147 166 148 167 c call dump2d(jjp1,llm,tetajl,'TEQ ') 149 168 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) 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) 155 172 156 173 c intialisation du vent et de la temperature 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-10162 q(:,:,2 )=1.e-15163 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. 164 181 165 182 166 183 c perturbation aleatoire sur la temperature 167 idum = -1168 zz = ran1(idum)169 idum = 0170 do l=1,llm171 do ij=iip2,ip1jm184 idum = -1 185 zz = ran1(idum) 186 idum = 0 187 do l=1,llm 188 do ij=iip2,ip1jm 172 189 teta(ij,l)=teta(ij,l)*(1.+0.005*ran1(idum)) 173 enddo174 enddo175 176 do l=1,llm177 do ij=1,ip1jmp1,iip1190 enddo 191 enddo 192 193 do l=1,llm 194 do ij=1,ip1jmp1,iip1 178 195 teta(ij+iim,l)=teta(ij,l) 179 enddo180 enddo196 enddo 197 enddo 181 198 182 199 … … 188 205 189 206 c initialisation d'un traceur sur une colonne 190 j=jjp1*3/4 191 i=iip1/2 192 ij=(j-1)*iip1+i 193 q(ij,:,3)=1. 194 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 195 213 else 196 214 write(lunout,*)"iniacademic: planet types other than earth",
Note: See TracChangeset
for help on using the changeset viewer.