Changeset 5103 for LMDZ6/branches/Amaury_dev/libf/dyn3d_common
- Timestamp:
- Jul 23, 2024, 3:29:36 PM (4 months ago)
- Location:
- LMDZ6/branches/Amaury_dev/libf/dyn3d_common
- Files:
-
- 45 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/adaptdt.F
r5099 r5103 2 2 ! $Id$ 3 3 4 subroutineadaptdt(nadv,dtbon,n,pbaru,4 SUBROUTINE adaptdt(nadv,dtbon,n,pbaru, 5 5 c masse) 6 6 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/advn.F
r5101 r5103 300 300 zqv(ij,l)=q(ij,l) 301 301 zqv(ip1jm-iip1+ij,l)=q(ip1jm+ij,l) 302 extremum(ij)=. true.303 extremum(ip1jmp1-iip1+ij)=. true.302 extremum(ij)=.TRUE. 303 extremum(ip1jmp1-iip1+ij)=.TRUE. 304 304 enddo 305 305 … … 404 404 zqw(ij,2)=q(ij,1) 405 405 zqw(ij,llm)=q(ij,llm) 406 extremum(ij,1)=. true.407 extremum(ij,llm)=. true.406 extremum(ij,1)=.TRUE. 407 extremum(ij,llm)=.TRUE. 408 408 enddo 409 409 … … 502 502 zdq=qd(ij,l)-qg(ij,l) 503 503 c if((qd(ij,l)-q(ij,l))*(q(ij,l)-qg(ij,l)).lt.0.) then 504 c print*,'probleme au point ij=',ij,' l=',l505 c print*,qd(ij,l),q(ij,l),qg(ij,l)504 c PRINT*,'probleme au point ij=',ij,' l=',l 505 c PRINT*,qd(ij,l),q(ij,l),qg(ij,l) 506 506 c qd(ij,l)=q(ij,l) 507 507 c qg(ij,l)=q(ij,l) … … 512 512 c if(.not.(zsigd(ij,l).ge.0..and.zsigd(ij,l).le.1. .and. 513 513 c s zsigg(ij,l).ge.0..or.zsigg(ij,l).le.1.) ) then 514 c print*,'probleme au point ij=',ij,' l=',l515 c print*,'sigg=',zsigg(ij,l),' sigd=',zsigd(ij,l)516 c print*,'q d,c,g ',qd(ij,l),q(ij,l),qg(ij,l),zdq514 c PRINT*,'probleme au point ij=',ij,' l=',l 515 c PRINT*,'sigg=',zsigg(ij,l),' sigd=',zsigd(ij,l) 516 c PRINT*,'q d,c,g ',qd(ij,l),q(ij,l),qg(ij,l),zdq 517 517 c stop 518 518 c endif … … 566 566 endif 567 567 c if(zsig.lt.0.) then 568 c print*,'au point ij=',ij,' l=',l,' sig=',zsig568 c PRINT*,'au point ij=',ij,' l=',l,' sig=',zsig 569 569 c stop 570 570 c endif … … 611 611 enddo 612 612 niju=iju 613 c print*,'niju,nl',niju,nl(l)613 c PRINT*,'niju,nl',niju,nl(l) 614 614 615 615 c traitement des mailles … … 759 759 zdq=qn(ij,l)-qs(ij,l) 760 760 c if((qn(ij,l)-q(ij,l))*(q(ij,l)-qs(ij,l)).lt.0.) then 761 c print*,'probleme au point ij=',ij,' l=',l,' advnqx'762 c print*,qn(ij,l),q(ij,l),qs(ij,l)761 c PRINT*,'probleme au point ij=',ij,' l=',l,' advnqx' 762 c PRINT*,qn(ij,l),q(ij,l),qs(ij,l) 763 763 c qn(ij,l)=q(ij,l) 764 764 c qs(ij,l)=q(ij,l) … … 769 769 c if(.not.(zsign(ij).ge.0..and.zsign(ij).le.1. .and. 770 770 c s zsigs(ij).ge.0..or.zsigs(ij).le.1.) ) then 771 c print*,'probleme au point ij=',ij,' l=',l772 c print*,'sigs=',zsigs(ij),' sign=',zsign(ij)771 c PRINT*,'probleme au point ij=',ij,' l=',l 772 c PRINT*,'sigs=',zsigs(ij),' sign=',zsign(ij) 773 773 c stop 774 774 c endif … … 886 886 zdq=qb(ij,l)-qh(ij,l) 887 887 c if((qh(ij,l)-q(ij,l))*(q(ij,l)-qb(ij,l)).lt.0.) then 888 c print*,'probleme au point ij=',ij,' l=',l889 c print*,qh(ij,l),q(ij,l),qb(ij,l)888 c PRINT*,'probleme au point ij=',ij,' l=',l 889 c PRINT*,qh(ij,l),q(ij,l),qb(ij,l) 890 890 c qh(ij,l)=q(ij,l) 891 891 c qb(ij,l)=q(ij,l) … … 903 903 enddo 904 904 905 c print*,'ok1'905 c PRINT*,'ok1' 906 906 c calcul de la pente maximum dans la maille en valeur absolue 907 907 do l=2,llm … … 947 947 enddo 948 948 enddo 949 c print*,'ok3'949 c PRINT*,'ok3' 950 950 RETURN 951 951 END -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/advx.F
r5099 r5103 59 59 60 60 C Rem : VGRI et WGRI ne sont pas utilises dans 61 C cette subroutine( advection en x uniquement )61 C cette SUBROUTINE ( advection en x uniquement ) 62 62 C 63 63 C Ti are the moments for the current latitude and level … … 461 461 c PRINT*,'SM(',i,j,l,')=',SM(i,j,l) 462 462 c PRINT*,'S0(',i,j,l,')=',S0(i,j,l,ntra) 463 c print*, 'sx(',i,j,l,')=',sx(i,j,l,ntra)464 c print*, 'sy(',i,j,l,')=',sy(i,j,l,ntra)465 c print*, 'sz(',i,j,l,')=',sz(i,j,l,ntra)463 c PRINT*, 'sx(',i,j,l,')=',sx(i,j,l,ntra) 464 c PRINT*, 'sy(',i,j,l,')=',sy(i,j,l,ntra) 465 c PRINT*, 'sz(',i,j,l,')=',sz(i,j,l,ntra) 466 466 c WRITE (*,*) 'On arrete !! - pbl en fin de ADVX1' 467 467 cc STOP -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/advxp.F
r5099 r5103 51 51 52 52 C Rem : VGRI et WGRI ne sont pas utilises dans 53 C cette subroutine( advection en x uniquement )53 C cette SUBROUTINE ( advection en x uniquement ) 54 54 C 55 55 C … … 101 101 c IF (S0(i,j,l,ntra) .lt. 0. ) THEN 102 102 c PRINT*,'S0(',i,j,l,')=',S0(i,j,l,ntra) 103 c print*, 'SSX(',i,j,l,')=',SSX(i,j,l,ntra)104 c print*, 'SY(',i,j,l,')=',SY(i,j,l,ntra)105 c print*, 'SZ(',i,j,l,')=',SZ(i,j,l,ntra)103 c PRINT*, 'SSX(',i,j,l,')=',SSX(i,j,l,ntra) 104 c PRINT*, 'SY(',i,j,l,')=',SY(i,j,l,ntra) 105 c PRINT*, 'SZ(',i,j,l,')=',SZ(i,j,l,ntra) 106 106 c PRINT*, 'AIE !! debut ADVXP - pbl arg. passage dans ADVXP' 107 107 cc STOP … … 618 618 c PRINT*, 'En fin de ADVXP' 619 619 c PRINT*,'S0(',i,j,l,')=',S0(i,j,l,ntra) 620 c print*, 'SSX(',i,j,l,')=',SSX(i,j,l,ntra)621 c print*, 'SY(',i,j,l,')=',SY(i,j,l,ntra)622 c print*, 'SZ(',i,j,l,')=',SZ(i,j,l,ntra)620 c PRINT*, 'SSX(',i,j,l,')=',SSX(i,j,l,ntra) 621 c PRINT*, 'SY(',i,j,l,')=',SY(i,j,l,ntra) 622 c PRINT*, 'SZ(',i,j,l,')=',SZ(i,j,l,ntra) 623 623 c WRITE (*,*) 'On arrete !! - pbl en fin de ADVXP' 624 624 c STOP -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/advy.F
r5099 r5103 64 64 65 65 C Rem : UGRI et WGRI ne sont pas utilises dans 66 C cette subroutine( advection en y uniquement )66 C cette SUBROUTINE ( advection en y uniquement ) 67 67 C Rem 2 :le dimensionnement de VGRI depend de celui de pbarv 68 68 C -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/advyp.F
r5099 r5103 71 71 72 72 C Rem : UGRI et WGRI ne sont pas utilises dans 73 C cette subroutine( advection en y uniquement )73 C cette SUBROUTINE ( advection en y uniquement ) 74 74 C Rem 2 :le dimensionnement de VGRI depend de celui de pbarv 75 75 C … … 229 229 C 230 230 END DO 231 c print*,'ADVYP 21'231 c PRINT*,'ADVYP 21' 232 232 C 233 233 DO JV=1,NTRA … … 276 276 C puts the temporary moments Fi into appropriate neighboring boxes 277 277 C 278 c print*,'av ADVYP 25'278 c PRINT*,'av ADVYP 25' 279 279 DO I=1,LON 280 280 C … … 291 291 C 292 292 END DO 293 c print*,'av ADVYP 25'293 c PRINT*,'av ADVYP 25' 294 294 C 295 295 DO JV=1,NTRA … … 317 317 C flux from KP to K if V(K).lt.0 and from K to KP if V(K).gt.0 318 318 C 319 c print*,'av ADVYP 30'319 c PRINT*,'av ADVYP 30' 320 320 DO K=1,LAT-1 321 321 KP=K+1 … … 341 341 END DO 342 342 END DO 343 c print*,'ap ADVYP 30'343 c PRINT*,'ap ADVYP 30' 344 344 C 345 345 DO JV=1,NTRA … … 409 409 END DO 410 410 END DO 411 c print*,'ap ADVYP 31'411 c PRINT*,'ap ADVYP 31' 412 412 C 413 413 C puts the temporary moments Fi into appropriate neighboring boxes … … 433 433 END DO 434 434 END DO 435 c print*,'ap ADVYP 32'435 c PRINT*,'ap ADVYP 32' 436 436 C 437 437 DO JV=1,NTRA … … 481 481 END DO 482 482 END DO 483 c print*,'ap ADVYP 33'483 c PRINT*,'ap ADVYP 33' 484 484 C 485 485 C traitement special pour le pole Sud (idem pole Nord) … … 509 509 C 510 510 END DO 511 c print*,'ap ADVYP 41'511 c PRINT*,'ap ADVYP 41' 512 512 C 513 513 DO JV=1,NTRA … … 534 534 END DO 535 535 END DO 536 c print*,'ap ADVYP 42'536 c PRINT*,'ap ADVYP 42' 537 537 C 538 538 DO I=1,LON … … 542 542 ENDIF 543 543 END DO 544 c print*,'ap ADVYP 43'544 c PRINT*,'ap ADVYP 43' 545 545 C 546 546 DO JV=1,NTRA … … 568 568 C 569 569 END DO 570 c print*,'ap ADVYP 45'570 c PRINT*,'ap ADVYP 45' 571 571 C 572 572 DO JV=1,NTRA … … 587 587 END DO 588 588 END DO 589 c print*,'ap ADVYP 46'589 c PRINT*,'ap ADVYP 46' 590 590 C 591 591 END DO … … 637 637 PRINT*,'---------- DIAG DANS ADVY - SORTIE --------' 638 638 PRINT*,'sqf=',sqf 639 c print*,'ap ADVYP fin'639 c PRINT*,'ap ADVYP fin' 640 640 641 641 c----------------------------------------------------------------- -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/advz.F
r5099 r5103 86 86 c IF (S0(i,j,l,ntra) .lt. 0. ) THEN 87 87 c PRINT*,'S0(',i,j,l,')=',S0(i,j,l,ntra) 88 c print*, 'sx(',i,j,l,')=',sx(i,j,l,ntra)89 c print*, 'sy(',i,j,l,')=',sy(i,j,l,ntra)90 c print*, 'sz(',i,j,l,')=',sz(i,j,l,ntra)88 c PRINT*, 'sx(',i,j,l,')=',sx(i,j,l,ntra) 89 c PRINT*, 'sy(',i,j,l,')=',sy(i,j,l,ntra) 90 c PRINT*, 'sz(',i,j,l,')=',sz(i,j,l,ntra) 91 91 c PRINT*, 'AIE !! debut ADVZ - pbl arg. passage dans ADVZ' 92 92 c STOP … … 283 283 c PRINT*, 'En fin de ADVZ' 284 284 c PRINT*,'S0(',i,j,l,')=',S0(i,j,l,ntra) 285 c print*, 'sx(',i,j,l,')=',sx(i,j,l,ntra)286 c print*, 'sy(',i,j,l,')=',sy(i,j,l,ntra)287 c print*, 'sz(',i,j,l,')=',sz(i,j,l,ntra)285 c PRINT*, 'sx(',i,j,l,')=',sx(i,j,l,ntra) 286 c PRINT*, 'sy(',i,j,l,')=',sy(i,j,l,ntra) 287 c PRINT*, 'sz(',i,j,l,')=',sz(i,j,l,ntra) 288 288 c WRITE (*,*) 'On arrete !! - pbl en fin de ADVZ1' 289 289 c STOP -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/advzp.F
r5099 r5103 74 74 75 75 C Rem : UGRI et VGRI ne sont pas utilises dans 76 C cette subroutine( advection en z uniquement )76 C cette SUBROUTINE ( advection en z uniquement ) 77 77 C Rem 2 :le dimensionnement de VGRI depend de celui de pbarv 78 78 C attention a celui de WGRI -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/bernoui.F
r5099 r5103 51 51 c ------- 52 52 c 53 CALL filtreg( pbern, jjp1, llm, 2,1, . true., 1 )53 CALL filtreg( pbern, jjp1, llm, 2,1, .TRUE., 1 ) 54 54 c 55 55 c----------------------------------------------------------------------- -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/caldyn0.F90
r5099 r5103 49 49 CALL bernoui ( ip1jmp1, llm , phi , ecin , bern ) 50 50 DO l=1,llm; ang(:,l) = ucov(:,l) + constang(:); END DO 51 resetvarc=. true. ! force a recomputation of initial values in sortvarc51 resetvarc=.TRUE. ! force a recomputation of initial values in sortvarc 52 52 dp(:)=convm(:,1)/airesurg(:) 53 53 CALL sortvarc( itau,ucov,teta,ps,masse,pk,phis,vorpot,phi,bern,dp,time,vcov ) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/conf_planete.F90
r5101 r5103 4 4 SUBROUTINE conf_planete 5 5 6 #ifdef CPP_IOIPSL7 6 USE IOIPSL 8 #else9 ! if not using IOIPSL, we still need to use (a local version of) getin10 USE ioipsl_getincom11 #endif12 7 USE comconst_mod, ONLY: pi, g, molmass, kappa, cpp, omeg, rad, & 13 8 year_day, daylen, daysec, ihf -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/diagedyn.F
r5101 r5103 159 159 C 160 160 C 161 print*,'MAIS POURQUOI DONC DIAGEDYN NE MARCHE PAS ?'161 PRINT*,'MAIS POURQUOI DONC DIAGEDYN NE MARCHE PAS ?' 162 162 return 163 163 C On ne garde les donnees que dans les colonnes i=1,iim -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/disvert.F90
r5101 r5103 3 3 SUBROUTINE disvert() 4 4 5 #ifdef CPP_IOIPSL6 5 use ioipsl, only: getin 7 #else8 USE ioipsl_getincom, only: getin9 #endif10 6 use new_unit_m, only: new_unit 11 7 use assert_m, only: assert … … 71 67 dsigmin=1. 72 68 endif 73 callgetin('dsigmin', dsigmin)69 CALL getin('dsigmin', dsigmin) 74 70 WRITE(LUNOUT,*) trim(modname), 'Discretisation verticale DSIGMIN=',dsigmin 75 71 … … 267 263 !=================================================================== 268 264 269 callgetin('vert_scale',vert_scale)270 callgetin('vert_dzmin',vert_dzmin)271 callgetin('vert_dzlow',vert_dzlow)272 callgetin('vert_z0low',vert_z0low)265 CALL getin('vert_scale',vert_scale) 266 CALL getin('vert_dzmin',vert_dzmin) 267 CALL getin('vert_dzlow',vert_dzlow) 268 CALL getin('vert_z0low',vert_z0low) 273 269 CALL getin('vert_dzmid',vert_dzmid) 274 270 CALL getin('vert_z0mid',vert_z0mid) 275 callgetin('vert_h_mid',vert_h_mid)276 callgetin('vert_dzhig',vert_dzhig)277 callgetin('vert_z0hig',vert_z0hig)278 callgetin('vert_h_hig',vert_h_hig)271 CALL getin('vert_h_mid',vert_h_mid) 272 CALL getin('vert_dzhig',vert_dzhig) 273 CALL getin('vert_z0hig',vert_z0hig) 274 CALL getin('vert_h_hig',vert_h_hig) 279 275 280 276 scaleheight=vert_scale ! for consistency with further computations … … 314 310 ! should be in Pa. First couple of values should correspond to 315 311 ! the surface, that is : "bp" should be in descending order. 316 callnew_unit(unit)312 CALL new_unit(unit) 317 313 open(unit, file="hybrid.txt", status="old", action="read", & 318 314 position="rewind") … … 322 318 END DO 323 319 close(unit) 324 callassert(ap(1) == 0., ap(llm + 1) == 0., bp(1) == 1., &320 CALL assert(ap(1) == 0., ap(llm + 1) == 0., bp(1) == 1., & 325 321 bp(llm + 1) == 0., "disvert: bad ap or bp values") 326 322 case default 327 callabort_gcm("disvert", 'Wrong value for "vert_sampling"', 1)323 CALL abort_gcm("disvert", 'Wrong value for "vert_sampling"', 1) 328 324 END select 329 325 … … 437 433 sg(l)=sg(l)-(c1*sg(l)+f1-sig(l))/(c1+2*f1*sg(l)**(-3)) 438 434 ENDDO 439 ! print*,'SSSSIG ',sig(l),sg(l),c1*sg(l)+exp(1-1./sg(l)**2)*(1.-c1)435 ! PRINT*,'SSSSIG ',sig(l),sg(l),c1*sg(l)+exp(1-1./sg(l)**2)*(1.-c1) 440 436 ENDDO 441 437 sg(1)=1.; sg(ns)=0. -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/disvert_noterre.F
r5101 r5103 6 6 c On l'utilise aussi pour Venus et Titan, legerment modifiee. 7 7 8 #ifdef CPP_IOIPSL9 8 use IOIPSL 10 #else11 ! if not using IOIPSL, we still need to use (a local version of) getin12 use ioipsl_getincom13 #endif14 9 USE comvert_mod, ONLY: ap,bp,aps,bps,presnivs,pseudoalt, 15 10 & nivsig,nivsigs,pa,preff,scaleheight … … 58 53 ! pi=2.*ASIN(1.) ! already done in iniconst 59 54 60 hybrid=. true. ! default value for hybrid (ie: use hybrid coordinates)55 hybrid=.TRUE. ! default value for hybrid (ie: use hybrid coordinates) 61 56 CALL getin('hybrid',hybrid) 62 57 write(lunout,*) trim(modname),': hybrid=',hybrid … … 275 270 276 271 c ************************************************************ 277 subroutinesig_hybrid(sig,pa,preff,newsig)272 SUBROUTINE sig_hybrid(sig,pa,preff,newsig) 278 273 c ---------------------------------------------- 279 274 c Subroutine utilisee pour calculer des valeurs de sigma modifie -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/divgrad.F
r5099 r5103 38 38 DO iter = 1,lh 39 39 40 CALL filtreg ( divgra,jjp1,klevel,2,1,. true.,1 )40 CALL filtreg ( divgra,jjp1,klevel,2,1,.TRUE.,1 ) 41 41 42 42 CALL grad (klevel,divgra, ghx , ghy ) 43 43 CALL diverg (klevel, ghx , ghy , divgra ) 44 44 45 CALL filtreg ( divgra,jjp1,klevel,2,1,. true.,1)45 CALL filtreg ( divgra,jjp1,klevel,2,1,.TRUE.,1) 46 46 47 47 DO l = 1,klevel -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/exner_hyb_m.F90
r5101 r5103 52 52 REAL unpl2k,dellta 53 53 54 logical,save :: firstcall=. true.54 logical,save :: firstcall=.TRUE. 55 55 character(len=*),parameter :: modname="exner_hyb" 56 56 … … 69 69 endif ! of if (llm.eq.1) 70 70 71 firstcall=. false.71 firstcall=.FALSE. 72 72 endif ! of if (firstcall) 73 73 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/exner_milieu_m.F90
r5101 r5103 49 49 REAL dum1 50 50 51 logical,save :: firstcall=. true.51 logical,save :: firstcall=.TRUE. 52 52 character(len=*),parameter :: modname="exner_milieu" 53 53 … … 66 66 endif ! of if (llm.eq.1) 67 67 68 firstcall=. false.68 firstcall=.FALSE. 69 69 endif ! of if (firstcall) 70 70 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/gr_ecrit_fi.F
r5099 r5103 13 13 INTEGER i, j, n, ig 14 14 c 15 c print*,'iim jjm ',iim,jjm15 c PRINT*,'iim jjm ',iim,jjm 16 16 17 17 c modif par abd 21 02 01 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/gr_int_dyn.F
r5099 r5103 2 2 ! $Header$ 3 3 4 subroutinegr_int_dyn(champin,champdyn,iim,jp1)4 SUBROUTINE gr_int_dyn(champin,champdyn,iim,jp1) 5 5 implicit none 6 6 c======================================================================= -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/gradiv.F
r5099 r5103 40 40 c 41 41 CALL diverg( klevel, gdx , gdy, div ) 42 CALL filtreg( div, jjp1, klevel, 2,1, . true.,2 )42 CALL filtreg( div, jjp1, klevel, 2,1, .TRUE.,2 ) 43 43 CALL grad( klevel, div, gdx, gdy ) 44 44 c -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/gradsdef.h
r5099 r5103 2 2 ! $Header$ 3 3 4 5 4 integer nfmx,imx,jmx,lmx,nvarmx 5 parameter(nfmx=10,imx=200,jmx=150,lmx=200,nvarmx=1000) 6 6 7 7 real xd(imx,nfmx),yd(jmx,nfmx),zd(lmx,nfmx),dtime(nfmx) 8 8 9 10 11 12 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 15 14 integer nvar(nfmx),ivar(nfmx) 15 logical firsttime(nfmx) 16 16 17 18 17 character*10 var(nvarmx,nfmx),fichier(nfmx) 18 character*40 title(nfmx),tvar(nvarmx,nfmx) 19 19 20 21 simd,jmd,lmd,iid,jid,ifd,jfd,22 sunit,irec,nvar,ivar,itime,nld,firsttime,23 svar,fichier,title,tvar20 common/gradsdef/xd,yd,zd,dtime, 21 imd,jmd,lmd,iid,jid,ifd,jfd, 22 unit,irec,nvar,ivar,itime,nld,firsttime, 23 var,fichier,title,tvar -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/grilles_gcm_netcdf_sub.F90
r5101 r5103 2 2 ! $Id: $ 3 3 4 ! This subroutinecreates the grilles_gcm.nc file, containing:4 ! This SUBROUTINE creates the grilles_gcm.nc file, containing: 5 5 ! -> longitudes and latitudes in degrees for dynamical grids u, v and scalaire, 6 6 ! and the following variables added for INCA (informative anyway) … … 8 8 ! -> mask (land/sea), area (grid), phis=surface geopotential height = phis/g 9 9 10 ! The subroutineis called in dynphy_lonlat/phylmd/ce0l.F90.10 ! The SUBROUTINE is called in dynphy_lonlat/phylmd/ce0l.F90. 11 11 12 12 SUBROUTINE grilles_gcm_netcdf_sub(masque,phis) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/infotrac.F90
r5101 r5103 196 196 SELECT CASE(type_trac) 197 197 CASE('inca', 'inco') 198 IF ( CPPKEY_INCA) THEN198 IF (.NOT. CPPKEY_INCA) THEN 199 199 CALL abort_gcm(modname, 'You must add cpp key INCA and compile with INCA code', 1) 200 200 END IF … … 228 228 IF(fType == 1 .AND. ANY(['inca', 'inco']==type_trac)) THEN !=== FOUND OLD STYLE INCA "traceur.def" 229 229 !--------------------------------------------------------------------------------------------------------------------------- 230 IF (CPPKEY_INCA) THEN231 230 nqo = SIZE(tracers) - nqCO2 232 231 CALL Init_chem_inca_trac(nqINCA) !--- Get nqINCA from INCA … … 259 258 IF(setGeneration(tracers)) CALL abort_gcm(modname, 'See above', 1) !- SET FIELDS %iGeneration, %gen0Name 260 259 DEALLOCATE(had, hadv_inca, vad, vadv_inca, conv_flg_inca, pbl_flg_inca, solsym_inca) 261 END IF262 260 !--------------------------------------------------------------------------------------------------------------------------- 263 261 ELSE !=== OTHER CASES (OLD OR NEW FORMAT, NO INCA MODULE) … … 268 266 nbtr = nqtrue - COUNT(delPhase(tracers(:)%gen0Name) == 'H2O' & 269 267 .AND. tracers(:)%component == 'lmdz') !--- Number of tracers passed to phytrac 270 IF (CPPKEY_INCA) THEN271 268 nqINCA = COUNT(tracers(:)%component == 'inca') 272 END IF273 269 lerr = getKey('hadv', hadv, ky = tracers(:)%keys) 274 270 lerr = getKey('vadv', vadv, ky = tracers(:)%keys) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/iniconst.F90
r5101 r5103 5 5 6 6 USE control_mod 7 #ifdef CPP_IOIPSL8 7 use IOIPSL 9 #else10 ! if not using IOIPSL, we still need to use (a local version of) getin11 use ioipsl_getincom12 #endif13 8 USE comconst_mod, ONLY: im, imp1, jm, jmp1, lllm, lllmm1, lllmp1, & 14 9 unsim, pi, r, kappa, cpp, dtvr, dtphys -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inigrads.f90
r5102 r5103 1 2 1 ! $Header$ 3 2 4 subroutine inigrads(if,im 5 s ,x,fx,xmin,xmax,jm,y,ymin,ymax,fy,lm,z,fz6 s ,dt,file,titlel)3 SUBROUTINE inigrads(if, im & 4 , x, fx, xmin, xmax, jm, y, ymin, ymax, fy, lm, z, fz & 5 , dt, file, titlel) 7 6 7 implicit none 8 8 9 implicit none 9 integer :: if, im, jm, lm, i, j, l 10 real :: x(im), y(jm), z(lm), fx, fy, fz, dt 11 real :: xmin, xmax, ymin, ymax 10 12 11 integer if,im,jm,lm,i,j,l 12 real x(im),y(jm),z(lm),fx,fy,fz,dt 13 real xmin,xmax,ymin,ymax 13 character(len = *), intent(in) :: file 14 character(len = *), intent(in) :: titlel 14 15 15 character(len=*),intent(in) :: file 16 character(len=*),intent(in) :: titlel 16 INCLUDE "gradsdef.h" 17 17 18 INCLUDE "gradsdef.h" 18 ! data unit/66,32,34,36,38,40,42,44,46,48/ 19 integer :: nf 20 save nf 21 data nf/0/ 19 22 20 c data unit/66,32,34,36,38,40,42,44,46,48/ 21 integer nf 22 save nf 23 data nf/0/ 23 unit(1) = 66 24 unit(2) = 32 25 unit(3) = 34 26 unit(4) = 36 27 unit(5) = 38 28 unit(6) = 40 29 unit(7) = 42 30 unit(8) = 44 31 unit(9) = 46 24 32 25 unit(1)=66 26 unit(2)=32 27 unit(3)=34 28 unit(4)=36 29 unit(5)=38 30 unit(6)=40 31 unit(7)=42 32 unit(8)=44 33 unit(9)=46 33 if (if<=nf) stop'verifier les appels a inigrads' 34 34 35 if (if<=nf) stop'verifier les appels ainigrads'35 PRINT*, 'Entree dans inigrads' 36 36 37 print*,'Entree dans inigrads' 37 nf = if 38 title(if) = titlel 39 ivar(if) = 0 38 40 39 nf=if 40 title(if)=titlel 41 ivar(if)=0 41 fichier(if) = trim(file) 42 42 43 fichier(if)=trim(file) 43 firsttime(if) = .TRUE. 44 dtime(if) = dt 44 45 45 firsttime(if)=.true. 46 dtime(if)=dt 46 iid(if) = 1 47 ifd(if) = im 48 imd(if) = im 49 do i = 1, im 50 xd(i, if) = x(i) * fx 51 if(xd(i, if)<xmin) iid(if) = i + 1 52 if(xd(i, if)<=xmax) ifd(if) = i 53 enddo 54 PRINT*, 'On stoke du point ', iid(if), ' a ', ifd(if), ' en x' 47 55 48 iid(if)=149 ifd(if)=im50 imd(if)=im51 do i=1,im52 xd(i,if)=x(i)*fx53 if(xd(i,if)<xmin) iid(if)=i+154 if(xd(i,if)<=xmax) ifd(if)=i55 56 print*,'On stoke du point ',iid(if),' a ',ifd(if),' en x'56 jid(if) = 1 57 jfd(if) = jm 58 jmd(if) = jm 59 do j = 1, jm 60 yd(j, if) = y(j) * fy 61 if(yd(j, if)>ymax) jid(if) = j + 1 62 if(yd(j, if)>=ymin) jfd(if) = j 63 enddo 64 PRINT*, 'On stoke du point ', jid(if), ' a ', jfd(if), ' en y' 57 65 58 jid(if)=1 59 jfd(if)=jm 60 jmd(if)=jm 61 do j=1,jm 62 yd(j,if)=y(j)*fy 63 if(yd(j,if)>ymax) jid(if)=j+1 64 if(yd(j,if)>=ymin) jfd(if)=j 65 enddo 66 print*,'On stoke du point ',jid(if),' a ',jfd(if),' en y' 66 PRINT*, 'Open de dat' 67 PRINT*, 'file=', file 68 PRINT*, 'fichier(if)=', fichier(if) 67 69 68 print*,'Open de dat' 69 print*,'file=',file 70 print*,'fichier(if)=',fichier(if) 70 PRINT*, 4 * (ifd(if) - iid(if)) * (jfd(if) - jid(if)) 71 PRINT*, trim(file) // '.dat' 71 72 72 print*,4*(ifd(if)-iid(if))*(jfd(if)-jid(if)) 73 print*,trim(file)//'.dat' 73 OPEN (unit(if) + 1, FILE = trim(file) // '.dat' & 74 , FORM = 'unformatted', & 75 ACCESS = 'direct' & 76 , RECL = 4 * (ifd(if) - iid(if) + 1) * (jfd(if) - jid(if) + 1)) 74 77 75 OPEN (unit(if)+1,FILE=trim(file)//'.dat' 76 s ,FORM='unformatted', 77 s ACCESS='direct' 78 s ,RECL=4*(ifd(if)-iid(if)+1)*(jfd(if)-jid(if)+1)) 78 PRINT*, 'Open de dat ok' 79 79 80 print*,'Open de dat ok' 80 lmd(if) = lm 81 do l = 1, lm 82 zd(l, if) = z(l) * fz 83 enddo 81 84 82 lmd(if)=lm 83 do l=1,lm 84 zd(l,if)=z(l)*fz 85 enddo 85 irec(if) = 0 86 86 87 irec(if)=0 87 PRINT*, if, imd(if), jmd(if), lmd(if) 88 PRINT*, 'if,imd(if),jmd(if),lmd(if)' 88 89 89 print*,if,imd(if),jmd(if),lmd(if) 90 print*,'if,imd(if),jmd(if),lmd(if)' 91 92 return 93 end 90 return 91 end subroutine inigrads -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/initdynav.F90
r5101 r5103 1 1 ! $Id$ 2 2 3 subroutineinitdynav(day0,anne0,tstep,t_ops,t_wrt)3 SUBROUTINE initdynav(day0,anne0,tstep,t_ops,t_wrt) 4 4 5 #ifdef CPP_IOIPSL6 5 USE IOIPSL 7 #endif8 6 USE infotrac, ONLY: nqtot 9 7 use com_io_dyn_mod, ONLY: histaveid,histvaveid,histuaveid, & … … 47 45 real tstep, t_ops, t_wrt 48 46 49 #ifdef CPP_IOIPSL50 47 ! This routine needs IOIPSL to work 51 48 ! Variables locales … … 82 79 ! Creation de 3 fichiers pour les differentes grilles horizontales 83 80 ! Restriction de IOIPSL: seulement 2 coordonnees dans le meme fichier 84 ! Grille Scalaire 81 ! Grille Scalaire 85 82 CALL histbeg(dynhistave_file, iip1, rlong(:,1), jjp1, rlat(1,:), & 86 83 1, iip1, 1, jjp1, & … … 185 182 CALL histend(histuaveid) 186 183 CALL histend(histvaveid) 187 #else188 write(lunout,*)"initdynav: Warning this routine should not be", &189 " used without ioipsl"190 #endif191 ! of #ifdef CPP_IOIPSL192 184 193 end subroutineinitdynav185 END SUBROUTINE initdynav -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/initfluxsto.F
r5101 r5103 2 2 ! $Id$ 3 3 4 subroutineinitfluxsto4 SUBROUTINE initfluxsto 5 5 . (infile,tstep,t_ops,t_wrt, 6 6 . fileid,filevid,filedid) 7 7 8 #ifdef CPP_IOIPSL9 8 USE IOIPSL 10 #endif11 9 USE comconst_mod, ONLY: pi 12 10 USE comvert_mod, ONLY: nivsigs … … 54 52 integer fileid, filevid,filedid 55 53 56 #ifdef CPP_IOIPSL57 54 ! This routine needs IOIPSL to work 58 55 C Variables locales … … 75 72 str='q ' 76 73 ctrac = 'traceur ' 77 ok_sync = . true.74 ok_sync = .TRUE. 78 75 C 79 76 C Appel a histbeg: creation du fichier netcdf et initialisations diverses 80 C 77 C 81 78 82 79 zan = annee_ref … … 84 81 CALL ymds2ju(zan, 1, idayref, 0.0, zjulian) 85 82 tau0 = itau_dyn 86 83 87 84 do jj = 1, jjp1 88 85 do ii = 1, iip1 … … 91 88 enddo 92 89 enddo 93 90 94 91 CALL histbeg(infile, iip1, rlong(:,1), jjp1, rlat(1,:), 95 92 . 1, iip1, 1, jjp1, … … 97 94 C 98 95 C Creation du fichier histoire pour la grille en V (oblige pour l'instant, 99 C IOIPSL ne permet pas de grilles avec des nombres de point differents dans 96 C IOIPSL ne permet pas de grilles avec des nombres de point differents dans 100 97 C un meme fichier) 101 98 … … 111 108 . 1, iip1, 1, jjm, 112 109 . tau0, zjulian, tstep, vhoriid, filevid) 113 110 114 111 rl(1,1) = 1. 115 112 CALL histbeg('defstoke.nc', 1, rl, 1, rl, … … 129 126 CALL histhori(fileid, iip1, rlong, jjp1, rlat, 'scalar', 130 127 . 'Grille points scalaires', thoriid) 131 128 132 129 C 133 130 C Appel a histvert pour la grille verticale … … 148 145 C 149 146 C Appels a histdef pour la definition des variables a sauvegarder 150 147 151 148 CALL histdef(fileid, "phis", "Surface geop. height", "-", 152 149 . iip1,jjp1,thoriid, 1,1,1, -99, 32, … … 156 153 . iip1,jjp1,thoriid, 1,1,1, -99, 32, 157 154 . "once", t_ops, t_wrt) 158 155 159 156 CALL histdef(filedid, "dtvr", "tps dyn", "s", 160 157 . 1,1,dhoriid, 1,1,1, -99, 32, 161 158 . "once", t_ops, t_wrt) 162 159 163 160 CALL histdef(filedid, "istdyn", "tps stock", "s", 164 161 . 1,1,dhoriid, 1,1,1, -99, 32, 165 162 . "once", t_ops, t_wrt) 166 163 167 164 CALL histdef(filedid, "istphy", "tps stock phy", "s", 168 165 . 1,1,dhoriid, 1,1,1, -99, 32, … … 171 168 172 169 C 173 C Masse 170 C Masse 174 171 C 175 172 CALL histdef(fileid, 'masse', 'Masse', 'kg', … … 177 174 . 32, 'inst(X)', t_ops, t_wrt) 178 175 C 179 C Pbaru 176 C Pbaru 180 177 C 181 178 CALL histdef(fileid, 'pbaru', 'flx de masse zonal', 'kg m/s', … … 184 181 185 182 C 186 C Pbarv 183 C Pbarv 187 184 C 188 185 CALL histdef(filevid, 'pbarv', 'flx de masse mer', 'kg m/s', … … 190 187 . 32, 'inst(X)', t_ops, t_wrt) 191 188 C 192 C w 189 C w 193 190 C 194 191 CALL histdef(fileid, 'w', 'flx de masse vert', 'kg m/s', … … 205 202 206 203 C 207 C Geopotentiel 204 C Geopotentiel 208 205 C 209 206 CALL histdef(fileid, 'phi', 'geopotentiel instantane', '-', … … 221 218 CALL histsync(filedid) 222 219 endif 223 224 #else 225 ! tell the user this routine should be run with ioipsl 226 write(lunout,*)"initfluxsto: Warning this routine should not be", 227 & " used without ioipsl" 228 #endif 229 ! of #ifdef CPP_IOIPSL 220 230 221 return 231 222 end -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inithist.F90
r5101 r5103 1 1 ! $Id$ 2 2 3 subroutineinithist(day0, anne0, tstep, t_ops, t_wrt)3 SUBROUTINE inithist(day0, anne0, tstep, t_ops, t_wrt) 4 4 5 #ifdef CPP_IOIPSL6 5 USE IOIPSL 7 #endif8 6 USE infotrac, ONLY: nqtot 9 7 use com_io_dyn_mod, ONLY: histid, histvid, histuid, & … … 51 49 real :: tstep, t_ops, t_wrt 52 50 53 #ifdef CPP_IOIPSL54 51 ! This routine needs IOIPSL to work 55 52 ! Variables locales … … 185 182 CALL histend(histuid) 186 183 CALL histend(histvid) 187 #else 188 ! tell the user this routine should be run with ioipsl 189 write(lunout, *)"inithist: Warning this routine should not be", & 190 " used without ioipsl" 191 #endif 192 ! of #ifdef CPP_IOIPSL 193 return 194 end subroutine inithist 184 END SUBROUTINE inithist -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/interpost.F
r5099 r5103 2 2 ! $Header$ 3 3 4 subroutineinterpost(q,qppm)4 SUBROUTINE interpost(q,qppm) 5 5 6 6 implicit none -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/interpre.F
r5099 r5103 2 2 ! $Id$ 3 3 4 subroutineinterpre(q,qppm,w,fluxwppm,masse,4 SUBROUTINE interpre(q,qppm,w,fluxwppm,masse, 5 5 s apppm,bpppm,massebx,masseby,pbaru,pbarv, 6 6 s unatppm,vnatppm,psppm) … … 92 92 do i=1,iip1 93 93 fluxw(i,j,l)=w(i,j,l)*g*0.01/aire(i,j) 94 C print*,i,j,l,'fluxw(i,j,l)=',fluxw(i,j,l),94 C PRINT*,i,j,l,'fluxw(i,j,l)=',fluxw(i,j,l), 95 95 C c 'w(i,j,l)=',w(i,j,l) 96 96 enddo -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/invert_zoom_x_m.F90
r5086 r5103 7 7 contains 8 8 9 subroutineinvert_zoom_x(xf, xtild, Xprimt, xlon, xprimm, xuv)9 SUBROUTINE invert_zoom_x(xf, xtild, Xprimt, xlon, xprimm, xuv) 10 10 11 11 use coefpoly_m, only: coefpoly … … 84 84 xprimm = xxprim 85 85 86 end subroutineinvert_zoom_x86 END SUBROUTINE invert_zoom_x 87 87 88 88 end module invert_zoom_x_m -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/limx.F
r5099 r5103 47 47 EXTERNAL SSUM, ismin,ismax 48 48 49 data first/. true./49 data first/.TRUE./ 50 50 51 51 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/limy.F
r5081 r5103 53 53 EXTERNAL filtreg 54 54 55 data first/. true./55 data first/.TRUE./ 56 56 57 57 if(first) then 58 print*,'SCHEMA AMONT NOUVEAU'59 first=. false.58 PRINT*,'SCHEMA AMONT NOUVEAU' 59 first=.FALSE. 60 60 do i=2,iip1 61 61 coslon(i)=cos(rlonv(i)) … … 114 114 c calcul des pentes limites aux poles 115 115 116 c print*,dyqv(iip1+1)116 c PRINT*,dyqv(iip1+1) 117 117 c appn=abs(dyq(1)/dyqv(iip1+1)) 118 c print*,dyq(ip1jm+1)119 c print*,dyqv(ip1jm-iip1+1)118 c PRINT*,dyq(ip1jm+1) 119 c PRINT*,dyqv(ip1jm-iip1+1) 120 120 c apps=abs(dyq(ip1jm+1)/dyqv(ip1jm-iip1+1)) 121 121 c do ij=2,iim -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/limz.F
r5099 r5103 47 47 EXTERNAL SSUM, ismin,ismax 48 48 49 data first/. true./49 data first/.TRUE./ 50 50 51 51 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/nxgrarot.F
r5099 r5103 38 38 DO iter = 1,lr 39 39 CALL rotat (klevel,grx, gry, rot ) 40 CALL filtreg( rot, jjm, klevel, 2,1, . false.,2)40 CALL filtreg( rot, jjm, klevel, 2,1, .FALSE.,2) 41 41 CALL nxgrad (klevel,rot, grx, gry ) 42 42 c -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/pentes_ini.F
r5101 r5103 68 68 69 69 c modif Fred 24 03 96 70 data first/. true./70 data first/.TRUE./ 71 71 72 72 limit = .TRUE. … … 85 85 qmin=0. 86 86 if(first) then 87 print*,'SCHEMA AMONT NOUVEAU'88 first=. false.87 PRINT*,'SCHEMA AMONT NOUVEAU' 88 first=.FALSE. 89 89 do i=2,iip1 90 90 coslon(i)=cos(rlonv(i)) … … 92 92 coslondlon(i)=coslon(i)*(rlonu(i)-rlonu(i-1))/pi 93 93 sinlondlon(i)=sinlon(i)*(rlonu(i)-rlonu(i-1))/pi 94 print*,coslondlon(i),sinlondlon(i)94 PRINT*,coslondlon(i),sinlondlon(i) 95 95 enddo 96 96 coslon(1)=coslon(iip1) … … 98 98 sinlon(1)=sinlon(iip1) 99 99 sinlondlon(1)=sinlondlon(iip1) 100 print*,'sum sinlondlon ',ssum(iim,sinlondlon,1)/sinlondlon(1)101 print*,'sum coslondlon ',ssum(iim,coslondlon,1)/coslondlon(1)100 PRINT*,'sum sinlondlon ',ssum(iim,sinlondlon,1)/sinlondlon(1) 101 PRINT*,'sum coslondlon ',ssum(iim,coslondlon,1)/coslondlon(1) 102 102 DO l = 1,llm 103 103 DO j = 1,jjp1 … … 182 182 c zq=s0(i,j,l)/sm(i,j,l) 183 183 c if(zq.lt.qmin) 184 c , print*,'avant advx1, s0(',i,',',j,',',l,')=',zq184 c , PRINT*,'avant advx1, s0(',i,',',j,',',l,')=',zq 185 185 c enddo 186 186 c enddo … … 324 324 c zq=s0(i,j,l)/sm(i,j,l) 325 325 c if(zq.lt.qmin) 326 c , print*,'apres advx2, s0(',i,',',j,',',l,')=',zq326 c , PRINT*,'apres advx2, s0(',i,',',j,',',l,')=',zq 327 327 c enddo 328 328 c enddo … … 460 460 do i=1,iip1 461 461 if(q(i,j,l,0)<qmin) 462 , print*,'apres pentes, s0(',i,',',j,',',l,')=',q(i,j,l,0)462 , PRINT*,'apres pentes, s0(',i,',',j,',',l,')=',q(i,j,l,0) 463 463 enddo 464 464 enddo -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/ppm3d.F
r5101 r5103 62 62 C ****6***0*********0*********0*********0*********0*********0**********72 63 63 C 64 subroutineppm3d(IGD,Q,PS1,PS2,U,V,W,NDT,IORD,JORD,KORD,NC,IMR,64 SUBROUTINE ppm3d(IGD,Q,PS1,PS2,U,V,W,NDT,IORD,JORD,KORD,NC,IMR, 65 65 & JNP,j1,NLAY,AP,BP,PT,AE,fill,dum,Umax) 66 66 … … 297 297 & cosp(Jmax), cose(Jmax), DAP(kmax),DBK(Kmax) 298 298 data NDT0, NSTEP /0, 0/ 299 data cross /. true./299 data cross /.TRUE./ 300 300 REAL DTDY, DTDY5, RCAP 301 301 INTEGER JS0, JN0, IML, JMR, IMJM … … 404 404 DTDX(j) = DT / ( DL*AE*COSP(J) ) 405 405 406 c print*,'dtdx=',dtdx(j)406 c PRINT*,'dtdx=',dtdx(j) 407 407 DTDX5(j) = 0.5*DTDX(j) 408 408 enddo … … 410 410 411 411 DTDY = DT /(AE*DP) 412 c print*,'dtdy=',dtdy412 c PRINT*,'dtdy=',dtdy 413 413 DTDY5 = 0.5*DTDY 414 414 C … … 751 751 752 752 if(fill) CALL qckxyz(DQ(1,1,1,IC),DC2,IMR,JNP,NLAY,j1,j2, 753 & cosp,acosp,. false.,IC,NSTEP)753 & cosp,acosp,.FALSE.,IC,NSTEP) 754 754 C 755 755 C Recover tracer mixing ratio from "density" using predicted … … 760 760 DO i=1,IMR 761 761 Q(i,j,k,IC) = DQ(i,j,k,IC) / delp2(i,j,k) 762 c print*,'i=',i,'j=',j,'k=',k,'Q(i,j,k,IC)=',Q(i,j,k,IC)762 c PRINT*,'i=',i,'j=',j,'k=',k,'Q(i,j,k,IC)=',Q(i,j,k,IC) 763 763 enddo 764 764 enddo … … 789 789 C 790 790 C****6***0*********0*********0*********0*********0*********0**********72 791 subroutineFZPPM(IMR,JNP,NLAY,j1,DQ,WZ,P,DC,DQDT,AR,AL,A6,791 SUBROUTINE FZPPM(IMR,JNP,NLAY,j1,DQ,WZ,P,DC,DQDT,AR,AL,A6, 792 792 & flux,wk1,wk2,wz2,delp,KORD) 793 793 implicit none … … 964 964 end 965 965 C 966 subroutinextp(IMR,JNP,IML,j1,j2,JN,JS,PU,DQ,Q,UC,966 SUBROUTINE xtp(IMR,JNP,IML,j1,j2,JN,JS,PU,DQ,Q,UC, 967 967 & fx1,xmass,IORD) 968 968 implicit none … … 1087 1087 end 1088 1088 C 1089 subroutinefxppm(IMR,IML,UT,P,DC,flux,IORD)1089 SUBROUTINE fxppm(IMR,IML,UT,P,DC,flux,IORD) 1090 1090 implicit none 1091 1091 integer IMR,IML,IORD … … 1096 1096 integer LMT,IMP,JLVL,i 1097 1097 c logical first 1098 c data first /. true./1098 c data first /.TRUE./ 1099 1099 c SAVE LMT 1100 1100 c if(first) then … … 1116 1116 LMT = IORD - 3 1117 1117 c write(6,*) 'PPM option in E-W direction = ', LMT 1118 c first = . false.1118 c first = .FALSE. 1119 1119 C endif 1120 1120 C … … 1150 1150 end 1151 1151 C 1152 subroutinexmist(IMR,IML,P,DC)1152 SUBROUTINE xmist(IMR,IML,P,DC) 1153 1153 implicit none 1154 1154 integer IMR,IML … … 1167 1167 end 1168 1168 C 1169 subroutineytp(IMR,JNP,j1,j2,acosp,RCAP,DQ,P,VC,DC21169 SUBROUTINE ytp(IMR,JNP,j1,j2,acosp,RCAP,DQ,P,VC,DC2 1170 1170 & ,ymass,fx,A6,AR,AL,JORD) 1171 1171 implicit none … … 1320 1320 end 1321 1321 C 1322 subroutinefyppm(VC,P,DC,flux,IMR,JNP,j1,j2,A6,AR,AL,JORD)1322 SUBROUTINE fyppm(VC,P,DC,flux,IMR,JNP,j1,j2,A6,AR,AL,JORD) 1323 1323 implicit none 1324 1324 integer IMR,JNP,j1,j2,JORD … … 1330 1330 integer IMH,JMR,j11,IMJM1,len 1331 1331 c logical first 1332 C data first /. true./1332 C data first /.TRUE./ 1333 1333 C SAVE LMT 1334 1334 C … … 1351 1351 C endif 1352 1352 C 1353 C first = . false.1353 C first = .FALSE. 1354 1354 C endif 1355 1355 C … … 1400 1400 end 1401 1401 C 1402 subroutineyadv(IMR,JNP,j1,j2,p,VA,ady,wk,IAD)1402 SUBROUTINE yadv(IMR,JNP,j1,j2,p,VA,ady,wk,IAD) 1403 1403 implicit none 1404 1404 integer IMR,JNP,j1,j2,IAD … … 1490 1490 end 1491 1491 C 1492 subroutinexadv(IMR,JNP,j1,j2,p,UA,JS,JN,IML,adx,IAD)1492 SUBROUTINE xadv(IMR,JNP,j1,j2,p,UA,JS,JN,IML,adx,IAD) 1493 1493 implicit none 1494 1494 INTEGER IMR,JNP,j1,j2,JS,JN,IML,IAD … … 1583 1583 end 1584 1584 C 1585 subroutinelmtppm(DC,A6,AR,AL,P,IM,LMT)1585 SUBROUTINE lmtppm(DC,A6,AR,AL,P,IM,LMT) 1586 1586 implicit none 1587 1587 C … … 1664 1664 end 1665 1665 C 1666 subroutineA2C(U,V,IMR,JMR,j1,j2,CRX,CRY,dtdx5,DTDY5)1666 SUBROUTINE A2C(U,V,IMR,JMR,j1,j2,CRX,CRY,dtdx5,DTDY5) 1667 1667 implicit none 1668 1668 integer IMR,JMR,j1,j2 … … 1686 1686 end 1687 1687 C 1688 subroutinecosa(cosp,cose,JNP,PI,DP)1688 SUBROUTINE cosa(cosp,cose,JNP,PI,DP) 1689 1689 implicit none 1690 1690 integer JNP … … 1719 1719 end 1720 1720 C 1721 subroutinecosc(cosp,cose,JNP,PI,DP)1721 SUBROUTINE cosc(cosp,cose,JNP,PI,DP) 1722 1722 implicit none 1723 1723 integer JNP … … 1852 1852 END 1853 1853 C 1854 subroutinefilcr(q,IMR,JNP,j1,j2,cosp,acosp,icr,tiny)1854 SUBROUTINE filcr(q,IMR,JNP,j1,j2,cosp,acosp,icr,tiny) 1855 1855 implicit none 1856 1856 integer :: IMR,JNP,j1,j2,icr … … 1955 1955 end 1956 1956 C 1957 subroutinefilns(q,IMR,JNP,j1,j2,cosp,acosp,ipy,tiny)1957 SUBROUTINE filns(q,IMR,JNP,j1,j2,cosp,acosp,ipy,tiny) 1958 1958 implicit none 1959 1959 integer :: IMR,JNP,j1,j2,ipy … … 1962 1962 INTEGER :: i,j 1963 1963 c logical first 1964 c data first /. true./1964 c data first /.TRUE./ 1965 1965 c save cap1 1966 1966 C … … 1968 1968 DP = 4.*ATAN(1.)/REAL(JNP-1) 1969 1969 CAP1 = IMR*(1.-COS((j1-1.5)*DP))/DP 1970 c first = . false.1970 c first = .FALSE. 1971 1971 c endif 1972 1972 C … … 2042 2042 end 2043 2043 C 2044 subroutinefilew(q,qtmp,IMR,JNP,j1,j2,ipx,tiny)2044 SUBROUTINE filew(q,qtmp,IMR,JNP,j1,j2,ipx,tiny) 2045 2045 implicit none 2046 2046 integer :: IMR,JNP,j1,j2,ipx … … 2124 2124 end 2125 2125 C 2126 subroutinezflip(q,im,km,nc)2126 SUBROUTINE zflip(q,im,km,nc) 2127 2127 implicit none 2128 2128 C This routine flip the array q (in the vertical). -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/prather.F
r5101 r5103 67 67 68 68 69 data first/. true./69 data first/.TRUE./ 70 70 data qmin,qmax/-1.e33,1.e33/ 71 71 … … 81 81 82 82 if(first) then 83 print*,'SCHEMA PRATHER'84 first=. false.83 PRINT*,'SCHEMA PRATHER' 84 first=.FALSE. 85 85 do i=2,iip1 86 86 coslon(i)=cos(rlonv(i)) … … 251 251 enddo 252 252 c enddo 253 c print*,'qpn',qpn,'qps',qps254 c print*,'dqzpn',dqzpn,'dqzps',dqzps253 c PRINT*,'qpn',qpn,'qps',qps 254 c PRINT*,'dqzpn',dqzpn,'dqzps',dqzps 255 255 c enddo 256 256 dyn1=0. -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/principal_cshift_m.F90
r2598 r5103 5 5 contains 6 6 7 subroutineprincipal_cshift(is2, xlon, xprimm)7 SUBROUTINE principal_cshift(is2, xlon, xprimm) 8 8 9 9 ! Add or subtract 2 pi so that xlon is near [-pi, pi], then cshift … … 39 39 xprimm(iim + 1) = xprimm(1) 40 40 41 end subroutineprincipal_cshift41 END SUBROUTINE principal_cshift 42 42 43 43 end module principal_cshift_m -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/sortvarc.F
r5099 r5103 63 63 64 64 REAL SSUM 65 LOGICAL,SAVE :: firstcal=. true.65 LOGICAL,SAVE :: firstcal=.TRUE. 66 66 CHARACTER(LEN=*),PARAMETER :: modname="sortvarc" 67 67 … … 71 71 if (firstcal) then 72 72 if (.not.read_start) then 73 resetvarc=. true.73 resetvarc=.TRUE. 74 74 endif 75 75 endif … … 188 188 endif 189 189 190 firstcal = . false.190 firstcal = .FALSE. 191 191 192 192 WRITE(lunout,3500) itau, rjour, heure, time -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/test_period.F
r5101 r5103 47 47 PRINT *,'STOP dans test_period car --- TETA --- n est pas', 48 48 , ' constant aux poles ! ' 49 print*,'teta(',1 ,',',l,')=',teta(1 ,l)50 print*,'teta(',ij,',',l,')=',teta(ij,l)51 print*,'teta(',ip1jm+1 ,',',l,')=',teta(ip1jm+1 ,l)52 print*,'teta(',ip1jm+ij,',',l,')=',teta(ip1jm+ij,l)49 PRINT*,'teta(',1 ,',',l,')=',teta(1 ,l) 50 PRINT*,'teta(',ij,',',l,')=',teta(ij,l) 51 PRINT*,'teta(',ip1jm+1 ,',',l,')=',teta(ip1jm+1 ,l) 52 PRINT*,'teta(',ip1jm+ij,',',l,')=',teta(ip1jm+ij,l) 53 53 stop 54 54 endif … … 103 103 PRINT *,'STOP dans test_period car --- P --- n est pas', 104 104 , ' constant aux poles ! ' 105 print*,'p(',1 ,',',l,')=',p(1 ,l)106 print*,'p(',ij,',',l,')=',p(ij,l)107 print*,'p(',ip1jm+1 ,',',l,')=',p(ip1jm+1 ,l)108 print*,'p(',ip1jm+ij,',',l,')=',p(ip1jm+ij,l)105 PRINT*,'p(',1 ,',',l,')=',p(1 ,l) 106 PRINT*,'p(',ij,',',l,')=',p(ij,l) 107 PRINT*,'p(',ip1jm+1 ,',',l,')=',p(ip1jm+1 ,l) 108 PRINT*,'p(',ip1jm+ij,',',l,')=',p(ip1jm+ij,l) 109 109 stop 110 110 endif -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/traceurpole.F
r5099 r5103 2 2 ! $Id$ 3 3 4 subroutinetraceurpole(q,masse)4 SUBROUTINE traceurpole(q,masse) 5 5 6 6 implicit none -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/ugeostr.F90
r5101 r5103 2 2 ! $Id$ 3 3 4 subroutineugeostr(phi,ucov)4 SUBROUTINE ugeostr(phi,ucov) 5 5 6 6 ! Calcul du vent covariant geostrophique a partir du champ de … … 67 67 print *, 301 68 68 69 end subroutineugeostr69 END SUBROUTINE ugeostr -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/write_grads_dyn.h
r5101 r5103 10 10 s ,dtvr*iperiod,string10,'dyn_zon ') 11 11 12 callinigrads=. false.12 callinigrads=.FALSE. 13 13 14 14 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/writedynav.F90
r5101 r5103 1 1 ! $Id$ 2 2 3 subroutinewritedynav(time, vcov, ucov, teta, ppk, phi, q, masse, ps, phis)3 SUBROUTINE writedynav(time, vcov, ucov, teta, ppk, phi, q, masse, ps, phis) 4 4 5 #ifdef CPP_IOIPSL6 5 USE ioipsl 7 #endif8 6 USE infotrac, ONLY: nqtot 9 7 use com_io_dyn_mod, ONLY: histaveid, histvaveid, histuaveid … … 46 44 integer time 47 45 48 #ifdef CPP_IOIPSL49 46 ! This routine needs IOIPSL to work 50 47 ! Variables locales … … 53 50 INTEGER iq, ii, ll 54 51 real tm(ip1jmp1*llm) 55 REAL vnat(ip1jm, llm), unat(ip1jmp1, llm) 52 REAL vnat(ip1jm, llm), unat(ip1jmp1, llm) 56 53 logical ok_sync 57 54 integer itau_w … … 75 72 ! Appels a histwrite pour l'ecriture des variables a sauvegarder 76 73 77 ! Vents U 74 ! Vents U 78 75 79 76 CALL histwrite(histuaveid, 'u', itau_w, unat, & … … 129 126 ENDIF 130 127 131 #else 132 write(lunout, *) "writedynav: Warning this routine should not be", & 133 " used without ioipsl" 134 #endif 135 ! of #ifdef CPP_IOIPSL 136 137 end subroutine writedynav 128 END SUBROUTINE writedynav -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/writehist.F
r5101 r5103 2 2 ! $Id$ 3 3 4 subroutinewritehist(time,vcov,ucov,teta,phi,q,masse,ps,phis)4 SUBROUTINE writehist(time,vcov,ucov,teta,phi,q,masse,ps,phis) 5 5 6 #ifdef CPP_IOIPSL7 6 USE ioipsl 8 #endif9 7 USE infotrac, ONLY: nqtot 10 8 use com_io_dyn_mod, ONLY: histid,histvid,histuid … … 53 51 54 52 55 #ifdef CPP_IOIPSL56 53 ! This routine needs IOIPSL to work 57 54 C Variables locales … … 123 120 CALL histsync(histuid) 124 121 endif 125 #else126 ! tell the user this routine should be run with ioipsl127 write(lunout,*)"writehist: Warning this routine should not be",128 & " used without ioipsl"129 #endif130 ! of #ifdef CPP_IOIPSL131 122 return 132 123 end
Note: See TracChangeset
for help on using the changeset viewer.