Changeset 1070b4c in flexpart.git
- Timestamp:
- Aug 27, 2020, 9:51:56 PM (4 years ago)
- Branches:
- GFS_025, dev
- Children:
- b0ecb61
- Parents:
- 8c0ae9b (diff), a803521 (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. - Location:
- src
- Files:
-
- 2 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
src/com_mod.f90
r07c3e71 ra756649 25 25 !**************************************************************** 26 26 27 character :: path(numpath+2*maxnests)* 12027 character :: path(numpath+2*maxnests)*200 28 28 integer :: length(numpath+2*maxnests) 29 29 character(len=256) :: pathfile, flexversion, flexversion_major, arg1, arg2 -
src/concoutput_mpi.f90
r92fab65 ra803521 59 59 real :: sp_fact 60 60 real :: outnum,densityoutrecept(maxreceptor),xl,yl 61 ! RLT 62 real :: densitydryrecept(maxreceptor) 63 real :: factor_dryrecept(maxreceptor) 61 64 62 65 !real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid), … … 93 96 character(LEN=8),save :: file_stat='REPLACE' 94 97 logical :: ldates_file 98 logical :: lexist 95 99 integer :: ierr 96 100 character(LEN=100) :: dates_char … … 194 198 densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,mind)*dz1+ & 195 199 rho(iix,jjy,kzz-1,mind)*dz2)/dz 200 ! RLT 201 densitydrygrid(ix,jy,kz)=(rho_dry(iix,jjy,kzz,mind)*dz1+ & 202 rho_dry(iix,jjy,kzz-1,mind)*dz2)/dz 196 203 end do 197 204 end do … … 205 212 !densityoutrecept(i)=rho(iix,jjy,1,2) 206 213 densityoutrecept(i)=rho(iix,jjy,1,mind) 214 ! RLT 215 densitydryrecept(i)=rho_dry(iix,jjy,1,mind) 207 216 end do 208 217 218 ! RLT 219 ! conversion factor for output relative to dry air 220 factor_drygrid=densityoutgrid/densitydrygrid 221 factor_dryrecept=densityoutrecept/densitydryrecept 209 222 210 223 ! Output is different for forward and backward simulations … … 259 272 write(unitoutgrid) itime 260 273 endif 261 262 274 if ((iout.eq.2).or.(iout.eq.3)) then ! mixing ratio 263 275 open(unitoutgridppt,file=path(2)(1:length(2))//'grid_pptv_'//adate// & 264 276 atime//'_'//anspec,form='unformatted') 265 266 277 write(unitoutgridppt) itime 267 278 endif … … 607 618 end do 608 619 620 ! RLT Aug 2017 621 ! Write out conversion factor for dry air 622 inquire(file=path(2)(1:length(2))//'factor_drygrid',exist=lexist) 623 if (lexist) then 624 ! open and append 625 open(unitoutfactor,file=path(2)(1:length(2))//'factor_drygrid',form='unformatted',& 626 status='old',action='write',access='append') 627 else 628 ! create new 629 open(unitoutfactor,file=path(2)(1:length(2))//'factor_drygrid',form='unformatted',& 630 status='new',action='write') 631 endif 632 sp_count_i=0 633 sp_count_r=0 634 sp_fact=-1. 635 sp_zer=.true. 636 do kz=1,numzgrid 637 do jy=0,numygrid-1 638 do ix=0,numxgrid-1 639 if (factor_drygrid(ix,jy,kz).gt.(1.+smallnum).or.factor_drygrid(ix,jy,kz).lt.(1.-smallnum)) then 640 if (sp_zer.eqv..true.) then ! first value not equal to one 641 sp_count_i=sp_count_i+1 642 sparse_dump_i(sp_count_i)= & 643 ix+jy*numxgrid+kz*numxgrid*numygrid 644 sp_zer=.false. 645 sp_fact=sp_fact*(-1.) 646 endif 647 sp_count_r=sp_count_r+1 648 sparse_dump_r(sp_count_r)= & 649 sp_fact*factor_drygrid(ix,jy,kz) 650 else ! factor is one 651 sp_zer=.true. 652 endif 653 end do 654 end do 655 end do 656 write(unitoutfactor) sp_count_i 657 write(unitoutfactor) (sparse_dump_i(i),i=1,sp_count_i) 658 write(unitoutfactor) sp_count_r 659 write(unitoutfactor) (sparse_dump_r(i),i=1,sp_count_r) 660 close(unitoutfactor) 661 662 609 663 if (gridtotal.gt.0.) gridtotalunc=gridsigmatotal/gridtotal 610 664 if (wetgridtotal.gt.0.) wetgridtotalunc=wetgridsigmatotal/ & … … 633 687 endif 634 688 635 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 636 706 637 707 ! Reinitialization of grid -
src/concoutput_nest.f90
r92fab65 ra803521 588 588 close(unitoutfactor) 589 589 590 591 590 ! Reinitialization of grid 592 591 !************************* -
src/concoutput_nest_mpi.f90
r92fab65 ra803521 39 39 ! * 40 40 !***************************************************************************** 41 42 41 43 42 use unc_mod … … 56 55 real :: sp_fact 57 56 real :: outnum,densityoutrecept(maxreceptor),xl,yl 57 ! RLT 58 real :: densitydryrecept(maxreceptor) 59 real :: factor_dryrecept(maxreceptor) 58 60 59 61 !real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid), … … 82 84 character :: adate*8,atime*6 83 85 character(len=3) :: anspec 86 logical :: lexist 84 87 integer :: mind 85 88 ! mind eso:added to ensure identical results between 2&3-fields versions … … 158 161 densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,mind)*dz1+ & 159 162 rho(iix,jjy,kzz-1,mind)*dz2)/dz 163 ! RLT 164 densitydrygrid(ix,jy,kz)=(rho_dry(iix,jjy,kzz,mind)*dz1+ & 165 rho_dry(iix,jjy,kzz-1,mind)*dz2)/dz 160 166 end do 161 167 end do … … 169 175 !densityoutrecept(i)=rho(iix,jjy,1,2) 170 176 densityoutrecept(i)=rho(iix,jjy,1,mind) 177 ! RLT 178 densitydryrecept(i)=rho_dry(iix,jjy,1,mind) 171 179 end do 172 180 181 ! RLT 182 ! conversion factor for output relative to dry air 183 factor_drygrid=densityoutgrid/densitydrygrid 184 factor_dryrecept=densityoutrecept/densitydryrecept 173 185 174 186 ! Output is different for forward and backward simulations … … 193 205 194 206 write(anspec,'(i3.3)') ks 207 208 if (DRYBKDEP.or.WETBKDEP) then !scavdep output 209 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) itime 216 else 195 217 if ((iout.eq.1).or.(iout.eq.3).or.(iout.eq.5)) then 196 218 if (ldirect.eq.1) then … … 205 227 write(unitoutgrid) itime 206 228 endif 229 endif 207 230 208 231 if ((iout.eq.2).or.(iout.eq.3)) then ! mixing ratio … … 535 558 end do 536 559 537 538 539 ! Reinitialization of grid 540 !************************* 541 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 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 557 593 end do 558 594 end do 559 595 end do 560 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) 601 602 ! Reinitialization of grid 603 !************************* 604 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 561 626 if (mp_measure_time) call mpif_mtime('iotime',1) 562 627 ! if (mp_measure_time) then -
src/concoutput_surf_nest_mpi.f90
r92fab65 ra803521 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. 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 645 646 end do 646 647 end do … … 648 649 end do 649 650 end do 650 end do651 651 end do 652 652 -
src/gributils/class_gribfile_mod.f90
r61e07ba ra756649 78 78 ! module 79 79 80 USE grib_api80 use grib_api 81 81 82 82 IMPLICIT NONE -
src/gridcheck_ecmwf.f90
r3ea93bb ra803521 55 55 !********************************************************************** 56 56 57 use grib_api57 use eccodes 58 58 use par_mod 59 59 use com_mod -
src/gridcheck_gfs.f90
r92fab65 ra803521 56 56 !********************************************************************** 57 57 58 use grib_api58 use eccodes 59 59 use par_mod 60 60 use com_mod -
src/gridcheck_nests.f90
r92fab65 ra803521 19 19 !***************************************************************************** 20 20 21 use grib_api21 use eccodes 22 22 use par_mod 23 23 use com_mod -
src/makefile
rc56da45 r71f2128 62 62 LIBPATH1 = ${ROOT_DIR}/lib 63 63 else 64 # Compiled libraries under user ~flexpart, gfortran v5.4 65 ROOT_DIR = /homevip/flexpart/ 66 64 # Using system installed libraries at njord.nilu.no 67 65 F90 = /usr/bin/gfortran 68 66 MPIF90 = /usr/bin/mpifort 69 70 INCPATH1 = ${ROOT_DIR}/gcc-5.4.0/include67 LIBPATH1 = /opt/eccodes/lib 68 INCPATH1 = /opt/eccodes/include 71 69 INCPATH2 = /usr/include 72 LIBPATH1 = ${ROOT_DIR}/gcc-5.4.0/lib 70 71 72 # INCPATH1 = /usr/include 73 # INCPATH2 = /usr/include 73 74 endif 74 75 … … 88 89 89 90 ## OPTIMIZATION LEVEL 90 O_LEV = 0# [0,1,2,3,g,s,fast]91 O_LEV = 2 # [0,1,2,3,g,s,fast] 91 92 O_LEV_DBG = g # [0,g] 92 93 93 94 ## LIBRARIES 94 #LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper -lnetcdff 95 LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper $(NCOPT) 95 LIBS = -leccodes -leccodes_f90 -lm $(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 \132 130 getfields.o \ 133 readwind_ecmwf.o 131 readwind_ecmwf.o \ 132 initial_cond_output.o \ 133 initial_cond_output_inversion.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 147 readwind_ecmwf_mpi.o \ 148 initial_cond_output_mpi.o \ 149 initial_cond_output_inversion_mpi.o 148 150 149 151 OBJECTS_NCF = netcdf_output_mod.o 150 152 151 153 OBJECTS = \ 154 initial_cond_calc.o \ 152 155 advance.o initialize.o \ 153 156 writeheader.o writeheader_txt.o \ … … 202 205 drydepokernel_nest.o zenithangle.o \ 203 206 ohreaction.o getvdep_nests.o \ 204 initial_cond_calc.o initial_cond_output.o initial_cond_output_inversion.o \205 207 dynamic_viscosity.o get_settling.o \ 206 208 initialize_cbl_vel.o re_initialize_particle.o \ 207 cbl.o 209 cbl.o \ 210 concoutput_inversion_nest.o \ 211 concoutput_inversion.o \ 212 208 213 209 214 ifeq ($(ncf), yes) … … 325 330 init_domainfill_mpi.o: com_mod.o mpi_mod.o par_mod.o point_mod.o random_mod.o 326 331 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.o 327 333 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.o 328 335 initial_cond_output_inversion.o: com_mod.o outg_mod.o par_mod.o point_mod.o \ 336 unc_mod.o 337 initial_cond_output_inversion_mpi.o: com_mod.o outg_mod.o par_mod.o point_mod.o \ 329 338 unc_mod.o 330 339 initialize.o: com_mod.o hanna_mod.o interpol_mod.o par_mod.o random_mod.o -
src/mpi_mod.f90
r92fab65 ra803521 2579 2579 601 end subroutine mpif_tm_reduce_grid_nest 2580 2580 2581 2582 subroutine mpif_tm_reduce_initcond 2583 !*********************************************************************** 2584 ! Collect init_cond to PID 0, adding from all processes. 2585 ! 2586 ! 2587 !*********************************************************************** 2588 use com_mod 2589 use unc_mod 2590 use par_mod 2591 2592 implicit none 2593 2594 integer :: grid_size 2595 2596 !********************************************************************** 2597 2598 grid_size=numxgrid*numygrid*numzgrid*maxspec* & 2599 & maxpointspec_act 2600 2601 ! Time for MPI communications 2602 if (mp_measure_time) call mpif_mtime('commtime',0) 2603 2604 2605 #ifdef USE_MPIINPLACE 2606 ! Using in-place reduction 2607 if (lroot) then 2608 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 600 2611 else 2612 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 600 2615 end if 2616 2617 #else 2618 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 600 2621 ! if (lroot) init_cond = init_cond0 2622 #endif 2623 2624 if (mp_measure_time) call mpif_mtime('commtime',1) 2625 2626 goto 601 2627 2628 600 write(*,*) "mpi_mod> mp_ierr \= 0", mp_ierr 2629 stop 2630 2631 601 end subroutine mpif_tm_reduce_initcond 2632 2581 2633 2582 2634 subroutine mpif_mtime(ident,imode) -
src/outgrid_init.f90
r92fab65 ra803521 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) then 300 if (lroot) then 301 allocate(init_cond0(0:numxgrid-1,0:numygrid-1,numzgrid,maxspec, & 302 maxpointspec_act),stat=stat) 303 else 304 allocate(init_cond0(1,1,1,1,1)) 305 end if 306 end if 299 307 endif 300 308 -
src/par_mod.f90
r92fab65 ra803521 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 208 integer,parameter :: maxspec= 1207 integer,parameter :: maxpart=10000000 208 integer,parameter :: maxspec=6 209 209 210 210 real,parameter :: minmass=0.0001 -
src/readwind_ecmwf.f90
r92fab65 ra803521 48 48 !********************************************************************** 49 49 50 use grib_api50 use eccodes 51 51 use par_mod 52 52 use com_mod -
src/readwind_gfs.f90
r92fab65 ra803521 47 47 !*********************************************************************** 48 48 49 use grib_api49 use eccodes 50 50 use par_mod 51 51 use com_mod -
src/readwind_nests.f90
r92fab65 ra803521 22 22 !***************************************************************************** 23 23 24 use grib_api24 use eccodes 25 25 use par_mod 26 26 use com_mod -
src/timemanager.f90
r92fab65 ra803521 90 90 implicit none 91 91 92 integer(selected_int_kind(16)) :: idummy,idummy2 92 93 integer :: metdata_format 93 94 integer :: j,ks,kp,l,n,itime=0,nstop,nstop1 94 95 ! integer :: ksp 95 96 integer :: loutnext,loutstart,loutend 96 integer :: ix,jy,ldeltat,itage,nage ,idummy97 integer :: ix,jy,ldeltat,itage,nage 97 98 integer :: i_nan=0,ii_nan,total_nan_intl=0 !added by mc to check instability in CBL scheme 98 99 real :: outnum,weight,prob_rec(maxspec),prob(maxspec),decfact,wetscav … … 379 380 call concoutput(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc) 380 381 endif 381 else 382 else ! surf only 382 383 if (verbosity.eq.1) then 383 print*,'call concoutput_surf '384 call system_clock(count_clock)385 write(*,*) 'system clock',count_clock - count_clock0384 print*,'call concoutput_surf ' 385 call system_clock(count_clock) 386 write(*,*) 'system clock',count_clock - count_clock0 386 387 endif 387 388 if (lnetcdfout.eq.1) then … … 398 399 endif 399 400 else 400 call concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc)401 call concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc) 401 402 endif 402 403 if (verbosity.eq.1) then … … 416 417 call concoutput_inversion_nest(itime,outnum) 417 418 else 418 call concoutput_surf_nest(itime,outnum)419 endif419 call concoutput_surf_nest(itime,outnum) 420 endif 420 421 endif 421 422 else … … 581 582 do ks=1,nspec 582 583 if ((xscav_frac1(j,ks).lt.0)) then 583 call get_wetscav(itime,lsynctime,loutnext,j,ks,grfraction,idummy,idummy ,wetscav)584 call get_wetscav(itime,lsynctime,loutnext,j,ks,grfraction,idummy,idummy2,wetscav) 584 585 if (wetscav.gt.0) then 585 586 xscav_frac1(j,ks)=wetscav* & -
src/timemanager_mpi.f90
r92fab65 ra803521 91 91 implicit none 92 92 93 integer(selected_int_kind(16)) :: idummy,idummy2 93 94 integer :: metdata_format 94 95 logical :: reqv_state=.false. ! .true. if waiting for a MPI_Irecv to complete … … 97 98 integer :: ip,irec 98 99 integer :: loutnext,loutstart,loutend 99 integer :: ix,jy,ldeltat,itage,nage ,idummy100 integer :: ix,jy,ldeltat,itage,nage 100 101 integer :: i_nan=0,ii_nan,total_nan_intl=0 !added by mc to check instability in CBL scheme 101 102 integer :: numpart_tot_mpi ! for summing particles on all processes … … 159 160 !******************************************************************** 160 161 161 if (mp_dbg_mode) write(*,*) 'myid, itime: ',mp_pid,itime162 ! if (mp_dbg_mode) write(*,*) 'myid, itime: ',mp_pid,itime 162 163 163 164 if (WETDEP .and. itime .ne. 0 .and. numpart .gt. 0) then … … 280 281 281 282 if (lmpreader.and.lmp_use_reader) then 282 if ( itime.lt.ideltas*ldirect) then283 if (abs(itime).lt.ideltas*ldirect) then 283 284 cycle 284 285 else … … 480 481 creceptor(:,:)=0. 481 482 end if 482 else 483 else ! surf only 483 484 if (lroot) then 484 485 if (lnetcdfout.eq.1) then … … 488 489 #endif 489 490 else 490 call concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc) 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 491 496 end if 492 497 else … … 516 521 517 522 else 518 call concoutput_surf_nest(itime,outnum) 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 519 536 end if 520 537 else … … 724 741 do ks=1,nspec 725 742 if ((xscav_frac1(j,ks).lt.0)) then 726 call get_wetscav(itime,lsynctime,loutnext,j,ks,grfraction,idummy,idummy ,wetscav)743 call get_wetscav(itime,lsynctime,loutnext,j,ks,grfraction,idummy,idummy2,wetscav) 727 744 if (wetscav.gt.0) then 728 745 xscav_frac1(j,ks)=wetscav* & … … 877 894 !***************************************************************************** 878 895 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 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 888 903 if (ipout.eq.2) then 889 904 ! MPI process 0 creates the file, the other processes append to it … … 897 912 end if 898 913 899 ! eso :TODO: MPI 900 if (linit_cond.ge.1.and.lroot) call initial_cond_output(itime) ! dump initial cond. field 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 901 922 902 923 -
src/unc_mod.f90
r92fab65 ra803521 35 35 36 36 real,allocatable, dimension (:,:,:,:,:) :: init_cond 37 real,allocatable, dimension (:,:,:,:,:) :: init_cond0 ! for MPI 37 38 38 39 end module unc_mod
Note: See TracChangeset
for help on using the changeset viewer.