Changeset 505a96e in flexpart.git for src/timemanager_mpi.f90
- Timestamp:
- May 22, 2018, 2:40:40 PM (6 years ago)
- Branches:
- master, 10.4.1_pesei, GFS_025, bugfixes+enhancements, dev, release-10, release-10.4.1, scaling-bug, univie
- Children:
- cd6e10c, 77778f8
- Parents:
- 3d04845 (diff), 20963b1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/timemanager_mpi.f90
rd8eed02 r20963b1 102 102 use com_mod 103 103 use mpi_mod 104 #ifdef USE_NCF 104 105 use netcdf_output_mod, only: concoutput_netcdf,concoutput_nest_netcdf,& 105 106 &concoutput_surf_netcdf,concoutput_surf_nest_netcdf 107 #endif 106 108 107 109 implicit none … … 113 115 integer :: ip 114 116 integer :: loutnext,loutstart,loutend 115 integer :: ix,jy,ldeltat,itage,nage 117 integer :: ix,jy,ldeltat,itage,nage,idummy 116 118 integer :: i_nan=0,ii_nan,total_nan_intl=0 !added by mc to check instability in CBL scheme 117 119 integer :: numpart_tot_mpi ! for summing particles on all processes 118 real :: outnum,weight,prob(maxspec) 119 real :: decfact 120 real :: outnum,weight,prob(maxspec), prob_rec(maxspec), decfact,wetscav 120 121 121 122 real(sp) :: gridtotalunc … … 123 124 & drydeposit(maxspec)=0_dep_prec 124 125 real :: xold,yold,zold,xmassfract 126 real :: grfraction(3) 125 127 real, parameter :: e_inv = 1.0/exp(1.0) 126 128 … … 157 159 !CGZ-lifetime: set lifetime to 0 158 160 161 if (.not.lusekerneloutput) write(*,*) 'Not using the kernel' 162 if (turboff) write(*,*) 'Turbulence switched off' 159 163 160 164 … … 481 485 if (lroot) then 482 486 if (lnetcdfout.eq.1) then 487 #ifdef USE_NCF 483 488 call concoutput_netcdf(itime,outnum,gridtotalunc,wetgridtotalunc,& 484 489 &drygridtotalunc) 490 #endif 485 491 else 486 492 call concoutput(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc) … … 494 500 if (lroot) then 495 501 if (lnetcdfout.eq.1) then 502 #ifdef USE_NCF 496 503 call concoutput_surf_netcdf(itime,outnum,gridtotalunc,wetgridtotalunc,& 497 504 &drygridtotalunc) 505 #endif 498 506 else 499 507 call concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc) … … 513 521 call mpif_tm_reduce_grid_nest 514 522 515 if (mp_measure_time) call mpif_mtime('iotime',0)523 if (mp_measure_time) call mpif_mtime('iotime',0) 516 524 517 525 if (lnetcdfout.eq.0) then … … 526 534 else ! :TODO: check for zeroing in the netcdf module 527 535 call concoutput_surf_nest(itime,outnum) 528 529 536 end if 530 531 537 else 532 538 #ifdef USE_NCF 533 539 if (surf_only.ne.1) then 534 540 if (lroot) then … … 544 550 end if 545 551 endif 546 547 552 #endif 548 553 end if 549 554 end if 550 551 552 555 outnum=0. 553 556 endif … … 707 710 zold=ztra1(j) 708 711 712 713 ! RECEPTOR: dry/wet depovel 714 !**************************** 715 ! Before the particle is moved 716 ! the calculation of the scavenged mass shall only be done once after release 717 ! xscav_frac1 was initialised with a negative value 718 719 if (DRYBKDEP) then 720 do ks=1,nspec 721 if ((xscav_frac1(j,ks).lt.0)) then 722 call get_vdep_prob(itime,xtra1(j),ytra1(j),ztra1(j),prob_rec) 723 if (DRYDEPSPEC(ks)) then ! dry deposition 724 xscav_frac1(j,ks)=prob_rec(ks) 725 else 726 xmass1(j,ks)=0. 727 xscav_frac1(j,ks)=0. 728 endif 729 endif 730 enddo 731 endif 732 733 if (WETBKDEP) then 734 do ks=1,nspec 735 if ((xscav_frac1(j,ks).lt.0)) then 736 call get_wetscav(itime,lsynctime,loutnext,j,ks,grfraction,idummy,idummy,wetscav) 737 if (wetscav.gt.0) then 738 xscav_frac1(j,ks)=wetscav* & 739 (zpoint2(npoint(j))-zpoint1(npoint(j)))*grfraction(1) 740 else 741 xmass1(j,ks)=0. 742 xscav_frac1(j,ks)=0. 743 endif 744 endif 745 enddo 746 endif 747 709 748 ! Integrate Lagevin equation for lsynctime seconds 710 749 !************************************************* … … 808 847 call initial_cond_calc(itime+lsynctime,j) 809 848 itra1(j)=-999999999 810 !print*, 'terminated particle ',j,'for age' 849 if (verbosity.gt.0) then 850 print*, 'terminated particle ',j,'for age' 851 endif 811 852 endif 812 853 endif … … 819 860 820 861 821 ! Added by mc: counter of "unstable" particle velocity during a time scale822 ! 823 862 ! Counter of "unstable" particle velocity during a time scale 863 ! of maximumtl=20 minutes (defined in com_mod) 864 !************************************************************ 824 865 total_nan_intl=0 825 866 i_nan=i_nan+1 ! added by mc to count nan during a time of maxtl (i.e. maximum tl fixed here to 20 minutes, see com_mod)
Note: See TracChangeset
for help on using the changeset viewer.