Changeset 5117 for LMDZ6/branches/Amaury_dev/libf/dyn3d_common
- Timestamp:
- Jul 24, 2024, 4:23:34 PM (4 months ago)
- Location:
- LMDZ6/branches/Amaury_dev/libf/dyn3d_common
- Files:
-
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/adaptdt.f90
r5116 r5117 40 40 n=int(CFLmax)+1 41 41 ! pour reproduire cas VL du code qui appele x,y,z,y,x 42 ! if (nadv. eq.30) n=n/2 ! Pour Prather42 ! if (nadv.EQ.30) n=n/2 ! Pour Prather 43 43 dtbon=dtvr/n 44 44 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/advn.f90
r5116 r5117 148 148 REAL :: dxqu(ip1jmp1),zqu(ip1jmp1) 149 149 REAL :: zqmax(ip1jmp1),zqmin(ip1jmp1) 150 logical:: extremum(ip1jmp1)150 LOGICAL :: extremum(ip1jmp1) 151 151 152 152 INTEGER :: mode … … 156 156 ! calcul des pentes en u: 157 157 ! ----------------------- 158 if(mode==0) THEN158 IF (mode==0) THEN 159 159 do l=1,llm 160 160 do ij=1,ip1jm … … 230 230 enddo 231 231 do ij=iip2,ip1jm-1 232 if(extremum(ij).and..not.extremum(ij+1)) &232 IF (extremum(ij).and..not.extremum(ij+1)) & 233 233 qg(ij+1,l)=q(ij,l) 234 234 enddo … … 239 239 8888 continue 240 240 enddo 241 endif241 ENDIF 242 242 RETURN 243 243 END SUBROUTINE advnqx … … 265 265 REAL :: dyqv(ip1jm),zqv(ip1jm,llm) 266 266 REAL :: zqmax(ip1jm),zqmin(ip1jm) 267 logical:: extremum(ip1jmp1)267 LOGICAL :: extremum(ip1jmp1) 268 268 269 269 INTEGER :: mode … … 271 271 data mode/1/ 272 272 273 if(mode==0) THEN273 IF (mode==0) THEN 274 274 do l=1,llm 275 275 do ij=1,ip1jmp1 … … 318 318 qs(ij,l)=q(ij,l) 319 319 qn(ij,l)=q(ij,l) 320 ! if (. not.extremum(ij-iip1)) qs(ij-iip1,l)=q(ij,l)321 ! if (. not.extremum(ij+iip1)) qn(ij+iip1,l)=q(ij,l)320 ! if (.NOT.extremum(ij-iip1)) qs(ij-iip1,l)=q(ij,l) 321 ! if (.NOT.extremum(ij+iip1)) qn(ij+iip1,l)=q(ij,l) 322 322 else 323 323 qs(ij,l)=zqv(ij,l) … … 334 334 335 335 enddo 336 endif336 ENDIF 337 337 RETURN 338 338 END SUBROUTINE advnqy … … 361 361 REAL :: dzqw(ip1jmp1,llm+1),zqw(ip1jmp1,llm+1) 362 362 REAL :: zqmax(ip1jmp1,llm),zqmin(ip1jmp1,llm) 363 logical:: extremum(ip1jmp1,llm)363 LOGICAL :: extremum(ip1jmp1,llm) 364 364 365 365 INTEGER :: mode … … 371 371 ! ----------------------- 372 372 373 if(mode==0) THEN373 IF (mode==0) THEN 374 374 do l=1,llm 375 375 do ij=1,ip1jmp1 … … 436 436 ! do ij=1,ip1jmp1 437 437 ! IF(extremum(ij,l)) THEN 438 ! if (. not.extremum(ij,l-1)) qh(ij,l-1)=q(ij,l)439 ! if (. not.extremum(ij,l+1)) qb(ij,l+1)=q(ij,l)438 ! if (.NOT.extremum(ij,l-1)) qh(ij,l-1)=q(ij,l) 439 ! if (.NOT.extremum(ij,l+1)) qb(ij,l+1)=q(ij,l) 440 440 ! endif 441 441 ! enddo … … 449 449 enddo 450 450 451 endif451 ENDIF 452 452 453 453 RETURN … … 491 491 REAL :: zm,zq,zsigm,zsigp,zqm,zqp,zu 492 492 493 logical:: ladvplus(ip1jmp1,llm)493 LOGICAL :: ladvplus(ip1jmp1,llm) 494 494 495 495 REAL :: prec … … 506 506 ! qd(ij,l)=q(ij,l) 507 507 ! qg(ij,l)=q(ij,l) 508 ! endif508 ! END IF 509 509 IF(abs(zdq)>prec) THEN 510 510 zsigd(ij,l)=(q(ij,l)-qg(ij,l))/zdq 511 511 zsigg(ij,l)=1.-zsigd(ij,l) 512 ! IF(. not.(zsigd(ij,l).ge.0..and.zsigd(ij,l).le.1. .and.512 ! IF(.NOT.(zsigd(ij,l).ge.0..and.zsigd(ij,l).le.1. .AND. 513 513 ! s zsigg(ij,l).ge.0..or.zsigg(ij,l).le.1.) ) THEN 514 514 ! PRINT*,'probleme au point ij=',ij,' l=',l … … 516 516 ! PRINT*,'q d,c,g ',qd(ij,l),q(ij,l),qg(ij,l),zdq 517 517 ! stop 518 ! endif518 ! END IF 519 519 else 520 520 zsigd(ij,l)=0.5 … … 530 530 do l=1,llm 531 531 do ij=iip2,ip1jm-1 532 if(u_m(ij,l)>=0.) THEN532 IF (u_m(ij,l)>=0.) THEN 533 533 zsigp=zsigd(ij,l) 534 534 zsigm=zsigg(ij,l) … … 549 549 zsig=zu/zm 550 550 IF(zsig==0.) zsigp=0.1 551 if(mode==1) THEN552 if(zsig<=zsigp) THEN551 IF (mode==1) THEN 552 IF (zsig<=zsigp) THEN 553 553 u_mq(ij,l)=u_m(ij,l)*zqp 554 else if(mode==1) THEN554 ELSE IF (mode==1) THEN 555 555 u_mq(ij,l)= & 556 556 sign(zm,u_m(ij,l))*(zsigp*zqp+(zsig-zsigp)*zqm) 557 557 endif 558 558 else 559 if(zsig<=zsigp) THEN559 IF (zsig<=zsigp) THEN 560 560 u_mq(ij,l)=u_m(ij,l)*(zqp-0.5*zsig/zsigp*(zqp-zq)) 561 561 else … … 568 568 ! PRINT*,'au point ij=',ij,' l=',l,' sig=',zsig 569 569 ! stop 570 ! endif570 ! END IF 571 571 enddo 572 572 enddo … … 605 605 ! indicage des mailles concernees par le traitement special 606 606 do ij=iip2,ip1jm 607 IF(ladvplus(ij,l). and.mod(ij,iip1)/=0) THEN607 IF(ladvplus(ij,l).AND.mod(ij,iip1)/=0) THEN 608 608 iju=iju+1 609 609 indu(iju)=ij … … 639 639 ! goto 8888 640 640 zz=0.5*(zsig-zsigd(ijq,l))/zsigg(ijq,l) 641 IF(. not.(zz>0..and.zz<=0.5)) THEN641 IF(.NOT.(zz>0..and.zz<=0.5)) THEN 642 642 WRITE(lunout,*)'probleme2 au point ij=',ij, & 643 643 ' l=',l … … 669 669 ! goto 9999 670 670 zz=0.5*(zsig-zsigg(ijq,l))/zsigd(ijq,l) 671 IF(. not.(zz>0..and.zz<=0.5)) THEN671 IF(.NOT.(zz>0..and.zz<=0.5)) THEN 672 672 WRITE(lunout,*)'probleme22 au point ij=',ij & 673 673 ,' l=',l … … 685 685 endif 686 686 enddo 687 endif! n0.gt.0687 ENDIF ! n0.gt.0 688 688 689 689 ! bouclage en latitude … … 763 763 ! qn(ij,l)=q(ij,l) 764 764 ! qs(ij,l)=q(ij,l) 765 ! endif765 ! END IF 766 766 IF(abs(zdq)>prec) THEN 767 767 zsign(ij)=(q(ij,l)-qs(ij,l))/zdq 768 768 zsigs(ij)=1.-zsign(ij) 769 ! IF(. not.(zsign(ij).ge.0..and.zsign(ij).le.1. .and.769 ! IF(.NOT.(zsign(ij).ge.0..and.zsign(ij).le.1. .AND. 770 770 ! s zsigs(ij).ge.0..or.zsigs(ij).le.1.) ) THEN 771 771 ! PRINT*,'probleme au point ij=',ij,' l=',l 772 772 ! PRINT*,'sigs=',zsigs(ij),' sign=',zsign(ij) 773 773 ! stop 774 ! endif774 ! END IF 775 775 else 776 776 zsign(ij)=0.5 … … 782 782 783 783 do ij=1,ip1jm 784 if(v_m(ij,l)>=0.) THEN784 IF (v_m(ij,l)>=0.) THEN 785 785 zsigp=zsign(ij+iip1) 786 786 zsigm=zsigs(ij+iip1) … … 799 799 zsig=abs(v_m(ij,l))/zm 800 800 IF(zsig==0.) zsigp=0.1 801 if(zsig<=zsigp) THEN801 IF (zsig<=zsigp) THEN 802 802 v_mq(ij,l)=v_m(ij,l)*(zqp-0.5*zsig/zsigp*(zqp-zq)) 803 803 else … … 890 890 ! qh(ij,l)=q(ij,l) 891 891 ! qb(ij,l)=q(ij,l) 892 ! endif892 ! END IF 893 893 894 894 IF(abs(zdq)>prec) THEN … … 907 907 do l=2,llm 908 908 do ij=1,ip1jmp1 909 if(w_m(ij,l)>=0.) THEN909 IF (w_m(ij,l)>=0.) THEN 910 910 zsigp=zsigb(ij,l) 911 911 zsigm=zsigh(ij,l) … … 924 924 zsig=abs(w_m(ij,l))/zm 925 925 IF(zsig==0.) zsigp=0.1 926 if(zsig<=zsigp) THEN926 IF (zsig<=zsigp) THEN 927 927 w_mq(ij,l)=w_m(ij,l)*(zqp-0.5*zsig/zsigp*(zqp-zq)) 928 928 else -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/comdissnew.h
r5099 r5117 17 17 INTEGER nitergdiv, nitergrot, niterh 18 18 19 integervert_prof_dissip ! vertical profile of horizontal dissipation19 INTEGER vert_prof_dissip ! vertical profile of horizontal dissipation 20 20 ! Allowed values: 21 21 ! 0: rational fraction, function of pressure -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/diagedyn.f90
r5116 r5117 273 273 ! =================================== 274 274 ! 275 IF ( (idiag2>0) . and. (pas(idiag2) /= 0) ) THEN275 IF ( (idiag2>0) .AND. (pas(idiag2) /= 0) ) THEN 276 276 d_h_vcol = (h_vcol_tot - h_vcol_pre(idiag2) )/dtime 277 277 d_h_dair = (h_dair_tot- h_dair_pre(idiag2))/dtime -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/disvert.F90
r5116 r5117 3 3 SUBROUTINE disvert() 4 4 5 useioipsl, ONLY: getin6 use new_unit_m, ONLY: new_unit7 uselmdz_assert, ONLY: assert5 USE ioipsl, ONLY: getin 6 USE lmdz_new_unit, ONLY: new_unit 7 USE lmdz_assert, ONLY: assert 8 8 USE comvert_mod, ONLY: ap, bp, aps, bps, nivsigs, nivsig, dpres, presnivs, & 9 9 pseudoalt, pa, preff, scaleheight, presinter … … 62 62 CALL getin('vert_sampling', vert_sampling) 63 63 WRITE(lunout,*) TRIM(modname)//' vert_sampling = ' // vert_sampling 64 if (llm==39 .and. vert_sampling=="strato") THEN64 IF (llm==39 .AND. vert_sampling=="strato") THEN 65 65 dsigmin=0.3 ! Vieille option par défaut pour CMIP5 66 66 else 67 67 dsigmin=1. 68 endif68 ENDIF 69 69 CALL getin('dsigmin', dsigmin) 70 70 WRITE(LUNOUT,*) trim(modname), 'Discretisation verticale DSIGMIN=',dsigmin -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/disvert_noterre.f90
r5116 r5117 6 6 ! On l'utilise aussi pour Venus et Titan, legerment modifiee. 7 7 8 useIOIPSL8 USE IOIPSL 9 9 USE comvert_mod, ONLY: ap,bp,aps,bps,presnivs,pseudoalt, & 10 10 nivsig,nivsigs,pa,preff,scaleheight … … 168 168 ! 169 169 170 if(hybrid) then ! use hybrid coordinates170 IF (hybrid) then ! use hybrid coordinates 171 171 WRITE(lunout,*) "*********************************" 172 172 WRITE(lunout,*) "Using hybrid vertical coordinates" … … 191 191 ENDDO 192 192 ap(llmp1) = 0. 193 endif193 ENDIF 194 194 195 195 bp(llmp1) = 0. … … 213 213 ENDDO 214 214 215 if(hybrid) THEN215 IF (hybrid) THEN 216 216 aps(llm) = aps(llm-1)**2 / aps(llm-2) 217 217 bps(llm) = 0.5*(bp(llm) + bp(llm+1)) … … 301 301 x1=0 302 302 x2=1 303 if(sig>=1) THEN303 IF (sig>=1) THEN 304 304 newsig= sig 305 else if(sig*preff/pa>=0.25) THEN305 ELSE IF (sig*preff/pa>=0.25) THEN 306 306 DO J=1,9999 ! nombre d''iteration max 307 307 F=((1 -pa/preff)*exp(1-1./newsig**2)+(pa/preff)*newsig)/sig 308 308 ! WRITE(0,*) J, ' newsig =', newsig, ' F= ', F 309 if(F>1) THEN309 IF (F>1) THEN 310 310 X2 = newsig 311 311 newsig=(X1+newsig)*0.5 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/exner_hyb_m.F90
r5116 r5117 45 45 INTEGER ngrid 46 46 REAL p(ngrid,llmp1),pk(ngrid,llm) 47 real, optional:: pkf(ngrid,llm)47 REAL, optional:: pkf(ngrid,llm) 48 48 REAL ps(ngrid),pks(ngrid), alpha(ngrid,llm),beta(ngrid,llm) 49 49 … … 57 57 58 58 ! Sanity check 59 if(firstcall) THEN59 IF (firstcall) THEN 60 60 ! sanity checks for Shallow Water case (1 vertical layer) 61 if(llm==1) THEN62 if(kappa/=1) THEN61 IF (llm==1) THEN 62 IF (kappa/=1) THEN 63 63 CALL abort_gcm(modname, & 64 64 "kappa!=1 , but running in Shallow Water mode!!",42) 65 65 endif 66 if(cpp/=r) THEN66 IF (cpp/=r) THEN 67 67 CALL abort_gcm(modname, & 68 68 "cpp!=r , but running in Shallow Water mode!!",42) 69 69 endif 70 endif ! of if (llm. eq.1)70 endif ! of if (llm.EQ.1) 71 71 72 72 firstcall=.FALSE. … … 74 74 75 75 ! Specific behaviour for Shallow Water (1 vertical layer) case: 76 if(llm==1) THEN76 IF (llm==1) THEN 77 77 ! Compute pks(:),pk(:),pkf(:) 78 78 … … 82 82 ENDDO 83 83 84 if(present(pkf)) THEN84 IF (present(pkf)) THEN 85 85 pkf = pk 86 86 CALL filtreg ( pkf, jmp1, llm, 2, 1, .TRUE., 1 ) … … 89 89 ! our work is done, exit routine 90 90 RETURN 91 endif ! of if (llm. eq.1)91 endif ! of if (llm.EQ.1) 92 92 93 93 ! General case: … … 137 137 ENDDO 138 138 139 if(present(pkf)) THEN139 IF (present(pkf)) THEN 140 140 ! calcul de pkf 141 141 pkf = pk -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/exner_milieu_m.F90
r5116 r5117 42 42 INTEGER ngrid 43 43 REAL p(ngrid,llmp1),pk(ngrid,llm) 44 real, optional:: pkf(ngrid,llm)44 REAL, optional:: pkf(ngrid,llm) 45 45 REAL ps(ngrid),pks(ngrid) 46 46 … … 54 54 55 55 ! Sanity check 56 if(firstcall) THEN56 IF (firstcall) THEN 57 57 ! sanity checks for Shallow Water case (1 vertical layer) 58 if(llm==1) THEN59 if(kappa/=1) THEN58 IF (llm==1) THEN 59 IF (kappa/=1) THEN 60 60 CALL abort_gcm(modname, & 61 61 "kappa!=1 , but running in Shallow Water mode!!",42) 62 62 endif 63 if(cpp/=r) THEN63 IF (cpp/=r) THEN 64 64 CALL abort_gcm(modname, & 65 65 "cpp!=r , but running in Shallow Water mode!!",42) 66 66 endif 67 endif ! of if (llm. eq.1)67 endif ! of if (llm.EQ.1) 68 68 69 69 firstcall=.FALSE. … … 71 71 72 72 ! Specific behaviour for Shallow Water (1 vertical layer) case: 73 if(llm==1) THEN73 IF (llm==1) THEN 74 74 ! Compute pks(:),pk(:),pkf(:) 75 75 … … 79 79 ENDDO 80 80 81 if(present(pkf)) THEN81 IF (present(pkf)) THEN 82 82 pkf = pk 83 83 CALL filtreg ( pkf, jmp1, llm, 2, 1, .TRUE., 1 ) … … 86 86 ! our work is done, exit routine 87 87 RETURN 88 endif ! of if (llm. eq.1)88 endif ! of if (llm.EQ.1) 89 89 90 90 ! General case: … … 116 116 ENDDO 117 117 118 if(present(pkf)) THEN118 IF (present(pkf)) THEN 119 119 ! calcul de pkf 120 120 pkf = pk -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/fxhyp_m.F90
r5116 r5117 18 18 ! 1., taux=0., clon=0.) est à - 180 degrés. 19 19 20 uselmdz_arth, ONLY: arth21 useinvert_zoom_x_m, ONLY: invert_zoom_x, nmax22 use nrtype, ONLY: pi, pi_d, twopi, twopi_d, k823 useprincipal_cshift_m, ONLY: principal_cshift24 useserre_mod, ONLY: clon, grossismx, dzoomx, taux20 USE lmdz_arth, ONLY: arth 21 USE invert_zoom_x_m, ONLY: invert_zoom_x, nmax 22 USE lmdz_physical_constants, ONLY: pi, pi_d, twopi, twopi_d, k8 23 USE principal_cshift_m, ONLY: principal_cshift 24 USE serre_mod, ONLY: clon, grossismx, dzoomx, taux 25 25 26 26 include "dimensions.h" 27 27 ! for iim 28 28 29 REAL, intent(out):: xprimm025(:), rlonv(:), xprimv(:) ! (iim + 1)30 real, intent(out):: rlonu(:), xprimu(:), xprimp025(:) ! (iim + 1)29 REAL, INTENT(OUT):: xprimm025(:), rlonv(:), xprimv(:) ! (iim + 1) 30 REAL, INTENT(OUT):: rlonu(:), xprimu(:), xprimp025(:) ! (iim + 1) 31 31 32 32 ! Local: 33 realrlonm025(iim + 1), rlonp025(iim + 1)33 REAL rlonm025(iim + 1), rlonp025(iim + 1) 34 34 REAL dzoom, step 35 reald_rlonv(iim)35 REAL d_rlonv(iim) 36 36 REAL(K8) xtild(0:2 * nmax) 37 37 REAL(K8) fhyp(nmax:2 * nmax), ffdx, beta, Xprimt(0:2 * nmax) … … 185 185 186 186 IF (MINval(rlonm025(:iim)) < - pi - 0.1 & 187 . or. MAXval(rlonm025(:iim)) > pi + 0.1) THEN187 .OR. MAXval(rlonm025(:iim)) > pi + 0.1) THEN 188 188 IF (clon <= 0.) THEN 189 189 is2 = 1 190 190 191 do while (rlonm025(is2) < - pi . and. is2 < iim)191 do while (rlonm025(is2) < - pi .AND. is2 < iim) 192 192 is2 = is2 + 1 193 193 END DO 194 194 195 if(rlonm025(is2) < - pi) THEN195 IF (rlonm025(is2) < - pi) THEN 196 196 print *, 'Rlonm025 plus petit que - pi !' 197 197 STOP 1 … … 200 200 is2 = iim 201 201 202 do while (rlonm025(is2) > pi . and. is2 > 1)202 do while (rlonm025(is2) > pi .AND. is2 > 1) 203 203 is2 = is2 - 1 204 204 END DO 205 205 206 if(rlonm025(is2) > pi) THEN206 IF (rlonm025(is2) > pi) THEN 207 207 print *, 'Rlonm025 plus grand que pi !' 208 208 STOP 1 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/fyhyp_m.F90
r5116 r5117 16 16 ! Il vaut mieux avoir : grossismy * dzoom < pi / 2 17 17 18 uselmdz_coefpoly, ONLY: coefpoly19 use nrtype, ONLY: k820 useserre_mod, ONLY: clat, grossismy, dzoomy, tauy18 USE lmdz_coefpoly, ONLY: coefpoly 19 USE lmdz_physical_constants, ONLY: k8 20 USE serre_mod, ONLY: clat, grossismy, dzoomy, tauy 21 21 22 22 include "dimensions.h" 23 23 ! for jjm 24 24 25 REAL, intent(out):: rlatu(jjm + 1), yyprimu(jjm + 1)26 REAL, intent(out):: rlatv(jjm)27 real, intent(out):: rlatu2(jjm), yprimu2(jjm), rlatu1(jjm), yprimu1(jjm)25 REAL, INTENT(OUT):: rlatu(jjm + 1), yyprimu(jjm + 1) 26 REAL, INTENT(OUT):: rlatv(jjm) 27 REAL, INTENT(OUT):: rlatu2(jjm), yprimu2(jjm), rlatu1(jjm), yprimu1(jjm) 28 28 29 29 ! Local: … … 179 179 180 180 it = nmax2 181 DO while (it >= 1 . and. yfi < yf(it))181 DO while (it >= 1 .AND. yfi < yf(it)) 182 182 it = it - 1 183 183 END DO … … 201 201 DO 202 202 yi = yi - (yf1-yfi)/yprimin 203 IF (abs(yi-yo1)<=epsilon . or. iter == 300) exit203 IF (abs(yi-yo1)<=epsilon .OR. iter == 300) exit 204 204 yo1 = yi 205 205 yi2 = yi*yi … … 207 207 yprimin = a1 + 2.*a2*yi + 3.*a3*yi2 208 208 END DO 209 if(abs(yi-yo1) > epsilon) THEN209 IF (abs(yi-yo1) > epsilon) THEN 210 210 print *, 'Pas de solution.', j, ylon2 211 211 STOP 1 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/gr_int_dyn.f90
r5116 r5117 34 34 do j = 1, jp1 35 35 do i = 1, iim 36 if(j == 1) THEN36 IF (j == 1) THEN 37 37 champdyn(i, j) = polenord 38 else if(j == jp1) THEN38 ELSE IF (j == jp1) THEN 39 39 champdyn(i, j) = polesud 40 40 else -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/gradsdef.h
r5105 r5117 2 2 ! $Header$ 3 3 4 integernfmx,imx,jmx,lmx,nvarmx4 INTEGER nfmx,imx,jmx,lmx,nvarmx 5 5 parameter(nfmx=10,imx=200,jmx=150,lmx=200,nvarmx=1000) 6 6 7 realxd(imx,nfmx),yd(jmx,nfmx),zd(lmx,nfmx),dtime(nfmx)7 REAL xd(imx,nfmx),yd(jmx,nfmx),zd(lmx,nfmx),dtime(nfmx) 8 8 9 integerimd(imx),jmd(jmx),lmd(lmx)10 integeriid(imx),jid(jmx)11 integerifd(imx),jfd(jmx)12 integerunit(nfmx),irec(nfmx),itime(nfmx),nld(nvarmx,nfmx)9 INTEGER imd(imx),jmd(jmx),lmd(lmx) 10 INTEGER iid(imx),jid(jmx) 11 INTEGER ifd(imx),jfd(jmx) 12 INTEGER unit(nfmx),irec(nfmx),itime(nfmx),nld(nvarmx,nfmx) 13 13 14 integernvar(nfmx),ivar(nfmx)15 logicalfirsttime(nfmx)14 INTEGER nvar(nfmx),ivar(nfmx) 15 LOGICAL firsttime(nfmx) 16 16 17 17 character*10 var(nvarmx,nfmx),fichier(nfmx) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/infotrac.F90
r5103 r5117 3 3 MODULE infotrac 4 4 5 USE strings_mod, ONLY: msg, fmsg, maxlen, cat, dispTable, int2str, bool2str, strStack, strParse6 USE readTracFiles_mod, ONLY: trac_type, readTracersFiles, tracers, setGeneration, itZonIso, nzone, tran0, isoZone, &5 USE lmdz_strings, ONLY: msg, fmsg, maxlen, cat, dispTable, int2str, bool2str, strStack, strParse 6 USE lmdz_readTracFiles, ONLY: trac_type, readTracersFiles, tracers, setGeneration, itZonIso, nzone, tran0, isoZone, & 7 7 delPhase, niso, getKey, isot_type, processIsotopes, isotope, maxTableWidth, iqIsoPha, nphas, ixIso, isoPhas, & 8 8 addPhase, iH2O, addKey, isoSelect, testTracersFiles, isoKeys, indexUpdate, iqWIsoPha, nbIso, ntiso, isoName, isoCheck … … 176 176 IF (nt > 1) THEN 177 177 IF (nt > 2) CALL abort_gcm(modname, 'you need to modify type_trac, this version is not supported by lmdz', 1) 178 if(nt == 2) type_trac = types_trac(2)178 IF (nt == 2) type_trac = types_trac(2) 179 179 ENDIF 180 180 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/iniconst.F90
r5116 r5117 5 5 6 6 USE control_mod 7 useIOIPSL7 USE IOIPSL 8 8 USE comconst_mod, ONLY: im, imp1, jm, jmp1, lllm, lllmm1, lllmp1, & 9 9 unsim, pi, r, kappa, cpp, dtvr, dtphys … … 53 53 54 54 ! vertical discretization: default behavior depends on planet_type flag 55 if(planet_type=="earth") THEN55 IF (planet_type=="earth") THEN 56 56 disvert_type=1 57 57 else 58 58 disvert_type=2 59 endif59 ENDIF 60 60 ! but user can also specify using one or the other in run.def: 61 61 CALL getin('disvert_type',disvert_type) … … 65 65 CALL getin('pressure_exner', pressure_exner) 66 66 67 if(disvert_type==1) THEN67 IF (disvert_type==1) THEN 68 68 ! standard case for Earth (automatic generation of levels) 69 69 CALL disvert() 70 else if(disvert_type==2) THEN70 ELSE IF (disvert_type==2) THEN 71 71 ! standard case for planets (levels generated using z2sig.def file) 72 72 CALL disvert_noterre … … 74 74 WRITE(abort_message,*) "Wrong value for disvert_type: ", disvert_type 75 75 CALL abort_gcm(modname,abort_message,0) 76 endif76 ENDIF 77 77 78 78 END SUBROUTINE iniconst -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inidissip.F90
r5116 r5117 16 16 USE lmdz_filtreg, ONLY: filtreg 17 17 USE lmdz_libmath, ONLY: minmax 18 USE lmdz_ran1, ONLY: ran1 18 19 19 20 IMPLICIT NONE … … 23 24 include "iniprint.h" 24 25 25 LOGICAL, INTENT( in) :: lstardis26 INTEGER, INTENT( in) :: nitergdiv, nitergrot, niterh27 REAL, INTENT( in) :: tetagdiv, tetagrot, tetatemp28 29 integer, INTENT(in) :: vert_prof_dissip26 LOGICAL, INTENT(IN) :: lstardis 27 INTEGER, INTENT(IN) :: nitergdiv, nitergrot, niterh 28 REAL, INTENT(IN) :: tetagdiv, tetagrot, tetatemp 29 30 INTEGER, INTENT(IN) :: vert_prof_dissip 30 31 ! Vertical profile of horizontal dissipation 31 32 ! Allowed values: … … 36 37 REAL fact, zvert(llm), zz 37 38 REAL zh(ip1jmp1), zu(ip1jmp1), gx(ip1jmp1), divgra(ip1jmp1) 38 realzv(ip1jm), gy(ip1jm), deltap(ip1jmp1, llm)39 REAL zv(ip1jm), gy(ip1jm), deltap(ip1jmp1, llm) 39 40 REAL ullm, vllm, umin, vmin, zhmin, zhmax 40 41 REAL zllm … … 43 44 REAL tetamin 44 45 REAL pseudoz 45 character (len = 80) :: abort_message 46 47 REAL ran1 48 46 CHARACTER (LEN = 80) :: abort_message 49 47 50 48 !----------------------------------------------------------------------- … … 174 172 ! -------------------------------------------------- 175 173 176 if(vert_prof_dissip == 1) THEN174 IF (vert_prof_dissip == 1) THEN 177 175 do l = 1, llm 178 176 pseudoz = 8. * log(preff / presnivs(l)) … … 190 188 zvert(l) = fact - (fact - 1.) / (1. + zz * zz) 191 189 ENDDO 192 endif190 ENDIF 193 191 194 192 WRITE(lunout, *)'inidissip: Constantes de temps de la diffusion horizontale' -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inigeom.f90
r5116 r5117 16 16 ! 17 17 ! 18 usefxhyp_m, ONLY: fxhyp19 usefyhyp_m, ONLY: fyhyp18 USE fxhyp_m, ONLY: fxhyp 19 USE fyhyp_m, ONLY: fyhyp 20 20 USE comconst_mod, ONLY: pi, g, omeg, rad 21 21 USE logic_mod, ONLY: fxyhypb, ysinus -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inigrads.f90
r5116 r5117 11 11 REAL :: xmin, xmax, ymin, ymax 12 12 13 CHARACTER(LEN = *), intent(in) :: file14 CHARACTER(LEN = *), intent(in) :: titlel13 CHARACTER(LEN = *), INTENT(IN) :: file 14 CHARACTER(LEN = *), INTENT(IN) :: titlel 15 15 16 16 INCLUDE "gradsdef.h" … … 31 31 unit(9) = 46 32 32 33 if(if<=nf) stop 'verifier les appels a inigrads'33 IF (if<=nf) stop 'verifier les appels a inigrads' 34 34 35 35 PRINT*, 'Entree dans inigrads' -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/initdynav.F90
r5114 r5117 5 5 USE IOIPSL 6 6 USE infotrac, ONLY: nqtot 7 usecom_io_dyn_mod, ONLY: histaveid,histvaveid,histuaveid, &7 USE com_io_dyn_mod, ONLY: histaveid,histvaveid,histuaveid, & 8 8 dynhistave_file,dynhistvave_file,dynhistuave_file 9 9 USE comconst_mod, ONLY: pi … … 42 42 ! Arguments 43 43 44 integerday0, anne045 realtstep, t_ops, t_wrt44 INTEGER day0, anne0 45 REAL tstep, t_ops, t_wrt 46 46 47 47 ! This routine needs IOIPSL to work 48 48 ! Variables locales 49 49 50 integertau051 realzjulian52 integeriq53 realrlong(iip1,jjp1), rlat(iip1,jjp1)54 integeruhoriid, vhoriid, thoriid, zvertiid55 integerii,jj56 integerzan, dayref50 INTEGER tau0 51 REAL zjulian 52 INTEGER iq 53 REAL rlong(iip1,jjp1), rlat(iip1,jjp1) 54 INTEGER uhoriid, vhoriid, thoriid, zvertiid 55 INTEGER ii,jj 56 INTEGER zan, dayref 57 57 58 58 !-------------------------------------------------------------------- -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/initfluxsto.f90
r5116 r5117 64 64 INTEGER :: ii, jj 65 65 INTEGER :: zan, idayref 66 logical:: ok_sync66 LOGICAL :: ok_sync 67 67 ! 68 68 ! Initialisations … … 211 211 CALL histend(filevid) 212 212 CALL histend(filedid) 213 if(ok_sync) THEN213 IF (ok_sync) THEN 214 214 CALL histsync(fileid) 215 215 CALL histsync(filevid) 216 216 CALL histsync(filedid) 217 endif217 ENDIF 218 218 219 219 RETURN -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inter_barxy_m.F90
r5116 r5117 14 14 SUBROUTINE inter_barxy(dlonid, dlatid, champ, rlonimod, rlatimod, champint) 15 15 16 uselmdz_assert_eq, ONLY: assert_eq17 uselmdz_assert, ONLY: assert16 USE lmdz_assert_eq, ONLY: assert_eq 17 USE lmdz_assert, ONLY: assert 18 18 19 19 include "dimensions.h" … … 26 26 ! (for "aire", "apoln", "apols") 27 27 28 REAL, intent(in) :: dlonid(:)28 REAL, INTENT(IN) :: dlonid(:) 29 29 ! (longitude from input file, in rad, from -pi to pi) 30 30 31 REAL, intent(in) :: dlatid(:), champ(:, :), rlonimod(:)32 33 REAL, intent(in) :: rlatimod(:)31 REAL, INTENT(IN) :: dlatid(:), champ(:, :), rlonimod(:) 32 33 REAL, INTENT(IN) :: rlatimod(:) 34 34 ! (latitude angle, in degrees or rad, in strictly decreasing order) 35 35 36 real, intent(out) :: champint(:, :)36 REAL, INTENT(OUT) :: champint(:, :) 37 37 ! Si taille de la seconde dim = jjm + 1, on veut interpoler sur les 38 38 ! jjm+1 latitudes rlatu du modele (latitudes des scalaires et de U) … … 43 43 44 44 REAL champy(iim, size(champ, 2)) 45 integerj, i, jnterfd, jmods45 INTEGER j, i, jnterfd, jmods 46 46 47 47 REAL yjmod(size(champint, 2)) … … 78 78 ENDIF 79 79 80 if(jmods == jjm + 1) yjmod(jjm + 1) = 90.80 IF (jmods == jjm + 1) yjmod(jjm + 1) = 90. 81 81 82 82 DO j = 1, jnterfd + 1 … … 121 121 IMPLICIT NONE 122 122 123 REAL, intent(in) :: dlonid(:)124 real, intent(in) :: fdat(:)125 real, intent(in) :: rlonimod(:)126 127 realinter_barx(size(rlonimod))123 REAL, INTENT(IN) :: dlonid(:) 124 REAL, INTENT(IN) :: fdat(:) 125 REAL, INTENT(IN) :: rlonimod(:) 126 127 REAL inter_barx(size(rlonimod)) 128 128 129 129 ! ... Variables locales ... … … 184 184 185 185 i = 2 186 DO while (xxd(i) >= xxd(i - 1) . and. i < idatmax)186 DO while (xxd(i) >= xxd(i - 1) .AND. i < idatmax) 187 187 i = i + 1 188 188 ENDDO … … 299 299 ! L'indice 1 correspond à l'interface maille 1 -- maille 2. 300 300 301 uselmdz_assert, ONLY: assert301 USE lmdz_assert, ONLY: assert 302 302 303 303 IMPLICIT NONE 304 304 305 REAL, intent(in) :: yjdat(:)305 REAL, INTENT(IN) :: yjdat(:) 306 306 ! (angles, ordonnées des interfaces des mailles des données, in 307 307 ! degrees, in increasing order) 308 308 309 REAL, intent(in) :: fdat(:) ! champ de données310 311 REAL, intent(in) :: yjmod(:)309 REAL, INTENT(IN) :: fdat(:) ! champ de données 310 311 REAL, INTENT(IN) :: yjmod(:) 312 312 ! (ordonnées des interfaces des mailles du modèle) 313 313 ! (in degrees, in strictly increasing order) … … 319 319 REAL y0, dy, dym 320 320 INTEGER jdat ! indice du champ de données 321 integerjmod ! indice du champ du modèle321 INTEGER jmod ! indice du champ du modèle 322 322 323 323 !------------------------------------ … … 373 373 ! Finally, the procedure adds 90° as the last value of the array. 374 374 375 uselmdz_assert_eq, ONLY: assert_eq376 usecomconst_mod, ONLY: pi375 USE lmdz_assert_eq, ONLY: assert_eq 376 USE comconst_mod, ONLY: pi 377 377 378 378 IMPLICIT NONE 379 379 380 REAL, intent(in) :: xi(:)380 REAL, INTENT(IN) :: xi(:) 381 381 ! (latitude, in degrees or radians, in increasing or decreasing order) 382 382 ! ("xi" should contain latitudes from pole to pole. … … 385 385 ! So the extreme values should not be 90° and -90°.) 386 386 387 REAL, intent(out) :: xo(:) ! angles in degrees388 LOGICAL, intent(out) :: decrois387 REAL, INTENT(OUT) :: xo(:) ! angles in degrees 388 LOGICAL, INTENT(OUT) :: decrois 389 389 390 390 ! Variables local to the procedure: … … 410 410 end IF 411 411 412 IF (ABS(abs(xo(1)) - 90) < 0.001 . or. ABS(abs(xo(nmax)) - 90) < 0.001) THEN412 IF (ABS(abs(xo(1)) - 90) < 0.001 .OR. ABS(abs(xo(nmax)) - 90) < 0.001) THEN 413 413 print *, "ord_coord" 414 414 PRINT *, '"xi" should contain the latitudes of the boundaries of ' & … … 429 429 ! order. 430 430 431 usecomconst_mod, ONLY: pi431 USE comconst_mod, ONLY: pi 432 432 433 433 IMPLICIT NONE 434 434 435 REAL, intent(in) :: xi(:) ! angle, in rad or degrees435 REAL, INTENT(IN) :: xi(:) ! angle, in rad or degrees 436 436 REAL ord_coordm(size(xi)) ! angle, in degrees 437 437 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/invert_zoom_x_m.F90
r5116 r5117 9 9 SUBROUTINE invert_zoom_x(xf, xtild, Xprimt, xlon, xprimm, xuv) 10 10 11 uselmdz_coefpoly, ONLY: coefpoly12 use nrtype, ONLY: pi, pi_d, twopi_d, k813 useserre_mod, ONLY: clon11 USE lmdz_coefpoly, ONLY: coefpoly 12 USE lmdz_physical_constants, ONLY: pi, pi_d, twopi_d, k8 13 USE serre_mod, ONLY: clon 14 14 15 15 include "dimensions.h" 16 16 ! for iim 17 17 18 REAL(K8), intent(in):: Xf(0:), xtild(0:), Xprimt(0:) ! (0:2 * nmax)19 real, intent(out):: xlon(:), xprimm(:) ! (iim)18 REAL(K8), INTENT(IN):: Xf(0:), xtild(0:), Xprimt(0:) ! (0:2 * nmax) 19 REAL, INTENT(OUT):: xlon(:), xprimm(:) ! (iim) 20 20 21 REAL(K8), intent(in):: xuv21 REAL(K8), INTENT(IN):: xuv 22 22 ! 0. si calcul aux points scalaires 23 23 ! 0.5 si calcul aux points U … … 25 25 ! Local: 26 26 REAL(K8) xo1, Xfi, a0, a1, a2, a3, Xf1, Xprimin 27 integeri, it, iter27 INTEGER i, it, iter 28 28 REAL(K8), parameter:: my_eps = 1e-6_k8 29 29 … … 37 37 38 38 it = 2 * nmax 39 do while (xfi < xf(it) . and. it >= 1)39 do while (xfi < xf(it) .AND. it >= 1) 40 40 it = it - 1 41 41 END DO … … 56 56 iter = 1 57 57 58 do58 DO 59 59 xvrai(i) = xvrai(i) - (Xf1 - Xfi) / Xprimin 60 IF (ABS(xvrai(i) - xo1) <= my_eps . or. iter == 300) exit60 IF (ABS(xvrai(i) - xo1) <= my_eps .OR. iter == 300) exit 61 61 xo1 = xvrai(i) 62 62 Xf1 = a0 + xvrai(i) * (a1 + xvrai(i) * (a2 + xvrai(i) * a3)) … … 64 64 end DO 65 65 66 if(ABS(xvrai(i) - xo1) > my_eps) THEN66 IF (ABS(xvrai(i) - xo1) > my_eps) THEN 67 67 ! iter == 300 68 68 print *, 'Pas de solution.' -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/iso_verif_dyn.f90
r5116 r5117 13 13 INTEGER :: iso_verif_noNaN_nostop 14 14 15 if ((x>-borne).and.(x<borne)) THEN15 IF ((x>-borne).AND.(x<borne)) THEN 16 16 iso_verif_noNAN_nostop=0 17 17 else … … 47 47 iso_verif_egalite_nostop=0 48 48 49 if(abs(a-b)>errmax) THEN50 if(abs((a-b)/max(max(abs(b),abs(a)),1e-18)) &49 IF (abs(a-b)>errmax) THEN 50 IF (abs((a-b)/max(max(abs(b),abs(a)),1e-18)) & 51 51 >errmaxrel) THEN 52 52 WRITE(*,*) 'erreur detectee par iso_verif_egalite:' … … 84 84 85 85 ! verifier que HDO est raisonable 86 if(q>qmin) THEN86 IF (q>qmin) THEN 87 87 IF(getKey('tnat', tnat, isoName(iso))) THEN 88 88 err_msg = 'Missing isotopic parameter "tnat"' … … 91 91 END IF 92 92 deltaD=(x/q/tnat-1)*1000 93 if ((deltaD>deltaDmax).or.(deltaD<deltaDmin)) THEN93 IF ((deltaD>deltaDmax).OR.(deltaD<deltaDmin)) THEN 94 94 WRITE(*,*) 'erreur detectee par iso_verif_aberrant:' 95 95 WRITE(*,*) err_msg … … 98 98 WRITE(*,*) 'iso=',iso 99 99 iso_verif_aberrant_nostop=1 100 endif !if ((deltaD.gt.deltaDmax). or.(deltaD.lt.deltaDmin)) THEN100 endif !if ((deltaD.gt.deltaDmax).OR.(deltaD.lt.deltaDmin)) THEN 101 101 endif !if (q(i,k,iq).gt.qmin) THEN 102 102 RETURN -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/limx.f90
r5116 r5117 85 85 do ij=iip2+1,ip1jm 86 86 IF( dxqu(ij-1)*dxqu(ij)>0. & 87 . and. dxq(ij,l)*dxqu(ij)>0.) THEN87 .AND. dxq(ij,l)*dxqu(ij)>0.) THEN 88 88 dxq(ij,l)= & 89 89 sign(min(abs(dxq(ij,l)),dxqmax(ij)),dxq(ij,l)) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/limy.f90
r5116 r5117 67 67 sinlon(1)=sinlon(iip1) 68 68 sinlondlon(1)=sinlondlon(iip1) 69 endif69 ENDIF 70 70 71 71 ! … … 158 158 dyqmax(ij)=pente_max*abs(dyqv(ij)) 159 159 enddo 160 endif160 ENDIF 161 161 162 162 IF(dyqv(ismax(iim,dyqv(ip1jm-iip1+1),1)+ip1jm-iip1+1)* & … … 170 170 dyqmax(ij)=pente_max*abs(dyqv(ij-iip1)) 171 171 enddo 172 endif172 ENDIF 173 173 174 174 ! calcul des pentes limitees -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/limz.f90
r5116 r5117 78 78 do l=2,llm-1 79 79 IF( dzqw(l-1)*dzqw(l)>0. & 80 . and. dzq(ij,l)*dzqw(l)>0.) THEN80 .AND. dzq(ij,l)*dzqw(l)>0.) THEN 81 81 dzq(ij,l)= & 82 82 sign(min(abs(dzq(ij,l)),dzqmax(l)),dzq(ij,l)) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/misc_mod.F90
r2311 r5117 1 1 module misc_mod 2 integer,save :: itaumax2 INTEGER,save :: itaumax 3 3 logical,save :: adjust 4 integer,save :: ItCount4 INTEGER,save :: ItCount 5 5 logical,save :: debug 6 6 end module misc_mod -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/pentes_ini.f90
r5116 r5117 58 58 INTEGER :: ismax,ismin,lati,latf 59 59 EXTERNAL SSUM, ismin,ismax 60 logical:: first60 LOGICAL :: first 61 61 save first 62 62 ! fin modif … … 72 72 limit = .TRUE. 73 73 pente_max=2 74 ! if (mode. eq.1.or.mode.eq.3) THEN75 ! if (mode. eq.1) THEN76 if(mode>=1) THEN74 ! if (mode.EQ.1.OR.mode.EQ.3) THEN 75 ! if (mode.EQ.1) THEN 76 IF (mode>=1) THEN 77 77 lati=2 78 78 latf=jjm … … 80 80 lati=1 81 81 latf=jjp1 82 endif82 ENDIF 83 83 84 84 qmin=0.4995 … … 110 110 ENDDO 111 111 112 endif112 ENDIF 113 113 ! Fin modif Fred 114 114 … … 245 245 sx(1,jjp1,l)=sx(iip1,jjp1,l) 246 246 enddo 247 endif248 249 if(mode==4) THEN247 ENDIF 248 249 IF (mode==4) THEN 250 250 do l=1,llm 251 251 do i=1,iip1 … … 256 256 enddo 257 257 enddo 258 endif258 ENDIF 259 259 CALL limx(s0,sx,sm,pente_max) 260 260 ! CALL minmaxq(zq,1.e33,-1.e33,'avant advx ') 261 261 CALL advx( limit,.5*dtvr,pbaru,sm,s0,sx,sy,sz,lati,latf) 262 262 ! CALL minmaxq(zq,1.e33,-1.e33,'avant advy ') 263 if(mode==4) THEN263 IF (mode==4) THEN 264 264 do l=1,llm 265 265 do i=1,iip1 … … 270 270 enddo 271 271 enddo 272 endif272 ENDIF 273 273 CALL limy(s0,sy,sm,pente_max) 274 274 CALL advy( limit,.5*dtvr,pbarv,sm,s0,sx,sy,sz ) … … 282 282 CALL limz(s0,sz,sm,pente_max) 283 283 CALL advz( limit,dtvr,w,sm,s0,sx,sy,sz ) 284 if(mode==4) THEN284 IF (mode==4) THEN 285 285 do l=1,llm 286 286 do i=1,iip1 … … 291 291 enddo 292 292 enddo 293 endif293 ENDIF 294 294 CALL limy(s0,sy,sm,pente_max) 295 295 CALL advy( limit,.5*dtvr,pbarv,sm,s0,sx,sy,sz ) … … 306 306 307 307 ! CALL minmaxq(zq,1.e33,-1.e33,'avant advx ') 308 if(mode==4) THEN308 IF (mode==4) THEN 309 309 do l=1,llm 310 310 do i=1,iip1 … … 315 315 enddo 316 316 enddo 317 endif317 ENDIF 318 318 CALL limx(s0,sx,sm,pente_max) 319 319 CALL advx( limit,.5*dtvr,pbaru,sm,s0,sx,sy,sz,lati,latf) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/ppm3d.f90
r5116 r5117 269 269 ! User modifiable parameters 270 270 ! 271 integer,parameter :: Jmax = 361, kmax = 150271 INTEGER,parameter :: Jmax = 361, kmax = 150 272 272 ! 273 273 ! ****6***0*********0*********0*********0*********0*********0**********72 … … 282 282 INTEGER :: IMRD2 283 283 REAL :: PT 284 logical:: cross, fill, dum284 LOGICAL :: cross, fill, dum 285 285 ! 286 286 ! Local dynamic arrays … … 327 327 WRITE(6,*) 'NLAY must be >= 6' 328 328 stop 329 endif330 if(JNP<NLAY) THEN329 ENDIF 330 IF (JNP<NLAY) THEN 331 331 WRITE(6,*) 'JNP must be >= NLAY' 332 332 stop 333 endif333 ENDIF 334 334 IMRD2=mod(IMR,2) 335 if (j1==2.and.IMRD2/=0) THEN335 IF (j1==2.AND.IMRD2/=0) THEN 336 336 WRITE(6,*) 'if j1=2 IMR must be an even integer' 337 337 stop 338 endif339 340 ! 341 IF(Jmax<JNP . or. Kmax<NLAY) THEN338 ENDIF 339 340 ! 341 IF(Jmax<JNP .OR. Kmax<NLAY) THEN 342 342 WRITE(6,*) 'Jmax or Kmax is too small' 343 343 stop 344 endif344 ENDIF 345 345 ! 346 346 DO k=1,NLAY … … 359 359 ! Define cosine consistent with GEOS-GCM (using dycore2.0 or later) 360 360 CALL cosc(cosp,cose,JNP,PI,DP) 361 endif361 ENDIF 362 362 ! 363 363 do J=2,JMR … … 370 370 acosp(1) = RCAP 371 371 acosp(JNP) = RCAP 372 endif372 ENDIF 373 373 ! 374 374 IF(NDT0 /= NDT) THEN … … 384 384 IF(MaxDT < abs(NDT)) THEN 385 385 WRITE(6,*) 'Warning!!! NDT maybe too large!' 386 endif386 ENDIF 387 387 ! 388 388 IF(CR1>=0.95) THEN … … 398 398 IML = min(6*JS0/(J1-1)+2, 4*IMR/5) 399 399 JN0 = JNP-JS0+1 400 endif400 ENDIF 401 401 ! 402 402 ! … … 414 414 ! 415 415 ! WRITE(6,*) 'J1=',J1,' J2=', J2 416 endif416 ENDIF 417 417 ! 418 418 ! *********** End Initialization ********************** … … 438 438 END DO 439 439 END DO 440 endif440 ENDIF 441 441 ! 442 442 ! Compute "tracer density" … … 472 472 CRY(i,2) = DTDY*V(i,1,k) 473 473 END DO 474 endif474 ENDIF 475 475 ! 476 476 ! Determine JS and JN … … 483 483 JS = j 484 484 go to 2222 485 endif485 ENDIF 486 486 enddo 487 487 enddo … … 493 493 JN = j 494 494 go to 2233 495 endif495 ENDIF 496 496 enddo 497 497 enddo … … 503 503 DPI(i,JMR,k) = 0. 504 504 enddo 505 endif505 ENDIF 506 506 ! 507 507 ! ******* Compute horizontal mass fluxes ************ … … 596 596 VA(IMR,1)=VA(1,1) 597 597 VA(IMR,JNP)=VA(1,JNP) 598 endif598 ENDIF 599 599 ! 600 600 ! ****6***0*********0*********0*********0*********0*********0**********72 … … 608 608 ! E-W advective cross term 609 609 do j=J1,J2 610 IF(J>JS . and. J<JN) GO TO 250610 IF(J>JS .AND. J<JN) GO TO 250 611 611 ! 612 612 do i=1,IMR … … 627 627 else 628 628 wk1(i,j,1) = qtmp(iiu)+ru*(qtmp(iiu)-qtmp(iiu+1)) 629 endif629 ENDIF 630 630 wk1(i,j,1) = wk1(i,j,1) - qtmp(i) 631 631 END DO … … 648 648 enddo 649 649 enddo 650 endif650 ENDIF 651 651 ! ****6***0*********0*********0*********0*********0*********0**********72 652 652 ! Contribution from the N-S advection … … 681 681 enddo 682 682 enddo 683 endif683 ENDIF 684 684 ! 685 685 CALL xtp(IMR,JNP,IML,j1,j2,JN,JS,PU,DQ(1,1,k,IC),wk1(1,1,2) & … … 773 773 END DO 774 774 END DO 775 endif775 ENDIF 776 776 END DO 777 777 ! … … 783 783 END DO 784 784 END DO 785 endif785 ENDIF 786 786 ! 787 787 RETURN … … 792 792 flux,wk1,wk2,wz2,delp,KORD) 793 793 IMPLICIT NONE 794 integer,parameter :: kmax = 150795 real,parameter :: R23 = 2./3., R3 = 1./3.794 INTEGER,parameter :: kmax = 150 795 REAL,parameter :: R23 = 2./3., R3 = 1./3. 796 796 INTEGER :: IMR,JNP,NLAY,J1,KORD 797 797 REAL :: WZ(IMR,JNP,NLAY),P(IMR,JNP,NLAY),DC(IMR,JNP,NLAY), & … … 838 838 ! 839 839 DO j=1,JNP 840 if((j==2 .or. j==JMR) .and. j1/=2) goto 2000840 IF((j==2 .OR. j==JMR) .AND. j1/=2) goto 2000 841 841 ! 842 842 DO k=1,NLAY … … 942 942 flux(i,2) = AL(i,2)+0.5*CP*(AL(i,2)-AR(i,2)-A6(i,2)*(1.+R23*CP)) 943 943 ! print *,'test2',i, AL(i,2),AR(i,2),A6(i,2),R23 944 endif944 ENDIF 945 945 END DO 946 946 ! … … 990 990 enddo 991 991 ! 992 IF(j>=JN . or. j<=JS) goto 2222992 IF(j>=JN .OR. j<=JS) goto 2222 993 993 ! ************* Eulerian ********** 994 994 ! … … 998 998 qtmp(IMP+1) = q(2,J) 999 999 ! 1000 IF(IORD==1 . or. j==j1 .or. j==j2) THEN1000 IF(IORD==1 .OR. j==j1 .OR. j==j2) THEN 1001 1001 DO i=1,IMR 1002 1002 iu = REAL(i) - uc(i,j) … … 1007 1007 DC(0) = DC(IMR) 1008 1008 ! 1009 IF(IORD==2 . or. j<=j1vl .or. j>=j2vl) THEN1009 IF(IORD==2 .OR. j<=j1vl .OR. j>=j2vl) THEN 1010 1010 DO i=1,IMR 1011 1011 iu = REAL(i) - uc(i,j) … … 1014 1014 else 1015 1015 CALL fxppm(IMR,IML,UC(1,j),Qtmp,DC,fx1,IORD) 1016 endif1016 ENDIF 1017 1017 ! 1018 1018 ENDIF … … 1033 1033 enddo 1034 1034 ! 1035 IF(IORD==1 . or. j==j1 .or. j==j2) THEN1035 IF(IORD==1 .OR. j==j1 .OR. j==j2) THEN 1036 1036 DO i=1,IMR 1037 1037 itmp = INT(uc(i,j)) … … 1068 1068 enddo 1069 1069 !DIR$ VECTOR 1070 endif1070 ENDIF 1071 1071 END DO 1072 1072 do i=1,IMR … … 1091 1091 INTEGER :: IMR,IML,IORD 1092 1092 REAL :: UT,P,DC,flux 1093 real,parameter :: R3 = 1./3., R23 = 2./3.1093 REAL,parameter :: R3 = 1./3., R23 = 2./3. 1094 1094 DIMENSION UT(*),flux(*),P(-IML:IMR+IML+1),DC(-IML:IMR+IML+1) 1095 1095 REAL :: AR(0:IMR),AL(0:IMR),A6(0:IMR) 1096 1096 INTEGER :: LMT,IMP,JLVL,i 1097 ! logicalfirst1097 ! LOGICAL first 1098 1098 ! data first /.TRUE./ 1099 1099 ! SAVE LMT … … 1112 1112 ! else 1113 1113 ! LMT = IORD - 3 1114 ! endif1114 ! ENDIF 1115 1115 ! 1116 1116 LMT = IORD - 3 1117 1117 ! WRITE(6,*) 'PPM option in E-W direction = ', LMT 1118 1118 ! first = .FALSE. 1119 ! endif1119 ! END IF 1120 1120 ! 1121 1121 DO i=1,IMR … … 1145 1145 flux(i) = AL(i) - 0.5*UT(i)*(AR(i) - AL(i) + & 1146 1146 A6(i)*(1.+R23*UT(i))) 1147 endif1147 ENDIF 1148 1148 enddo 1149 1149 RETURN … … 1153 1153 IMPLICIT NONE 1154 1154 INTEGER :: IMR,IML 1155 real,parameter :: R24 = 1./24.1155 REAL,parameter :: R24 = 1./24. 1156 1156 REAL :: P(-IML:IMR+1+IML),DC(-IML:IMR+1+IML) 1157 1157 INTEGER :: i … … 1191 1191 CALL ymist(IMR,JNP,j1,P,DC2,4) 1192 1192 ! 1193 IF(JORD<=0 . or. JORD>=3) THEN1193 IF(JORD<=0 .OR. JORD>=3) THEN 1194 1194 CALL fyppm(VC,P,DC2,fx,IMR,JNP,j1,j2,A6,AR,AL,JORD) 1195 1195 … … 1199 1199 fx(i,j1) = p(i,JT) + (sign(1.,VC(i,j1))-VC(i,j1))*DC2(i,JT) 1200 1200 END DO 1201 endif1202 endif1201 ENDIF 1202 ENDIF 1203 1203 ! 1204 1204 DO i=1,len … … 1232 1232 DQ(i,JMR) = sum2 1233 1233 enddo 1234 endif1234 ENDIF 1235 1235 ! 1236 1236 RETURN … … 1240 1240 IMPLICIT NONE 1241 1241 INTEGER :: IMR,JNP,j1,ID 1242 real,parameter :: R24 = 1./24.1242 REAL,parameter :: R24 = 1./24. 1243 1243 REAL :: P(IMR,JNP),DC(IMR,JNP) 1244 1244 INTEGER :: iimh,jmr,ijm3,imh,i … … 1315 1315 DC(i,JNP) = - DC(i-imh,JNP) 1316 1316 END DO 1317 endif1317 ENDIF 1318 1318 RETURN 1319 1319 END SUBROUTINE ymist … … 1322 1322 IMPLICIT NONE 1323 1323 INTEGER :: IMR,JNP,j1,j2,JORD 1324 real,parameter :: R3 = 1./3., R23 = 2./3.1324 REAL,parameter :: R3 = 1./3., R23 = 2./3. 1325 1325 REAL :: VC(IMR,*),flux(IMR,*),P(IMR,*),DC(IMR,*) 1326 1326 ! Local work arrays. … … 1328 1328 INTEGER :: LMT,i 1329 1329 INTEGER :: IMH,JMR,j11,IMJM1,len 1330 ! logicalfirst1330 ! LOGICAL first 1331 1331 ! data first /.TRUE./ 1332 1332 ! SAVE LMT … … 1348 1348 ! else 1349 1349 ! LMT = JORD - 3 1350 ! endif1350 ! END IF 1351 1351 ! 1352 1352 ! first = .FALSE. 1353 ! endif1353 ! ENDIF 1354 1354 ! 1355 1355 ! modifs pour pouvoir choisir plusieurs schemas PPM … … 1394 1394 flux(i,j1) = AL(i,j1) - 0.5*VC(i,j1)*(AR(i,j1) - AL(i,j1) + & 1395 1395 A6(i,j1)*(1.+R23*VC(i,j1))) 1396 endif1396 ENDIF 1397 1397 END DO 1398 1398 RETURN … … 1498 1498 JMR = JNP-1 1499 1499 do j=j1,j2 1500 IF(J>JS . and. J<JN) GO TO 13091500 IF(J>JS .AND. J<JN) GO TO 1309 1501 1501 ! 1502 1502 do i=1,IMR … … 1527 1527 else 1528 1528 adx(i,j) = qtmp(iiu)+ru*(qtmp(iiu)-qtmp(iiu+1)) 1529 endif1529 ENDIF 1530 1530 enddo 1531 1531 ENDIF … … 1598 1598 ! LMT = 2: POSITIVE-DEFINITE CONSTRAINT 1599 1599 ! 1600 real,parameter :: R12 = 1./12.1600 REAL,parameter :: R12 = 1./12. 1601 1601 REAL :: A6(IM),AR(IM),AL(IM),P(IM),DC(IM) 1602 1602 INTEGER :: IM,LMT … … 1621 1621 A6(i) = 3.*(AR(i)-p(i)) 1622 1622 AL(i) = AR(i) - A6(i) 1623 endif1624 endif1623 ENDIF 1624 ENDIF 1625 1625 END DO 1626 1626 elseif(LMT==1) THEN … … 1628 1628 do i=1,IM 1629 1629 IF(abs(AR(i)-AL(i)) >= -A6(i)) go to 150 1630 IF(p(i)<AR(i) . and. p(i)<AL(i)) THEN1630 IF(p(i)<AR(i) .AND. p(i)<AL(i)) THEN 1631 1631 AR(i) = p(i) 1632 1632 AL(i) = p(i) … … 1638 1638 A6(i) = 3.*(AR(i)-p(i)) 1639 1639 AL(i) = AR(i) - A6(i) 1640 endif1640 ENDIF 1641 1641 150 continue 1642 1642 END DO … … 1646 1646 fmin = p(i) + 0.25*(AR(i)-AL(i))**2/A6(i) + A6(i)*R12 1647 1647 IF(fmin>=0.) go to 250 1648 IF(p(i)<AR(i) . and. p(i)<AL(i)) THEN1648 IF(p(i)<AR(i) .AND. p(i)<AL(i)) THEN 1649 1649 AR(i) = p(i) 1650 1650 AL(i) = p(i) … … 1656 1656 A6(i) = 3.*(AR(i)-p(i)) 1657 1657 AL(i) = AR(i) - A6(i) 1658 endif1658 ENDIF 1659 1659 250 continue 1660 1660 END DO 1661 endif1661 ENDIF 1662 1662 RETURN 1663 1663 END SUBROUTINE lmtppm … … 1708 1708 cose(j) = cose(JNP+2-j) 1709 1709 enddo 1710 endif1710 ENDIF 1711 1711 ! 1712 1712 do j=2,JMR … … 1746 1746 cross,IC,NSTEP) 1747 1747 ! 1748 real,parameter :: tiny = 1.E-601748 REAL,parameter :: tiny = 1.E-60 1749 1749 INTEGER :: IMR,JNP,NLAY,j1,j2,IC,NSTEP 1750 1750 REAL :: Q(IMR,JNP,NLAY),qtmp(IMR,JNP),cosp(*),acosp(*) 1751 logical:: cross1751 LOGICAL :: cross 1752 1752 INTEGER :: NLAYM1,len,ip,L,icr,ipy,ipx,i 1753 1753 REAL :: qup,qly,dup,sum … … 1767 1767 IF(cross) THEN 1768 1768 CALL filcr(q(1,1,L),IMR,JNP,j1,j2,cosp,acosp,icr,tiny) 1769 endif1769 ENDIF 1770 1770 IF(icr==0) goto 50 1771 1771 ! … … 1776 1776 Q(i,j1,2) = Q(i,j1,2) + Q(i,j1,1) 1777 1777 Q(i,j1,1) = 0. 1778 endif1778 ENDIF 1779 1779 enddo 1780 1780 ! … … 1789 1789 IF(cross) THEN 1790 1790 CALL filcr(q(1,1,L),IMR,JNP,j1,j2,cosp,acosp,icr,tiny) 1791 endif1791 ENDIF 1792 1792 IF(icr==0) goto 225 1793 1793 ! … … 1843 1843 WRITE(6,*) 'IC=',IC,' STEP=',NSTEP, & 1844 1844 ' Vertical filling pts=',ip 1845 endif1845 ENDIF 1846 1846 ! 1847 1847 IF(sum>1.e-25) THEN 1848 1848 WRITE(6,*) IC,NSTEP,' Mass source from the ground=',sum 1849 endif1849 ENDIF 1850 1850 RETURN 1851 1851 END SUBROUTINE qckxyz … … 1875 1875 q(i+1,j-1) = (ds - d2)*acosp(j-1) 1876 1876 q(i,j) = (d2 - dq)*acosp(j) + tiny 1877 endif1878 END DO 1879 IF(icr==0 . and. q(IMR,j)>=0.) goto 651877 ENDIF 1878 END DO 1879 IF(icr==0 .AND. q(IMR,j)>=0.) goto 65 1880 1880 DO i=2,IMR 1881 1881 IF(q(i,j)<0.) THEN … … 1894 1894 q(i-1,j-1) = (ds - d2)*acosp(j-1) 1895 1895 q(i,j) = (d2 - dq)*acosp(j) + tiny 1896 endif1896 ENDIF 1897 1897 END DO 1898 1898 ! ***************************************** … … 1914 1914 q(IMR,j-1) = (ds - d2)*acosp(j-1) 1915 1915 q(i,j) = (d2 - dq)*acosp(j) + tiny 1916 endif1916 ENDIF 1917 1917 ! ***************************************** 1918 1918 ! i=IMR … … 1933 1933 q(1,j-1) = (ds - d2)*acosp(j-1) 1934 1934 q(i,j) = (d2 - dq)*acosp(j) + tiny 1935 endif1935 ENDIF 1936 1936 ! ***************************************** 1937 1937 65 continue … … 1939 1939 ! 1940 1940 do i=1,IMR 1941 IF(q(i,j1)<0. . or. q(i,j2)<0.) THEN1941 IF(q(i,j1)<0. .OR. q(i,j2)<0.) THEN 1942 1942 icr = 1 1943 1943 goto 80 1944 endif1944 ENDIF 1945 1945 enddo 1946 1946 ! 1947 1947 80 continue 1948 1948 ! 1949 IF(q(1,1)<0. . or. q(1,jnp)<0.) THEN1949 IF(q(1,1)<0. .OR. q(1,jnp)<0.) THEN 1950 1950 icr = 1 1951 endif1951 ENDIF 1952 1952 ! 1953 1953 RETURN … … 1960 1960 REAL :: DP,CAP1,dq,dn,d0,d1,ds,d2 1961 1961 INTEGER :: i,j 1962 ! logicalfirst1962 ! LOGICAL first 1963 1963 ! data first /.TRUE./ 1964 1964 ! save cap1 … … 1968 1968 CAP1 = IMR*(1.-COS((j1-1.5)*DP))/DP 1969 1969 ! first = .FALSE. 1970 ! endif1970 ! END IF 1971 1971 ! 1972 1972 ipy = 0 … … 1988 1988 q(i,j-1) = (ds - d2)*acosp(j-1) 1989 1989 q(i,j) = (d2 - dq)*acosp(j) + tiny 1990 endif1990 ENDIF 1991 1991 END DO 1992 1992 END DO … … 2002 2002 q(i,j1+1) = (dn - d1)*acosp(j1+1) 2003 2003 q(i,j1) = (d1 - dq)*acosp(j1) + tiny 2004 endif2004 ENDIF 2005 2005 enddo 2006 2006 ! … … 2016 2016 q(i,j-1) = (ds - d2)*acosp(j-1) 2017 2017 q(i,j) = (d2 - dq)*acosp(j) + tiny 2018 endif2018 ENDIF 2019 2019 enddo 2020 2020 ! … … 2027 2027 IF(q(i,j1)<0.) ipy = 1 2028 2028 enddo 2029 endif2029 ENDIF 2030 2030 ! 2031 2031 IF(q(1,JNP)<0.) THEN … … 2036 2036 IF(q(i,j2)<0.) ipy = 1 2037 2037 enddo 2038 endif2038 ENDIF 2039 2039 ! 2040 2040 RETURN … … 2070 2070 qtmp(j,i+1) = qtmp(j,i+1) - d2 2071 2071 qtmp(j,i) = qtmp(j,i) + d2 + tiny 2072 endif2072 ENDIF 2073 2073 END DO 2074 2074 END DO … … 2089 2089 ! 2090 2090 qtmp(j,i) = qtmp(j,i) + d2 + tiny 2091 endif2091 ENDIF 2092 2092 END DO 2093 2093 i=IMR … … 2106 2106 ! 2107 2107 qtmp(j,i) = qtmp(j,i) + d2 + tiny 2108 endif2108 ENDIF 2109 2109 END DO 2110 2110 ! … … 2118 2118 ! 2119 2119 ! Poles. 2120 IF(q(1,1)<0 . or. q(1,JNP)<0.) ipx = 12121 endif2120 IF(q(1,1)<0 .OR. q(1,JNP)<0.) ipx = 1 2121 ENDIF 2122 2122 RETURN 2123 2123 END SUBROUTINE filew -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/prather.f90
r5116 r5117 62 62 INTEGER :: ismax,ismin 63 63 EXTERNAL SSUM, ismin,ismax 64 logical:: first64 LOGICAL :: first 65 65 save first 66 66 EXTERNAL advxp,advyp,advzp … … 109 109 ENDDO 110 110 ENDDO 111 endif111 ENDIF 112 112 ! Fin modif Fred 113 113 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/principal_cshift_m.F90
r5116 r5117 11 11 ! xprimm. 12 12 13 use nrtype, ONLY: twopi14 useserre_mod, ONLY: clon13 USE lmdz_physical_constants, ONLY: twopi 14 USE serre_mod, ONLY: clon 15 15 16 16 include "dimensions.h" 17 17 ! for iim 18 18 19 integer, intent(in):: is220 real, intent(inout):: xlon(:), xprimm(:) ! (iim + 1)19 INTEGER, INTENT(IN):: is2 20 REAL, INTENT(INOUT):: xlon(:), xprimm(:) ! (iim + 1) 21 21 22 22 !----------------------------------------------------- 23 23 24 if(is2 /= 0) THEN24 IF (is2 /= 0) THEN 25 25 IF (clon <= 0.) THEN 26 26 IF (is2 /= 1) THEN -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/sortvarc.f90
r5116 r5117 70 70 ! Ehouarn: when no initialization fields from file, resetvarc should be 71 71 ! set to false 72 if(firstcal) THEN73 if (.not.read_start) THEN72 IF (firstcal) THEN 73 IF (.NOT.read_start) THEN 74 74 resetvarc=.TRUE. 75 75 endif … … 147 147 ang = SSUM( llm, angl, 1 ) 148 148 149 IF (firstcal. and.resetvarc) THEN149 IF (firstcal.AND.resetvarc) THEN 150 150 WRITE(lunout,3500) itau, rjour, heure, time 151 151 WRITE(lunout,*) trim(modname), & … … 162 162 ! compute relative changes in etot,... (except if 'reference' values 163 163 ! are zero, which can happen when using iniacademic) 164 if(etot0/=0) THEN164 IF (etot0/=0) THEN 165 165 etot= etot/etot0 166 166 else 167 167 etot=1. 168 endif168 ENDIF 169 169 rmsv= SQRT(rmsv/ptot) 170 if(ptot0/=0) THEN170 IF (ptot0/=0) THEN 171 171 ptot= ptot/ptot0 172 172 else 173 173 ptot=1. 174 endif175 if(ztot0/=0) THEN174 ENDIF 175 IF (ztot0/=0) THEN 176 176 ztot= ztot/ztot0 177 177 else 178 178 ztot=1. 179 endif180 if(stot0/=0) THEN179 ENDIF 180 IF (stot0/=0) THEN 181 181 stot= stot/stot0 182 182 else 183 183 stot=1. 184 endif185 if(ang0/=0) THEN184 ENDIF 185 IF (ang0/=0) THEN 186 186 ang = ang /ang0 187 187 else 188 188 ang=1. 189 endif189 ENDIF 190 190 191 191 firstcal = .FALSE. -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/test_period.f90
r5116 r5117 43 43 44 44 do ij=1,iim 45 if(teta(ij,l)/=teta(1,l) &46 . or.teta(ip1jm+ij,l)/=teta(ip1jm+1,l) ) THEN45 IF (teta(ij,l)/=teta(1,l) & 46 .OR.teta(ip1jm+ij,l)/=teta(ip1jm+1,l) ) THEN 47 47 PRINT *,'STOP dans test_period car --- TETA --- n est pas', & 48 48 ' constant aux poles ! ' … … 99 99 ENDDO 100 100 do ij=1,iim 101 if(p(ij,l)/=p(1,l) &102 . or.p(ip1jm+ij,l)/=p(ip1jm+1,l) ) THEN101 IF (p(ij,l)/=p(1,l) & 102 .OR.p(ip1jm+ij,l)/=p(ip1jm+1,l) ) THEN 103 103 PRINT *,'STOP dans test_period car --- P --- n est pas', & 104 104 ' constant aux poles ! ' -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/tracstoke.h
r5099 r5117 3 3 4 4 common /tracstoke/istdyn,istphy,unittrac 5 integeristdyn,istphy,unittrac5 INTEGER istdyn,istphy,unittrac -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/ugeostr.F90
r5116 r5117 11 11 ! levels are pressure levels. 12 12 13 usecomconst_mod, ONLY: omeg, rad13 USE comconst_mod, ONLY: omeg, rad 14 14 15 15 IMPLICIT NONE … … 19 19 include "comgeom2.h" 20 20 21 realucov(iip1,jjp1,llm),phi(iip1,jjp1,llm)22 realum(jjm,llm),fact,u(iip1,jjm,llm)23 integeri,j,l21 REAL ucov(iip1,jjp1,llm),phi(iip1,jjp1,llm) 22 REAL um(jjm,llm),fact,u(iip1,jjm,llm) 23 INTEGER i,j,l 24 24 25 realzlat25 REAL zlat 26 26 27 27 um(:,:)=0 ! initialize um() … … 29 29 DO j=1,jjm 30 30 31 if(abs(sin(rlatv(j)))<1.e-4) THEN31 IF (abs(sin(rlatv(j)))<1.e-4) THEN 32 32 zlat=1.e-4 33 33 else -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/write_grads_dyn.h
r5116 r5117 2 2 ! $Header$ 3 3 4 if(callinigrads) THEN4 IF (callinigrads) THEN 5 5 string10='dyn' 6 6 CALL inigrads(1,iip1 & -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/writedynav.F90
r5116 r5117 5 5 USE ioipsl 6 6 USE infotrac, ONLY: nqtot 7 usecom_io_dyn_mod, ONLY: histaveid, histvaveid, histuaveid7 USE com_io_dyn_mod, ONLY: histaveid, histvaveid, histuaveid 8 8 USE comconst_mod, ONLY: cpp 9 9 USE temps_mod, ONLY: itau_dyn … … 47 47 ! Variables locales 48 48 49 integerndex2d(ip1jmp1), ndexu(ip1jmp1*llm), ndexv(ip1jm*llm)49 INTEGER ndex2d(ip1jmp1), ndexu(ip1jmp1*llm), ndexv(ip1jm*llm) 50 50 INTEGER iq, ii, ll 51 realtm(ip1jmp1*llm)51 REAL tm(ip1jmp1*llm) 52 52 REAL vnat(ip1jm, llm), unat(ip1jmp1, llm) 53 logicalok_sync54 integeritau_w53 LOGICAL ok_sync 54 INTEGER itau_w 55 55 56 56 !----------------------------------------------------------------- … … 120 120 ! CALL histwrite(histaveid, 'phis', itau_w, phis, iip1*jjp1, ndex2d) 121 121 122 if(ok_sync) THEN122 IF (ok_sync) THEN 123 123 CALL histsync(histaveid) 124 124 CALL histsync(histvaveid) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/writehist.f90
r5116 r5117 55 55 INTEGER :: iq, ii, ll 56 56 INTEGER :: ndexu(ip1jmp1 * llm), ndexv(ip1jm * llm), ndex2d(ip1jmp1) 57 logical:: ok_sync57 LOGICAL :: ok_sync 58 58 INTEGER :: itau_w 59 59 REAL :: vnat(ip1jm, llm), unat(ip1jmp1, llm) … … 114 114 ! Fin 115 115 ! 116 if(ok_sync) THEN116 IF (ok_sync) THEN 117 117 CALL histsync(histid) 118 118 CALL histsync(histvid) 119 119 CALL histsync(histuid) 120 endif120 ENDIF 121 121 RETURN 122 122 END SUBROUTINE writehist
Note: See TracChangeset
for help on using the changeset viewer.