Changeset 2418 for LMDZ5/trunk/libf/dynphy_lonlat
- Timestamp:
- Jan 3, 2016, 11:16:34 AM (9 years ago)
- Location:
- LMDZ5/trunk/libf/dynphy_lonlat
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/dynphy_lonlat/calfis.F
r2333 r2418 31 31 USE infotrac, ONLY: nqtot, niadv, tname 32 32 USE control_mod, ONLY: planet_type, nsplit_phys 33 33 #ifdef CPP_PHYS 34 USE callphysiq_mod, ONLY: call_physiq 35 #endif 34 36 35 37 IMPLICIT NONE … … 121 123 REAL,INTENT(IN) :: pp(iip1,jjp1,llmp1) ! pressure at mesh interfaces (Pa) 122 124 REAL,INTENT(IN) :: ppk(iip1,jjp1,llm) ! Exner at mid-layer 123 REAL,INTENT(IN) :: flxw(iip1,jjp1,llm) ! Vertical mass flux on dynamics grid125 REAL,INTENT(IN) :: flxw(iip1,jjp1,llm) ! Vertical mass flux on lower mesh interfaces (kg/s) (on llm because flxw(:,:,llm+1)=0) 124 126 125 127 ! tendencies (in */s) from the physics … … 167 169 LOGICAL,SAVE :: firstcal=.true., debut=.true. 168 170 ! REAL rdayvrai 169 170 LOGICAL tracerdyn171 171 172 172 c … … 468 468 lafin_split=lafin.and.isplit==nsplit_phys 469 469 470 if (planet_type=="earth") then 471 472 CALL physiq (ngridmx, 473 . llm, 474 . debut_split, 475 . lafin_split, 476 . jD_cur, 477 . jH_cur_split, 478 . zdt_split, 479 . zplev, 480 . zplay, 481 . zphi, 482 . zphis, 483 . presnivs, 484 . zufi, 485 . zvfi, zrfi, 486 . ztfi, 487 . zqfi, 488 . flxwfi, 489 . zdufi, 490 . zdvfi, 491 . zdtfi, 492 . zdqfi, 493 . zdpsrf, 494 . pducov) 495 496 else if ( planet_type=="generic" ) then 497 498 CALL physiq (ngridmx, !! ngrid 499 . llm, !! nlayer 500 . nqtot, !! nq 501 . tname, !! tracer names from dynamical core (given in infotrac) 502 . debut_split, !! firstcall 503 . lafin_split, !! lastcall 504 . jD_cur, !! pday. see leapfrog 505 . jH_cur_split, !! ptime "fraction of day" 506 . zdt_split, !! ptimestep 507 . zplev, !! pplev 508 . zplay, !! pplay 509 . zphi, !! pphi 510 . zufi, !! pu 511 . zvfi, !! pv 512 . ztfi, !! pt 513 . zqfi, !! pq 514 . flxwfi, !! pw !! or 0. anyway this is for diagnostic. not used in physiq. 515 . zdufi, !! pdu 516 . zdvfi, !! pdv 517 . zdtfi, !! pdt 518 . zdqfi, !! pdq 519 . zdpsrf, !! pdpsrf 520 . tracerdyn) !! tracerdyn <-- utilite ??? 521 522 endif ! of if (planet_type=="earth") 470 CALL call_physiq(ngridmx,llm,nqtot,tname, 471 & debut_split,lafin_split, 472 & jD_cur,jH_cur_split,zdt_split, 473 & zplev,zplay, 474 & zphi,zphis, 475 & presnivs, 476 & zufi,zvfi,zrfi,ztfi,zqfi, 477 & flxwfi,pducov, 478 & zdufi,zdvfi,zdtfi,zdqfi,zdpsrf) 479 480 ! if (planet_type=="earth") then 481 ! 482 ! CALL physiq (ngridmx, 483 ! . llm, 484 ! . debut_split, 485 ! . lafin_split, 486 ! . jD_cur, 487 ! . jH_cur_split, 488 ! . zdt_split, 489 ! . zplev, 490 ! . zplay, 491 ! . zphi, 492 ! . zphis, 493 ! . presnivs, 494 ! . zufi, 495 ! . zvfi, zrfi, 496 ! . ztfi, 497 ! . zqfi, 498 ! . flxwfi, 499 ! . zdufi, 500 ! . zdvfi, 501 ! . zdtfi, 502 ! . zdqfi, 503 ! . zdpsrf, 504 ! . pducov) 505 ! 506 ! else if ( planet_type=="generic" ) then 507 ! 508 ! CALL physiq (ngridmx, !! ngrid 509 ! . llm, !! nlayer 510 ! . nqtot, !! nq 511 ! . tname, !! tracer names from dynamical core (given in infotrac) 512 ! . debut_split, !! firstcall 513 ! . lafin_split, !! lastcall 514 ! . jD_cur, !! pday. see leapfrog 515 ! . jH_cur_split, !! ptime "fraction of day" 516 ! . zdt_split, !! ptimestep 517 ! . zplev, !! pplev 518 ! . zplay, !! pplay 519 ! . zphi, !! pphi 520 ! . zufi, !! pu 521 ! . zvfi, !! pv 522 ! . ztfi, !! pt 523 ! . zqfi, !! pq 524 ! . flxwfi, !! pw !! or 0. anyway this is for diagnostic. not used in physiq. 525 ! . zdufi, !! pdu 526 ! . zdvfi, !! pdv 527 ! . zdtfi, !! pdt 528 ! . zdqfi, !! pdq 529 ! . zdpsrf, !! pdpsrf 530 ! . tracerdyn) !! tracerdyn <-- utilite ??? 531 ! 532 ! endif ! of if (planet_type=="earth") 523 533 524 534 zufi(:,:)=zufi(:,:)+zdufi(:,:)*zdt_split -
LMDZ5/trunk/libf/dynphy_lonlat/calfis_loc.F
r2351 r2418 47 47 USE infotrac, ONLY: nqtot, niadv, tname 48 48 USE control_mod, ONLY: planet_type, nsplit_phys 49 #ifdef CPP_PHYS 50 USE callphysiq_mod, ONLY: call_physiq 51 #endif 49 52 50 53 #ifdef CPP_PARA … … 138 141 REAL,INTENT(IN) :: pp(iip1,jjb_u:jje_u,llmp1) ! pressure at mesh interfaces (Pa) 139 142 REAL,INTENT(IN) :: ppk(iip1,jjb_u:jje_u,llm) ! Exner at mid-layer 140 REAL,INTENT(IN) :: flxw(iip1,jjb_u:jje_u,llm) ! Vertical mass flux on dynamics grid143 REAL,INTENT(IN) :: flxw(iip1,jjb_u:jje_u,llm) ! Vertical mass flux on lower mesh interfaces (kg/s) (on llm because flxw(:,:,llm+1)=0) 141 144 142 145 ! tendencies (in */s) from the physics … … 240 243 INTEGER :: jjb,jje 241 244 242 LOGICAL tracerdyn243 245 c 244 246 c----------------------------------------------------------------------- … … 709 711 lafin_split=lafin.and.isplit==nsplit_phys 710 712 711 if (planet_type=="earth") then 712 713 CALL physiq (klon, 714 . llm, 715 . debut_split, 716 . lafin_split, 717 . jD_cur, 718 . jH_cur_split, 719 . zdt_split, 720 . zplev_omp, 721 . zplay_omp, 722 . zphi_omp, 723 . zphis_omp, 724 . presnivs_omp, 725 . zufi_omp, 726 . zvfi_omp, 727 . zrfi_omp, 728 . ztfi_omp, 729 . zqfi_omp, 730 . flxwfi_omp, 731 . zdufi_omp, 732 . zdvfi_omp, 733 . zdtfi_omp, 734 . zdqfi_omp, 735 . zdpsrf_omp, 736 . pducov) 737 738 else if ( planet_type=="generic" ) then 739 740 CALL physiq (klon, !! ngrid 741 . llm, !! nlayer 742 . nqtot, !! nq 743 . tname, !! tracer names from dynamical core (given in infotrac) 744 . debut_split, !! firstcall 745 . lafin_split, !! lastcall 746 . jD_cur, !! pday. see leapfrog_p 747 . jH_cur_split, !! ptime "fraction of day" 748 . zdt_split, !! ptimestep 749 . zplev_omp, !! pplev 750 . zplay_omp, !! pplay 751 . zphi_omp, !! pphi 752 . zufi_omp, !! pu 753 . zvfi_omp, !! pv 754 . ztfi_omp, !! pt 755 . zqfi_omp, !! pq 756 . flxwfi_omp, !! pw !! or 0. anyway this is for diagnostic. not used in physiq. 757 . zdufi_omp, !! pdu 758 . zdvfi_omp, !! pdv 759 . zdtfi_omp, !! pdt 760 . zdqfi_omp, !! pdq 761 . zdpsrf_omp, !! pdpsrf 762 . tracerdyn) !! tracerdyn <-- utilite ??? 763 764 endif ! of if (planet_type=="earth") 713 CALL call_physiq(klon,llm,nqtot,tname, 714 & debut_split,lafin_split, 715 & jD_cur,jH_cur_split,zdt_split, 716 & zplev_omp,zplay_omp, 717 & zphi_omp,zphis_omp, 718 & presnivs_omp, 719 & zufi_omp,zvfi_omp,zrfi_omp,ztfi_omp,zqfi_omp, 720 & flxwfi_omp,pducov, 721 & zdufi_omp,zdvfi_omp,zdtfi_omp,zdqfi_omp, 722 & zdpsrf_omp) 765 723 766 724 -
LMDZ5/trunk/libf/dynphy_lonlat/calfis_p.F
r2351 r2418 36 36 #endif 37 37 #ifdef CPP_PARA 38 USE parallel_lmdz, ONLY : omp_chunk, using_mpi 38 USE parallel_lmdz,ONLY:omp_chunk,using_mpi,jjb_u,jje_u,jjb_v,jje_v 39 $ ,jj_begin_dyn=>jj_begin,jj_end_dyn=>jj_end 39 40 USE Write_Field 40 41 Use Write_field_p … … 43 44 USE infotrac, ONLY: nqtot, niadv, tname 44 45 USE control_mod, ONLY: planet_type, nsplit_phys 46 #ifdef CPP_PHYS 47 USE callphysiq_mod, ONLY: call_physiq 48 #endif 45 49 46 50 IMPLICIT NONE … … 135 139 REAL,INTENT(IN) :: pp(iip1,jjp1,llmp1) ! pressure at mesh interfaces (Pa) 136 140 REAL,INTENT(IN) :: ppk(iip1,jjp1,llm) ! Exner at mid-layer 137 REAL,INTENT(IN) :: flxw(iip1,jjp1,llm) ! Vertical mass flux on dynamics grid141 REAL,INTENT(IN) :: flxw(iip1,jjp1,llm) ! Vertical mass flux on lower mesh interfaces (kg/s) (on llm because flxw(:,:,llm+1)=0) 138 142 139 143 ! tendencies (in */s) from the physics … … 155 159 REAL,ALLOCATABLE,SAVE :: zphi(:,:),zphis(:) 156 160 c 157 REAL,ALLOCATABLE,SAVE :: zufi(:,:), zvfi(:,:) 161 REAL zrot(iip1,jjb_v:jje_v,llm) ! AdlC May 2014 162 REAL,ALLOCATABLE,SAVE :: zufi(:,:), zvfi(:,:), zrfi(:,:) 158 163 REAL,ALLOCATABLE,SAVE :: ztfi(:,:),zqfi(:,:,:) 159 164 c … … 174 179 REAL,ALLOCATABLE,SAVE :: zufi_omp(:,:) 175 180 REAL,ALLOCATABLE,SAVE :: zvfi_omp(:,:) 181 REAL,ALLOCATABLE,SAVE :: zrfi_omp(:,:) 176 182 REAL,ALLOCATABLE,SAVE :: ztfi_omp(:,:) 177 183 REAL,ALLOCATABLE,SAVE :: zqfi_omp(:,:,:) … … 207 213 c$OMP THREADPRIVATE(zplev_omp,zplay_omp,zphi_omp,zphis_omp, 208 214 c$OMP+ presnivs_omp,zufi_omp,zvfi_omp,ztfi_omp, 209 c$OMP+ z qfi_omp,zdufi_omp,zdvfi_omp,215 c$OMP+ zrfi_omp,zqfi_omp,zdufi_omp,zdvfi_omp, 210 216 c$OMP+ zdtfi_omp,zdqfi_omp,zdpsrf_omp,flxwfi_omp, 211 217 c$OMP+ zdufic_omp,zdvfic_omp,zdtfic_omp,zdqfic_omp) … … 234 240 integer :: k,kstart,kend 235 241 INTEGER :: offset 236 237 LOGICAL tracerdyn 242 INTEGER :: jjb,jje 243 238 244 c 239 245 c----------------------------------------------------------------------- … … 260 266 ALLOCATE(zplev(klon,llm+1),zplay(klon,llm)) 261 267 ALLOCATE(zphi(klon,llm),zphis(klon)) 262 ALLOCATE(zufi(klon,llm), zvfi(klon,llm) )268 ALLOCATE(zufi(klon,llm), zvfi(klon,llm),zrfi(klon,llm)) 263 269 ALLOCATE(ztfi(klon,llm),zqfi(klon,llm,nqtot)) 264 270 ALLOCATE(pcvgu(klon,llm), pcvgv(klon,llm)) … … 409 415 c$OMP END DO NOWAIT 410 416 411 c 46.champ v: 417 c 418 C Alvaro de la Camara (May 2014) 419 C 46.1 Calcul de la vorticite et passage sur la grille physique 420 C -------------------------------------------------------------- 421 422 jjb=jj_begin_dyn-1 423 jje=jj_end_dyn+1 424 if (is_north_pole) jjb=1 425 if (is_south_pole) jje=jjm 426 427 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 428 429 DO l=1,llm 430 do i=1,iim 431 do j=jjb,jje 432 zrot(i,j,l) = (pvcov(i+1,j,l) - pvcov(i,j,l) 433 $ + pucov(i,j+1,l) - pucov(i,j,l)) 434 $ / (cu(i,j)+cu(i,j+1)) 435 $ / (cv(i+1,j)+cv(i,j)) *4 436 enddo 437 enddo 438 ENDDO 439 440 441 c 46.2champ v: 412 442 c ----------- 413 443 … … 422 452 $ + pvcov(i,j,l)/cv(i,j) ) 423 453 454 if (j==1 .OR. j==jjp1) then ! AdlC MAY 2014 455 zrfi(ig0,l) = 0 ! AdlC MAY 2014 456 else 457 if(i==1)then 458 zrfi(ig0,l)= 0.25 *(zrot(iim,j-1,l)+zrot(iim,j,l) 459 $ +zrot(1,j-1,l)+zrot(1,j,l)) ! AdlC MAY 2014 460 else 461 zrfi(ig0,l)= 0.25 *(zrot(i-1,j-1,l)+zrot(i-1,j,l) 462 $ +zrot(i,j-1,l)+zrot(i,j,l)) ! AdlC MAY 2014 463 endif 464 endif 465 466 424 467 ENDDO 425 468 ENDDO … … 447 490 zufi(1,l) = SSUM(iim,zcos,1)/pi 448 491 zvfi(1,l) = SSUM(iim,zsin,1)/pi 492 zrfi(1,l) = 0. 449 493 450 494 ENDDO … … 474 518 zufi(klon,l) = SSUM(iim,zcos,1)/pi 475 519 zvfi(klon,l) = SSUM(iim,zsin,1)/pi 520 zrfi(klon,l) = 0. 476 521 ENDDO 477 522 c$OMP END DO NOWAIT … … 497 542 allocate(zufi_omp(klon,llm)) 498 543 allocate(zvfi_omp(klon,llm)) 544 allocate(zrfi_omp(klon,llm)) ! LG Ari 2014 499 545 allocate(ztfi_omp(klon,llm)) 500 546 allocate(zqfi_omp(klon,llm,nqtot)) … … 557 603 do l=1,llm 558 604 do i=1,klon 605 zrfi_omp(i,l)=zrfi(offset+i,l) 606 enddo 607 enddo 608 609 610 do l=1,llm 611 do i=1,klon 559 612 ztfi_omp(i,l)=ztfi(offset+i,l) 560 613 enddo … … 623 676 lafin_split=lafin.and.isplit==nsplit_phys 624 677 625 if (planet_type=="earth") then 626 627 CALL physiq (klon, 628 . llm, 629 . debut_split, 630 . lafin_split, 631 . jD_cur, 632 . jH_cur_split, 633 . zdt_split, 634 . zplev_omp, 635 . zplay_omp, 636 . zphi_omp, 637 . zphis_omp, 638 . presnivs_omp, 639 . zufi_omp, 640 . zvfi_omp, 641 . ztfi_omp, 642 . zqfi_omp, 643 . flxwfi_omp, 644 . zdufi_omp, 645 . zdvfi_omp, 646 . zdtfi_omp, 647 . zdqfi_omp, 648 . zdpsrf_omp, 649 . pducov) 650 651 else if ( planet_type=="generic" ) then 652 653 CALL physiq (klon, !! ngrid 654 . llm, !! nlayer 655 . nqtot, !! nq 656 . tname, !! tracer names from dynamical core (given in infotrac) 657 . debut_split, !! firstcall 658 . lafin_split, !! lastcall 659 . jD_cur, !! pday. see leapfrog_p 660 . jH_cur_split, !! ptime "fraction of day" 661 . zdt_split, !! ptimestep 662 . zplev_omp, !! pplev 663 . zplay_omp, !! pplay 664 . zphi_omp, !! pphi 665 . zufi_omp, !! pu 666 . zvfi_omp, !! pv 667 . ztfi_omp, !! pt 668 . zqfi_omp, !! pq 669 . flxwfi_omp, !! pw !! or 0. anyway this is for diagnostic. not used in physiq. 670 . zdufi_omp, !! pdu 671 . zdvfi_omp, !! pdv 672 . zdtfi_omp, !! pdt 673 . zdqfi_omp, !! pdq 674 . zdpsrf_omp, !! pdpsrf 675 . tracerdyn) !! tracerdyn <-- utilite ??? 676 677 endif ! of if (planet_type=="earth") 678 CALL call_physiq(klon,llm,nqtot,tname, 679 & debut_split,lafin_split, 680 & jD_cur,jH_cur_split,zdt_split, 681 & zplev_omp,zplay_omp, 682 & zphi_omp,zphis_omp, 683 & presnivs_omp, 684 & zufi_omp,zvfi_omp,zrfi_omp,ztfi_omp,zqfi_omp, 685 & flxwfi_omp,pducov, 686 & zdufi_omp,zdvfi_omp,zdtfi_omp,zdqfi_omp, 687 & zdpsrf_omp) 678 688 679 689
Note: See TracChangeset
for help on using the changeset viewer.