- Timestamp:
- Feb 17, 2012, 12:59:00 PM (13 years ago)
- Location:
- LMDZ5/trunk/libf
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/dyn3d/integrd.F
r1550 r1616 4 4 SUBROUTINE integrd 5 5 $ ( nq,vcovm1,ucovm1,tetam1,psm1,massem1, 6 $ dv,du,dteta,dq,dp,vcov,ucov,teta,q,ps,masse,phis,finvmaold ) 6 $ dv,du,dteta,dq,dp,vcov,ucov,teta,q,ps,masse,phis !,finvmaold 7 & ) 7 8 8 9 use control_mod, only : planet_type … … 34 35 #include "temps.h" 35 36 #include "serre.h" 37 #include "iniprint.h" 36 38 37 39 c Arguments: 38 40 c ---------- 39 41 40 INTEGER nq 41 42 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm),teta(ip1jmp1,llm) 43 REAL q(ip1jmp1,llm,nq) 44 REAL ps(ip1jmp1),masse(ip1jmp1,llm),phis(ip1jmp1) 45 46 REAL vcovm1(ip1jm,llm),ucovm1(ip1jmp1,llm) 47 REAL tetam1(ip1jmp1,llm),psm1(ip1jmp1),massem1(ip1jmp1,llm) 48 49 REAL dv(ip1jm,llm),du(ip1jmp1,llm) 50 REAL dteta(ip1jmp1,llm),dp(ip1jmp1) 51 REAL dq(ip1jmp1,llm,nq), finvmaold(ip1jmp1,llm) 42 integer,intent(in) :: nq ! number of tracers to handle in this routine 43 real,intent(inout) :: vcov(ip1jm,llm) ! covariant meridional wind 44 real,intent(inout) :: ucov(ip1jmp1,llm) ! covariant zonal wind 45 real,intent(inout) :: teta(ip1jmp1,llm) ! potential temperature 46 real,intent(inout) :: q(ip1jmp1,llm,nq) ! advected tracers 47 real,intent(inout) :: ps(ip1jmp1) ! surface pressure 48 real,intent(inout) :: masse(ip1jmp1,llm) ! atmospheric mass 49 real,intent(in) :: phis(ip1jmp1) ! ground geopotential !!! unused 50 ! values at previous time step 51 real,intent(inout) :: vcovm1(ip1jm,llm) 52 real,intent(inout) :: ucovm1(ip1jmp1,llm) 53 real,intent(inout) :: tetam1(ip1jmp1,llm) 54 real,intent(inout) :: psm1(ip1jmp1) 55 real,intent(inout) :: massem1(ip1jmp1,llm) 56 ! the tendencies to add 57 real,intent(in) :: dv(ip1jm,llm) 58 real,intent(in) :: du(ip1jmp1,llm) 59 real,intent(in) :: dteta(ip1jmp1,llm) 60 real,intent(in) :: dp(ip1jmp1) 61 real,intent(in) :: dq(ip1jmp1,llm,nq) !!! unused 62 ! real,intent(out) :: finvmaold(ip1jmp1,llm) !!! unused 52 63 53 64 c Local: … … 55 66 56 67 REAL vscr( ip1jm ),uscr( ip1jmp1 ),hscr( ip1jmp1 ),pscr(ip1jmp1) 57 REAL massescr( ip1jmp1,llm ), finvmasse(ip1jmp1,llm) 68 REAL massescr( ip1jmp1,llm ) 69 ! REAL finvmasse(ip1jmp1,llm) 58 70 REAL p(ip1jmp1,llmp1) 59 71 REAL tpn,tps,tppn(iim),tpps(iim) … … 61 73 REAL deltap( ip1jmp1,llm ) 62 74 63 INTEGER l,ij,iq 75 INTEGER l,ij,iq,i,j 64 76 65 77 REAL SSUM … … 88 100 DO ij = 1,ip1jmp1 89 101 IF( ps(ij).LT.0. ) THEN 90 PRINT*,' Au point ij = ',ij, ' , pression sol neg. ', ps(ij) 91 print *, ' dans integrd' 92 stop 1 102 write(lunout,*) "integrd: negative surface pressure ",ps(ij) 103 write(lunout,*) " at node ij =", ij 104 ! since ij=j+(i-1)*jjp1 , we have 105 j=modulo(ij,jjp1) 106 i=1+(ij-j)/jjp1 107 write(lunout,*) " lon = ",rlonv(i)*180./pi, " deg", 108 & " lat = ",rlatu(j)*180./pi, " deg" 109 stop 93 110 ENDIF 94 111 ENDDO … … 110 127 CALL massdair ( p , masse ) 111 128 112 CALL SCOPY( ijp1llm , masse, 1, finvmasse, 1 ) 113 CALL filtreg( finvmasse, jjp1, llm, -2, 2, .TRUE., 1 ) 129 ! Ehouarn : we don't use/need finvmaold and finvmasse, 130 ! so might as well not compute them 131 ! CALL SCOPY( ijp1llm , masse, 1, finvmasse, 1 ) 132 ! CALL filtreg( finvmasse, jjp1, llm, -2, 2, .TRUE., 1 ) 114 133 c 115 134 … … 218 237 ENDDO 219 238 220 221 CALL SCOPY( ijp1llm , finvmasse, 1, finvmaold, 1 )239 ! Ehouarn: forget about finvmaold 240 ! CALL SCOPY( ijp1llm , finvmasse, 1, finvmaold, 1 ) 222 241 223 242 endif ! of if (planet_type.eq."earth") -
LMDZ5/trunk/libf/dyn3d/leapfrog.F
r1615 r1616 117 117 118 118 REAL SSUM 119 REAL time_0 , finvmaold(ip1jmp1,llm) 119 REAL time_0 120 ! REAL finvmaold(ip1jmp1,llm) 120 121 121 122 cym LOGICAL lafin … … 257 258 258 259 c ... P.Le Van .26/04/94 .... 259 260 CALL SCOPY ( ijp1llm, masse, 1, finvmaold, 1 )261 CALL filtreg ( finvmaold ,jjp1, llm, -2,2, .TRUE., 1 )260 ! Ehouarn: finvmaold is actually not used 261 ! CALL SCOPY ( ijp1llm, masse, 1, finvmaold, 1 ) 262 ! CALL filtreg ( finvmaold ,jjp1, llm, -2,2, .TRUE., 1 ) 262 263 263 264 2 CONTINUE ! Matsuno backward or leapfrog step begins here … … 318 319 319 320 IF( forward. OR . leapf ) THEN 320 321 ! Ehouarn: NB: at this point p with ps are not synchronized 322 ! (whereas mass and ps are...) 321 323 CALL caladvtrac(q,pbaru,pbarv, 322 324 * p, masse, dq, teta, … … 343 345 344 346 CALL integrd ( 2,vcovm1,ucovm1,tetam1,psm1,massem1 , 345 $ dv,du,dteta,dq,dp,vcov,ucov,teta,q,ps,masse,phis ,346 $ finvmaold )347 $ dv,du,dteta,dq,dp,vcov,ucov,teta,q,ps,masse,phis ) 348 ! $ finvmaold ) 347 349 348 350 -
LMDZ5/trunk/libf/dyn3dpar/integrd_p.F
r1550 r1616 4 4 SUBROUTINE integrd_p 5 5 $ ( nq,vcovm1,ucovm1,tetam1,psm1,massem1, 6 $ dv,du,dteta,dq,dp,vcov,ucov,teta,q,ps0,masse,phis ,finvmaold)6 $ dv,du,dteta,dq,dp,vcov,ucov,teta,q,ps0,masse,phis) !,finvmaold) 7 7 USE parallel 8 8 USE control_mod, only : planet_type … … 33 33 #include "temps.h" 34 34 #include "serre.h" 35 #include "iniprint.h" 35 36 36 37 c Arguments: 37 38 c ---------- 38 39 39 INTEGER nq 40 41 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm),teta(ip1jmp1,llm) 42 REAL q(ip1jmp1,llm,nq) 43 REAL ps0(ip1jmp1),masse(ip1jmp1,llm),phis(ip1jmp1) 44 45 REAL vcovm1(ip1jm,llm),ucovm1(ip1jmp1,llm) 46 REAL tetam1(ip1jmp1,llm),psm1(ip1jmp1),massem1(ip1jmp1,llm) 47 48 REAL dv(ip1jm,llm),du(ip1jmp1,llm) 49 REAL dteta(ip1jmp1,llm),dp(ip1jmp1) 50 REAL dq(ip1jmp1,llm,nq), finvmaold(ip1jmp1,llm) 40 integer,intent(in) :: nq ! number of tracers to handle in this routine 41 real,intent(inout) :: vcov(ip1jm,llm) ! covariant meridional wind 42 real,intent(inout) :: ucov(ip1jmp1,llm) ! covariant zonal wind 43 real,intent(inout) :: teta(ip1jmp1,llm) ! potential temperature 44 real,intent(inout) :: q(ip1jmp1,llm,nq) ! advected tracers 45 real,intent(inout) :: ps0(ip1jmp1) ! surface pressure 46 real,intent(inout) :: masse(ip1jmp1,llm) ! atmospheric mass 47 real,intent(in) :: phis(ip1jmp1) ! ground geopotential !!! unused 48 ! values at previous time step 49 real,intent(inout) :: vcovm1(ip1jm,llm) 50 real,intent(inout) :: ucovm1(ip1jmp1,llm) 51 real,intent(inout) :: tetam1(ip1jmp1,llm) 52 real,intent(inout) :: psm1(ip1jmp1) 53 real,intent(inout) :: massem1(ip1jmp1,llm) 54 ! the tendencies to add 55 real,intent(in) :: dv(ip1jm,llm) 56 real,intent(in) :: du(ip1jmp1,llm) 57 real,intent(in) :: dteta(ip1jmp1,llm) 58 real,intent(in) :: dp(ip1jmp1) 59 real,intent(in) :: dq(ip1jmp1,llm,nq) !!! unused 60 ! real,intent(out) :: finvmaold(ip1jmp1,llm) !!! unused 51 61 52 62 c Local: … … 54 64 55 65 REAL vscr( ip1jm ),uscr( ip1jmp1 ),hscr( ip1jmp1 ),pscr(ip1jmp1) 56 REAL massescr( ip1jmp1,llm ), finvmasse(ip1jmp1,llm) 66 REAL massescr( ip1jmp1,llm ) 67 ! REAL finvmasse(ip1jmp1,llm) 57 68 REAL,SAVE :: p(ip1jmp1,llmp1) 58 69 REAL tpn,tps,tppn(iim),tpps(iim) … … 60 71 REAL,SAVE :: deltap( ip1jmp1,llm ) 61 72 62 INTEGER l,ij,iq 73 INTEGER l,ij,iq,i,j 63 74 64 75 REAL SSUM … … 126 137 127 138 IF( .NOT. checksum ) THEN 128 PRINT*,' Au point ij = ',stop_it, ' , pression sol neg. ' 129 & , ps(stop_it) 130 print *, ' dans integrd' 131 stop 1 139 write(lunout,*) "integrd: negative surface pressure ", 140 & ps(stop_it) 141 write(lunout,*) " at node ij =", stop_it 142 ! since ij=j+(i-1)*jjp1 , we have 143 j=modulo(stop_it,jjp1) 144 i=1+(stop_it-j)/jjp1 145 write(lunout,*) " lon = ",rlonv(i)*180./pi, " deg", 146 & " lat = ",rlatu(j)*180./pi, " deg" 132 147 ENDIF 133 148 … … 167 182 CALL massdair_p ( p , masse ) 168 183 169 c CALL SCOPY( ijp1llm , masse, 1, finvmasse, 1 ) 170 ijb=ij_begin 171 ije=ij_end 172 173 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 174 DO l = 1,llm 175 finvmasse(ijb:ije,l)=masse(ijb:ije,l) 176 ENDDO 177 c$OMP END DO NOWAIT 178 179 jjb=jj_begin 180 jje=jj_end 181 CALL filtreg_p( finvmasse,jjb,jje, jjp1, llm, -2, 2, .TRUE., 1 ) 184 ! Ehouarn : we don't use/need finvmaold and finvmasse, 185 ! so might as well not compute them 186 !c CALL SCOPY( ijp1llm , masse, 1, finvmasse, 1 ) 187 ! ijb=ij_begin 188 ! ije=ij_end 189 ! 190 !c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 191 ! DO l = 1,llm 192 ! finvmasse(ijb:ije,l)=masse(ijb:ije,l) 193 ! ENDDO 194 !c$OMP END DO NOWAIT 195 ! 196 ! jjb=jj_begin 197 ! jje=jj_end 198 ! CALL filtreg_p( finvmasse,jjb,jje, jjp1, llm, -2, 2, .TRUE., 1 ) 182 199 c 183 200 … … 330 347 ENDIF 331 348 332 c CALL SCOPY( ijp1llm , finvmasse, 1, finvmaold, 1 ) 333 334 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 335 DO l = 1, llm 336 finvmaold(ijb:ije,l)=finvmasse(ijb:ije,l) 337 ENDDO 338 c$OMP END DO NOWAIT 349 ! Ehouarn: forget about finvmaold 350 !c CALL SCOPY( ijp1llm , finvmasse, 1, finvmaold, 1 ) 351 ! 352 !c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 353 ! DO l = 1, llm 354 ! finvmaold(ijb:ije,l)=finvmasse(ijb:ije,l) 355 ! ENDDO 356 !c$OMP END DO NOWAIT 339 357 340 358 endif ! of if (planet_type.eq."earth") -
LMDZ5/trunk/libf/dyn3dpar/leapfrog_p.F
r1615 r1616 124 124 REAL SSUM 125 125 REAL time_0 126 REAL,SAVE :: finvmaold(ip1jmp1,llm)126 ! REAL,SAVE :: finvmaold(ip1jmp1,llm) 127 127 128 128 cym LOGICAL lafin … … 284 284 massem1= masse 285 285 psm1= ps 286 287 finvmaold = masse 288 CALL filtreg ( finvmaold ,jjp1, llm, -2,2, .TRUE., 1 ) 286 287 ! Ehouarn: finvmaold is actually not used 288 ! finvmaold = masse 289 ! CALL filtreg ( finvmaold ,jjp1, llm, -2,2, .TRUE., 1 ) 289 290 c$OMP END MASTER 290 291 c$OMP BARRIER … … 304 305 tetam1 (ijb:ije,l) = teta (ijb:ije,l) 305 306 massem1 (ijb:ije,l) = masse (ijb:ije,l) 306 finvmaold(ijb:ije,l)=masse(ijb:ije,l)307 ! finvmaold(ijb:ije,l)=masse(ijb:ije,l) 307 308 308 309 if (pole_sud) ije=ij_end-iip1 … … 313 314 c$OMP ENDDO 314 315 315 316 CALL filtreg_p ( finvmaold ,jj_begin,jj_end,jjp1,317 . llm, -2,2, .TRUE., 1 )316 ! Ehouarn: finvmaold not used 317 ! CALL filtreg_p ( finvmaold ,jj_begin,jj_end,jjp1, 318 ! . llm, -2,2, .TRUE., 1 ) 318 319 319 320 endif ! of if (FirstCaldyn) … … 476 477 call Register_SwapFieldHallo(phi,phi,ip1jmp1,llm, 477 478 & jj_Nb_caldyn,0,0,TestRequest) 478 call Register_SwapFieldHallo(finvmaold,finvmaold,ip1jmp1,llm,479 & jj_Nb_caldyn,0,0,TestRequest)479 ! call Register_SwapFieldHallo(finvmaold,finvmaold,ip1jmp1,llm, 480 ! & jj_Nb_caldyn,0,0,TestRequest) 480 481 481 482 do j=1,nqtot … … 634 635 635 636 CALL integrd_p ( 2,vcovm1,ucovm1,tetam1,psm1,massem1 , 636 $ dv,du,dteta,dq,dp,vcov,ucov,teta,q,ps,masse,phis ,637 $ finvmaold )637 $ dv,du,dteta,dq,dp,vcov,ucov,teta,q,ps,masse,phis ) 638 ! $ finvmaold ) 638 639 639 640 ! CALL FTRACE_REGION_END("integrd")
Note: See TracChangeset
for help on using the changeset viewer.