Changes in / [1070b4c:8c0ae9b] in flexpart.git
- Location:
- src
- Files:
-
- 2 deleted
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
src/com_mod.f90
ra756649 r07c3e71 25 25 !**************************************************************** 26 26 27 character :: path(numpath+2*maxnests)* 20027 character :: path(numpath+2*maxnests)*120 28 28 integer :: length(numpath+2*maxnests) 29 29 character(len=256) :: pathfile, flexversion, flexversion_major, arg1, arg2 -
src/concoutput_mpi.f90
rf3054ea r92fab65 59 59 real :: sp_fact 60 60 real :: outnum,densityoutrecept(maxreceptor),xl,yl 61 ! RLT62 real :: densitydryrecept(maxreceptor)63 real :: factor_dryrecept(maxreceptor)64 61 65 62 !real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid), … … 96 93 character(LEN=8),save :: file_stat='REPLACE' 97 94 logical :: ldates_file 98 logical :: lexist99 95 integer :: ierr 100 96 character(LEN=100) :: dates_char … … 198 194 densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,mind)*dz1+ & 199 195 rho(iix,jjy,kzz-1,mind)*dz2)/dz 200 ! RLT201 densitydrygrid(ix,jy,kz)=(rho_dry(iix,jjy,kzz,mind)*dz1+ &202 rho_dry(iix,jjy,kzz-1,mind)*dz2)/dz203 196 end do 204 197 end do … … 212 205 !densityoutrecept(i)=rho(iix,jjy,1,2) 213 206 densityoutrecept(i)=rho(iix,jjy,1,mind) 214 ! RLT215 densitydryrecept(i)=rho_dry(iix,jjy,1,mind)216 207 end do 217 208 218 ! RLT219 ! conversion factor for output relative to dry air220 factor_drygrid=densityoutgrid/densitydrygrid221 factor_dryrecept=densityoutrecept/densitydryrecept222 209 223 210 ! Output is different for forward and backward simulations … … 272 259 write(unitoutgrid) itime 273 260 endif 261 274 262 if ((iout.eq.2).or.(iout.eq.3)) then ! mixing ratio 275 263 open(unitoutgridppt,file=path(2)(1:length(2))//'grid_pptv_'//adate// & 276 264 atime//'_'//anspec,form='unformatted') 265 277 266 write(unitoutgridppt) itime 278 267 endif … … 618 607 end do 619 608 620 ! RLT Aug 2017621 ! Write out conversion factor for dry air622 inquire(file=path(2)(1:length(2))//'factor_drygrid',exist=lexist)623 if (lexist) then624 ! open and append625 open(unitoutfactor,file=path(2)(1:length(2))//'factor_drygrid',form='unformatted',&626 status='old',action='write',access='append')627 else628 ! create new629 open(unitoutfactor,file=path(2)(1:length(2))//'factor_drygrid',form='unformatted',&630 status='new',action='write')631 endif632 sp_count_i=0633 sp_count_r=0634 sp_fact=-1.635 sp_zer=.true.636 do kz=1,numzgrid637 do jy=0,numygrid-1638 do ix=0,numxgrid-1639 if (factor_drygrid(ix,jy,kz).gt.(1.+smallnum).or.factor_drygrid(ix,jy,kz).lt.(1.-smallnum)) then640 if (sp_zer.eqv..true.) then ! first value not equal to one641 sp_count_i=sp_count_i+1642 sparse_dump_i(sp_count_i)= &643 ix+jy*numxgrid+kz*numxgrid*numygrid644 sp_zer=.false.645 sp_fact=sp_fact*(-1.)646 endif647 sp_count_r=sp_count_r+1648 sparse_dump_r(sp_count_r)= &649 sp_fact*factor_drygrid(ix,jy,kz)650 else ! factor is one651 sp_zer=.true.652 endif653 end do654 end do655 end do656 write(unitoutfactor) sp_count_i657 write(unitoutfactor) (sparse_dump_i(i),i=1,sp_count_i)658 write(unitoutfactor) sp_count_r659 write(unitoutfactor) (sparse_dump_r(i),i=1,sp_count_r)660 close(unitoutfactor)661 662 663 609 if (gridtotal.gt.0.) gridtotalunc=gridsigmatotal/gridtotal 664 610 if (wetgridtotal.gt.0.) wetgridtotalunc=wetgridsigmatotal/ & … … 687 633 endif 688 634 689 ! RLT Aug 2017 690 ! Write out conversion factor for dry air 691 if (numreceptor.gt.0) then 692 inquire(file=path(2)(1:length(2))//'factor_dryreceptor',exist=lexist) 693 if (lexist) then 694 ! open and append 695 open(unitoutfactor,file=path(2)(1:length(2))//'factor_dryreceptor',form='unformatted',& 696 status='old',action='write',access='append') 697 else 698 ! create new 699 open(unitoutfactor,file=path(2)(1:length(2))//'factor_dryreceptor',form='unformatted',& 700 status='new',action='write') 701 endif 702 write(unitoutfactor) itime 703 write(unitoutfactor) (factor_dryrecept(i),i=1,numreceptor) 704 close(unitoutfactor) 705 endif 635 706 636 707 637 ! Reinitialization of grid -
src/concoutput_nest.f90
rf3054ea r92fab65 588 588 close(unitoutfactor) 589 589 590 590 591 ! Reinitialization of grid 591 592 !************************* -
src/concoutput_nest_mpi.f90
rf3054ea r92fab65 39 39 ! * 40 40 !***************************************************************************** 41 41 42 42 43 use unc_mod … … 55 56 real :: sp_fact 56 57 real :: outnum,densityoutrecept(maxreceptor),xl,yl 57 ! RLT58 real :: densitydryrecept(maxreceptor)59 real :: factor_dryrecept(maxreceptor)60 58 61 59 !real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid), … … 84 82 character :: adate*8,atime*6 85 83 character(len=3) :: anspec 86 logical :: lexist87 84 integer :: mind 88 85 ! mind eso:added to ensure identical results between 2&3-fields versions … … 161 158 densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,mind)*dz1+ & 162 159 rho(iix,jjy,kzz-1,mind)*dz2)/dz 163 ! RLT164 densitydrygrid(ix,jy,kz)=(rho_dry(iix,jjy,kzz,mind)*dz1+ &165 rho_dry(iix,jjy,kzz-1,mind)*dz2)/dz166 160 end do 167 161 end do … … 175 169 !densityoutrecept(i)=rho(iix,jjy,1,2) 176 170 densityoutrecept(i)=rho(iix,jjy,1,mind) 177 ! RLT178 densitydryrecept(i)=rho_dry(iix,jjy,1,mind)179 171 end do 180 172 181 ! RLT182 ! conversion factor for output relative to dry air183 factor_drygrid=densityoutgrid/densitydrygrid184 factor_dryrecept=densityoutrecept/densitydryrecept185 173 186 174 ! Output is different for forward and backward simulations … … 205 193 206 194 write(anspec,'(i3.3)') ks 207 208 if (DRYBKDEP.or.WETBKDEP) then !scavdep output209 if (DRYBKDEP) &210 open(unitoutgrid,file=path(2)(1:length(2))//'grid_drydep_nest_'//adate// &211 atime//'_'//anspec,form='unformatted')212 if (WETBKDEP) &213 open(unitoutgrid,file=path(2)(1:length(2))//'grid_wetdep_nest_'//adate// &214 atime//'_'//anspec,form='unformatted')215 write(unitoutgrid) itime216 else217 195 if ((iout.eq.1).or.(iout.eq.3).or.(iout.eq.5)) then 218 196 if (ldirect.eq.1) then … … 227 205 write(unitoutgrid) itime 228 206 endif 229 endif230 207 231 208 if ((iout.eq.2).or.(iout.eq.3)) then ! mixing ratio … … 558 535 end do 559 536 560 ! RLT Aug 2017 561 ! Write out conversion factor for dry air 562 inquire(file=path(2)(1:length(2))//'factor_drygrid_nest',exist=lexist) 563 if (lexist) then 564 ! open and append 565 open(unitoutfactor,file=path(2)(1:length(2))//'factor_drygrid_nest',form='unformatted',& 566 status='old',action='write',access='append') 567 else 568 ! create new 569 open(unitoutfactor,file=path(2)(1:length(2))//'factor_drygrid_nest',form='unformatted',& 570 status='new',action='write') 571 endif 572 sp_count_i=0 573 sp_count_r=0 574 sp_fact=-1. 575 sp_zer=.true. 576 do kz=1,numzgrid 577 do jy=0,numygridn-1 578 do ix=0,numxgridn-1 579 if (factor_drygrid(ix,jy,kz).gt.(1.+smallnum).or.factor_drygrid(ix,jy,kz).lt.(1.-smallnum)) then 580 if (sp_zer.eqv..true.) then ! first value not equal to one 581 sp_count_i=sp_count_i+1 582 sparse_dump_i(sp_count_i)= & 583 ix+jy*numxgridn+kz*numxgridn*numygridn 584 sp_zer=.false. 585 sp_fact=sp_fact*(-1.) 586 endif 587 sp_count_r=sp_count_r+1 588 sparse_dump_r(sp_count_r)= & 589 sp_fact*factor_drygrid(ix,jy,kz) 590 else ! factor is one 591 sp_zer=.true. 592 endif 593 end do 594 end do 595 end do 596 write(unitoutfactor) sp_count_i 597 write(unitoutfactor) (sparse_dump_i(i),i=1,sp_count_i) 598 write(unitoutfactor) sp_count_r 599 write(unitoutfactor) (sparse_dump_r(i),i=1,sp_count_r) 600 close(unitoutfactor) 537 601 538 602 539 ! Reinitialization of grid 603 540 !************************* 604 541 605 ! do ks=1,nspec 606 ! do kp=1,maxpointspec_act 607 ! do i=1,numreceptor 608 ! creceptor(i,ks)=0. 609 ! end do 610 ! do jy=0,numygridn-1 611 ! do ix=0,numxgridn-1 612 ! do l=1,nclassunc 613 ! do nage=1,nageclass 614 ! do kz=1,numzgrid 615 ! griduncn(ix,jy,kz,ks,kp,l,nage)=0. 616 ! end do 617 ! end do 618 ! end do 619 ! end do 620 ! end do 621 ! end do 622 ! end do 623 creceptor(:,:)=0. 624 griduncn(:,:,:,:,:,:,:)=0. 625 542 do ks=1,nspec 543 do kp=1,maxpointspec_act 544 do i=1,numreceptor 545 creceptor(i,ks)=0. 546 end do 547 do jy=0,numygridn-1 548 do ix=0,numxgridn-1 549 do l=1,nclassunc 550 do nage=1,nageclass 551 do kz=1,numzgrid 552 griduncn(ix,jy,kz,ks,kp,l,nage)=0. 553 end do 554 end do 555 end do 556 end do 557 end do 558 end do 559 end do 560 626 561 if (mp_measure_time) call mpif_mtime('iotime',1) 627 562 ! if (mp_measure_time) then -
src/concoutput_surf_nest_mpi.f90
rf3054ea r92fab65 633 633 634 634 do ks=1,nspec 635 do kp=1,maxpointspec_act 636 do i=1,numreceptor 637 creceptor(i,ks)=0. 638 end do 639 do jy=0,numygridn-1 640 do ix=0,numxgridn-1 641 do l=1,nclassunc 642 do nage=1,nageclass 643 do kz=1,numzgrid 644 griduncn(ix,jy,kz,ks,kp,l,nage)=0. 645 end do 635 do kp=1,maxpointspec_act 636 do i=1,numreceptor 637 creceptor(i,ks)=0. 638 end do 639 do jy=0,numygridn-1 640 do ix=0,numxgridn-1 641 do l=1,nclassunc 642 do nage=1,nageclass 643 do kz=1,numzgrid 644 griduncn(ix,jy,kz,ks,kp,l,nage)=0. 646 645 end do 647 646 end do … … 649 648 end do 650 649 end do 650 end do 651 651 end do 652 652 -
src/gributils/class_gribfile_mod.f90
ra756649 r61e07ba 78 78 ! module 79 79 80 use grib_api80 USE grib_api 81 81 82 82 IMPLICIT NONE -
src/gridcheck_ecmwf.f90
ra756649 r92fab65 55 55 !********************************************************************** 56 56 57 use eccodes57 use grib_api 58 58 use par_mod 59 59 use com_mod -
src/gridcheck_gfs.f90
ra756649 r92fab65 56 56 !********************************************************************** 57 57 58 use eccodes58 use grib_api 59 59 use par_mod 60 60 use com_mod -
src/gridcheck_nests.f90
ra756649 r92fab65 19 19 !***************************************************************************** 20 20 21 use eccodes21 use grib_api 22 22 use par_mod 23 23 use com_mod -
src/makefile
r71f2128 rc56da45 62 62 LIBPATH1 = ${ROOT_DIR}/lib 63 63 else 64 # Using system installed libraries at njord.nilu.no 64 # Compiled libraries under user ~flexpart, gfortran v5.4 65 ROOT_DIR = /homevip/flexpart/ 66 65 67 F90 = /usr/bin/gfortran 66 68 MPIF90 = /usr/bin/mpifort 67 LIBPATH1 = /opt/eccodes/lib 68 INCPATH1 = /opt/eccodes/include69 70 INCPATH1 = ${ROOT_DIR}/gcc-5.4.0/include 69 71 INCPATH2 = /usr/include 70 71 72 # INCPATH1 = /usr/include 73 # INCPATH2 = /usr/include 72 LIBPATH1 = ${ROOT_DIR}/gcc-5.4.0/lib 74 73 endif 75 74 … … 89 88 90 89 ## OPTIMIZATION LEVEL 91 O_LEV = 2# [0,1,2,3,g,s,fast]90 O_LEV = 0 # [0,1,2,3,g,s,fast] 92 91 O_LEV_DBG = g # [0,g] 93 92 94 93 ## LIBRARIES 95 LIBS = -leccodes -leccodes_f90 -lm $(NCOPT) 94 #LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper -lnetcdff 95 LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper $(NCOPT) 96 96 97 97 FFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV) -g -cpp -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV) $(NCOPT) $(FUSER) #-Warray-bounds -fcheck=all # -march=native … … 128 128 redist.o \ 129 129 concoutput_surf.o concoutput_surf_nest.o \ 130 concoutput_inversion_nest.o \ 131 concoutput_inversion.o \ 130 132 getfields.o \ 131 readwind_ecmwf.o \ 132 initial_cond_output.o \ 133 initial_cond_output_inversion.o 133 readwind_ecmwf.o 134 134 135 135 ## For MPI version … … 145 145 concoutput_surf_mpi.o concoutput_surf_nest_mpi.o \ 146 146 getfields_mpi.o \ 147 readwind_ecmwf_mpi.o \ 148 initial_cond_output_mpi.o \ 149 initial_cond_output_inversion_mpi.o 147 readwind_ecmwf_mpi.o 150 148 151 149 OBJECTS_NCF = netcdf_output_mod.o 152 150 153 151 OBJECTS = \ 154 initial_cond_calc.o \155 152 advance.o initialize.o \ 156 153 writeheader.o writeheader_txt.o \ … … 205 202 drydepokernel_nest.o zenithangle.o \ 206 203 ohreaction.o getvdep_nests.o \ 204 initial_cond_calc.o initial_cond_output.o initial_cond_output_inversion.o \ 207 205 dynamic_viscosity.o get_settling.o \ 208 206 initialize_cbl_vel.o re_initialize_particle.o \ 209 cbl.o \ 210 concoutput_inversion_nest.o \ 211 concoutput_inversion.o \ 212 207 cbl.o 213 208 214 209 ifeq ($(ncf), yes) … … 330 325 init_domainfill_mpi.o: com_mod.o mpi_mod.o par_mod.o point_mod.o random_mod.o 331 326 initial_cond_calc.o: com_mod.o outg_mod.o par_mod.o unc_mod.o 332 initial_cond_calc_mpi.o: com_mod.o outg_mod.o par_mod.o unc_mod.o333 327 initial_cond_output.o: com_mod.o outg_mod.o par_mod.o point_mod.o unc_mod.o 334 initial_cond_output_mpi.o: com_mod.o outg_mod.o par_mod.o point_mod.o unc_mod.o mpi_mod.o335 328 initial_cond_output_inversion.o: com_mod.o outg_mod.o par_mod.o point_mod.o \ 336 unc_mod.o337 initial_cond_output_inversion_mpi.o: com_mod.o outg_mod.o par_mod.o point_mod.o \338 329 unc_mod.o 339 330 initialize.o: com_mod.o hanna_mod.o interpol_mod.o par_mod.o random_mod.o -
src/mpi_mod.f90
rf3054ea r92fab65 2579 2579 601 end subroutine mpif_tm_reduce_grid_nest 2580 2580 2581 2582 subroutine mpif_tm_reduce_initcond2583 !***********************************************************************2584 ! Collect init_cond to PID 0, adding from all processes.2585 !2586 !2587 !***********************************************************************2588 use com_mod2589 use unc_mod2590 use par_mod2591 2592 implicit none2593 2594 integer :: grid_size2595 2596 !**********************************************************************2597 2598 grid_size=numxgrid*numygrid*numzgrid*maxspec* &2599 & maxpointspec_act2600 2601 ! Time for MPI communications2602 if (mp_measure_time) call mpif_mtime('commtime',0)2603 2604 2605 #ifdef USE_MPIINPLACE2606 ! Using in-place reduction2607 if (lroot) then2608 call MPI_Reduce(MPI_IN_PLACE, init_cond, grid_size, mp_sp, MPI_SUM, id_root, &2609 & mp_comm_used, mp_ierr)2610 if (mp_ierr /= 0) goto 6002611 else2612 call MPI_Reduce(init_cond, 0, grid_size, mp_sp, MPI_SUM, id_root, &2613 & mp_comm_used, mp_ierr)2614 if (mp_ierr /= 0) goto 6002615 end if2616 2617 #else2618 call MPI_Reduce(init_cond, init_cond0, grid_size, mp_sp, MPI_SUM, id_root, &2619 & mp_comm_used, mp_ierr)2620 if (mp_ierr /= 0) goto 6002621 ! if (lroot) init_cond = init_cond02622 #endif2623 2624 if (mp_measure_time) call mpif_mtime('commtime',1)2625 2626 goto 6012627 2628 600 write(*,*) "mpi_mod> mp_ierr \= 0", mp_ierr2629 stop2630 2631 601 end subroutine mpif_tm_reduce_initcond2632 2633 2581 2634 2582 subroutine mpif_mtime(ident,imode) -
src/outgrid_init.f90
rf3054ea r92fab65 297 297 maxpointspec_act),stat=stat) 298 298 if (stat.ne.0) write(*,*)'ERROR: could not allocate init_cond' 299 if (mpi_mode.gt.0) then300 if (lroot) then301 allocate(init_cond0(0:numxgrid-1,0:numygrid-1,numzgrid,maxspec, &302 maxpointspec_act),stat=stat)303 else304 allocate(init_cond0(1,1,1,1,1))305 end if306 end if307 299 endif 308 300 -
src/par_mod.f90
ra756649 r92fab65 133 133 ! ECMWF 134 134 ! integer,parameter :: nxmax=361,nymax=181,nuvzmax=92,nwzmax=92,nzmax=92,nxshift=359 ! 1.0 degree 92 level 135 integer,parameter :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138,nxshift=0 ! 1.0 degree 138 level135 ! integer,parameter :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138,nxshift=0 ! 1.0 degree 138 level 136 136 ! integer,parameter :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138,nxshift=359 ! 1.0 degree 138 level 137 137 ! integer,parameter :: nxmax=721,nymax=361,nuvzmax=138,nwzmax=138,nzmax=138,nxshift=359 ! 0.5 degree 138 level … … 139 139 140 140 ! GFS 141 !integer,parameter :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138142 !integer :: nxshift=0 ! shift not fixed for the executable141 integer,parameter :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138 142 integer :: nxshift=0 ! shift not fixed for the executable 143 143 144 144 … … 205 205 !************************************************** 206 206 207 integer,parameter :: maxpart=100000 00208 integer,parameter :: maxspec= 6207 integer,parameter :: maxpart=100000 208 integer,parameter :: maxspec=1 209 209 210 210 real,parameter :: minmass=0.0001 -
src/readwind_ecmwf.f90
ra756649 r92fab65 48 48 !********************************************************************** 49 49 50 use eccodes50 use grib_api 51 51 use par_mod 52 52 use com_mod -
src/readwind_gfs.f90
ra756649 r92fab65 47 47 !*********************************************************************** 48 48 49 use eccodes49 use grib_api 50 50 use par_mod 51 51 use com_mod -
src/readwind_nests.f90
ra756649 r92fab65 22 22 !***************************************************************************** 23 23 24 use eccodes24 use grib_api 25 25 use par_mod 26 26 use com_mod -
src/timemanager.f90
rf3054ea r92fab65 90 90 implicit none 91 91 92 integer(selected_int_kind(16)) :: idummy,idummy293 92 integer :: metdata_format 94 93 integer :: j,ks,kp,l,n,itime=0,nstop,nstop1 95 94 ! integer :: ksp 96 95 integer :: loutnext,loutstart,loutend 97 integer :: ix,jy,ldeltat,itage,nage 96 integer :: ix,jy,ldeltat,itage,nage,idummy 98 97 integer :: i_nan=0,ii_nan,total_nan_intl=0 !added by mc to check instability in CBL scheme 99 98 real :: outnum,weight,prob_rec(maxspec),prob(maxspec),decfact,wetscav … … 380 379 call concoutput(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc) 381 380 endif 382 else ! surf only381 else 383 382 if (verbosity.eq.1) then 384 385 386 383 print*,'call concoutput_surf ' 384 call system_clock(count_clock) 385 write(*,*) 'system clock',count_clock - count_clock0 387 386 endif 388 387 if (lnetcdfout.eq.1) then … … 399 398 endif 400 399 else 401 400 call concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc) 402 401 endif 403 402 if (verbosity.eq.1) then … … 417 416 call concoutput_inversion_nest(itime,outnum) 418 417 else 419 420 418 call concoutput_surf_nest(itime,outnum) 419 endif 421 420 endif 422 421 else … … 582 581 do ks=1,nspec 583 582 if ((xscav_frac1(j,ks).lt.0)) then 584 call get_wetscav(itime,lsynctime,loutnext,j,ks,grfraction,idummy,idummy 2,wetscav)583 call get_wetscav(itime,lsynctime,loutnext,j,ks,grfraction,idummy,idummy,wetscav) 585 584 if (wetscav.gt.0) then 586 585 xscav_frac1(j,ks)=wetscav* & -
src/timemanager_mpi.f90
rf3054ea r92fab65 91 91 implicit none 92 92 93 integer(selected_int_kind(16)) :: idummy,idummy294 93 integer :: metdata_format 95 94 logical :: reqv_state=.false. ! .true. if waiting for a MPI_Irecv to complete … … 98 97 integer :: ip,irec 99 98 integer :: loutnext,loutstart,loutend 100 integer :: ix,jy,ldeltat,itage,nage 99 integer :: ix,jy,ldeltat,itage,nage,idummy 101 100 integer :: i_nan=0,ii_nan,total_nan_intl=0 !added by mc to check instability in CBL scheme 102 101 integer :: numpart_tot_mpi ! for summing particles on all processes … … 160 159 !******************************************************************** 161 160 162 !if (mp_dbg_mode) write(*,*) 'myid, itime: ',mp_pid,itime161 if (mp_dbg_mode) write(*,*) 'myid, itime: ',mp_pid,itime 163 162 164 163 if (WETDEP .and. itime .ne. 0 .and. numpart .gt. 0) then … … 281 280 282 281 if (lmpreader.and.lmp_use_reader) then 283 if ( abs(itime).lt.ideltas*ldirect) then282 if (itime.lt.ideltas*ldirect) then 284 283 cycle 285 284 else … … 481 480 creceptor(:,:)=0. 482 481 end if 483 else ! surf only482 else 484 483 if (lroot) then 485 484 if (lnetcdfout.eq.1) then … … 489 488 #endif 490 489 else 491 if (linversionout.eq.1) then 492 call concoutput_inversion(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc) 493 else 494 call concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc) 495 end if 490 call concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc) 496 491 end if 497 492 else … … 521 516 522 517 else 523 if(linversionout.eq.1) then 524 if (lroot) then 525 call concoutput_inversion_nest(itime,outnum) 526 else 527 griduncn(:,:,:,:,:,:,:)=0. 528 end if 529 else 530 if (lroot) then 531 call concoutput_surf_nest(itime,outnum) 532 else 533 griduncn(:,:,:,:,:,:,:)=0. 534 end if 535 end if 518 call concoutput_surf_nest(itime,outnum) 536 519 end if 537 520 else … … 741 724 do ks=1,nspec 742 725 if ((xscav_frac1(j,ks).lt.0)) then 743 call get_wetscav(itime,lsynctime,loutnext,j,ks,grfraction,idummy,idummy 2,wetscav)726 call get_wetscav(itime,lsynctime,loutnext,j,ks,grfraction,idummy,idummy,wetscav) 744 727 if (wetscav.gt.0) then 745 728 xscav_frac1(j,ks)=wetscav* & … … 894 877 !***************************************************************************** 895 878 896 do j=1,numpart 897 if (linit_cond.ge.1) call initial_cond_calc(itime,j) 898 end do 899 900 ! Transfer sum of init_cond field to root process, for output 901 call mpif_tm_reduce_initcond 902 879 ! eso :TODO: this not implemented yet (transfer particles to PID 0 or rewrite) 880 ! the tools to do this are already in mpi_mod.f90 881 if (lroot) then 882 do j=1,numpart 883 if (linit_cond.ge.1) call initial_cond_calc(itime,j) 884 end do 885 end if 886 887 903 888 if (ipout.eq.2) then 904 889 ! MPI process 0 creates the file, the other processes append to it … … 912 897 end if 913 898 914 915 if (linit_cond.ge.1.and.lroot) then 916 if(linversionout.eq.1) then 917 call initial_cond_output_inversion(itime) ! dump initial cond. field 918 else 919 call initial_cond_output(itime) ! dump initial cond. fielf 920 endif 921 endif 899 ! eso :TODO: MPI 900 if (linit_cond.ge.1.and.lroot) call initial_cond_output(itime) ! dump initial cond. field 922 901 923 902 -
src/unc_mod.f90
rf3054ea r92fab65 35 35 36 36 real,allocatable, dimension (:,:,:,:,:) :: init_cond 37 real,allocatable, dimension (:,:,:,:,:) :: init_cond0 ! for MPI38 37 39 38 end module unc_mod
Note: See TracChangeset
for help on using the changeset viewer.