Changeset f75967d in flexpart.git
- Timestamp:
- Jan 5, 2016, 12:20:01 PM (8 years ago)
- Branches:
- master, 10.4.1_pesei, GFS_025, bugfixes+enhancements, dev, release-10, release-10.4.1, scaling-bug, univie
- Children:
- d8107c2
- Parents:
- d6a0977
- Location:
- src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/FLEXPART_MPI.f90
rd6a0977 rf75967d 436 436 stop 437 437 endif 438 439 438 440 439 441 440 call timemanager 441 442 442 443 443 ! NIK 16.02.2005 444 444 if (lroot) then 445 call MPI_Reduce(MPI_IN_PLACE, tot_blc_count, 1, mp_pp, MPI_SUM, id_root, &445 call MPI_Reduce(MPI_IN_PLACE, tot_blc_count, 1, MPI_INTEGER, MPI_SUM, id_root, & 446 446 & mp_comm_used, mp_ierr) 447 call MPI_Reduce(MPI_IN_PLACE, tot_inc_count, 1, mp_pp, MPI_SUM, id_root, &447 call MPI_Reduce(MPI_IN_PLACE, tot_inc_count, 1, MPI_INTEGER, MPI_SUM, id_root, & 448 448 & mp_comm_used, mp_ierr) 449 449 else 450 450 if (mp_partgroup_pid.ge.0) then ! Skip for readwind process 451 call MPI_Reduce(tot_blc_count, tot_blc_count, 1, mp_pp, MPI_SUM, id_root, &451 call MPI_Reduce(tot_blc_count, tot_blc_count, 1, MPI_INTEGER, MPI_SUM, id_root, & 452 452 & mp_comm_used, mp_ierr) 453 call MPI_Reduce(tot_inc_count, tot_inc_count, 1, mp_pp, MPI_SUM, id_root, &453 call MPI_Reduce(tot_inc_count, tot_inc_count, 1, MPI_INTEGER, MPI_SUM, id_root, & 454 454 & mp_comm_used, mp_ierr) 455 455 end if -
src/com_mod.f90
rd6a0977 rf75967d 132 132 !ZHG SEP 2015 wheather or not to read clouds from GRIB 133 133 logical :: readclouds 134 !ESO DEC 2015 whether or not both clwc and ciwc are present (if so they are summed) 135 logical :: sumclouds 136 134 137 135 138 !NIK 16.02.2015 136 integer :: tot_blc_count , tot_inc_count139 integer :: tot_blc_count=0, tot_inc_count=0 137 140 138 141 … … 746 749 !***************************************************************** 747 750 integer :: mpi_mode=0 ! .gt. 0 if running MPI version 748 logical :: lroot=.true. ! true if serial version, or if MPI androot process751 logical :: lroot=.true. ! true if serial version, or if MPI .and. root process 749 752 750 753 contains -
src/timemanager.f90
rd6a0977 rf75967d 138 138 !ZHG 2015 139 139 !CGZ-lifetime: set lifetime to 0 140 checklifetime(:,:)=0141 species_lifetime(:,:)=0142 print*, 'Initialized lifetime'140 ! checklifetime(:,:)=0 141 ! species_lifetime(:,:)=0 142 ! print*, 'Initialized lifetime' 143 143 !CGZ-lifetime: set lifetime to 0 144 144 … … 422 422 !CGZ-lifetime: output species lifetime 423 423 !ZHG 424 write(*,*) 'Overview species lifetime in days', &425 real((species_lifetime(:,1)/species_lifetime(:,2))/real(3600.0*24.0))426 write(*,*) 'all info:',species_lifetime424 ! write(*,*) 'Overview species lifetime in days', & 425 ! real((species_lifetime(:,1)/species_lifetime(:,2))/real(3600.0*24.0)) 426 ! write(*,*) 'all info:',species_lifetime 427 427 !ZHG 428 428 !CGZ-lifetime: output species lifetime … … 594 594 !ZHG 2015 595 595 !CGZ-lifetime: Check mass fraction left/save lifetime 596 if(real(npart(npoint(j)))*xmass1(j,ks)/xmass(npoint(j),ks).lt.0.01.and.checklifetime(j,ks).eq.0.)then596 ! if(real(npart(npoint(j)))*xmass1(j,ks)/xmass(npoint(j),ks).lt.0.01.and.checklifetime(j,ks).eq.0.)then 597 597 !Mass below 1% of initial >register lifetime 598 checklifetime(j,ks)=abs(itra1(j)-itramem(j))599 species_lifetime(ks,1)=species_lifetime(ks,1)+abs(itra1(j)-itramem(j))600 species_lifetime(ks,2)= species_lifetime(ks,2)+1601 endif598 ! checklifetime(j,ks)=abs(itra1(j)-itramem(j)) 599 ! species_lifetime(ks,1)=species_lifetime(ks,1)+abs(itra1(j)-itramem(j)) 600 ! species_lifetime(ks,2)= species_lifetime(ks,2)+1 601 ! endif 602 602 !CGZ-lifetime: Check mass fraction left/save lifetime 603 603 !ZHG 2015 -
src/timemanager_mpi.f90
rd6a0977 rf75967d 151 151 152 152 !CGZ-lifetime: set lifetime to 0 153 checklifetime(:,:)=0154 species_lifetime(:,:)=0155 print*, 'Initialized lifetime'153 ! checklifetime(:,:)=0 154 ! species_lifetime(:,:)=0 155 ! print*, 'Initialized lifetime' 156 156 !CGZ-lifetime: set lifetime to 0 157 157 … … 564 564 565 565 !CGZ-lifetime: output species lifetime 566 !if (lroot) then566 if (lroot) then 567 567 ! write(*,*) 'Overview species lifetime in days', & 568 568 ! real((species_lifetime(:,1)/species_lifetime(:,2))/real(3600.0*24.0)) … … 573 573 ! write (*,*) 'timemanager> starting simulation' 574 574 ! end if 575 !end if575 end if 576 576 577 577 45 format(i13,' SECONDS SIMULATED: ',i13, ' PARTICLES: Uncertainty: ',3f7.3) … … 757 757 758 758 !CGZ-lifetime: Check mass fraction left/save lifetime 759 if(lroot.and.real(npart(npoint(j)))*xmass1(j,ks)/xmass(npoint(j),ks).lt.0.01.and.checklifetime(j,ks).eq.0.)then759 ! if(lroot.and.real(npart(npoint(j)))*xmass1(j,ks)/xmass(npoint(j),ks).lt.0.01.and.checklifetime(j,ks).eq.0.)then 760 760 !Mass below 1% of initial >register lifetime 761 checklifetime(j,ks)=abs(itra1(j)-itramem(j))762 763 species_lifetime(ks,1)=species_lifetime(ks,1)+abs(itra1(j)-itramem(j))764 species_lifetime(ks,2)= species_lifetime(ks,2)+1765 endif761 ! checklifetime(j,ks)=abs(itra1(j)-itramem(j)) 762 763 ! species_lifetime(ks,1)=species_lifetime(ks,1)+abs(itra1(j)-itramem(j)) 764 ! species_lifetime(ks,2)= species_lifetime(ks,2)+1 765 ! endif 766 766 !CGZ-lifetime: Check mass fraction left/save lifetime 767 767 -
src/verttransform.f90
rd6a0977 rf75967d 568 568 569 569 !*********************************************************************************** 570 if (readclouds) then !HG METHOD570 if (readclouds) then !HG METHOD 571 571 ! The method is loops all grids vertically and constructs the 3D matrix for clouds 572 572 ! Cloud top and cloud bottom gid cells are assigned as well as the total column … … 577 577 ! to include future cloud processing by non-precipitating-clouds. 578 578 !*********************************************************************************** 579 if (readclouds)write(*,*) 'using cloud water from ECMWF'580 clw(:,:,:,n)=0581 icloud_stats(:,:,:,n)=0582 clouds(:,:,:,n)=0583 do jy=0,nymin1584 do ix=0,nxmin1585 lsp=lsprec(ix,jy,1,n)586 convp=convprec(ix,jy,1,n)587 prec=lsp+convp588 tot_cloud_h=0589 590 do kz=1, nz-1 !go from top to bottom591 if (clwc(ix,jy,kz,n).gt.0) then592 593 clw(ix,jy,kz,n)=(clwc(ix,jy,kz,n)*rho(ix,jy,kz,n))*(height(kz+1)-height(kz))594 tot_cloud_h=tot_cloud_h+(height(kz+1)-height(kz))595 icloud_stats(ix,jy,4,n)= icloud_stats(ix,jy,4,n)+clw(ix,jy,kz,n) ! Column cloud water [m3/m3]596 icloud_stats(ix,jy,3,n)= min(height(kz+1),height(kz)) ! Cloud BOT height stats [m]579 write(*,*) 'using cloud water from ECMWF' 580 clw(:,:,:,n)=0 581 icloud_stats(:,:,:,n)=0 582 clouds(:,:,:,n)=0 583 do jy=0,nymin1 584 do ix=0,nxmin1 585 lsp=lsprec(ix,jy,1,n) 586 convp=convprec(ix,jy,1,n) 587 prec=lsp+convp 588 tot_cloud_h=0 589 ! Find clouds in the vertical 590 do kz=1, nz-1 !go from top to bottom 591 if (clwc(ix,jy,kz,n).gt.0) then 592 ! assuming rho is in kg/m3 and hz in m gives: kg/kg * kg/m3 *m3/kg /m = m2/m3 593 clw(ix,jy,kz,n)=(clwc(ix,jy,kz,n)*rho(ix,jy,kz,n))*(height(kz+1)-height(kz)) 594 tot_cloud_h=tot_cloud_h+(height(kz+1)-height(kz)) 595 icloud_stats(ix,jy,4,n)= icloud_stats(ix,jy,4,n)+clw(ix,jy,kz,n) ! Column cloud water [m3/m3] 596 icloud_stats(ix,jy,3,n)= min(height(kz+1),height(kz)) ! Cloud BOT height stats [m] 597 597 !ZHG 2015 extra for testing 598 clh(ix,jy,kz,n)=height(kz+1)-height(kz)599 icloud_stats(ix,jy,1,n)=icloud_stats(ix,jy,1,n)+(height(kz+1)-height(kz)) ! Cloud total vertical extent [m]600 icloud_stats(ix,jy,2,n)= max(icloud_stats(ix,jy,2,n),height(kz)) ! Cloud TOP height [m]598 clh(ix,jy,kz,n)=height(kz+1)-height(kz) 599 icloud_stats(ix,jy,1,n)=icloud_stats(ix,jy,1,n)+(height(kz+1)-height(kz)) ! Cloud total vertical extent [m] 600 icloud_stats(ix,jy,2,n)= max(icloud_stats(ix,jy,2,n),height(kz)) ! Cloud TOP height [m] 601 601 !ZHG 602 endif603 end do604 605 606 if ((lsp.gt.0.01).or.(convp.gt.0.01)) then ! cloud and precipitation607 608 do kz=nz,1,-1 !go Bottom up!609 if (clw(ix,jy,kz,n).gt. 0) then ! is in cloud610 cloudsh(ix,jy,n)=cloudsh(ix,jy,n)+height(kz)-height(kz-1)611 clouds(ix,jy,kz,n)=1 ! is a cloud612 if (lsp.ge.convp) then613 clouds(ix,jy,kz,n)=3 ! lsp in-cloud614 else615 clouds(ix,jy,kz,n)=2 ! convp in-cloud616 endif ! convective or large scale617 elseif((clw(ix,jy,kz,n).le.0) .and. (icloud_stats(ix,jy,3,n).ge.height(kz)) ) then ! is below cloud618 if (lsp.ge.convp) then619 clouds(ix,jy,kz,n)=5 ! lsp dominated washout620 else621 clouds(ix,jy,kz,n)=4 ! convp dominated washout622 endif ! convective or large scale623 endif624 625 if (height(kz).ge. 19000) then ! set a max height for removal626 clouds(ix,jy,kz,n)=0627 endif !clw>0628 end do !nz629 endif ! precipitation630 end do631 end do602 endif 603 end do 604 605 ! If Precipitation. Define removal type in the vertical 606 if ((lsp.gt.0.01).or.(convp.gt.0.01)) then ! cloud and precipitation 607 608 do kz=nz,1,-1 !go Bottom up! 609 if (clw(ix,jy,kz,n).gt. 0) then ! is in cloud 610 cloudsh(ix,jy,n)=cloudsh(ix,jy,n)+height(kz)-height(kz-1) 611 clouds(ix,jy,kz,n)=1 ! is a cloud 612 if (lsp.ge.convp) then 613 clouds(ix,jy,kz,n)=3 ! lsp in-cloud 614 else 615 clouds(ix,jy,kz,n)=2 ! convp in-cloud 616 endif ! convective or large scale 617 elseif((clw(ix,jy,kz,n).le.0) .and. (icloud_stats(ix,jy,3,n).ge.height(kz)) ) then ! is below cloud 618 if (lsp.ge.convp) then 619 clouds(ix,jy,kz,n)=5 ! lsp dominated washout 620 else 621 clouds(ix,jy,kz,n)=4 ! convp dominated washout 622 endif ! convective or large scale 623 endif 624 625 if (height(kz).ge. 19000) then ! set a max height for removal 626 clouds(ix,jy,kz,n)=0 627 endif !clw>0 628 end do !nz 629 endif ! precipitation 630 end do 631 end do 632 632 !************************************************************************** 633 else ! use old definitions633 else ! use old definitions 634 634 !************************************************************************** 635 635 ! create a cloud and rainout/washout field, clouds occur where rh>80% 636 636 ! total cloudheight is stored at level 0 637 if (.not.readclouds) write(*,*) 'using cloud water from Parameterization' 638 do jy=0,nymin1 639 do ix=0,nxmin1 637 ! if (.not.readclouds) write(*,*) 'using cloud water from Parameterization' 638 write(*,*) 'using cloud water from Parameterization' 639 do jy=0,nymin1 640 do ix=0,nxmin1 640 641 ! OLD METHOD 641 rain_cloud_above(ix,jy)=0 642 lsp=lsprec(ix,jy,1,n) 643 convp=convprec(ix,jy,1,n) 644 cloudsh(ix,jy,n)=0 645 do kz_inv=1,nz-1 646 kz=nz-kz_inv+1 647 pressure=rho(ix,jy,kz,n)*r_air*tt(ix,jy,kz,n) 648 rh=qv(ix,jy,kz,n)/f_qvsat(pressure,tt(ix,jy,kz,n)) 649 clouds(ix,jy,kz,n)=0 650 if (rh.gt.0.8) then ! in cloud 651 if ((lsp.gt.0.01).or.(convp.gt.0.01)) then ! cloud and precipitation 652 rain_cloud_above(ix,jy)=1 653 cloudsh(ix,jy,n)=cloudsh(ix,jy,n)+ & 654 height(kz)-height(kz-1) 655 if (lsp.ge.convp) then 656 clouds(ix,jy,kz,n)=3 ! lsp dominated rainout 657 else 658 clouds(ix,jy,kz,n)=2 ! convp dominated rainout 642 rain_cloud_above(ix,jy)=0 643 lsp=lsprec(ix,jy,1,n) 644 convp=convprec(ix,jy,1,n) 645 cloudsh(ix,jy,n)=0 646 do kz_inv=1,nz-1 647 kz=nz-kz_inv+1 648 pressure=rho(ix,jy,kz,n)*r_air*tt(ix,jy,kz,n) 649 rh=qv(ix,jy,kz,n)/f_qvsat(pressure,tt(ix,jy,kz,n)) 650 clouds(ix,jy,kz,n)=0 651 if (rh.gt.0.8) then ! in cloud 652 if ((lsp.gt.0.01).or.(convp.gt.0.01)) then ! cloud and precipitation 653 rain_cloud_above(ix,jy)=1 654 cloudsh(ix,jy,n)=cloudsh(ix,jy,n)+ & 655 height(kz)-height(kz-1) 656 if (lsp.ge.convp) then 657 clouds(ix,jy,kz,n)=3 ! lsp dominated rainout 658 else 659 clouds(ix,jy,kz,n)=2 ! convp dominated rainout 660 endif 661 else ! no precipitation 662 clouds(ix,jy,kz,n)=1 ! cloud 659 663 endif 660 else ! no precipitation 661 clouds(ix,jy,kz,n)=1 ! cloud 662 endif 663 else ! no cloud 664 if (rain_cloud_above(ix,jy).eq.1) then ! scavenging 665 if (lsp.ge.convp) then 666 clouds(ix,jy,kz,n)=5 ! lsp dominated washout 667 else 668 clouds(ix,jy,kz,n)=4 ! convp dominated washout 664 else ! no cloud 665 if (rain_cloud_above(ix,jy).eq.1) then ! scavenging 666 if (lsp.ge.convp) then 667 clouds(ix,jy,kz,n)=5 ! lsp dominated washout 668 else 669 clouds(ix,jy,kz,n)=4 ! convp dominated washout 670 endif 669 671 endif 670 672 endif 671 endif 672 end do 673 end do 673 674 !END OLD METHOD 674 675 end do 675 676 endif !readclouds676 end do 677 endif !readclouds 677 678 678 679 !********* TEST *************** … … 838 839 ! sum(ww(:,:,:,n)*ww(:,:,:,n)), & 839 840 ! sum(clouds(:,:,:,n)), sum(cloudsh(:,:,n)),sum(idx),sum(pinmconv) 840 841 841 end subroutine verttransform 842 -
src/wetdepo.f90
rd6a0977 rf75967d 73 73 integer :: ngrid,itage,nage,hz,il,interp_time, n, clouds_v 74 74 integer :: ks, kp 75 integer :: n1,n2, icbot,ictop, indcloud !TEST75 ! integer :: n1,n2, icbot,ictop, indcloud !TEST 76 76 real :: S_i, act_temp, cl, cle ! in cloud scavenging 77 77 real :: clouds_h ! cloud height for the specific grid point … … 105 105 ! Loop over all particles 106 106 !************************ 107 108 107 109 108 blc_count=0 … … 185 184 n=memind(2) 186 185 if (abs(memtime(1)-interp_time).lt.abs(memtime(2)-interp_time)) & 187 n=memind(1)186 n=memind(1) 188 187 189 188 if (ngrid.eq.0) then … … 199 198 ! scavenging is done 200 199 201 200 if (clouds_v.le.1) goto 20 202 201 203 202 ! 1) Parameterization of the the area fraction of the grid cell where the … … 311 310 ! NIK 13 may 2015: only do incloud if positive in-cloud scavenging parameters are given in species file 312 311 if (weta_in(ks).gt.0. .or. wetb_in(ks).gt.0.) then 312 inc_count=inc_count+1 313 313 ! if negative coefficients (turned off) set to zero for use in equation 314 314 if (weta_in(ks).lt.0.) weta_in(ks)=0. … … 355 355 !OLD 356 356 if (readclouds) then 357 wetscav=S_i*(prec(1)/3.6E6)357 wetscav=S_i*(prec(1)/3.6E6) 358 358 else 359 wetscav=S_i*(prec(1)/3.6E6)/clouds_h359 wetscav=S_i*(prec(1)/3.6E6)/clouds_h 360 360 endif 361 361
Note: See TracChangeset
for help on using the changeset viewer.