Changeset 1893 for LMDZ5/tags
- Timestamp:
- Oct 16, 2013, 2:36:06 PM (11 years ago)
- Location:
- LMDZ5/tags/proto-testing-20131015
- Files:
-
- 9 deleted
- 46 edited
- 22 copied
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/tags/proto-testing-20131015
- Property svn:mergeinfo changed
/LMDZ5/trunk merged: 1861-1863,1865-1867,1869,1871-1875,1877-1880,1882-1891
- Property svn:mergeinfo changed
-
LMDZ5/tags/proto-testing-20131015/arch/arch-X64_ADA.fcm
r1864 r1893 12 12 %OMP_FFLAGS -openmp 13 13 %BASE_LD -L/smplocal/pub/FFTW/3.3.3_dyn/lib -lfftw3 -shared-intel -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -Wl,-rpath=/smplocal/pub/NetCDF/4.1.3/lib:/smplocal/pub/HDF5/1.8.9/seq/lib:/smplocal/pub/FFTW/3.3.3_dyn/lib 14 %MPI_LD 14 %MPI_LD -L/smplocal/pub/IdrMemMPI/1.3/lib -lidrmem 15 15 %OMP_LD -openmp 16 16 -
LMDZ5/tags/proto-testing-20131015/bld.cfg
r1864 r1893 24 24 src::dyn %SRC_PATH/%DYN 25 25 src::phys %SRC_PATH/%PHYS 26 #src::sisvat %SRC_PATH/%PHYS/sisvat 26 27 src::grid %SRC_PATH/grid 27 28 src::filtrez %SRC_PATH/filtrez … … 91 92 bld::outfile_ext::mod .mod 92 93 bld::tool::SHELL /bin/bash 94 bld::tool::SHELL /bin/ksh -
LMDZ5/tags/proto-testing-20131015/create_make_gcm
r1864 r1893 194 194 strlib=`echo $libstr | awk -F/ ' { print $1 } '` 195 195 str2='$(LIBO)/lib'$strlib'.a('$strj'.o)' 196 elif [ -f $dirinc/$stri.F90 ] || [ -f $dirinc/$stri.F ] ; then 197 strlib=`echo $libstr | awk -F/ ' { print $1 } '` 198 str2='$(LIBO)/lib'$strlib'.a('$stri'.o)' 196 199 fi 197 200 done -
LMDZ5/tags/proto-testing-20131015/libf/dyn3d/inigrads.F
r1665 r1893 13 13 real xmin,xmax,ymin,ymax 14 14 15 character file*10,titlel*40 15 character(len=*),intent(in) :: file 16 character(len=*),intent(in) :: titlel 16 17 17 18 #include "gradsdef.h" -
LMDZ5/tags/proto-testing-20131015/libf/dyn3dmem/bilan_dyn_loc.F
r1864 r1893 420 420 masse_cum(:,jjb:jje,l)=0. 421 421 flux_u_cum(:,jjb:jje,l)=0. 422 Q_cum(:,jjb:jje, :,l)=0.422 Q_cum(:,jjb:jje,l,:)=0. 423 423 flux_uQ_cum(:,jjb:jje,l,:)=0. 424 424 if (pole_sud) jje=jj_end-1 … … 444 444 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 445 445 DO l=1,llm 446 masse_cum(:,jjb:jje, :)=masse_cum(:,jjb:jje,:)+masse(:,jjb:jje,:)447 flux_u_cum(:,jjb:jje, :)=flux_u_cum(:,jjb:jje,:)448 . +flux_u(:,jjb:jje, :)446 masse_cum(:,jjb:jje,l)=masse_cum(:,jjb:jje,l)+masse(:,jjb:jje,l) 447 flux_u_cum(:,jjb:jje,l)=flux_u_cum(:,jjb:jje,l) 448 . +flux_u(:,jjb:jje,l) 449 449 ENDDO 450 450 !$OMP END DO NOWAIT … … 454 454 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 455 455 DO l=1,llm 456 flux_v_cum(:,jjb:jje, :)=flux_v_cum(:,jjb:jje,:)457 . +flux_v(:,jjb:jje, :)456 flux_v_cum(:,jjb:jje,l)=flux_v_cum(:,jjb:jje,l) 457 . +flux_v(:,jjb:jje,l) 458 458 ENDDO 459 459 !$OMP END DO NOWAIT … … 465 465 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 466 466 DO l=1,llm 467 Q_cum(:,jjb:jje, :,iQ)=Q_cum(:,jjb:jje,:,iQ)468 . +Q(:,jjb:jje, :,iQ)*masse(:,jjb:jje,:)467 Q_cum(:,jjb:jje,l,iQ)=Q_cum(:,jjb:jje,l,iQ) 468 . +Q(:,jjb:jje,l,iQ)*masse(:,jjb:jje,l) 469 469 ENDDO 470 470 !$OMP END DO NOWAIT … … 494 494 c ------------- 495 495 do iQ=1,nQ 496 call Register_Hallo_u(Q(1, 1,1,iQ),llm,0,1,1,0,Req)496 call Register_Hallo_u(Q(1,jjb_u,1,iQ),llm,0,1,1,0,Req) 497 497 enddo 498 498 call SendRequest(Req) … … 660 660 call Register_Hallo_u(masse_cum,llm,1,1,1,1,Req) 661 661 do iQ=1,nQ 662 call Register_Hallo_u(Q_cum(1, 1,1,iQ),llm,0,1,1,0,Req)662 call Register_Hallo_u(Q_cum(1,jjb_u,1,iQ),llm,0,1,1,0,Req) 663 663 enddo 664 664 -
LMDZ5/tags/proto-testing-20131015/libf/dyn3dmem/inigrads.F
r1707 r1893 13 13 real xmin,xmax,ymin,ymax 14 14 15 character file*10,titlel*40 15 character(len=*),intent(in) :: file 16 character(len=*),intent(in) :: titlel 16 17 17 18 #include "gradsdef.h" -
LMDZ5/tags/proto-testing-20131015/libf/dyn3dpar/bilan_dyn_p.F
r1864 r1893 16 16 USE mod_hallo 17 17 use misc_mod 18 use write_field 18 use write_field_p 19 19 IMPLICIT NONE 20 20 … … 57 57 c ======= 58 58 59 integer icum,ncum 60 logical first 61 real zz,zqy,zfactv(jjm,llm) 62 63 integer nQ 64 parameter (nQ=7) 59 integer,save :: icum,ncum 60 !$OMP THREADPRIVATE(icum,ncum) 61 logical,SAVE :: first=.true. 62 !$OMP THREADPRIVATE(first) 63 64 real zz,zqy 65 real,save :: zfactv(jjm,llm) 66 67 integer,parameter :: nQ=7 65 68 66 69 67 70 cym character*6 nom(nQ) 68 71 cym character*6 unites(nQ) 69 character *6,save :: nom(nQ)70 character *6,save :: unites(nQ)71 72 character *10file72 character(len=6),save :: nom(nQ) 73 character(len=6),save :: unites(nQ) 74 75 character(len=10) file 73 76 integer ifile 74 77 parameter (ifile=4) 75 78 76 integer itemp,igeop,iecin,iang,iu,iovap,iun 77 integer i_sortie 78 79 save first,icum,ncum 80 save itemp,igeop,iecin,iang,iu,iovap,iun 81 save i_sortie 82 83 real time 84 integer itau 85 save time,itau 86 data time,itau/0.,0/ 87 88 data first/.true./ 89 data itemp,igeop,iecin,iang,iu,iovap,iun/1,2,3,4,5,6,7/ 90 data i_sortie/1/ 79 integer,PARAMETER :: itemp=1,igeop=2,iecin=3,iang=4,iu=5 80 INTEGER,PARAMETER :: iovap=6,iun=7 81 integer,PARAMETER :: i_sortie=1 82 83 real,SAVE :: time=0. 84 integer,SAVE :: itau=0. 85 !$OMP THREADPRIVATE(time,itau) 91 86 92 87 real ww 93 88 94 89 c variables dynamiques intermédiaires 95 REAL vcont(iip1,jjm,llm),ucont(iip1,jjp1,llm) 96 REAL ang(iip1,jjp1,llm),unat(iip1,jjp1,llm) 97 REAL massebx(iip1,jjp1,llm),masseby(iip1,jjm,llm) 98 REAL vorpot(iip1,jjm,llm) 99 REAL w(iip1,jjp1,llm),ecin(iip1,jjp1,llm),convm(iip1,jjp1,llm) 100 REAL bern(iip1,jjp1,llm) 90 REAL,save :: vcont(iip1,jjm,llm),ucont(iip1,jjp1,llm) 91 REAL,save :: ang(iip1,jjp1,llm),unat(iip1,jjp1,llm) 92 REAL,save :: massebx(iip1,jjp1,llm),masseby(iip1,jjm,llm) 93 REAL,save :: vorpot(iip1,jjm,llm) 94 REAL,save :: w(iip1,jjp1,llm),ecin(iip1,jjp1,llm) 95 REAL,save ::convm(iip1,jjp1,llm) 96 REAL,save :: bern(iip1,jjp1,llm) 101 97 102 98 c champ contenant les scalaires advectés. 103 real Q(iip1,jjp1,llm,nQ)99 real,save :: Q(iip1,jjp1,llm,nQ) 104 100 105 101 c champs cumulés 106 real ps_cum(iip1,jjp1) 107 real masse_cum(iip1,jjp1,llm) 108 real flux_u_cum(iip1,jjp1,llm) 109 real flux_v_cum(iip1,jjm,llm) 110 real Q_cum(iip1,jjp1,llm,nQ) 111 real flux_uQ_cum(iip1,jjp1,llm,nQ) 112 real flux_vQ_cum(iip1,jjm,llm,nQ) 113 real flux_wQ_cum(iip1,jjp1,llm,nQ) 114 real dQ(iip1,jjp1,llm,nQ) 115 116 save ps_cum,masse_cum,flux_u_cum,flux_v_cum 117 save Q_cum,flux_uQ_cum,flux_vQ_cum 102 real,save :: ps_cum(iip1,jjp1) 103 real,save :: masse_cum(iip1,jjp1,llm) 104 real,save :: flux_u_cum(iip1,jjp1,llm) 105 real,save :: flux_v_cum(iip1,jjm,llm) 106 real,save :: Q_cum(iip1,jjp1,llm,nQ) 107 real,save :: flux_uQ_cum(iip1,jjp1,llm,nQ) 108 real,save :: flux_vQ_cum(iip1,jjm,llm,nQ) 109 real,save :: flux_wQ_cum(iip1,jjp1,llm,nQ) 110 real,save :: dQ(iip1,jjp1,llm,nQ) 111 118 112 119 113 c champs de tansport en moyenne zonale … … 128 122 character*10,save :: zunites(ntr,nQ) 129 123 130 integer iave,itot,immc,itrs,istn131 data iave,itot,immc,itrs,istn/1,2,3,4,5/ 124 INTEGER,PARAMETER :: iave=1,itot=2,immc=3,itrs=4,istn=5 125 132 126 character*3 ctrs(ntr) 133 127 data ctrs/' ','TOT','MMC','TRS','STN'/ 134 128 135 real zvQ(jjm,llm,ntr,nQ),zvQtmp(jjm,llm)136 real zavQ(jjm,ntr,nQ),psiQ(jjm,llm+1,nQ)137 real zmasse(jjm,llm),zamasse(jjm)138 139 real zv(jjm,llm),psi(jjm,llm+1)129 real,save :: zvQ(jjm,llm,ntr,nQ),zvQtmp(jjm,llm) 130 real,save :: zavQ(jjm,ntr,nQ),psiQ(jjm,llm+1,nQ) 131 real,save :: zmasse(jjm,llm),zamasse(jjm) 132 133 real,save :: zv(jjm,llm),psi(jjm,llm+1) 140 134 141 135 integer i,j,l,iQ … … 151 145 save fileid 152 146 153 integer ndex3d(jjm*llm)147 integer,save :: ndex3d(jjm*llm) 154 148 155 149 C Variables locales … … 162 156 integer zan, dayref 163 157 C 164 real rlong(jjm),rlatg(jjm)158 real,save :: rlong(jjm),rlatg(jjm) 165 159 integer :: jjb,jje,jjn,ijb,ije 166 type(Request) :: Req 160 type(Request),SAVE :: Req 161 !$OMP THREADPRIVATE(Req) 167 162 168 163 ! definition du domaine d'ecriture pour le rebuild … … 182 177 c Initialisation 183 178 c===================================================================== 184 ndex3d=0185 179 if (adjust) return 186 180 … … 190 184 if (first) then 191 185 186 ndex3d=0 192 187 193 188 icum=0 … … 202 197 WRITE(lunout,*)'dt_cum=',dt_cum 203 198 stop 199 else 200 write(lunout,*) "bilan_dyn_p: ncum=",ncum 204 201 endif 205 202 206 if (i_sortie.eq.1) then 207 file='dynzon' 208 if (mpi_rank==0) then 209 call inigrads(ifile,1 210 s ,0.,180./pi,0.,0.,jjm,rlatv,-90.,90.,180./pi 211 s ,llm,presnivs,1. 212 s ,dt_cum,file,'dyn_zon ') 213 endif 214 endif 215 203 ! if (i_sortie.eq.1) then 204 ! file='dynzon' 205 ! if (mpi_rank==0) then 206 ! call inigrads(ifile,1 207 ! s ,0.,180./pi,0.,0.,jjm,rlatv,-90.,90.,180./pi 208 ! s ,llm,presnivs,1. 209 ! s ,dt_cum,file,'dyn_zon ') 210 ! endif 211 ! endif 212 213 !$OMP MASTER 216 214 nom(itemp)='T' 217 215 nom(igeop)='gz' … … 339 337 CALL histend(fileid) 340 338 341 339 !$OMP END MASTER 340 !$OMP BARRIER 342 341 endif 343 342 … … 351 350 352 351 c énergie cinétique 353 ucont(:,jjb:jje,:)=0352 ! ucont(:,jjb:jje,:)=0 354 353 355 354 call Register_Hallo(ucov,ip1jmp1,llm,1,1,1,1,Req) 356 355 call Register_Hallo(vcov,ip1jm,llm,1,1,1,1,Req) 357 356 call SendRequest(Req) 357 c$OMP BARRIER 358 358 call WaitRequest(Req) 359 c$OMP BARRIER 359 360 360 361 CALL covcont_p(llm,ucov,vcov,ucont,vcont) … … 362 363 363 364 c moment cinétique 365 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 364 366 do l=1,llm 365 367 ang(:,jjb:jje,l)=ucov(:,jjb:jje,l)+constang(:,jjb:jje) 366 368 unat(:,jjb:jje,l)=ucont(:,jjb:jje,l)*cu(:,jjb:jje) 367 369 enddo 368 369 Q(:,jjb:jje,:,itemp)=teta(:,jjb:jje,:)*pk(:,jjb:jje,:)/cpp 370 Q(:,jjb:jje,:,igeop)=phi(:,jjb:jje,:) 371 Q(:,jjb:jje,:,iecin)=ecin(:,jjb:jje,:) 372 Q(:,jjb:jje,:,iang)=ang(:,jjb:jje,:) 373 Q(:,jjb:jje,:,iu)=unat(:,jjb:jje,:) 374 Q(:,jjb:jje,:,iovap)=trac(:,jjb:jje,:,1) 375 Q(:,jjb:jje,:,iun)=1. 376 370 !$OMP END DO 371 372 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 373 DO l=1,llm 374 Q(:,jjb:jje,l,itemp)=teta(:,jjb:jje,l)*pk(:,jjb:jje,l)/cpp 375 Q(:,jjb:jje,l,igeop)=phi(:,jjb:jje,l) 376 Q(:,jjb:jje,l,iecin)=ecin(:,jjb:jje,l) 377 Q(:,jjb:jje,l,iang)=ang(:,jjb:jje,l) 378 Q(:,jjb:jje,l,iu)=unat(:,jjb:jje,l) 379 Q(:,jjb:jje,l,iovap)=trac(:,jjb:jje,l,1) 380 Q(:,jjb:jje,l,iun)=1. 381 ENDDO 382 !$OMP END DO NOWAIT 377 383 378 384 c===================================================================== … … 384 390 jje=jj_end 385 391 392 !$OMP MASTER 386 393 ps_cum(:,jjb:jje)=0. 387 masse_cum(:,jjb:jje,:)=0. 388 flux_u_cum(:,jjb:jje,:)=0. 389 Q_cum(:,jjb:jje,:,:)=0. 390 flux_uQ_cum(:,jjb:jje,:,:)=0. 391 if (pole_sud) jje=jj_end-1 392 flux_v_cum(:,jjb:jje,:)=0. 393 flux_vQ_cum(:,jjb:jje,:,:)=0. 394 !$OMP END MASTER 395 !$OMP BARRIER 396 397 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 398 DO l=1,llm 399 masse_cum(:,jjb:jje,l)=0. 400 flux_u_cum(:,jjb:jje,l)=0. 401 Q_cum(:,jjb:jje,l,:)=0. 402 flux_uQ_cum(:,jjb:jje,l,:)=0. 403 if (pole_sud) jje=jj_end-1 404 flux_v_cum(:,jjb:jje,l)=0. 405 flux_vQ_cum(:,jjb:jje,l,:)=0. 406 ENDDO 407 !$OMP END DO NOWAIT 394 408 endif 395 409 … … 402 416 jje=jj_end 403 417 418 !$OMP MASTER 404 419 ps_cum(:,jjb:jje)=ps_cum(:,jjb:jje)+ps(:,jjb:jje) 405 masse_cum(:,jjb:jje,:)=masse_cum(:,jjb:jje,:)+masse(:,jjb:jje,:) 406 flux_u_cum(:,jjb:jje,:)=flux_u_cum(:,jjb:jje,:) 407 . +flux_u(:,jjb:jje,:) 420 !$OMP END MASTER 421 !$OMP BARRIER 422 423 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 424 DO l=1,llm 425 masse_cum(:,jjb:jje,l)=masse_cum(:,jjb:jje,l)+masse(:,jjb:jje,l) 426 flux_u_cum(:,jjb:jje,l)=flux_u_cum(:,jjb:jje,l) 427 . +flux_u(:,jjb:jje,l) 428 ENDDO 429 !$OMP END DO NOWAIT 430 408 431 if (pole_sud) jje=jj_end-1 409 flux_v_cum(:,jjb:jje,:)=flux_v_cum(:,jjb:jje,:) 410 . +flux_v(:,jjb:jje,:) 411 412 jjb=jj_begin 413 jje=jj_end 414 415 do iQ=1,nQ 416 Q_cum(:,jjb:jje,:,iQ)=Q_cum(:,jjb:jje,:,iQ) 417 . +Q(:,jjb:jje,:,iQ)*masse(:,jjb:jje,:) 432 433 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 434 DO l=1,llm 435 flux_v_cum(:,jjb:jje,l)=flux_v_cum(:,jjb:jje,l) 436 . +flux_v(:,jjb:jje,l) 437 ENDDO 438 !$OMP END DO NOWAIT 439 440 jjb=jj_begin 441 jje=jj_end 442 443 do iQ=1,nQ 444 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 445 DO l=1,llm 446 Q_cum(:,jjb:jje,l,iQ)=Q_cum(:,jjb:jje,l,iQ) 447 . +Q(:,jjb:jje,l,iQ)*masse(:,jjb:jje,l) 448 ENDDO 449 !$OMP END DO NOWAIT 418 450 enddo 419 451 … … 425 457 c ----------------- 426 458 do iQ=1,nQ 459 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 427 460 do l=1,llm 428 461 do j=jjb,jje … … 434 467 enddo 435 468 enddo 469 !$OMP END DO NOWAIT 436 470 enddo 437 471 … … 442 476 enddo 443 477 call SendRequest(Req) 478 !$OMP BARRIER 444 479 call WaitRequest(Req) 445 480 !$OMP BARRIER 481 446 482 jjb=jj_begin 447 483 jje=jj_end … … 449 485 450 486 do iQ=1,nQ 487 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 451 488 do l=1,llm 452 489 do j=jjb,jje … … 457 494 enddo 458 495 enddo 496 !$OMP END DO NOWAIT 459 497 enddo 460 498 … … 467 505 call Register_Hallo(flux_vQ_cum,ip1jm,llm,2,2,2,2,Req) 468 506 call SendRequest(Req) 507 !$OMP BARRIER 469 508 call WaitRequest(Req) 509 c$OMP BARRIER 470 510 471 511 call convflu_p(flux_uQ_cum,flux_vQ_cum,llm*nQ,dQ) … … 475 515 call Register_Hallo(flux_v_cum,ip1jm,llm,2,2,2,2,Req) 476 516 call SendRequest(Req) 517 !$OMP BARRIER 477 518 call WaitRequest(Req) 519 c$OMP BARRIER 478 520 479 521 call convmas_p(flux_u_cum,flux_v_cum,convm) 480 522 CALL vitvert_p(convm,w) 481 482 jjb=jj_begin 483 jje=jj_end 484 485 do iQ=1,nQ 486 do l=1,llm-1 487 do j=jjb,jje 488 do i=1,iip1 489 ww=-0.5*w(i,j,l+1)*(Q(i,j,l,iQ)+Q(i,j,l+1,iQ)) 490 dQ(i,j,l ,iQ)=dQ(i,j,l ,iQ)-ww 491 dQ(i,j,l+1,iQ)=dQ(i,j,l+1,iQ)+ww 492 enddo 493 enddo 494 enddo 523 !$OMP BARRIER 524 525 jjb=jj_begin 526 jje=jj_end 527 528 do iQ=1,nQ 529 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 530 do l=1,llm 531 IF (l<llm) THEN 532 do j=jjb,jje 533 do i=1,iip1 534 ww=-0.5*w(i,j,l+1)*(Q(i,j,l,iQ)+Q(i,j,l+1,iQ)) 535 dQ(i,j,l ,iQ)=dQ(i,j,l ,iQ)-ww 536 dQ(i,j,l+1,iQ)=dQ(i,j,l+1,iQ)+ww 537 enddo 538 enddo 539 ENDIF 540 IF (l>2) THEN 541 do j=jjb,jje 542 do i=1,iip1 543 ww=-0.5*w(i,j,l)*(Q(i,j,l-1,iQ)+Q(i,j,l,iQ)) 544 dQ(i,j,l,iQ)=dQ(i,j,l,iQ)+ww 545 enddo 546 enddo 547 ENDIF 548 enddo 549 !$OMP ENDDO NOWAIT 495 550 enddo 496 551 IF (prt_level > 5) … … 505 560 . WRITE(lunout,*)'Pas d ecriture' 506 561 562 jjb=jj_begin 563 jje=jj_end 564 507 565 c Normalisation 508 566 do iQ=1,nQ 509 Q_cum(:,jjb:jje,:,iQ)=Q_cum(:,jjb:jje,:,iQ) 510 . /masse_cum(:,jjb:jje,:) 511 enddo 567 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 568 do l=1,llm 569 Q_cum(:,jjb:jje,l,iQ)=Q_cum(:,jjb:jje,l,iQ) 570 . /masse_cum(:,jjb:jje,l) 571 enddo 572 !$OMP ENDDO NOWAIT 573 enddo 574 512 575 zz=1./REAL(ncum) 513 576 514 jjb=jj_begin 515 jje=jj_end 516 577 !$OMP MASTER 517 578 ps_cum(:,jjb:jje)=ps_cum(:,jjb:jje)*zz 518 masse_cum(:,jjb:jje,:)=masse_cum(:,jjb:jje,:)*zz 519 flux_u_cum(:,jjb:jje,:)=flux_u_cum(:,jjb:jje,:)*zz 520 flux_uQ_cum(:,jjb:jje,:,:)=flux_uQ_cum(:,jjb:jje,:,:)*zz 521 dQ(:,jjb:jje,:,:)=dQ(:,jjb:jje,:,:)*zz 579 !$OMP END MASTER 580 581 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 582 DO l=1,llm 583 masse_cum(:,jjb:jje,l)=masse_cum(:,jjb:jje,l)*zz 584 flux_u_cum(:,jjb:jje,l)=flux_u_cum(:,jjb:jje,l)*zz 585 flux_uQ_cum(:,jjb:jje,l,:)=flux_uQ_cum(:,jjb:jje,l,:)*zz 586 dQ(:,jjb:jje,l,:)=dQ(:,jjb:jje,l,:)*zz 587 ENDDO 588 !$OMP ENDDO NOWAIT 589 522 590 523 591 IF (pole_sud) jje=jj_end-1 524 flux_v_cum(:,jjb:jje,:)=flux_v_cum(:,jjb:jje,:)*zz 525 flux_vQ_cum(:,jjb:jje,:,:)=flux_vQ_cum(:,jjb:jje,:,:)*zz 592 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 593 DO l=1,llm 594 flux_v_cum(:,jjb:jje,l)=flux_v_cum(:,jjb:jje,l)*zz 595 flux_vQ_cum(:,jjb:jje,l,:)=flux_vQ_cum(:,jjb:jje,l,:)*zz 596 ENDDO 597 !$OMP ENDDO 526 598 527 599 jjb=jj_begin … … 532 604 c division de dQ par la masse pour revenir aux bonnes grandeurs 533 605 do iQ=1,nQ 534 dQ(:,jjb:jje,:,iQ)=dQ(:,jjb:jje,:,iQ)/masse_cum(:,jjb:jje,:) 606 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 607 DO l=1,llm 608 dQ(:,jjb:jje,l,iQ)=dQ(:,jjb:jje,l,iQ)/masse_cum(:,jjb:jje,l) 609 ENDDO 610 !$OMP ENDDO NOWAIT 535 611 enddo 536 612 … … 545 621 if (pole_sud) jje=jj_end-1 546 622 547 zv(jjb:jje,:)=0. 548 zmasse(jjb:jje,:)=0. 623 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 624 DO l=1,llm 625 zv(jjb:jje,l)=0. 626 zmasse(jjb:jje,l)=0. 627 ENDDO 628 !$OMP ENDDO NOWAIT 549 629 550 630 call Register_Hallo(masse_cum,ip1jmp1,llm,1,1,1,1,Req) … … 554 634 555 635 call SendRequest(Req) 636 !$OMP BARRIER 556 637 call WaitRequest(Req) 638 c$OMP BARRIER 557 639 558 640 call massbar_p(masse_cum,massebx,masseby) … … 562 644 if (pole_sud) jje=jj_end-1 563 645 646 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 564 647 do l=1,llm 565 648 do j=jjb,jje … … 571 654 enddo 572 655 enddo 656 !$OMP ENDDO 573 657 574 658 c print*,'3OK' … … 609 693 psiQ=0. 610 694 do iQ=1,nQ 611 zvQtmp=0. 695 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 612 696 do l=1,llm 697 zvQtmp(:,l)=0. 613 698 do j=jjb,jje 614 699 c print*,'j,l,iQ=',j,l,iQ … … 633 718 enddo 634 719 enddo 720 !$OMP ENDDO NOWAIT 635 721 c fonction de courant meridienne pour la quantite Q 722 !$OMP BARRIER 723 !$OMP MASTER 636 724 do l=llm,1,-1 637 725 do j=jjb,jje … … 639 727 enddo 640 728 enddo 641 enddo 729 !$OMP END MASTER 730 !$OMP BARRIER 731 enddo ! of do iQ=1,nQ 642 732 643 733 c fonction de courant pour la circulation meridienne moyenne 734 !$OMP BARRIER 735 !$OMP MASTER 644 736 psi(jjb:jje,:)=0. 645 737 do l=llm,1,-1 … … 649 741 enddo 650 742 enddo 743 !$OMP END MASTER 744 !$OMP BARRIER 651 745 652 746 c print*,'4OK' 653 747 c sorties proprement dites 748 !$OMP MASTER 654 749 if (i_sortie.eq.1) then 655 750 jjb=jj_begin … … 669 764 s ,jjn*llm,ndex3d) 670 765 enddo 671 672 766 call histwrite(fileid,'masse',itau,zmasse(jjb:jje,1:llm) 673 767 s ,jjn*llm,ndex3d) … … 703 797 enddo 704 798 enddo 705 799 !$OMP END MASTER 800 !$OMP BARRIER 706 801 c on doit pouvoir tracer systematiquement la fonction de courant. 707 802 … … 712 807 c///////////////////////////////////////////////////////////////////// 713 808 c===================================================================== 714 715 809 return 716 810 end -
LMDZ5/tags/proto-testing-20131015/libf/dyn3dpar/inigrads.F
r1665 r1893 13 13 real xmin,xmax,ymin,ymax 14 14 15 character file*10,titlel*40 15 character(len=*),intent(in) :: file 16 character(len=*),intent(in) :: titlel 16 17 17 18 #include "gradsdef.h" -
LMDZ5/tags/proto-testing-20131015/libf/dyn3dpar/leapfrog_p.F
r1864 r1893 1344 1344 c$OMP BARRIER 1345 1345 RETURN 1346 ENDIF 1346 ENDIF ! of IF (itau==itaumax) 1347 1347 1348 1348 IF ( .NOT.purmats ) THEN … … 1396 1396 #ifdef CPP_IOIPSL 1397 1397 IF (ok_dynzon) THEN 1398 call Register_Hallo(vcov,ip1jm,llm,1,0,0,1,TestRequest)1399 call SendRequest(TestRequest)1400 c$OMP BARRIER1401 call WaitRequest(TestRequest)1402 c$OMP BARRIER1403 c$OMP MASTER1404 ! CALL writedynav_p(histaveid, itau,vcov ,1405 ! , ucov,teta,pk,phi,q,masse,ps,phis)1406 1407 c ATTENTION!!! bilan_dyn_p ne marche probablement pas avec OpenMP1408 1398 CALL bilan_dyn_p(2,dtvr*iperiod,dtvr*day_step*periodav, 1409 1399 , ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 1410 c$OMP END MASTER1411 1400 ENDIF !ok_dynzon 1412 1401 #endif … … 1602 1591 #ifdef CPP_IOIPSL 1603 1592 IF (ok_dynzon) THEN 1604 c$OMP BARRIER1605 call Register_Hallo(vcov,ip1jm,llm,1,0,0,1,TestRequest)1606 call SendRequest(TestRequest)1607 c$OMP BARRIER1608 call WaitRequest(TestRequest)1609 c$OMP BARRIER1610 c$OMP MASTER1611 ! CALL writedynav_p(histaveid, itau,vcov ,1612 ! , ucov,teta,pk,phi,q,masse,ps,phis)1613 1593 CALL bilan_dyn_p(2,dtvr*iperiod,dtvr*day_step*periodav, 1614 1594 , ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 1615 c$OMP END MASTER1616 1595 END IF !ok_dynzon 1617 1596 #endif -
LMDZ5/tags/proto-testing-20131015/libf/phy1d/lmdz1d.F
r1864 r1893 13 13 use control_mod 14 14 USE indice_sol_mod 15 USE phyaqua_mod 15 16 16 17 implicit none -
LMDZ5/tags/proto-testing-20131015/libf/phydev/physiq.F90
r1864 r1893 104 104 call ymds2ju(1979, 1, 1, 0.0, zjulian) 105 105 dtime=pdtphys 106 #ifndef CPP_NO_IOIPSL 107 ! Initialize IOIPSL output file 106 108 call histbeg_phy("histins.nc",itau0,zjulian,dtime,nhori,nid_hist) 107 108 109 #endif 109 110 110 111 !$OMP MASTER 111 112 112 113 113 #ifndef CPP_NO_IOIPSL 114 ! IOIPSL 114 115 ! define vertical coordinate 115 116 call histvert(nid_hist,"presnivs","Vertical levels","Pa",klev, & … … 130 131 ! end definition sequence 131 132 call histend(nid_hist) 132 133 #endif 134 135 #ifdef CPP_XIOS 133 136 !XIOS 134 #ifdef CPP_XIOS135 137 ! Déclaration de l'axe vertical du fichier: 136 !CALL wxios_add_vaxis("presnivs", "histins", klev, presnivs)138 CALL wxios_add_vaxis("presnivs", "histins", klev, presnivs) 137 139 138 140 !Déclaration du pas de temps: 139 !CALL wxios_set_timestep(dtime)141 CALL wxios_set_timestep(dtime) 140 142 141 143 !Finalisation du contexte: 142 !CALL wxios_closedef()144 CALL wxios_closedef() 143 145 #endif 144 146 !$OMP END MASTER 145 147 endif ! of if (debut) 146 148 147 ! increment counter itau149 ! increment local time counter itau 148 150 itau=itau+1 149 151 … … 169 171 170 172 ! write some outputs: 173 ! IOIPSL 174 #ifndef CPP_NO_IOIPSL 171 175 if (modulo(itau,iwrite_phys)==0) then 172 176 call histwrite_phy(nid_hist,.false.,"temperature",itau,t) … … 175 179 call histwrite_phy(nid_hist,.false.,"ps",itau,paprs(:,1)) 176 180 endif 181 #endif 177 182 178 183 !XIOS 179 184 #ifdef CPP_XIOS 180 185 !$OMP MASTER 181 ! On incrémente le pas de temps XIOS182 !CALL wxios_update_calendar(itau)183 184 ! Et on écrit, avec la routine histwrite dédiée:185 !CALL histwrite_phy("temperature",t)186 !CALL histwrite_phy("u",u)187 !CALL histwrite_phy("v",v)188 !CALL histwrite_phy("ps",paprs(:,1))186 !Increment XIOS time 187 CALL wxios_update_calendar(itau) 188 189 !Send fields to XIOS: 190 CALL histwrite_phy("temperature",t) 191 CALL histwrite_phy("u",u) 192 CALL histwrite_phy("v",v) 193 CALL histwrite_phy("ps",paprs(:,1)) 189 194 !$OMP END MASTER 190 195 #endif -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/calcul_STDlev.h
r1707 r1893 1 c 2 c$Header$3 c 4 cIM on initialise les variables5 c 1 ! 2 ! $Header$ 3 ! 4 !IM on initialise les variables 5 ! 6 6 missing_val=nf90_fill_real 7 c 8 cIM freq_moyNMC = frequences auxquelles on moyenne les champs accumules9 cIM sur les niveaux de pression standard du NMC7 ! 8 !IM freq_moyNMC = frequences auxquelles on moyenne les champs accumules 9 !IM sur les niveaux de pression standard du NMC 10 10 DO n=1, nout 11 11 freq_moyNMC(n)=freq_outNMC(n)/freq_calNMC(n) 12 12 ENDDO 13 c 13 ! 14 14 CALL ini_undefSTD(itap,freq_outNMC) 15 c 16 cIM on interpole les champs sur les niveaux STD de pression17 cIM a chaque pas de temps de la physique18 c 19 c-------------------------------------------------------c20 cpositionnement de l'argument logique a .false. c21 cpour ne pas recalculer deux fois la meme chose ! c22 ca cet effet un appel a plevel_new a ete deplace c23 ca la fin de la serie d'appels c24 cla boucle 'DO k=1, nlevSTD' a ete internalisee c25 cdans plevel_new, d'ou la creation de cette routine... c26 c-------------------------------------------------------c27 c 28 CALL plevel_new(klon,klev,nlevSTD,.true.,pplay,rlevSTD, 29 &t_seri,tlevSTD)30 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 31 &u_seri,ulevSTD)32 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 33 &v_seri,vlevSTD)34 c 35 36 c 37 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 38 &zphi/RG,philevSTD)39 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 40 &qx(:,:,ivap),qlevSTD)41 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 42 &zx_rh*100.,rhlevSTD)43 c 15 ! 16 !IM on interpole les champs sur les niveaux STD de pression 17 !IM a chaque pas de temps de la physique 18 ! 19 !-------------------------------------------------------c 20 ! positionnement de l'argument logique a .false. c 21 ! pour ne pas recalculer deux fois la meme chose ! c 22 ! a cet effet un appel a plevel_new a ete deplace c 23 ! a la fin de la serie d'appels c 24 ! la boucle 'DO k=1, nlevSTD' a ete internalisee c 25 ! dans plevel_new, d'ou la creation de cette routine... c 26 !-------------------------------------------------------c 27 ! 28 CALL plevel_new(klon,klev,nlevSTD,.true.,pplay,rlevSTD, & 29 t_seri,tlevSTD) 30 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, & 31 u_seri,ulevSTD) 32 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, & 33 v_seri,vlevSTD) 34 ! 35 36 ! 37 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, & 38 zphi/RG,philevSTD) 39 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, & 40 qx(:,:,ivap),qlevSTD) 41 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, & 42 zx_rh*100.,rhlevSTD) 43 ! 44 44 DO l=1, klev 45 45 DO i=1, klon … … 47 47 ENDDO !i 48 48 ENDDO !l 49 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 50 &zx_tmp_fi3d,uvSTD)51 c 49 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, & 50 zx_tmp_fi3d,uvSTD) 51 ! 52 52 DO l=1, klev 53 53 DO i=1, klon … … 55 55 ENDDO !i 56 56 ENDDO !l 57 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 58 &zx_tmp_fi3d,vqSTD)59 c 57 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, & 58 zx_tmp_fi3d,vqSTD) 59 ! 60 60 DO l=1, klev 61 61 DO i=1, klon … … 63 63 ENDDO !i 64 64 ENDDO !l 65 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 66 &zx_tmp_fi3d,vTSTD)67 c 65 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, & 66 zx_tmp_fi3d,vTSTD) 67 ! 68 68 DO l=1, klev 69 69 DO i=1, klon … … 71 71 ENDDO !i 72 72 ENDDO !l 73 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 74 &zx_tmp_fi3d,wqSTD)75 c 73 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, & 74 zx_tmp_fi3d,wqSTD) 75 ! 76 76 DO l=1, klev 77 77 DO i=1, klon … … 79 79 ENDDO !i 80 80 ENDDO !l 81 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 82 &zx_tmp_fi3d,vphiSTD)83 c 81 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, & 82 zx_tmp_fi3d,vphiSTD) 83 ! 84 84 DO l=1, klev 85 85 DO i=1, klon … … 87 87 ENDDO !i 88 88 ENDDO !l 89 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 90 &zx_tmp_fi3d,wTSTD)91 c 89 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, & 90 zx_tmp_fi3d,wTSTD) 91 ! 92 92 DO l=1, klev 93 93 DO i=1, klon … … 95 95 ENDDO !i 96 96 ENDDO !l 97 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 98 &zx_tmp_fi3d,u2STD)99 c 97 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, & 98 zx_tmp_fi3d,u2STD) 99 ! 100 100 DO l=1, klev 101 101 DO i=1, klon … … 103 103 ENDDO !i 104 104 ENDDO !l 105 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 106 &zx_tmp_fi3d,v2STD)107 c 105 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, & 106 zx_tmp_fi3d,v2STD) 107 ! 108 108 DO l=1, klev 109 109 DO i=1, klon … … 111 111 ENDDO !i 112 112 ENDDO !l 113 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 114 &zx_tmp_fi3d,T2STD)115 116 c 113 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, & 114 zx_tmp_fi3d,T2STD) 115 116 ! 117 117 zx_tmp_fi3d(:,:)=wo(:,:,1) * dobson_u * 1e3 / zmasse / rmo3 * rmd 118 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 119 &zx_tmp_fi3d,O3STD)120 c 118 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, & 119 zx_tmp_fi3d,O3STD) 120 ! 121 121 if (read_climoz == 2) THEN 122 122 zx_tmp_fi3d(:,:)=wo(:,:,2) * dobson_u * 1e3 / zmasse / rmo3 * rmd 123 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 124 &zx_tmp_fi3d,O3daySTD)123 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, & 124 zx_tmp_fi3d,O3daySTD) 125 125 endif 126 c 126 ! 127 127 DO l=1, klev 128 128 DO i=1, klon … … 130 130 ENDDO !i 131 131 ENDDO !l 132 CALL plevel_new(klon,klev,nlevSTD,.true.,zx_tmp_fi3d,rlevSTD, 133 &omega,wlevSTD)134 c 135 cIM on somme les valeurs toutes les freq_calNMC secondes136 c 132 CALL plevel_new(klon,klev,nlevSTD,.true.,zx_tmp_fi3d,rlevSTD, & 133 omega,wlevSTD) 134 ! 135 !IM on somme les valeurs toutes les freq_calNMC secondes 136 ! 137 137 CALL undefSTD(itap,freq_calNMC, read_climoz) 138 c 139 cIM on moyenne a la fin du mois ou du jour (toutes les freq_outNMC secondes)140 c 138 ! 139 !IM on moyenne a la fin du mois ou du jour (toutes les freq_outNMC secondes) 140 ! 141 141 CALL moy_undefSTD(itap,freq_outNMC,freq_moyNMC) 142 c 143 CALL plevel(klon,klev,.true.,pplay,50000., 144 &zphi/RG,geo500)145 146 cIM on interpole a chaque pas de temps le SWup(clr) et SWdn(clr) a 200 hPa147 c 148 CALL plevel(klon,klevp1,.true.,paprs,20000., 149 $swdn0,SWdn200clr)150 CALL plevel(klon,klevp1,.false.,paprs,20000., 151 $swdn,SWdn200)152 CALL plevel(klon,klevp1,.false.,paprs,20000., 153 $swup0,SWup200clr)154 CALL plevel(klon,klevp1,.false.,paprs,20000., 155 $swup,SWup200)156 c 157 CALL plevel(klon,klevp1,.false.,paprs,20000., 158 $lwdn0,LWdn200clr)159 CALL plevel(klon,klevp1,.false.,paprs,20000., 160 $lwdn,LWdn200)161 CALL plevel(klon,klevp1,.false.,paprs,20000., 162 $lwup0,LWup200clr)163 CALL plevel(klon,klevp1,.false.,paprs,20000., 164 $lwup,LWup200)165 c 142 ! 143 CALL plevel(klon,klev,.true.,pplay,50000., & 144 zphi/RG,geo500) 145 146 !IM on interpole a chaque pas de temps le SWup(clr) et SWdn(clr) a 200 hPa 147 ! 148 CALL plevel(klon,klevp1,.true.,paprs,20000., & 149 swdn0,SWdn200clr) 150 CALL plevel(klon,klevp1,.false.,paprs,20000., & 151 swdn,SWdn200) 152 CALL plevel(klon,klevp1,.false.,paprs,20000., & 153 swup0,SWup200clr) 154 CALL plevel(klon,klevp1,.false.,paprs,20000., & 155 swup,SWup200) 156 ! 157 CALL plevel(klon,klevp1,.false.,paprs,20000., & 158 lwdn0,LWdn200clr) 159 CALL plevel(klon,klevp1,.false.,paprs,20000., & 160 lwdn,LWdn200) 161 CALL plevel(klon,klevp1,.false.,paprs,20000., & 162 lwup0,LWup200clr) 163 CALL plevel(klon,klevp1,.false.,paprs,20000., & 164 lwup,LWup200) 165 ! 166 166 twriteSTD(:,:,1)=tsumSTD(:,:,1) 167 167 qwriteSTD(:,:,1)=qsumSTD(:,:,1) … … 195 195 vwriteSTD(:,:,4)=vlevSTD(:,:) 196 196 wwriteSTD(:,:,4)=wlevSTD(:,:) 197 c 198 cIM initialisation 5eme fichier de sortie197 ! 198 !IM initialisation 5eme fichier de sortie 199 199 twriteSTD(:,:,5)=tlevSTD(:,:) 200 200 qwriteSTD(:,:,5)=qlevSTD(:,:) … … 204 204 vwriteSTD(:,:,5)=vlevSTD(:,:) 205 205 wwriteSTD(:,:,5)=wlevSTD(:,:) 206 c 207 cIM initialisation 6eme fichier de sortie206 ! 207 !IM initialisation 6eme fichier de sortie 208 208 twriteSTD(:,:,6)=tlevSTD(:,:) 209 209 qwriteSTD(:,:,6)=qlevSTD(:,:) … … 213 213 vwriteSTD(:,:,6)=vlevSTD(:,:) 214 214 wwriteSTD(:,:,6)=wlevSTD(:,:) 215 cIM for NMC files215 !IM for NMC files 216 216 DO n=1, nlevSTD3 217 217 DO k=1, nlevSTD … … 227 227 ENDDO 228 228 ENDDO 229 c 229 ! 230 230 DO n=1, nlevSTD8 231 231 DO k=1, nlevSTD -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/calcul_divers.h
r1454 r1893 1 c 2 c$Header$3 c 1 ! 2 ! $Header$ 3 ! 4 4 5 cInitialisations diverses au "debut" du mois5 ! Initialisations diverses au "debut" du mois 6 6 IF(debut) THEN 7 7 nday_rain(:)=0. 8 8 9 csurface terre9 ! surface terre 10 10 paire_ter(:)=0. 11 11 DO i=1, klon … … 16 16 ENDIF 17 17 18 cIM Calcul une fois par jour : total_rain, nday_rain18 !IM Calcul une fois par jour : total_rain, nday_rain 19 19 IF(MOD(itap,INT(un_jour/dtime)).EQ.0) THEN 20 20 DO i = 1, klon -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/clesphys.h
r1864 r1893 66 66 ! aer_type: pour utiliser un fichier constant dans readaerosol 67 67 CHARACTER*8 :: aer_type 68 LOGICAL ok_ isccp, ok_regdyn68 LOGICAL ok_regdyn 69 69 REAL lonmin_ins, lonmax_ins, latmin_ins, latmax_ins 70 70 REAL ecrit_ins, ecrit_hf, ecrit_day … … 94 94 & , lev_histins, lev_histLES, lev_histdayNMC, levout_histNMC & 95 95 & , pasphys, ok_histNMC, freq_outNMC, freq_calNMC & 96 & , type_run, ok_ isccp, ok_regdyn, ok_cosp&96 & , type_run, ok_regdyn, ok_cosp & 97 97 & , ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP & 98 98 & , lonmin_ins, lonmax_ins, latmin_ins, latmax_ins & -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/conema3.h
r879 r1893 6 6 logical ok_adj_ema ! F 7 7 integer iflag_clw ! 0 8 8 integer iflag_cvl_sigd 9 9 real sig1feed ! 1. 10 10 real sig2feed ! 0.95 -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/conf_phys_m.F90
r1864 r1893 83 83 character (len = 10),SAVE :: type_veget_omp 84 84 CHARACTER(len = 8),SAVE :: aer_type_omp 85 logical,SAVE :: ok_snow_omp 85 86 logical,SAVE :: ok_newmicro_omp 86 87 logical,SAVE :: ok_journe_omp, ok_mensuel_omp, ok_instan_omp, ok_hf_omp … … 160 161 REAL, SAVE :: freq_outNMC_omp(3), freq_calNMC_omp(3) 161 162 CHARACTER*4, SAVE :: type_run_omp 162 LOGICAL,SAVE :: ok_isccp_omp163 163 LOGICAL,SAVE :: ok_cosp_omp 164 164 LOGICAL,SAVE :: ok_mensuelCOSP_omp,ok_journeCOSP_omp,ok_hfCOSP_omp … … 227 227 call getin('VEGET', type_veget_omp) 228 228 ! 229 230 ! Martin 231 !Config Key = ok_snow 232 !Config Desc = Flag to activate snow model SISVAT 233 !Config Def = .false. 234 ok_snow_omp = .false. 235 call getin('ok_snow', ok_snow_omp) 236 ! Martin 237 229 238 !Config Key = OK_journe 230 239 !Config Desc = Pour des sorties journalieres … … 1341 1350 type_run_omp = 'AMIP' 1342 1351 call getin('type_run',type_run_omp) 1343 1344 !1345 !Config Key = ok_isccp1346 !Config Desc =1347 !Config Def = .true.1348 !Config Help =1349 !1350 ! ok_isccp = .true.1351 ok_isccp_omp = .false.1352 call getin('ok_isccp',ok_isccp_omp)1353 1352 1354 1353 ! … … 1737 1736 ok_veget=.false. 1738 1737 endif 1738 ! Martin 1739 ok_snow = ok_snow_omp 1740 ! Martin 1739 1741 1740 1742 ok_newmicro = ok_newmicro_omp … … 1786 1788 iflag_cvl_sigd = iflag_cvl_sigd_omp 1787 1789 type_run = type_run_omp 1788 ok_isccp = ok_isccp_omp1789 1790 ok_cosp = ok_cosp_omp 1790 1791 ok_mensuelCOSP = ok_mensuelCOSP_omp … … 1860 1861 write(lunout,*)' Version ocean = ', version_ocean 1861 1862 write(lunout,*)' Config veget = ', ok_veget,type_veget 1863 write(lunout,*)' Snow model SISVAT : ok_snow = ', ok_snow 1862 1864 write(lunout,*)' Sortie journaliere = ', ok_journe 1863 1865 write(lunout,*)' Sortie haute frequence = ', ok_hf … … 1958 1960 write(lunout,*)' iflag_clos = ', iflag_clos 1959 1961 write(lunout,*)' type_run = ',type_run 1960 write(lunout,*)' ok_isccp = ',ok_isccp1961 1962 write(lunout,*)' ok_cosp = ',ok_cosp 1962 1963 write(lunout,*)' ok_mensuelCOSP = ',ok_mensuelCOSP -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/cv30_routines.F
r1750 r1893 30 30 C *** IT MUST BE LESS THAN 0 *** 31 31 32 #include "cv30param.h"33 #include "conema3.h"32 include "cv30param.h" 33 include "conema3.h" 34 34 35 35 integer nd … … 108 108 real cpx(len,nd) 109 109 110 #include "cvthermo.h"111 #include "cv30param.h"110 include "cvthermo.h" 111 include "cv30param.h" 112 112 113 113 … … 176 176 C================================================================ 177 177 178 #include "cv30param.h"178 include "cv30param.h" 179 179 180 180 c inputs: … … 359 359 !---------------------------------------------------------------- 360 360 361 #include "cvthermo.h"362 #include "cv30param.h"361 include "cvthermo.h" 362 include "cv30param.h" 363 363 364 364 c inputs: … … 646 646 !------------------------------------------------------------------- 647 647 648 #include "cv30param.h"648 include "cv30param.h" 649 649 650 650 c input: … … 748 748 implicit none 749 749 750 #include "cv30param.h"750 include "cv30param.h" 751 751 include 'iniprint.h' 752 752 … … 873 873 C--------------------------------------------------------------------- 874 874 875 #include "cvthermo.h"876 #include "cv30param.h"877 #include "conema3.h"875 include "cvthermo.h" 876 include "cv30param.h" 877 include "conema3.h" 878 878 879 879 c inputs: … … 1233 1233 !=================================================================== 1234 1234 1235 #include "cvthermo.h"1236 #include "cv30param.h"1235 include "cvthermo.h" 1236 include "cv30param.h" 1237 1237 1238 1238 c input: … … 1443 1443 !--------------------------------------------------------------------- 1444 1444 1445 #include "cvthermo.h"1446 #include "cv30param.h"1445 include "cvthermo.h" 1446 include "cv30param.h" 1447 1447 1448 1448 c inputs: … … 1836 1836 1837 1837 1838 #include "cvthermo.h"1839 #include "cv30param.h"1840 #include "cvflag.h"1838 include "cvthermo.h" 1839 include "cv30param.h" 1840 include "cvflag.h" 1841 1841 1842 1842 c inputs: … … 2200 2200 implicit none 2201 2201 2202 #include "cvthermo.h"2203 #include "cv30param.h"2204 #include "cvflag.h"2205 #include "conema3.h"2202 include "cvthermo.h" 2203 include "cv30param.h" 2204 include "cvflag.h" 2205 include "conema3.h" 2206 2206 2207 2207 c inputs: … … 3053 3053 implicit none 3054 3054 3055 #include "cv30param.h"3055 include "cv30param.h" 3056 3056 3057 3057 c inputs: … … 3183 3183 implicit none 3184 3184 3185 #include "cv30param.h"3185 include "cv30param.h" 3186 3186 3187 3187 c inputs: -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/cv3_buoy.F
r1515 r1893 14 14 implicit none 15 15 16 #include "cvthermo.h"17 #include "cv3param.h"16 include "cvthermo.h" 17 include "cv3param.h" 18 18 19 19 c input: -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/cv3_cine.F
r1403 r1893 18 18 implicit none 19 19 c 20 #include "YOMCST.h"21 #include "cvthermo.h"22 #include "cv3param.h"20 include "YOMCST.h" 21 include "cvthermo.h" 22 include "cv3param.h" 23 23 c input: 24 24 integer ncum, nd, nloc -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/cv3_routines.F
r1864 r1893 30 30 C *** IT MUST BE LESS THAN 0 *** 31 31 32 #include "cv3param.h"33 #include "conema3.h"32 include "cv3param.h" 33 include "conema3.h" 34 34 35 35 integer nd … … 167 167 real cpx(len,nd) 168 168 169 #include "cvthermo.h"170 #include "cv3param.h"169 include "cvthermo.h" 170 include "cv3param.h" 171 171 172 172 … … 242 242 C================================================================ 243 243 244 #include "cv3param.h"245 #include "cvthermo.h"244 include "cv3param.h" 245 include "cvthermo.h" 246 246 247 247 c inputs: … … 434 434 !---------------------------------------------------------------- 435 435 436 #include "cvthermo.h"437 #include "cv3param.h"436 include "cvthermo.h" 437 include "cv3param.h" 438 438 439 439 c inputs: … … 715 715 !------------------------------------------------------------------- 716 716 717 #include "cv3param.h"717 include "cv3param.h" 718 718 719 719 c input: … … 818 818 implicit none 819 819 820 #include "cv3param.h"820 include "cv3param.h" 821 821 include 'iniprint.h' 822 822 … … 975 975 C--------------------------------------------------------------------- 976 976 977 #include "cvthermo.h"978 #include "cv3param.h"979 #include "conema3.h"980 #include "cvflag.h"977 include "cvthermo.h" 978 include "cv3param.h" 979 include "conema3.h" 980 include "cvflag.h" 981 981 982 982 c inputs: … … 1454 1454 !=================================================================== 1455 1455 1456 #include "cvthermo.h"1457 #include "cv3param.h"1456 include "cvthermo.h" 1457 include "cv3param.h" 1458 1458 1459 1459 c input: … … 1697 1697 !--------------------------------------------------------------------- 1698 1698 1699 #include "cvthermo.h"1700 #include "cv3param.h"1701 #include "cvflag.h"1699 include "cvthermo.h" 1700 include "cv3param.h" 1701 include "cvflag.h" 1702 1702 1703 1703 c inputs: … … 2119 2119 2120 2120 2121 #include "cvthermo.h"2122 #include "cv3param.h"2123 #include "cvflag.h"2121 include "cvthermo.h" 2122 include "cv3param.h" 2123 include "cvflag.h" 2124 2124 2125 2125 c inputs: … … 2719 2719 implicit none 2720 2720 2721 #include "cvthermo.h"2722 #include "cv3param.h"2723 #include "cvflag.h"2724 #include "conema3.h"2721 include "cvthermo.h" 2722 include "cv3param.h" 2723 include "cvflag.h" 2724 include "conema3.h" 2725 2725 2726 2726 c inputs: … … 3941 3941 implicit none 3942 3942 3943 #include "cv3param.h"3943 include "cv3param.h" 3944 3944 3945 3945 c inputs: … … 4053 4053 implicit none 4054 4054 4055 #include "cv3param.h"4055 include "cv3param.h" 4056 4056 4057 4057 c inputs: -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/cv3_vertmix.F
r879 r1893 19 19 C=============================================================== 20 20 21 #include "cvthermo.h"22 #include "YOETHF.h"23 #include "YOMCST.h"24 #include "FCTTRE.h"21 include "cvthermo.h" 22 include "YOETHF.h" 23 include "YOMCST.h" 24 include "FCTTRE.h" 25 25 c input : 26 26 integer nd,len -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/cv3p1_closure.F
r1664 r1893 23 23 implicit none 24 24 25 #include "cvthermo.h"26 #include "cv3param.h"27 #include "YOMCST2.h"28 #include "YOMCST.h"29 #include "conema3.h"30 #include "iniprint.h"25 include "cvthermo.h" 26 include "cv3param.h" 27 include "YOMCST2.h" 28 include "YOMCST.h" 29 include "conema3.h" 30 include "iniprint.h" 31 31 32 32 c input: -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/cv3p_mixing.F
r1750 r1893 15 15 implicit none 16 16 c 17 #include "cvthermo.h"18 #include "cv3param.h"19 #include "YOMCST2.h"17 include "cvthermo.h" 18 include "cv3param.h" 19 include "YOMCST2.h" 20 20 21 21 c inputs: -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/cv_routines.F
r1403 r1893 36 36 C *** (DAMP MUST BE LESS THAN 1) *** 37 37 38 #include "cvparam.h"38 include "cvparam.h" 39 39 integer nd 40 40 CHARACTER (LEN=20) :: modname='cv_routines' … … 94 94 real cpx(len,nd) 95 95 96 #include "cvthermo.h"97 #include "cvparam.h"96 include "cvthermo.h" 97 include "cvparam.h" 98 98 99 99 … … 140 140 C================================================================ 141 141 142 #include "cvparam.h"142 include "cvparam.h" 143 143 144 144 c inputs: … … 261 261 implicit none 262 262 263 #include "cvthermo.h"264 #include "cvparam.h"263 include "cvthermo.h" 264 include "cvparam.h" 265 265 266 266 c inputs: … … 377 377 !------------------------------------------------------------------- 378 378 379 #include "cvparam.h"379 include "cvparam.h" 380 380 381 381 c inputs: … … 409 409 implicit none 410 410 411 #include "cvparam.h"411 include "cvparam.h" 412 412 413 413 c inputs: … … 507 507 C--------------------------------------------------------------------- 508 508 509 #include "cvthermo.h"510 #include "cvparam.h"509 include "cvthermo.h" 510 include "cvparam.h" 511 511 512 512 c inputs: … … 796 796 real work(nloc) 797 797 798 #include "cvthermo.h"799 #include "cvparam.h"798 include "cvthermo.h" 799 include "cvparam.h" 800 800 801 801 c------------------------------------------------------------------- … … 866 866 implicit none 867 867 868 #include "cvthermo.h"869 #include "cvparam.h"868 include "cvthermo.h" 869 include "cvparam.h" 870 870 871 871 c inputs: … … 1126 1126 1127 1127 1128 #include "cvthermo.h"1129 #include "cvparam.h"1128 include "cvthermo.h" 1129 include "cvparam.h" 1130 1130 1131 1131 c inputs: … … 1330 1330 implicit none 1331 1331 1332 #include "cvthermo.h"1333 #include "cvparam.h"1332 include "cvthermo.h" 1333 include "cvparam.h" 1334 1334 1335 1335 c inputs … … 1720 1720 implicit none 1721 1721 1722 #include "cvparam.h"1722 include "cvparam.h" 1723 1723 1724 1724 c inputs: -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/declare_STDlev.h
r1864 r1893 1 cIM for NMC files1 !IM for NMC files 2 2 ! real twriteSTD(klon,nlevSTD,nfiles) 3 3 ! real qwriteSTD(klon,nlevSTD,nfiles) … … 26 26 27 27 real, save :: rlevSTD(nlevSTD) 28 DATA rlevSTD/100000., 92500., 85000., 70000., 29 .60000., 50000., 40000., 30000., 25000., 20000.,30 .15000., 10000., 7000., 5000., 3000., 2000., 1000./31 c$OMP THREADPRIVATE(rlevstd)28 DATA rlevSTD/100000., 92500., 85000., 70000., & 29 60000., 50000., 40000., 30000., 25000., 20000., & 30 15000., 10000., 7000., 5000., 3000., 2000., 1000./ 31 !$OMP THREADPRIVATE(rlevstd) 32 32 33 33 CHARACTER*4, SAVE :: clevSTD(nlevSTD) 34 DATA clevSTD/'1000','925 ','850 ','700 ','600 ', 35 .'500 ','400 ','300 ','250 ','200 ','150 ','100 ',36 .'70 ','50 ','30 ','20 ','10 '/37 c$OMP THREADPRIVATE(clevSTD)34 DATA clevSTD/'1000','925 ','850 ','700 ','600 ', & 35 '500 ','400 ','300 ','250 ','200 ','150 ','100 ', & 36 '70 ','50 ','30 ','20 ','10 '/ 37 !$OMP THREADPRIVATE(clevSTD) 38 38 39 39 real, save :: rlevSTD3(nlevSTD3) 40 40 DATA rlevSTD3/85000., 50000., 25000./ 41 c$OMP THREADPRIVATE(rlevSTD3)41 !$OMP THREADPRIVATE(rlevSTD3) 42 42 43 43 real, save :: rlevSTD8(nlevSTD8) 44 DATA rlevSTD8/100000., 85000., 70000., 50000., 25000., 10000., 45 $5000., 1000./46 c$OMP THREADPRIVATE(rlevSTD8)47 c 44 DATA rlevSTD8/100000., 85000., 70000., 50000., 25000., 10000., & 45 5000., 1000./ 46 !$OMP THREADPRIVATE(rlevSTD8) 47 ! 48 48 REAL geo500(klon) 49 49 50 cnout : niveau de output des variables a une pression donnee50 ! nout : niveau de output des variables a une pression donnee 51 51 logical oknondef(klon,nlevSTD,nout) 52 c 53 cles produits uvSTD, vqSTD, .., T2STD sont calcules54 ca partir des valeurs instantannees toutes les 6 h55 cqui sont moyennees sur le mois52 ! 53 ! les produits uvSTD, vqSTD, .., T2STD sont calcules 54 ! a partir des valeurs instantannees toutes les 6 h 55 ! qui sont moyennees sur le mois 56 56 57 57 REAL zx_tmp_fiNC(klon,nlevSTD) … … 59 59 REAL missing_val 60 60 REAL, SAVE :: freq_moyNMC(nout) 61 c$OMP THREADPRIVATE(freq_moyNMC)61 !$OMP THREADPRIVATE(freq_moyNMC) -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/ini_histday_seri.h
r1403 r1893 1 c 2 c$Id$3 c 4 cym Ne fonctionnera pas en mode parallele1 ! 2 ! $Id$ 3 ! 4 !ym Ne fonctionnera pas en mode parallele 5 5 IF (is_sequential) THEN 6 6 7 7 IF (type_run.EQ."AMIP") THEN 8 c 8 ! 9 9 zstophy = dtime 10 10 zout = ecrit_day 11 c 11 ! 12 12 idayref = day_ref 13 13 CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian) 14 c 14 ! 15 15 CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlon,zx_lon) 16 16 DO i = 1, iim … … 22 22 ENDDO 23 23 CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlat,zx_lat) 24 c 24 ! 25 25 imin_debut=1 26 26 nbpti=1 27 27 jmin_debut=1 28 28 nbptj=1 29 c 30 CALL histbeg("histday_seri.nc", 31 . iim,zx_lon(:,1), jjmp1,zx_lat(1,:),32 . imin_debut,nbpti,jmin_debut,nbptj,33 . itau_phy, zjulian, dtime,34 .nhori, nid_day_seri)35 c 36 CALL histvert(nid_day_seri, "presnivs", 37 . "Vertical levels","mb",38 .klev, presnivs/100., nvert)39 c 40 CALL histdef(nid_day_seri, "bilTOA", 41 . "Net radiation at model top", "W/m2",42 . iim,jjmp1,nhori, 1,1,1, -99, 32,43 ."ave(X)", zstophy,zout)44 c 45 CALL histdef(nid_day_seri, "bils", 46 . "Net downward energy flux at surface","W/m2",47 . iim,jjmp1,nhori, 1,1,1, -99, 32,48 ."ave(X)", zstophy,zout)49 c 50 CALL histdef(nid_day_seri, "ecin", 51 . "Total kinetic energy (per unit area)","J/m2",52 . iim,jjmp1,nhori, 1,1,1, -99, 32,53 ."ave(X)", zstophy,zout)54 c 55 cIM 151004 BEG29 ! 30 CALL histbeg("histday_seri.nc", & 31 iim,zx_lon(:,1), jjmp1,zx_lat(1,:), & 32 imin_debut,nbpti,jmin_debut,nbptj, & 33 itau_phy, zjulian, dtime, & 34 nhori, nid_day_seri) 35 ! 36 CALL histvert(nid_day_seri, "presnivs", & 37 "Vertical levels","mb", & 38 klev, presnivs/100., nvert) 39 ! 40 CALL histdef(nid_day_seri, "bilTOA", & 41 "Net radiation at model top", "W/m2", & 42 iim,jjmp1,nhori, 1,1,1, -99, 32, & 43 "ave(X)", zstophy,zout) 44 ! 45 CALL histdef(nid_day_seri, "bils", & 46 "Net downward energy flux at surface","W/m2", & 47 iim,jjmp1,nhori, 1,1,1, -99, 32, & 48 "ave(X)", zstophy,zout) 49 ! 50 CALL histdef(nid_day_seri, "ecin", & 51 "Total kinetic energy (per unit area)","J/m2", & 52 iim,jjmp1,nhori, 1,1,1, -99, 32, & 53 "ave(X)", zstophy,zout) 54 ! 55 !IM 151004 BEG 56 56 IF(1.EQ.0) THEN 57 c 58 CALL histdef(nid_day_seri, "momang", 59 . "Total relative angular momentum (per unit area)",60 . "kg/s",61 . iim,jjmp1,nhori, 1,1,1, -99, 32,62 ."ave(X)", zstophy,zout)63 c 64 CALL histdef(nid_day_seri, "frictor", 65 . "Friction torque (per unit area)", "N/m",66 . iim,jjmp1,nhori, 1,1,1, -99, 32,67 ."ave(X)", zstophy,zout)68 c 69 CALL histdef(nid_day_seri, "mountor", 70 . "Mountain torque (per unit area)", "N/m",71 . iim,jjmp1,nhori, 1,1,1, -99, 32,72 ."ave(X)", zstophy,zout)73 c 57 ! 58 CALL histdef(nid_day_seri, "momang", & 59 "Total relative angular momentum (per unit area)", & 60 "kg/s", & 61 iim,jjmp1,nhori, 1,1,1, -99, 32, & 62 "ave(X)", zstophy,zout) 63 ! 64 CALL histdef(nid_day_seri, "frictor", & 65 "Friction torque (per unit area)", "N/m", & 66 iim,jjmp1,nhori, 1,1,1, -99, 32, & 67 "ave(X)", zstophy,zout) 68 ! 69 CALL histdef(nid_day_seri, "mountor", & 70 "Mountain torque (per unit area)", "N/m", & 71 iim,jjmp1,nhori, 1,1,1, -99, 32, & 72 "ave(X)", zstophy,zout) 73 ! 74 74 ENDIF !(1.EQ.0) THEN 75 c 76 CALL histdef(nid_day_seri, "momang", 77 . "Axial angular momentum (per unit area)",78 . "kg/s",79 . iim,jjmp1,nhori, 1,1,1, -99, 32,80 ."ave(X)", zstophy,zout)81 c 82 CALL histdef(nid_day_seri, "torsfc", 83 . "Total surface torque (including mountain torque)", "N/m",84 . iim,jjmp1,nhori, 1,1,1, -99, 32,85 ."ave(X)", zstophy,zout)86 c 87 cIM 151004 END88 c 89 CALL histdef(nid_day_seri, "tamv", 90 . "Temperature (mass-weighted vert. ave)", "K",91 . iim,jjmp1,nhori, 1,1,1, -99, 32,92 ."ave(X)", zstophy,zout)93 c 94 CALL histdef(nid_day_seri, "psol", 95 . "Surface pressure", "Pa",96 . iim,jjmp1,nhori, 1,1,1, -99, 32,97 ."ave(X)", zstophy,zout)98 c 99 CALL histdef(nid_day_seri, "evap", 100 . "Evaporation and sublimation (per unit area)",101 . "kg/(m2*s)",102 . iim,jjmp1,nhori, 1,1,1, -99, 32,103 ."ave(X)", zstophy,zout)104 c 105 ccall histdef(nid_day_seri,106 c. "SnowFrac",107 c. "Snow-covered area ", "%",108 c. iim,jjmp1,nhori, 1,1,1, -99, 32,109 c. "ave(X)", zstophy,zout)110 c 111 cCALL histdef(nid_day_seri, "snow_depth",112 cIM 080904 . "Snow Depth (water equivalent)", "m",113 cIM 191104 . "Snow Depth (water equivalent)", "kg/m2",114 c. "Snow Mass", "kg/m2",115 c. iim,jjmp1,nhori, 1,1,1, -99, 32,116 c. "ave(X)", zstophy,zout)117 c 118 call histdef(nid_day_seri, 119 . "tsol_"//clnsurf(is_oce),120 . "SST over open (ice-free) ocean ", "K",121 . iim,jjmp1,nhori, 1,1,1, -99, 32,122 ."ave(X)", zstophy,zout)123 c 124 c=================================================================125 c 75 ! 76 CALL histdef(nid_day_seri, "momang", & 77 "Axial angular momentum (per unit area)", & 78 "kg/s", & 79 iim,jjmp1,nhori, 1,1,1, -99, 32, & 80 "ave(X)", zstophy,zout) 81 ! 82 CALL histdef(nid_day_seri, "torsfc", & 83 "Total surface torque (including mountain torque)", "N/m", & 84 iim,jjmp1,nhori, 1,1,1, -99, 32, & 85 "ave(X)", zstophy,zout) 86 ! 87 !IM 151004 END 88 ! 89 CALL histdef(nid_day_seri, "tamv", & 90 "Temperature (mass-weighted vert. ave)", "K", & 91 iim,jjmp1,nhori, 1,1,1, -99, 32, & 92 "ave(X)", zstophy,zout) 93 ! 94 CALL histdef(nid_day_seri, "psol", & 95 "Surface pressure", "Pa", & 96 iim,jjmp1,nhori, 1,1,1, -99, 32, & 97 "ave(X)", zstophy,zout) 98 ! 99 CALL histdef(nid_day_seri, "evap", & 100 "Evaporation and sublimation (per unit area)", & 101 "kg/(m2*s)", & 102 iim,jjmp1,nhori, 1,1,1, -99, 32, & 103 "ave(X)", zstophy,zout) 104 ! 105 ! call histdef(nid_day_seri, 106 ! . "SnowFrac", 107 ! . "Snow-covered area ", "%", 108 ! . iim,jjmp1,nhori, 1,1,1, -99, 32, 109 ! . "ave(X)", zstophy,zout) 110 ! 111 ! CALL histdef(nid_day_seri, "snow_depth", 112 !IM 080904 . "Snow Depth (water equivalent)", "m", 113 !IM 191104 . "Snow Depth (water equivalent)", "kg/m2", 114 ! . "Snow Mass", "kg/m2", 115 ! . iim,jjmp1,nhori, 1,1,1, -99, 32, 116 ! . "ave(X)", zstophy,zout) 117 ! 118 call histdef(nid_day_seri, & 119 "tsol_"//clnsurf(is_oce), & 120 "SST over open (ice-free) ocean ", "K", & 121 iim,jjmp1,nhori, 1,1,1, -99, 32, & 122 "ave(X)", zstophy,zout) 123 ! 124 !================================================================= 125 ! 126 126 CALL histend(nid_day_seri) 127 c 128 c=================================================================127 ! 128 !================================================================= 129 129 ENDIF ! fin de test sur type_run.EQ.AMIP 130 130 -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/ini_paramLMDZ_phy.h
r1538 r1893 1 cIM Implemente en modes sequentiel et parallele1 !IM Implemente en modes sequentiel et parallele 2 2 3 3 CALL gather(rlat,rlat_glo) … … 6 6 CALL bcast(rlon_glo) 7 7 8 c$OMP MASTER8 !$OMP MASTER 9 9 if (is_mpi_root) then 10 c 10 ! 11 11 zstophy = dtime 12 12 zout = mth_len*un_jour 13 c 13 ! 14 14 idayref = day_ref 15 15 CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian) 16 c 16 ! 17 17 CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlon_glo,zx_lon) 18 18 if (iim.gt.1) then … … 23 23 endif 24 24 CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlat_glo,zx_lat) 25 c 26 CALL histbeg("paramLMDZ_phy.nc", 27 . np,zx_lon(np:np,1), np,zx_lat(1,np:np),28 . 1,1,1,1,29 . itau_phy, zjulian, dtime,30 .nhori, nid_ctesGCM)31 c 32 CALL histdef(nid_ctesGCM, "R_ecc", 33 . "Excentricite","-",34 . 1,1,nhori, 1,1,1, -99, 32,35 ."ave", zstophy,zout)36 c 37 CALL histdef(nid_ctesGCM, "R_peri", 38 . "Equinoxe","-",39 . 1,1,nhori, 1,1,1, -99, 32,40 ."ave", zstophy,zout)41 c 42 CALL histdef(nid_ctesGCM, "R_incl", 43 . "Inclinaison","deg",44 . 1,1,nhori, 1,1,1, -99, 32,45 ."ave", zstophy,zout)46 c 47 CALL histdef(nid_ctesGCM, "solaire", 48 . "Constante solaire","W/m2",49 . 1,1,nhori, 1,1,1, -99, 32,50 ."ave", zstophy,zout)51 c 52 CALL histdef(nid_ctesGCM, "co2_ppm", 53 . "Concentration du CO2", "ppm",54 . 1,1,nhori, 1,1,1, -99, 32,55 ."ave(X)", zstophy,zout)56 c 57 CALL histdef(nid_ctesGCM, "CH4_ppb", 58 . "Concentration du CH4", "ppb",59 . 1,1,nhori, 1,1,1, -99, 32,60 ."ave(X)", zstophy,zout)61 c 62 CALL histdef(nid_ctesGCM, "N2O_ppb", 63 . "Concentration du N2O", "ppb",64 . 1,1,nhori, 1,1,1, -99, 32,65 ."ave(X)", zstophy,zout)66 c 67 CALL histdef(nid_ctesGCM, "CFC11_ppt", 68 . "Concentration du CFC11", "ppt",69 . 1,1,nhori, 1,1,1, -99, 32,70 ."ave(X)", zstophy,zout)71 c 72 CALL histdef(nid_ctesGCM, "CFC12_ppt", 73 . "Concentration du CFC12", "ppt",74 . 1,1,nhori, 1,1,1, -99, 32,75 ."ave(X)", zstophy,zout)76 c 77 CALL histdef(nid_ctesGCM, "bils", 78 . "Surface total heat flux", "W m-2",79 . 1,1,nhori, 1,1,1, -99, 32,80 ."ave", zstophy,zout)81 c 82 CALL histdef(nid_ctesGCM, "evap", 83 . "Evaporation", "kg m-2 s-1",84 . 1,1,nhori, 1,1,1, -99, 32,85 ."ave", zstophy,zout)86 c 87 CALL histdef(nid_ctesGCM, "evap_land", 88 . "Land evaporation", "kg m-2 s-1",89 . 1,1,nhori, 1,1,1, -99, 32,90 ."ave", zstophy,zout)91 c 92 CALL histdef(nid_ctesGCM, "flat", 93 . "Latent heat flux", "W m-2",94 . 1,1,nhori, 1,1,1, -99, 32,95 ."ave", zstophy,zout)96 c 97 CALL histdef(nid_ctesGCM, "nettop0", 98 . "Clear sky net downward radiatif flux at TOA",99 . "W m-2",100 . 1,1,nhori, 1,1,1, -99, 32,101 ."ave", zstophy,zout)102 c 103 CALL histdef(nid_ctesGCM, "nettop", 104 . "Net downward radiatif flux at TOA", "W m-2",105 . 1,1,nhori, 1,1,1, -99, 32,106 ."ave", zstophy,zout)107 c 108 CALL histdef(nid_ctesGCM, "precip", 109 . "Total precipitation (liq+sol)", "kg m-2 s-1",110 . 1,1,nhori, 1,1,1, -99, 32,111 ."ave", zstophy,zout)112 c 113 CALL histdef(nid_ctesGCM, "tsol", 114 . "Surface temperature", "K",115 . 1,1,nhori, 1,1,1, -99, 32,116 ."ave", zstophy,zout)117 c 118 CALL histdef(nid_ctesGCM, "t2m", 119 . "Temperature at 2m", "K",120 . 1,1,nhori, 1,1,1, -99, 32,121 ."ave", zstophy,zout)122 c 123 CALL histdef(nid_ctesGCM, "prw", 124 . "Precipitable water", "kg m-2",125 . 1,1,nhori, 1,1,1, -99, 32,126 ."ave", zstophy,zout)127 c=================================================================128 c 25 ! 26 CALL histbeg("paramLMDZ_phy.nc", & 27 np,zx_lon(np:np,1), np,zx_lat(1,np:np), & 28 1,1,1,1, & 29 itau_phy, zjulian, dtime, & 30 nhori, nid_ctesGCM) 31 ! 32 CALL histdef(nid_ctesGCM, "R_ecc", & 33 "Excentricite","-", & 34 1,1,nhori, 1,1,1, -99, 32, & 35 "ave", zstophy,zout) 36 ! 37 CALL histdef(nid_ctesGCM, "R_peri", & 38 "Equinoxe","-", & 39 1,1,nhori, 1,1,1, -99, 32, & 40 "ave", zstophy,zout) 41 ! 42 CALL histdef(nid_ctesGCM, "R_incl", & 43 "Inclinaison","deg", & 44 1,1,nhori, 1,1,1, -99, 32, & 45 "ave", zstophy,zout) 46 ! 47 CALL histdef(nid_ctesGCM, "solaire", & 48 "Constante solaire","W/m2", & 49 1,1,nhori, 1,1,1, -99, 32, & 50 "ave", zstophy,zout) 51 ! 52 CALL histdef(nid_ctesGCM, "co2_ppm", & 53 "Concentration du CO2", "ppm", & 54 1,1,nhori, 1,1,1, -99, 32, & 55 "ave(X)", zstophy,zout) 56 ! 57 CALL histdef(nid_ctesGCM, "CH4_ppb", & 58 "Concentration du CH4", "ppb", & 59 1,1,nhori, 1,1,1, -99, 32, & 60 "ave(X)", zstophy,zout) 61 ! 62 CALL histdef(nid_ctesGCM, "N2O_ppb", & 63 "Concentration du N2O", "ppb", & 64 1,1,nhori, 1,1,1, -99, 32, & 65 "ave(X)", zstophy,zout) 66 ! 67 CALL histdef(nid_ctesGCM, "CFC11_ppt", & 68 "Concentration du CFC11", "ppt", & 69 1,1,nhori, 1,1,1, -99, 32, & 70 "ave(X)", zstophy,zout) 71 ! 72 CALL histdef(nid_ctesGCM, "CFC12_ppt", & 73 "Concentration du CFC12", "ppt", & 74 1,1,nhori, 1,1,1, -99, 32, & 75 "ave(X)", zstophy,zout) 76 ! 77 CALL histdef(nid_ctesGCM, "bils", & 78 "Surface total heat flux", "W m-2", & 79 1,1,nhori, 1,1,1, -99, 32, & 80 "ave", zstophy,zout) 81 ! 82 CALL histdef(nid_ctesGCM, "evap", & 83 "Evaporation", "kg m-2 s-1", & 84 1,1,nhori, 1,1,1, -99, 32, & 85 "ave", zstophy,zout) 86 ! 87 CALL histdef(nid_ctesGCM, "evap_land", & 88 "Land evaporation", "kg m-2 s-1", & 89 1,1,nhori, 1,1,1, -99, 32, & 90 "ave", zstophy,zout) 91 ! 92 CALL histdef(nid_ctesGCM, "flat", & 93 "Latent heat flux", "W m-2", & 94 1,1,nhori, 1,1,1, -99, 32, & 95 "ave", zstophy,zout) 96 ! 97 CALL histdef(nid_ctesGCM, "nettop0", & 98 "Clear sky net downward radiatif flux at TOA", & 99 "W m-2", & 100 1,1,nhori, 1,1,1, -99, 32, & 101 "ave", zstophy,zout) 102 ! 103 CALL histdef(nid_ctesGCM, "nettop", & 104 "Net downward radiatif flux at TOA", "W m-2", & 105 1,1,nhori, 1,1,1, -99, 32, & 106 "ave", zstophy,zout) 107 ! 108 CALL histdef(nid_ctesGCM, "precip", & 109 "Total precipitation (liq+sol)", "kg m-2 s-1", & 110 1,1,nhori, 1,1,1, -99, 32, & 111 "ave", zstophy,zout) 112 ! 113 CALL histdef(nid_ctesGCM, "tsol", & 114 "Surface temperature", "K", & 115 1,1,nhori, 1,1,1, -99, 32, & 116 "ave", zstophy,zout) 117 ! 118 CALL histdef(nid_ctesGCM, "t2m", & 119 "Temperature at 2m", "K", & 120 1,1,nhori, 1,1,1, -99, 32, & 121 "ave", zstophy,zout) 122 ! 123 CALL histdef(nid_ctesGCM, "prw", & 124 "Precipitable water", "kg m-2", & 125 1,1,nhori, 1,1,1, -99, 32, & 126 "ave", zstophy,zout) 127 !================================================================= 128 ! 129 129 CALL histend(nid_ctesGCM) 130 130 131 131 endif !(is_mpi_root) 132 c$OMP END MASTER133 c=================================================================132 !$OMP END MASTER 133 !================================================================= -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/pbl_surface_mod.F90
r1864 r1893 171 171 debut, lafin, & 172 172 rlon, rlat, rugoro, rmu0, & 173 zsig, sollwd_m, pphi, cldt, & 173 174 rain_f, snow_f, solsw_m, sollw_m, & 174 175 t, q, u, v, & … … 177 178 lwdown_m, cdragh, cdragm, zu1, zv1, & 178 179 alb1_m, alb2_m, zxsens, zxevap, & 180 alb3_lic, runoff, snowhgt, qsnow, to_ice, sissnow, & 179 181 zxtsol, zxfluxlat, zt2m, qsat2m, & 180 182 d_t, d_q, d_u, d_v, d_t_diss, & … … 224 226 ! rlat-----input-R- latitude en degree 225 227 ! rugos----input-R- longeur de rugosite (en m) 228 ! Martin 229 ! zsig-----input-R- slope 230 ! cldt-----input-R- total cloud fraction 231 ! pphi-----input-R- geopotentiel de chaque couche (g z) (reference sol) 232 ! Martin 226 233 ! 227 234 ! d_t------output-R- le changement pour "t" … … 264 271 !**************************************************************************************** 265 272 ! Declarations specifiques pour le 1D. A reprendre 273 INCLUDE "flux_arp.h" 266 274 ! Input variables 267 275 !**************************************************************************************** … … 287 295 REAL, DIMENSION(klon,klev+1), INTENT(IN) :: paprs ! pression between layers (Pa) 288 296 REAL, DIMENSION(klon, nbsrf), INTENT(IN) :: pctsrf ! sub-surface fraction 297 ! Martin 298 REAL, DIMENSION(klon), INTENT(IN) :: zsig ! slope 299 REAL, DIMENSION(klon), INTENT(IN) :: sollwd_m ! net longwave radiation at mean s 300 REAL, DIMENSION(klon), INTENT(IN) :: cldt ! total cloud fraction 301 REAL, DIMENSION(klon,klev), INTENT(IN) :: pphi ! geopotential (m2/s2) 302 ! Martin 289 303 290 304 ! Input/Output variables … … 298 312 REAL, DIMENSION(klon, nbsrf), INTENT(INOUT) :: v10m ! v speed at 10m 299 313 REAL, DIMENSION(klon, klev+1, nbsrf+1), INTENT(INOUT) :: tke 300 301 314 ! Output variables 302 315 !**************************************************************************************** … … 308 321 REAL, DIMENSION(klon), INTENT(OUT) :: alb1_m ! mean albedo in visible SW interval 309 322 REAL, DIMENSION(klon), INTENT(OUT) :: alb2_m ! mean albedo in near IR SW interval 323 ! Martin 324 REAL, DIMENSION(klon), INTENT(OUT) :: alb3_lic 325 ! Martin 310 326 REAL, DIMENSION(klon), INTENT(OUT) :: zxsens ! sensible heat flux at surface with inversed sign 311 327 ! (=> positive sign upwards) … … 370 386 REAL, DIMENSION(klon, klev, nbsrf), INTENT(OUT) :: flux_q ! water vapour flux(latent flux) (kg/m**2/s) 371 387 388 ! Martin 389 ! sisvat 390 REAL, DIMENSION(klon), INTENT(OUT) :: qsnow ! snow water content 391 REAL, DIMENSION(klon), INTENT(OUT) :: snowhgt ! snow height 392 REAL, DIMENSION(klon), INTENT(OUT) :: to_ice ! snow passed to ice 393 REAL, DIMENSION(klon), INTENT(OUT) :: sissnow ! snow in snow model 394 REAL, DIMENSION(klon), INTENT(OUT) :: runoff ! runoff on land ice 395 ! Martin 372 396 373 397 ! Local variables with attribute SAVE … … 429 453 REAL, DIMENSION(klon) :: AcoefU, AcoefV, BcoefU, BcoefV 430 454 REAL, DIMENSION(klon) :: ypsref 431 REAL, DIMENSION(klon) :: yevap, ytsurf_new, yalb1_new, yalb2_new 455 REAL, DIMENSION(klon) :: yevap, ytsurf_new, yalb1_new, yalb2_new, yalb3_new 432 456 REAL, DIMENSION(klon) :: ztsol 433 457 REAL, DIMENSION(klon) :: alb_m ! mean albedo for whole SW interval … … 476 500 REAL :: zx_qs1, zcor1, zdelta1 477 501 478 !**************************************************************************************** 479 ! Declarations specifiques pour le 1D. A reprendre 480 !**************************************************************************************** 481 REAL :: fsens,flat 482 LOGICAL :: ok_flux_surf ! initialized during first_call below 483 COMMON /flux_arp/fsens,flat,ok_flux_surf 502 ! Martin 503 REAL, DIMENSION(klon, nbsrf) :: sollwd ! net longwave radiation at surface 504 REAL, DIMENSION(klon) :: ysollwd 505 REAL, DIMENSION(klon) :: ytoice 506 REAL, DIMENSION(klon) :: ysnowhgt, yqsnow, ysissnow, yrunoff 507 REAL, DIMENSION(klon) :: yzsig 508 REAL, DIMENSION(klon,klev) :: ypphi 509 REAL, DIMENSION(klon) :: ycldt 510 REAL, DIMENSION(klon) :: yrmu0 511 ! Martin 512 513 !**************************************************************************************** 484 514 ! End of declarations 485 515 !**************************************************************************************** … … 556 586 d_t_diss= 0.0 ;d_u = 0.0 ; d_v = 0.0 ; yqsol = 0.0 557 587 ytherm = 0.0 ; ytke=0. 588 ! Martin 589 ysnowhgt = 0.0; yqsnow = 0.0 ; yrunoff = 0.0 ; ytoice =0.0 590 yalb3_new = 0.0 ; ysissnow = 0.0 ; ysollwd = 0.0 591 ypphi = 0.0 ; ycldt = 0.0 ; yrmu0 = 0.0 592 ! Martin 558 593 559 594 tke(:,:,is_ave)=0. … … 644 679 DO i = 1, klon 645 680 sollw(i,nsrf) = sollw_m(i) + 4.0*RSIGMA*ztsol(i)**3 * (ztsol(i)-ts(i,nsrf)) 681 ! Martin 682 sollwd(i,nsrf)= sollwd_m(i) 683 ! Martin 646 684 solsw(i,nsrf) = solsw_m(i) * (1.-alb(i,nsrf)) / (1.-alb_m(i)) 647 685 ENDDO … … 712 750 ypaprs(j,klev+1) = paprs(i,klev+1) 713 751 ywindsp(j) = SQRT(u10m(i,nsrf)**2 + v10m(i,nsrf)**2 ) 752 ! Martin 753 yzsig(j) = zsig(i) 754 ycldt(j) = cldt(i) 755 yrmu0(j) = rmu0(i) 756 ! Martin 714 757 END DO 715 758 … … 862 905 863 906 CASE(is_lic) 907 ! Martin 864 908 CALL surf_landice(itap, dtime, knon, ni, & 909 rlon, rlat, debut, lafin, & 910 yrmu0, ysollwd, yalb, ypphi(:,1), & 865 911 ysolsw, ysollw, yts, ypplay(:,1), & 866 912 ycdragh, ycdragm, yrain_f, ysnow_f, yt(:,1), yq(:,1),& … … 871 917 ytsoil, yz0_new, yalb1_new, yalb2_new, yevap, yfluxsens, yfluxlat, & 872 918 ytsurf_new, y_dflux_t, y_dflux_q, & 919 yzsig, ycldt, & 920 ysnowhgt, yqsnow, ytoice, ysissnow, & 921 yalb3_new, yrunoff, & 873 922 y_flux_u1, y_flux_v1) 923 !CALL surf_landice(itap, dtime, knon, ni, & 924 ! ysolsw, ysollw, yts, ypplay(:,1), & 925 ! ycdragh, ycdragm, yrain_f, ysnow_f, yt(:,1), yq(:,1),& 926 ! AcoefH, AcoefQ, BcoefH, BcoefQ, & 927 ! AcoefU, AcoefV, BcoefU, BcoefV, & 928 ! ypsref, yu1, yv1, yrugoro, pctsrf, & 929 ! ysnow, yqsurf, yqsol, yagesno, & 930 ! ytsoil, yz0_new, yalb1_new, yalb2_new, yevap, yfluxsens, yfluxlat, & 931 ! ytsurf_new, y_dflux_t, y_dflux_q, & 932 ! y_flux_u1, y_flux_v1) 933 934 alb3_lic(:)=0. 935 DO j = 1, knon 936 i = ni(j) 937 alb3_lic(i) = yalb3_new(j) 938 snowhgt(i) = ysnowhgt(j) 939 qsnow(i) = yqsnow(j) 940 to_ice(i) = ytoice(j) 941 sissnow(i) = ysissnow(j) 942 runoff(i) = yrunoff(j) 943 END DO 944 ! Martin 874 945 875 946 CASE(is_oce) -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/phys_local_var_mod.F90
r1864 r1893 264 264 !$OMP THREADPRIVATE(rneb) 265 265 266 ! variables de sorties MM 267 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxsnow,snowhgt,qsnow,to_ice 268 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sissnow,runoff,albsol3_lic 269 !$OMP THREADPRIVATE(zxsnow,snowhgt,qsnow,to_ice) 270 !$OMP THREADPRIVATE(sissnow,runoff,albsol3_lic) 271 266 272 CONTAINS 267 273 … … 414 420 415 421 422 ALLOCATE (zxsnow(klon),snowhgt(klon),qsnow(klon),to_ice(klon)) 423 ALLOCATE (sissnow(klon),runoff(klon),albsol3_lic(klon)) 424 425 426 416 427 END SUBROUTINE phys_local_var_init 417 428 … … 554 565 DEALLOCATE(beta_prec) 555 566 DEALLOCATE(rneb) 567 DEALLOCATE (zxsnow,snowhgt,qsnow,to_ice,sissnow,runoff,albsol3_lic) 556 568 557 569 END SUBROUTINE phys_local_var_end -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/phys_output_ctrlout_mod.F90
r1864 r1893 1153 1153 TYPE(ctrl_out), SAVE :: o_rldcs4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11 /), & 1154 1154 'rldcs4co2', 'Downwelling CS LW 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 9) /)) 1155 TYPE(ctrl_out), SAVE :: o_snowsrf = ctrl_out((/ 1, 1, 10, 1, 10, 10, 11, 11, 11 /), & 1156 'snowsrf', 'Snow mass at surface', 'kg/m2', (/ ('', i=1, 9) /)) 1157 TYPE(ctrl_out), SAVE :: o_qsnow = ctrl_out((/ 1, 1, 10, 1, 10, 10, 11, 11, 11 /), & 1158 'qsnow', 'Water contained in snow', 'kg/m2', (/ ('', i=1, 9) /)) 1159 TYPE(ctrl_out), SAVE :: o_snowhgt = ctrl_out((/ 1, 1, 10, 1, 10, 10, 11, 11, 11 /), & 1160 'snowhgt', 'Snow height at surface', 'm', (/ ('', i=1, 9) /)) 1161 TYPE(ctrl_out), SAVE :: o_toice = ctrl_out((/ 1, 1, 10, 1, 10, 10, 11, 11, 11 /), & 1162 'to_ice', 'Snow passed to ice model', 'kg/m2', (/ ('', i=1, 9) /)) 1163 TYPE(ctrl_out), SAVE :: o_sissnow = ctrl_out((/ 1, 1, 10, 1, 10, 10, 11, 11, 11 /), & 1164 'sissnow', 'Snow in snow model', 'kg/m2', (/ ('', i=1, 9) /)) 1165 TYPE(ctrl_out), SAVE :: o_runoff = ctrl_out((/ 1, 1, 10, 1, 10, 10, 11, 11, 11 /), & 1166 'runoff', 'Run-off rate land ice', 'kg/m2/s', (/ ('', i=1, 9) /)) 1167 TYPE(ctrl_out), SAVE :: o_albslw3 = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11 /), & 1168 'albslw3', 'Surface albedo LW3', '-', (/ ('', i=1, 9) /)) 1155 1169 1156 1170 !!!!!!!!!!!!! Sorties niveaux standards de pression NMC -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/phys_output_mod.F90
r1881 r1893 41 41 USE mod_phys_lmdz_para 42 42 USE aero_mod, only : naero_spc,name_aero 43 !Martin 44 USE surface_data, ONLY : ok_snow 43 45 USE phys_output_ctrlout_mod 44 46 … … 110 112 INTEGER, DIMENSION(nfiles) :: phys_out_levmin, phys_out_levmax 111 113 INTEGER, DIMENSION(nfiles) :: phys_out_filelevels 112 CHARACTER(LEN=20), DIMENSION(nfiles) :: chtimestep = (/ '1mth', '1mth', '1mth', '1mth', '1mth', &113 '1mth', '1mth', '1mth', '1mth' /)114 CHARACTER(LEN=20), DIMENSION(nfiles) :: chtimestep = (/ 'Default', 'Default', 'Default', 'Default', 'Default', & 115 'Default', 'Default', 'Default', 'Default' /) 114 116 LOGICAL, DIMENSION(nfiles) :: phys_out_filekeys 115 117 LOGICAL, DIMENSION(nfiles) :: phys_out_filestations … … 272 274 273 275 ! Calculate ecrit_files for all files 274 IF ( chtimestep(iff).eq.'DefFreq' ) then 275 ! Par defaut ecrit_files = (ecrit_mensuel ecrit_jour ecrit_hf ...)*86400. 276 IF ( chtimestep(iff).eq.'Default' ) then 277 ! Par defaut ecrit_files = (ecrit_mensuel ecrit_jour ecrit_hf 278 ! ...)*86400. 276 279 ecrit_files(iff)=ecrit_files(iff)*86400. 277 ELSE 278 CALL convers_timesteps(chtimestep(iff),dtime,ecrit_files(iff)) 279 ENDIF 280 else 281 CALL convers_timesteps(chtimestep(iff),dtime,ecrit_files(iff)) 282 ENDIF 283 280 284 WRITE(lunout,*)'ecrit_files(',iff,')= ',ecrit_files(iff) 281 282 285 zoutm(iff) = ecrit_files(iff) ! Frequence ou l on ecrit en seconde 283 284 286 285 287 #ifdef CPP_XIOS -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/phys_output_var_mod.F90
r1864 r1893 23 23 REAL, ALLOCATABLE :: bils_latent(:) ! bilan de chaleur au sol 24 24 !$OMP THREADPRIVATE(bils_ec,bils_tke,bils_diss,bils_kinetic,bils_enthalp,bils_latent) 25 25 26 26 27 ! ug Plein de variables venues de phys_output_mod -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/phys_output_write_mod.F90
r1864 r1893 31 31 USE phys_state_var_mod 32 32 USE phys_local_var_mod 33 USE phys_output_var_mod 33 34 USE indice_sol_mod 34 35 USE infotrac 35 36 USE comgeomphy 36 USE surface_data, ONLY : type_ocean, ok_veget 37 USE surface_data, ONLY : type_ocean, ok_veget, ok_snow 37 38 USE aero_mod 38 39 USE ioipsl … … 296 297 ENDIF 297 298 CALL histwrite_phy(o_tauy, zx_tmp_fi2d) 299 300 IF (ok_snow) THEN 301 CALL histwrite_phy(o_snowsrf, zxsnow) 302 CALL histwrite_phy(o_qsnow, qsnow) 303 CALL histwrite_phy(o_snowhgt,snowhgt) 304 CALL histwrite_phy(o_toice,to_ice) 305 CALL histwrite_phy(o_sissnow,sissnow) 306 CALL histwrite_phy(o_runoff,runoff) 307 CALL histwrite_phy(o_albslw3,albsol3_lic) 308 ENDIF 298 309 299 310 -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/phytrac_mod.F90
r1864 r1893 1 !$Id $ 2 !$Id $ 1 !$Id$ 3 2 MODULE phytrac_mod 4 3 !================================================================================= -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/regdim.h
r524 r1893 2 2 ! $Header$ 3 3 ! 4 ! Valid and equivalent for either free source form or fixed source form 4 5 INTEGER i1_deb, i1_fin 5 6 INTEGER i2_deb, i2_fin 6 ccc PARAMETER (i1_deb=21, i1_fin=40)7 ccc PARAMETER (i2_deb=41, i2_fin=44)8 cccc PARAMETER (i1_deb=47, i1_fin=77)9 cccc PARAMETER (i2_deb=78, i2_fin=79)7 !cc PARAMETER (i1_deb=21, i1_fin=40) 8 !cc PARAMETER (i2_deb=41, i2_fin=44) 9 !ccc PARAMETER (i1_deb=47, i1_fin=77) 10 !ccc PARAMETER (i2_deb=78, i2_fin=79) 10 11 PARAMETER (i1_deb=16, i1_fin=30) 11 12 PARAMETER (i2_deb=31, i2_fin=33) 12 c 13 ! 13 14 INTEGER j_deb, j_fin 14 ccc PARAMETER (j_deb=29, j_fin=61)15 cccc PARAMETER (j_deb=21, j_fin=51)15 !cc PARAMETER (j_deb=29, j_fin=61) 16 !ccc PARAMETER (j_deb=21, j_fin=51) 16 17 PARAMETER (j_deb=18, j_fin=39) -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/surf_landice_mod.F90
r1795 r1893 9 9 ! 10 10 SUBROUTINE surf_landice(itime, dtime, knon, knindex, & 11 rlon, rlat, debut, lafin, & 12 rmu0, lwdownm, albedo, pphi1, & 11 13 swnet, lwnet, tsurf, p1lay, & 12 14 cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum, & … … 17 19 tsoil, z0_new, alb1, alb2, evap, fluxsens, fluxlat, & 18 20 tsurf_new, dflux_s, dflux_l, & 21 slope, cloudf, & 22 snowhgt, qsnow, to_ice, sissnow, & 23 alb3, runoff, & 19 24 flux_u1, flux_v1) 20 25 21 26 USE dimphy 22 USE surface_data, ONLY : type_ocean, calice, calsno 27 USE surface_data, ONLY : type_ocean, calice, calsno, ok_snow 23 28 USE fonte_neige_mod, ONLY : fonte_neige, run_off_lic 24 29 USE cpl_mod, ONLY : cpl_send_landice_fields 25 30 USE calcul_fluxs_mod 26 31 USE phys_output_var_mod 32 #ifdef CPP_SISVAT 33 USE surf_sisvat_mod, ONLY : surf_sisvat 34 #endif 27 35 USE indice_sol_mod 28 36 … … 52 60 REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf 53 61 62 LOGICAL, INTENT(IN) :: debut !true if first step 63 LOGICAL, INTENT(IN) :: lafin !true if last step 64 REAL, DIMENSION(klon), INTENT(IN) :: rlon, rlat 65 REAL, DIMENSION(klon), INTENT(IN) :: rmu0 66 REAL, DIMENSION(klon), INTENT(IN) :: lwdownm !ylwdown 67 REAL, DIMENSION(klon), INTENT(IN) :: albedo !mean albedo 68 REAL, DIMENSION(klon), INTENT(IN) :: pphi1 69 REAL, DIMENSION(klon), INTENT(IN) :: slope !mean slope in grid box 70 REAL, DIMENSION(klon), INTENT(IN) :: cloudf !total cloud fraction 71 54 72 ! In/Output variables 55 73 !**************************************************************************************** … … 69 87 REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1, flux_v1 70 88 89 REAL, DIMENSION(klon), INTENT(OUT) :: alb3 90 REAL, DIMENSION(klon), INTENT(OUT) :: qsnow !column water in snow [kg/m2] 91 REAL, DIMENSION(klon), INTENT(OUT) :: snowhgt !Snow height (m) 92 REAL, DIMENSION(klon), INTENT(OUT) :: to_ice 93 REAL, DIMENSION(klon), INTENT(OUT) :: sissnow 94 REAL, DIMENSION(klon), INTENT(OUT) :: runoff !Land ice runoff 95 96 71 97 ! Local variables 72 98 !**************************************************************************************** … … 78 104 INTEGER :: i,j 79 105 106 REAL, DIMENSION(klon) :: emis_new !Emissivity 107 REAL, DIMENSION(klon) :: swdown,lwdown 108 REAL, DIMENSION(klon) :: precip_snow_adv, snow_adv !Snow Drift precip./advection 109 REAL, DIMENSION(klon) :: bl_height, wind_velo !height boundary layer, wind spd 110 REAL, DIMENSION(klon) :: dens_air, snow_cont_air !air density; snow content air 111 REAL, DIMENSION(klon) :: alb_soil !albedo of underlying ice 112 REAL, DIMENSION(klon) :: pexner !Exner potential 113 REAL :: pref 114 REAL, DIMENSION(klon,nsoilmx) :: tsoil0 !modfi 115 116 CHARACTER (len = 20) :: modname = 'surf_landice' 117 CHARACTER (len = 80) :: abort_message 118 80 119 ! End definition 81 120 !**************************************************************************************** 82 121 ! 83 122 ! Initialize output variables 123 alb3(:) = 999999. 84 124 alb2(:) = 999999. 85 125 alb1(:) = 999999. 86 126 127 runoff(:) = 0. 87 128 !**************************************************************************************** 88 129 ! Calculate total absorbed radiance at surface … … 91 132 radsol(:) = 0.0 92 133 radsol(1:knon) = swnet(1:knon) + lwnet(1:knon) 134 135 !**************************************************************************************** 136 ! ok_snow = TRUE : prepare and call SISVAT snow model 137 ! ok_snow = FALSE : soil_model, calcul_flux, fonte_neige, ... 138 ! 139 !**************************************************************************************** 140 IF (ok_snow) THEN 141 #ifdef CPP_SISVAT 142 ! Prepare for calling SISVAT 143 144 ! Calculate incoming flux for SW and LW interval: swdown, lwdown 145 swdown(:) = 0.0 146 lwdown(:) = 0.0 147 DO i = 1, knon 148 swdown(i) = swnet(i)/(1-albedo(i)) 149 lwdown(i) = lwdownm(i) 150 END DO 151 152 ! Set constants and compute some input for SISVAT 153 snow_adv(:) = 0. ! no snow blown in for now 154 snow_cont_air(:) = 0. 155 alb_soil(:) = albedo(:) 156 pref = 100000. ! = 1000 hPa 157 DO i = 1, knon 158 wind_velo(i) = u1(i)**2 + v1(i)**2 159 wind_velo(i) = wind_velo(i)**0.5 160 pexner(i) = (p1lay(i)/pref)**(RD/RCPD) 161 dens_air(i) = p1lay(i)/RD/temp_air(i) ! dry air density 162 bl_height(i) = pphi1(i)/RG 163 END DO 164 165 !**************************************************************************************** 166 ! CALL to SISVAT interface 167 ! 168 !**************************************************************************************** 169 ! config: compute everything with SV but temperatures afterwards with soil/calculfluxs 170 DO i = 1, knon 171 tsoil0(i,:)=tsoil(i,:) 172 END DO 173 ! Martin 174 PRINT*, 'on appelle surf_sisvat' 175 ! Martin 176 CALL surf_sisvat(knon, rlon, rlat, knindex, itime, dtime, debut, lafin, & 177 rmu0, swdown, lwdown, pexner, ps, p1lay, & 178 precip_rain, precip_snow, precip_snow_adv, snow_adv, & 179 bl_height, wind_velo, temp_air, dens_air, spechum, tsurf, & 180 rugoro, snow_cont_air, alb_soil, slope, cloudf, & 181 radsol, qsol, tsoil0, snow, snowhgt, qsnow, to_ice,sissnow, agesno, & 182 AcoefH, AcoefQ, BcoefH, BcoefQ, cdragh, & 183 run_off_lic, evap, fluxsens, fluxlat, dflux_s, dflux_l, & 184 tsurf_new, alb1, alb2, alb3, & 185 emis_new, z0_new, qsurf) 186 187 ! Suppose zero surface speed 188 u0(:) = 0.0 189 v0(:) = 0.0 190 ! The calculation of heat/water fluxes, otherwise done by "CALL calcul_fluxs" is 191 ! integrated in SISVAT, using the same method. It can be found in "sisvat.f", in the 192 ! subroutine "SISVAT_TS2". 193 ! u0, v0=0., dif_grnd=0. and beta=1 are assumed there! 194 195 CALL calcul_flux_wind(knon, dtime, & 196 u0, v0, u1, v1, cdragm, & 197 AcoefU, AcoefV, BcoefU, BcoefV, & 198 p1lay, temp_air, & 199 flux_u1, flux_v1) 200 #else 201 abort_message='Pb de coherence: ok_snow = .true. mais CPP_SISVAT = .false.' 202 CALL abort_gcm(modname,abort_message,1) 203 #endif 204 ELSE ! ok_snow=FALSE 93 205 94 206 !**************************************************************************************** … … 168 280 !**************************************************************************************** 169 281 z0_new(:) = MAX(1.E-3,rugoro(:)) 282 END IF ! ok_snow 283 170 284 171 285 !**************************************************************************************** 172 286 ! Send run-off on land-ice to coupler if coupled ocean. 173 ! run_off_lic has been calculated in fonte_neige 287 ! run_off_lic has been calculated in fonte_neige or surf_sisvat 174 288 ! 175 289 !**************************************************************************************** … … 177 291 CALL cpl_send_landice_fields(itime, knon, knindex, run_off_lic) 178 292 ENDIF 293 294 ! transfer runoff rate [kg/m2/s](!) to physiq for output 295 runoff(1:knon)=run_off_lic(1:knon)/dtime 296 179 297 180 298 !**************************************************************************************** -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/surface_data.F90
r1750 r1893 11 11 CHARACTER(len=10), SAVE :: type_veget ! orchidee/y/bucket/n/betaclim 12 12 !$OMP THREADPRIVATE(ok_veget) 13 ! Martin 14 LOGICAL, SAVE :: ok_snow ! true for coupling to snow model SISVAT 15 !$OMP THREADPRIVATE(ok_snow) 16 ! Martin 13 17 14 18 CHARACTER(len=6), SAVE :: type_ocean ! force/slab/couple -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/thermcellV0_main.F90
r1750 r1893 41 41 ! ------------- 42 42 43 #include "dimensions.h"44 #include "YOMCST.h"45 #include "YOETHF.h"46 #include "FCTTRE.h"47 #include "iniprint.h"43 include "dimensions.h" 44 include "YOMCST.h" 45 include "YOETHF.h" 46 include "FCTTRE.h" 47 include "iniprint.h" 48 48 49 49 ! arguments: … … 796 796 if (prt_level.ge.1) print*,'thermcell_main sorties 3D' 797 797 #ifdef wrgrads_thermcell 798 #include "thermcell_out3d.h"798 include "thermcell_out3d.h" 799 799 #endif 800 800 … … 811 811 subroutine testV0_ltherm(klon,klev,pplev,pplay,long,seuil,ztv,po,ztva,zqla,f_star,zw2,comment) 812 812 IMPLICIT NONE 813 #include "iniprint.h"813 include "iniprint.h" 814 814 815 815 integer i, k, klon,klev … … 855 855 IMPLICIT NONE 856 856 857 #include "iniprint.h"858 #include "thermcell.h"857 include "iniprint.h" 858 include "thermcell.h" 859 859 INTEGER ngrid,nlay 860 860 INTEGER ig,k … … 935 935 IMPLICIT NONE 936 936 937 #include "YOMCST.h"938 #include "YOETHF.h"939 #include "FCTTRE.h"940 #include "iniprint.h"941 #include "thermcell.h"937 include "YOMCST.h" 938 include "YOETHF.h" 939 include "FCTTRE.h" 940 include "iniprint.h" 941 include "thermcell.h" 942 942 943 943 INTEGER itap … … 1732 1732 !-------------------------------------------------------------------------- 1733 1733 IMPLICIT NONE 1734 #include "YOMCST.h"1735 #include "iniprint.h"1734 include "YOMCST.h" 1735 include "iniprint.h" 1736 1736 INTEGER l,ig 1737 1737 … … 1944 1944 !---------------------------------------------------------------------- 1945 1945 IMPLICIT NONE 1946 #include "iniprint.h"1947 #include "thermcell.h"1946 include "iniprint.h" 1947 include "thermcell.h" 1948 1948 1949 1949 INTEGER l,ig -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/wake.F
r1669 r1893 116 116 c------------------------------------------------------------------------- 117 117 118 #include "dimensions.h"119 #include "YOMCST.h"120 #include "cvthermo.h"121 #include "iniprint.h"118 include "dimensions.h" 119 include "YOMCST.h" 120 include "cvthermo.h" 121 include "iniprint.h" 122 122 123 123 c Arguments en entree … … 1942 1942 c------------------------------------------------------------------------- 1943 1943 1944 #include "dimensions.h"1945 cccc #include "dimphy.h"1946 #include "YOMCST.h"1947 #include "cvthermo.h"1948 #include "iniprint.h"1944 include "dimensions.h" 1945 cccc include "dimphy.h" 1946 include "YOMCST.h" 1947 include "cvthermo.h" 1948 include "iniprint.h" 1949 1949 1950 1950 c Arguments en entree -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/write_histday_seri.h
r1665 r1893 1 c 2 c$Header$3 c 1 ! 2 ! $Header$ 3 ! 4 4 IF (is_sequential) THEN 5 5 6 6 IF (type_run.EQ."AMIP") THEN 7 c 7 ! 8 8 ndex2d = 0 9 9 itau_w = itau_phy + itap + start_time * day_step / iphysiq 10 c 11 cChamps 2D:12 c 10 ! 11 ! Champs 2D: 12 ! 13 13 pi = ACOS(-1.) 14 14 pir = 4.0*ATAN(1.0) / 180.0 15 c 15 ! 16 16 DO i=1, klon 17 17 zx_tmp_fi2d(i)=(topsw(i)-toplw(i)) 18 18 ENDDO 19 c 19 ! 20 20 ok_msk=.FALSE. 21 21 msk(1:klon)=pctsrf(1:klon,is_ter) 22 CALL moyglo_pondaire(klon, zx_tmp_fi2d, airephy, 23 .ok_msk, msk, moyglo)24 zx_tmp_fi2d(1:klon)=moyglo 25 c 26 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) 27 CALL histwrite(nid_day_seri,"bilTOA",itau_w, 28 .zx_tmp_2d,iim*jjmp1,ndex2d)29 c 30 ok_msk=.FALSE. 31 CALL moyglo_pondaire(klon, bils, airephy, 32 .ok_msk, msk, moyglo)33 zx_tmp_fi2d(1:klon)=moyglo 34 c 35 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) 36 CALL histwrite(nid_day_seri,"bils",itau_w, 37 .zx_tmp_2d,iim*jjmp1,ndex2d)38 c 22 CALL moyglo_pondaire(klon, zx_tmp_fi2d, airephy, & 23 ok_msk, msk, moyglo) 24 zx_tmp_fi2d(1:klon)=moyglo 25 ! 26 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) 27 CALL histwrite(nid_day_seri,"bilTOA",itau_w, & 28 zx_tmp_2d,iim*jjmp1,ndex2d) 29 ! 30 ok_msk=.FALSE. 31 CALL moyglo_pondaire(klon, bils, airephy, & 32 ok_msk, msk, moyglo) 33 zx_tmp_fi2d(1:klon)=moyglo 34 ! 35 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) 36 CALL histwrite(nid_day_seri,"bils",itau_w, & 37 zx_tmp_2d,iim*jjmp1,ndex2d) 38 ! 39 39 DO k=1, klev 40 40 DO i=1, klon 41 cIM 080904 zx_tmp_fi3d(i,k)=u(i,k)**2+v(i,k)**241 !IM 080904 zx_tmp_fi3d(i,k)=u(i,k)**2+v(i,k)**2 42 42 zx_tmp_fi3d(i,k)=(u(i,k)**2+v(i,k)**2)/2. 43 43 ENDDO 44 44 ENDDO 45 c 46 CALL moyglo_pondaima(klon, klev, zx_tmp_fi3d, 47 .airephy, paprs, moyglo)48 zx_tmp_fi2d(1:klon)=moyglo 49 c 50 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) 51 CALL histwrite(nid_day_seri,"ecin",itau_w, 52 .zx_tmp_2d,iim*jjmp1,ndex2d)53 c 54 cIM 151004 BEG45 ! 46 CALL moyglo_pondaima(klon, klev, zx_tmp_fi3d, & 47 airephy, paprs, moyglo) 48 zx_tmp_fi2d(1:klon)=moyglo 49 ! 50 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) 51 CALL histwrite(nid_day_seri,"ecin",itau_w, & 52 zx_tmp_2d,iim*jjmp1,ndex2d) 53 ! 54 !IM 151004 BEG 55 55 IF(1.EQ.0) THEN 56 c 56 ! 57 57 DO k=1, klev 58 58 DO i=1, klon … … 60 60 ENDDO 61 61 ENDDO 62 c 63 CALL moyglo_pondaima(klon, klev, zx_tmp_fi3d, 64 .airephy, paprs, moyglo)65 zx_tmp_fi2d(1:klon)=moyglo 66 c 67 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) 68 CALL histwrite(nid_day_seri,"momang",itau_w,zx_tmp_2d, 69 .iim*jjmp1,ndex2d)70 c 71 cfriction torque72 c 62 ! 63 CALL moyglo_pondaima(klon, klev, zx_tmp_fi3d, & 64 airephy, paprs, moyglo) 65 zx_tmp_fi2d(1:klon)=moyglo 66 ! 67 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) 68 CALL histwrite(nid_day_seri,"momang",itau_w,zx_tmp_2d, & 69 iim*jjmp1,ndex2d) 70 ! 71 ! friction torque 72 ! 73 73 DO i=1, klon 74 74 zx_tmp_fi2d(i)=zxfluxu(i,1)*RA* cos(pir* rlat(i)) 75 75 ENDDO 76 c 77 ok_msk=.FALSE. 78 CALL moyglo_pondaire(klon, zx_tmp_fi2d, airephy, 79 .ok_msk, msk, moyglo)80 zx_tmp_fi2d(1:klon)=moyglo 81 c 82 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) 83 CALL histwrite(nid_day_seri,"frictor",itau_w,zx_tmp_2d, 84 .iim*jjmp1,ndex2d)85 c 86 cmountain torque87 c 88 cIM 190504 BEG76 ! 77 ok_msk=.FALSE. 78 CALL moyglo_pondaire(klon, zx_tmp_fi2d, airephy, & 79 ok_msk, msk, moyglo) 80 zx_tmp_fi2d(1:klon)=moyglo 81 ! 82 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) 83 CALL histwrite(nid_day_seri,"frictor",itau_w,zx_tmp_2d, & 84 iim*jjmp1,ndex2d) 85 ! 86 ! mountain torque 87 ! 88 !IM 190504 BEG 89 89 CALL gr_fi_dyn(1,klon,iim+1,jjm+1,airephy,airedyn) 90 90 CALL gr_fi_dyn(klev+1,klon,iim+1,jjm+1,paprs,padyn) … … 97 97 zx_tmp(ij)=0. 98 98 DO k = 1, klev 99 zx_tmp(ij)=zx_tmp(ij)+dudyn(i,j,k)*airedyn(i,j)* 100 $(padyn(i,j,k+1)-padyn(i,j,k))/RG99 zx_tmp(ij)=zx_tmp(ij)+dudyn(i,j,k)*airedyn(i,j)* & 100 (padyn(i,j,k+1)-padyn(i,j,k))/RG 101 101 airetot=airetot+airedyn(i,j) 102 102 ENDDO 103 cIM 190504 mountor=mountor+zx_tmp(ij)*airedyn(i,j)*RA*104 mountor=mountor+zx_tmp(ij)*RA* 105 $cos(pir* rlatdyn(i,j))103 !IM 190504 mountor=mountor+zx_tmp(ij)*airedyn(i,j)*RA* 104 mountor=mountor+zx_tmp(ij)*RA* & 105 cos(pir* rlatdyn(i,j)) 106 106 ENDDO 107 107 ENDDO 108 cIM 151004 BEG108 !IM 151004 BEG 109 109 IF(itap.EQ.1) PRINT*,'airetot=',airetot,airetot/klev 110 cIM 151004 END111 cIM 190504 mountor=mountor/(airetot*airetot)110 !IM 151004 END 111 !IM 190504 mountor=mountor/(airetot*airetot) 112 112 mountor=mountor/airetot 113 c 114 cIM 190504 END113 ! 114 !IM 190504 END 115 115 zx_tmp_2d(1:iim,1:jjmp1)=mountor 116 CALL histwrite(nid_day_seri,"mountor",itau_w,zx_tmp_2d, 117 .iim*jjmp1,ndex2d)118 c 116 CALL histwrite(nid_day_seri,"mountor",itau_w,zx_tmp_2d, & 117 iim*jjmp1,ndex2d) 118 ! 119 119 ENDIF !(1.EQ.0) THEN 120 c 121 c 120 ! 121 ! 122 122 CALL gr_fi_dyn(1,klon,iim+1,jjm+1,airephy,airedyn) 123 123 CALL gr_fi_ecrit(1,klon,iim,jjmp1,airephy,zx_tmp_2d) 124 124 airetot=0. 125 cDO j = 1, jjmp1126 cDO i = 1, iim+1127 cij=i+(iim+1)*(j-1)128 cDO k = 1, klev129 cairetot=airetot+airedyn(i,j)130 cairetot=airetot+airedyn(i,j)131 cENDDO !k132 cENDDO !i133 cENDDO !j134 c 125 ! DO j = 1, jjmp1 126 ! DO i = 1, iim+1 127 ! ij=i+(iim+1)*(j-1) 128 ! DO k = 1, klev 129 ! airetot=airetot+airedyn(i,j) 130 ! airetot=airetot+airedyn(i,j) 131 ! ENDDO !k 132 ! ENDDO !i 133 ! ENDDO !j 134 ! 135 135 DO i=1, klon 136 136 airetot=airetot+airephy(i) 137 137 ENDDO 138 cIF(itap.EQ.1) PRINT*,'airetotphy=',airetot139 c 138 ! IF(itap.EQ.1) PRINT*,'airetotphy=',airetot 139 ! 140 140 airetot=0. 141 141 DO j=1, jjmp1 … … 144 144 ENDDO 145 145 ENDDO 146 c 147 cIF(itap.EQ.1) PRINT*,'airetotij=',airetot,148 c$ '4piR2',4.*pi*RA*RA149 c 146 ! 147 ! IF(itap.EQ.1) PRINT*,'airetotij=',airetot, 148 ! $ '4piR2',4.*pi*RA*RA 149 ! 150 150 zx_tmp_fi2d(1:klon)=aam/airetot 151 151 CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d) 152 CALL histwrite(nid_day_seri,"momang",itau_w,zx_tmp_2d, 153 .iim*jjmp1,ndex2d)154 c 152 CALL histwrite(nid_day_seri,"momang",itau_w,zx_tmp_2d, & 153 iim*jjmp1,ndex2d) 154 ! 155 155 zx_tmp_fi2d(1:klon)=torsfc/airetot 156 156 CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d) 157 CALL histwrite(nid_day_seri,"torsfc",itau_w,zx_tmp_2d, 158 .iim*jjmp1,ndex2d)159 c 160 cIM 151004 END161 c 162 CALL moyglo_pondmass(klon, klev, t_seri, 163 .airephy, paprs, moyglo)164 zx_tmp_fi2d(1:klon)=moyglo 165 c 157 CALL histwrite(nid_day_seri,"torsfc",itau_w,zx_tmp_2d, & 158 iim*jjmp1,ndex2d) 159 ! 160 !IM 151004 END 161 ! 162 CALL moyglo_pondmass(klon, klev, t_seri, & 163 airephy, paprs, moyglo) 164 zx_tmp_fi2d(1:klon)=moyglo 165 ! 166 166 CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d) 167 CALL histwrite(nid_day_seri,"tamv",itau_w, 168 .zx_tmp_2d,iim*jjmp1,ndex2d)169 c 170 ok_msk=.FALSE. 171 CALL moyglo_pondaire(klon, paprs(:,1), airephy, 172 .ok_msk, msk, moyglo)173 zx_tmp_fi2d(1:klon)=moyglo 174 c 175 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) 176 CALL histwrite(nid_day_seri,"psol",itau_w, 177 .zx_tmp_2d,iim*jjmp1,ndex2d)178 c 179 ok_msk=.FALSE. 180 CALL moyglo_pondaire(klon, evap, airephy, 181 .ok_msk, msk, moyglo)182 zx_tmp_fi2d(1:klon)=moyglo 183 c 184 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) 185 CALL histwrite(nid_day_seri,"evap",itau_w, 186 .zx_tmp_2d,iim*jjmp1,ndex2d)187 c 188 cDO i=1, klon189 czx_tmp_fi2d(i)=SnowFrac(i,is_ter)190 cENDDO191 c 192 cok_msk=.TRUE.193 cmsk(1:klon)=pctsrf(1:klon,is_ter)194 cCALL moyglo_pondaire(klon, zx_tmp_fi2d, airephy,195 c. ok_msk, msk, moyglo)196 czx_tmp_fi2d(1:klon)=moyglo197 c 198 cCALL gr_fi_ecrit(1, klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)199 cCALL histwrite(nid_day_seri,"SnowFrac",200 c. itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)201 c 202 cDO i=1, klon203 cIM 080904 zx_tmp_fi2d(i)=zsnow_mass(i)/330.*rowl204 czx_tmp_fi2d(i)=zsnow_mass(i)205 cENDDO206 c 207 cIM 140904 ok_msk=.FALSE.208 cok_msk=.TRUE.209 cmsk(1:klon)=pctsrf(1:klon,is_ter)210 cCALL moyglo_pondaire(klon, zx_tmp_fi2d, airephy,211 c. ok_msk, msk, moyglo)212 czx_tmp_fi2d(1:klon)=moyglo213 c 214 cCALL gr_fi_ecrit(1, klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)215 cCALL histwrite(nid_day_seri,"snow_depth",itau_w,216 c. zx_tmp_2d,iim*jjmp1,ndex2d)217 c 167 CALL histwrite(nid_day_seri,"tamv",itau_w, & 168 zx_tmp_2d,iim*jjmp1,ndex2d) 169 ! 170 ok_msk=.FALSE. 171 CALL moyglo_pondaire(klon, paprs(:,1), airephy, & 172 ok_msk, msk, moyglo) 173 zx_tmp_fi2d(1:klon)=moyglo 174 ! 175 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) 176 CALL histwrite(nid_day_seri,"psol",itau_w, & 177 zx_tmp_2d,iim*jjmp1,ndex2d) 178 ! 179 ok_msk=.FALSE. 180 CALL moyglo_pondaire(klon, evap, airephy, & 181 ok_msk, msk, moyglo) 182 zx_tmp_fi2d(1:klon)=moyglo 183 ! 184 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) 185 CALL histwrite(nid_day_seri,"evap",itau_w, & 186 zx_tmp_2d,iim*jjmp1,ndex2d) 187 ! 188 ! DO i=1, klon 189 ! zx_tmp_fi2d(i)=SnowFrac(i,is_ter) 190 ! ENDDO 191 ! 192 ! ok_msk=.TRUE. 193 ! msk(1:klon)=pctsrf(1:klon,is_ter) 194 ! CALL moyglo_pondaire(klon, zx_tmp_fi2d, airephy, 195 ! . ok_msk, msk, moyglo) 196 ! zx_tmp_fi2d(1:klon)=moyglo 197 ! 198 ! CALL gr_fi_ecrit(1, klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d) 199 ! CALL histwrite(nid_day_seri,"SnowFrac", 200 ! . itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) 201 ! 202 ! DO i=1, klon 203 !IM 080904 zx_tmp_fi2d(i)=zsnow_mass(i)/330.*rowl 204 ! zx_tmp_fi2d(i)=zsnow_mass(i) 205 ! ENDDO 206 ! 207 !IM 140904 ok_msk=.FALSE. 208 ! ok_msk=.TRUE. 209 ! msk(1:klon)=pctsrf(1:klon,is_ter) 210 ! CALL moyglo_pondaire(klon, zx_tmp_fi2d, airephy, 211 ! . ok_msk, msk, moyglo) 212 ! zx_tmp_fi2d(1:klon)=moyglo 213 ! 214 ! CALL gr_fi_ecrit(1, klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d) 215 ! CALL histwrite(nid_day_seri,"snow_depth",itau_w, 216 ! . zx_tmp_2d,iim*jjmp1,ndex2d) 217 ! 218 218 DO i=1, klon 219 219 zx_tmp_fi2d(i)=ftsol(i,is_oce) 220 220 ENDDO 221 c 221 ! 222 222 ok_msk=.TRUE. 223 223 msk(1:klon)=pctsrf(1:klon,is_oce) 224 CALL moyglo_pondaire(klon, zx_tmp_fi2d, airephy, 225 .ok_msk, msk, moyglo)226 zx_tmp_fi2d(1:klon)=moyglo 227 c 224 CALL moyglo_pondaire(klon, zx_tmp_fi2d, airephy, & 225 ok_msk, msk, moyglo) 226 zx_tmp_fi2d(1:klon)=moyglo 227 ! 228 228 CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d) 229 CALL histwrite(nid_day_seri,"tsol_"//clnsurf(is_oce), 230 $itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)231 c 232 c=================================================================233 c=================================================================234 c=================================================================235 c 229 CALL histwrite(nid_day_seri,"tsol_"//clnsurf(is_oce), & 230 itau_w,zx_tmp_2d,iim*jjmp1,ndex2d) 231 ! 232 !================================================================= 233 !================================================================= 234 !================================================================= 235 ! 236 236 if (ok_sync) then 237 237 call histsync(nid_day_seri) 238 238 endif 239 c 239 ! 240 240 ENDIF !fin test sur type_run.EQ."AMIP" 241 241 -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/write_paramLMDZ_phy.h
r1665 r1893 1 c 2 ccalcul moyennes globales3 c 1 ! 2 ! calcul moyennes globales 3 ! 4 4 zx_tmp_fi2d=bils*airephy 5 5 CALL global_mean(zx_tmp_fi2d,airephy,.TRUE.,gbils) … … 22 22 zx_tmp_fi2d=prw*airephy 23 23 CALL global_mean(zx_tmp_fi2d,airephy,.TRUE.,gprw) 24 c 25 c$OMP MASTER24 ! 25 !$OMP MASTER 26 26 if (is_mpi_root) then 27 c 27 ! 28 28 ndex2d = 0 29 itau_w = itau_phy + itap + start_time * day_step / iphysiq30 c 31 cVariables globales32 c 29 itau_w = itau_phy + itap + int(start_time * day_step / iphysiq) 30 ! 31 ! Variables globales 32 ! 33 33 zx_tmp_0d=R_ecc 34 CALL histwrite(nid_ctesGCM,"R_ecc",itau_w, 35 .zx_tmp_0d,np,ndex2d)36 c 34 CALL histwrite(nid_ctesGCM,"R_ecc",itau_w, & 35 zx_tmp_0d,np,ndex2d) 36 ! 37 37 zx_tmp_0d=R_peri 38 CALL histwrite(nid_ctesGCM,"R_peri",itau_w, 39 .zx_tmp_0d,np,ndex2d)40 c 38 CALL histwrite(nid_ctesGCM,"R_peri",itau_w, & 39 zx_tmp_0d,np,ndex2d) 40 ! 41 41 zx_tmp_0d=R_incl 42 CALL histwrite(nid_ctesGCM,"R_incl",itau_w, 43 .zx_tmp_0d,np,ndex2d)44 c 42 CALL histwrite(nid_ctesGCM,"R_incl",itau_w, & 43 zx_tmp_0d,np,ndex2d) 44 ! 45 45 zx_tmp_0d=solaire 46 CALL histwrite(nid_ctesGCM,"solaire",itau_w, 47 .zx_tmp_0d,np,ndex2d)48 c 46 CALL histwrite(nid_ctesGCM,"solaire",itau_w, & 47 zx_tmp_0d,np,ndex2d) 48 ! 49 49 zx_tmp_0d=co2_ppm 50 CALL histwrite(nid_ctesGCM,"co2_ppm",itau_w, 51 .zx_tmp_0d,np,ndex2d)52 c 50 CALL histwrite(nid_ctesGCM,"co2_ppm",itau_w, & 51 zx_tmp_0d,np,ndex2d) 52 ! 53 53 zx_tmp_0d=CH4_ppb 54 CALL histwrite(nid_ctesGCM,"CH4_ppb",itau_w, 55 .zx_tmp_0d,np,ndex2d)56 c 54 CALL histwrite(nid_ctesGCM,"CH4_ppb",itau_w, & 55 zx_tmp_0d,np,ndex2d) 56 ! 57 57 zx_tmp_0d=N2O_ppb 58 CALL histwrite(nid_ctesGCM,"N2O_ppb",itau_w, 59 .zx_tmp_0d,np,ndex2d)60 c 58 CALL histwrite(nid_ctesGCM,"N2O_ppb",itau_w, & 59 zx_tmp_0d,np,ndex2d) 60 ! 61 61 zx_tmp_0d=CFC11_ppt 62 CALL histwrite(nid_ctesGCM,"CFC11_ppt",itau_w, 63 .zx_tmp_0d,np,ndex2d)64 c 62 CALL histwrite(nid_ctesGCM,"CFC11_ppt",itau_w, & 63 zx_tmp_0d,np,ndex2d) 64 ! 65 65 zx_tmp_0d=CFC12_ppt 66 CALL histwrite(nid_ctesGCM,"CFC12_ppt",itau_w, 67 .zx_tmp_0d,np,ndex2d)68 c 69 c=================================================================70 cmoyennes globales71 c 72 CALL histwrite(nid_ctesGCM,"bils",itau_w, 73 .gbils,np,ndex2d)74 CALL histwrite(nid_ctesGCM,"evap",itau_w, 75 .gevap,np,ndex2d)76 CALL histwrite(nid_ctesGCM,"evap_land",itau_w, 77 .gevapt,np,ndex2d)78 CALL histwrite(nid_ctesGCM,"flat",itau_w, 79 .glat,np,ndex2d)80 CALL histwrite(nid_ctesGCM,"nettop0",itau_w, 81 .gnet0,np,ndex2d)82 CALL histwrite(nid_ctesGCM,"nettop",itau_w, 83 .gnet,np,ndex2d)84 CALL histwrite(nid_ctesGCM,"precip",itau_w, 85 .grain,np,ndex2d)86 CALL histwrite(nid_ctesGCM,"tsol",itau_w, 87 .gtsol,np,ndex2d)88 CALL histwrite(nid_ctesGCM,"t2m",itau_w, 89 .gt2m,np,ndex2d)90 CALL histwrite(nid_ctesGCM,"prw",itau_w, 91 .gprw,np,ndex2d)92 c=================================================================93 c 66 CALL histwrite(nid_ctesGCM,"CFC12_ppt",itau_w, & 67 zx_tmp_0d,np,ndex2d) 68 ! 69 !================================================================= 70 ! moyennes globales 71 ! 72 CALL histwrite(nid_ctesGCM,"bils",itau_w, & 73 gbils,np,ndex2d) 74 CALL histwrite(nid_ctesGCM,"evap",itau_w, & 75 gevap,np,ndex2d) 76 CALL histwrite(nid_ctesGCM,"evap_land",itau_w, & 77 gevapt,np,ndex2d) 78 CALL histwrite(nid_ctesGCM,"flat",itau_w, & 79 glat,np,ndex2d) 80 CALL histwrite(nid_ctesGCM,"nettop0",itau_w, & 81 gnet0,np,ndex2d) 82 CALL histwrite(nid_ctesGCM,"nettop",itau_w, & 83 gnet,np,ndex2d) 84 CALL histwrite(nid_ctesGCM,"precip",itau_w, & 85 grain,np,ndex2d) 86 CALL histwrite(nid_ctesGCM,"tsol",itau_w, & 87 gtsol,np,ndex2d) 88 CALL histwrite(nid_ctesGCM,"t2m",itau_w, & 89 gt2m,np,ndex2d) 90 CALL histwrite(nid_ctesGCM,"prw",itau_w, & 91 gprw,np,ndex2d) 92 !================================================================= 93 ! 94 94 if (ok_sync) then 95 95 call histsync(nid_ctesGCM) 96 96 endif 97 c 97 ! 98 98 endif !(is_mpi_root) then 99 c$OMP END MASTER99 !$OMP END MASTER -
LMDZ5/tags/proto-testing-20131015/libf/phylmd/yamada4.F
r1750 r1893 166 166 ! Computing M^2, N^2, Richardson numbers, stability functions 167 167 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 168 ! initialize arrays: 169 m2(:,:)=0.0 170 sm(:,:)=0.0 171 rif(:,:)=0.0 168 172 169 173 do k=2,klev … … 385 389 enddo 386 390 enddo 391 ! initialize near-surface and top-layer mixing coefficients 392 kq(1:ngrid,1)=kq(1:ngrid,2) ! constant (ie no gradient) near the surface 393 kq(1:ngrid,klev+1)=0 ! zero at the top 387 394 388 395 ! Transport diffusif vertical de la TKE. -
LMDZ5/tags/proto-testing-20131015/makegcm
r1864 r1893 24 24 set OPTIMI=' -ftrace ' 25 25 set OPT_LINUX="-O3 -fdefault-real-8 -DNC_DOUBLE" 26 set OPT_LINUX="-O3 -fdefault-real-8 -DNC_DOUBLE"27 26 set io=ioipsl 28 27 set cosp=false 28 set sisvat=false 29 29 30 30 set FC_LINUX=gfortran 31 set FC_LINUX=gfortran 32 #set FC_LINUX=gfortran 33 if ( $FC_LINUX == gfortran ) then 34 set OPT_LINUX="-O3 -fdefault-real-8 -DNC_DOUBLE" 31 32 if ( $FC_LINUX == g95 ) then 33 set OPT_LINUX="-i4 -O3 -r8 -DNC_DOUBLE" 35 34 else if ( $FC_LINUX == gfortran ) then 36 set OPT_LINUX="-O3 -fdefault-real-8 -DNC_DOUBLE"37 # set OPT_LINUX="-O3 -fdefault-real-8 -DNC_DOUBLE"38 35 set OPT_LINUX="-O3 -fdefault-real-8 -DNC_DOUBLE" 39 36 else 40 37 # pgf90 options 41 set OPT_LINUX="-O3 - fdefault-real-8 -DNC_DOUBLE"38 set OPT_LINUX="-O3 -i4 -r8 -DNC_DOUBLE" 42 39 endif 43 40 … … 54 51 setenv IOIPSLDIR /tmpdir/fairhead/Aqua/LMDZ20120327.trunk/modipsl/lib 55 52 setenv MODIPSLDIR /tmpdir/fairhead/Aqua/LMDZ20120327.trunk/modipsl/lib 56 setenv NCDFINC / tmpdir/fairhead/Test_HEAD/LMDZ20130808.trunk/netcdf-4.0.1/include57 setenv NCDFLIB / tmpdir/fairhead/Test_HEAD/LMDZ20130808.trunk/netcdf-4.0.1/lib53 setenv NCDFINC /d1/mpllmd/LMDZtesting/netcdf-4.0.1/include 54 setenv NCDFLIB /d1/mpllmd/LMDZtesting/netcdf-4.0.1/lib 58 55 59 56 … … 107 104 if ( ! $?NCDFLIB ) then 108 105 echo You must initialize the variable NCDFLIB in your environnement 109 echo for instance: "setenv NCDFLIB / tmpdir/fairhead/Test_HEAD/LMDZ20130808.trunk/netcdf-4.0.1/lib106 echo for instance: "setenv NCDFLIB /d1/mpllmd/LMDZtesting/netcdf-4.0.1/lib 110 107 exit 111 108 endif 112 109 if ( ! $?NCDFINC ) then 113 110 echo You must initialize the variable NCDFINC in your environnement 114 echo for instance: "setenv NCDFINC / tmpdir/fairhead/Test_HEAD/LMDZ20130808.trunk/netcdf-4.0.1/include111 echo for instance: "setenv NCDFINC /d1/mpllmd/LMDZtesting/netcdf-4.0.1/include 115 112 exit 116 113 endif … … 262 259 else if $LINUX then 263 260 ################# 264 if ( $FC_LINUX == pgf90 || $FC_LINUX == g fortran|| $FC_LINUX == gfortran ) then261 if ( $FC_LINUX == pgf90 || $FC_LINUX == g95 || $FC_LINUX == gfortran ) then 265 262 set optim=" $OPT_LINUX " 266 263 set optim90=" $OPT_LINUX " … … 490 487 case -cosp 491 488 set cosp="$2"; shift ; shift ; goto top 489 490 case -sisvat 491 set sisvat="$2" ; shift ; shift ; goto top 492 492 493 493 case -filtre … … 519 519 set optim90="$optim90"" -g -ffpe-trap=invalid,zero,overflow -fbounds-check -Wall " 520 520 set optimtru90="$optimtru90"" -ffpe-trap=invalid,zero,overflow -g -fbounds-check -Wall " 521 else if ( $FC_LINUX == 'g fortran' ) then521 else if ( $FC_LINUX == 'g95' ) then 522 522 set optim="$optim"" -g -fbounds-check -freal=nan -ftrace=full -Wall " 523 523 set optim90="$optim90"" -g -fbounds-check -freal=nan -ftrace=full -Wall " … … 564 564 endif 565 565 set opt_link="$lcosp $opt_link" 566 endif 567 568 if ( "$sisvat" == 'true' ) then 569 set cppflags="$cppflags -DCPP_SISVAT" 566 570 endif 567 571 … … 841 845 set opt_link="$opt_link -L$MODIPSLDIR $link_veget -L$NCDFLIB -lnetcdf " 842 846 endif 843 else if ($FC_LINUX == 'g fortran' || $FC_LINUX == 'gfortran' ) then847 else if ($FC_LINUX == 'g95' || $FC_LINUX == 'gfortran' ) then 844 848 if ( $io == "ioipsl" ) then 845 849 set opt_link="$opt_link -L$MODIPSLDIR $link_veget -lioipsl -L$NCDFLIB -lnetcdf -lioipsl -lnetcdf " … … 1015 1019 set optimtru90=" $optimtru90 -module $libo " 1016 1020 set optim90=" $optim90 -module $libo " 1017 else if ( $FC_LINUX == 'gfortran' ) then 1018 set optimtru90=" $optimtru90 - I$libo "1019 set optim90=" $optim90 - I$libo "1020 1021 else if ( $FC_LINUX == 'g95' ) then 1022 set optimtru90=" $optimtru90 -fmod=$libo " 1023 set optim90=" $optim90 -fmod=$libo " 1024 else if ( $FC_LINUX == 'gfortran' ) then 1021 1025 set optimtru90=" $optimtru90 -M $libo " 1022 1026 set optim90=" $optim90 -M $libo " -
LMDZ5/tags/proto-testing-20131015/makelmdz
r1864 r1893 25 25 fcm_path=none 26 26 cosp=false 27 sisvat=false 27 28 28 29 # guess a default 'arch' … … 173 174 cosp="$2" ; shift ; shift ;; 174 175 176 "-sisvat") 177 sisvat="$2" ; shift ; shift ;; 178 175 179 "-mem") 176 180 paramem="mem" ; shift ;; … … 275 279 archfileopt=$( echo ${archfileline##%BASE_LD} ) 276 280 LIB="$LIB ${archfileopt}" 281 282 # add Include files defined in arch.fcm file for pre-processing 283 archfileline=$( grep -i '^%FPP_FLAGS' arch.fcm ) 284 for inc in $archfileline ; do INCLUDE="$INCLUDE `echo $inc | grep '\-I'`" ; done 277 285 278 286 if [[ "$physique" != "nophys" ]] … … 396 404 INCLUDE="$INCLUDE"' -I$(LIBF)/cosp' 397 405 fi 406 407 if [[ "$sisvat" == "true" ]] 408 then 409 CPP_KEY="$CPP_KEY CPP_SISVAT" 410 fi 411 398 412 399 413 INCLUDE="$INCLUDE ${NETCDF_INCDIR}" -
LMDZ5/tags/proto-testing-20131015/makelmdz_fcm
r1864 r1893 22 22 couple=false 23 23 veget=false 24 sisvat=false 24 25 chimie=false 25 26 parallel=none … … 117 118 veget="$2" ; shift ; shift ;; 118 119 120 "-sisvat") 121 sisvat="$2" ; shift ; shift ;; 122 119 123 "-chimie") 120 124 chimie="$2" ; shift ; shift ;; … … 284 288 fi 285 289 290 if [[ "$sisvat" == "true" ]] 291 then 292 CPP_KEY="$CPP_KEY CPP_SISVAT" 293 sed -e 's/^#src::sisvat/src::sisvat/' bld.cfg > bld.tmp 294 mv bld.tmp bld.cfg 295 fi 296 286 297 if [[ $io == ioipsl ]] 287 298 then … … 482 493 ln -s $LIBOGCM/${arch}${SUFF_NAME}/.config/tmp tmp_src 483 494 495 #eventual cleanup for SISVAT 496 sed -e 's/^src::sisvat/#src::sisvat/' bld.cfg > bld.tmp 497 mv bld.tmp bld.cfg 498 499 484 500 if [[ -r $LIBFGCM/grid/dimensions.h ]] 485 501 then -
LMDZ5/tags/proto-testing-20131015/tools/install_1d_src.sh
r1795 r1893 13 13 if [[ ! -a ../phy1d/$my_file ]] 14 14 then 15 cp $my_file ../phy1d 15 # cp $my_file ../phy1d 16 cp -R $my_file ../phy1d 16 17 fi 17 18 done … … 19 20 20 21 cd ../phy1d 21 if grep -iq "subroutine *writelim" *.F *.F9022 then23 mv 1DUTILS.h_no_writelim 1DUTILS.h24 else25 mv 1DUTILS.h_with_writelim 1DUTILS.h26 rm -f ttt27 sed -e "s/^ *call *writelim *( *1 *,/ call writelim (/" lmdz1d.F >ttt28 rm -f lmdz1d.F29 mv ttt lmdz1d.F30 fi31 rm 1DUTILS.h*writelim32 22 rm wrgradsfi.F # already in 1DUTILS.h 33 23 34 sed -i -e "/add_phys_tend.*_vdf/s/add_phys_tend/add_pbl_tend/" physiq.F 24 sed -i -e "/add_phys_tend.*_vdf/s/add_phys_tend/add_pbl_tend/" physiq.F90 35 25 36 26 sed -i -e "/SUBROUTINE *convers_timesteps/,/END SUBROUTINE convers_timesteps/{ … … 49 39 }" phys_output_mod.F90 50 40 51 sed -i -e "/^ *INCLUDE *\"temps.h\"/{52 a\\53 !****************************************************************************************\\54 ! Declarations specifiques pour le 1D. A reprendre \\55 INCLUDE \"flux_arp.h\"56 }; /^.*REAL *::.*fsens *, *flat/d; /^.*LOGICAL *::.*ok_flux_surf/d; /^.*COMMON.*flux_arp.*/d " pbl_surface_mod.F9057 58 41 ln -s ../dyn3d/mod_const_mpi.F90 . 59 42 ln -s ../dyn3d/infotrac.F90 .
Note: See TracChangeset
for help on using the changeset viewer.