Changes in / [1070b4c:8c0ae9b] in flexpart.git


Ignore:
Location:
src
Files:
2 deleted
19 edited

Legend:

Unmodified
Added
Removed
  • src/com_mod.f90

    ra756649 r07c3e71  
    2525  !****************************************************************
    2626
    27   character :: path(numpath+2*maxnests)*200
     27  character :: path(numpath+2*maxnests)*120
    2828  integer :: length(numpath+2*maxnests)
    2929  character(len=256) :: pathfile, flexversion, flexversion_major, arg1, arg2
  • src/concoutput_mpi.f90

    rf3054ea r92fab65  
    5959  real :: sp_fact
    6060  real :: outnum,densityoutrecept(maxreceptor),xl,yl
    61 ! RLT
    62   real :: densitydryrecept(maxreceptor)
    63   real :: factor_dryrecept(maxreceptor)
    6461
    6562!real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid),
     
    9693  character(LEN=8),save :: file_stat='REPLACE'
    9794  logical :: ldates_file
    98   logical :: lexist
    9995  integer :: ierr
    10096  character(LEN=100) :: dates_char
     
    198194        densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,mind)*dz1+ &
    199195             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 
    203196      end do
    204197    end do
     
    212205    !densityoutrecept(i)=rho(iix,jjy,1,2)
    213206    densityoutrecept(i)=rho(iix,jjy,1,mind)
    214 ! RLT
    215     densitydryrecept(i)=rho_dry(iix,jjy,1,mind)
    216207  end do
    217208
    218 ! RLT
    219 ! conversion factor for output relative to dry air
    220   factor_drygrid=densityoutgrid/densitydrygrid
    221   factor_dryrecept=densityoutrecept/densitydryrecept
    222209
    223210! Output is different for forward and backward simulations
     
    272259        write(unitoutgrid) itime
    273260      endif
     261
    274262      if ((iout.eq.2).or.(iout.eq.3)) then      ! mixing ratio
    275263        open(unitoutgridppt,file=path(2)(1:length(2))//'grid_pptv_'//adate// &
    276264             atime//'_'//anspec,form='unformatted')
     265
    277266        write(unitoutgridppt) itime
    278267      endif
     
    618607  end do
    619608
    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 
    663609  if (gridtotal.gt.0.) gridtotalunc=gridsigmatotal/gridtotal
    664610  if (wetgridtotal.gt.0.) wetgridtotalunc=wetgridsigmatotal/ &
     
    687633  endif
    688634
    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
    706636
    707637! Reinitialization of grid
  • src/concoutput_nest.f90

    rf3054ea r92fab65  
    588588  close(unitoutfactor)
    589589
     590
    590591  ! Reinitialization of grid
    591592  !*************************
  • src/concoutput_nest_mpi.f90

    rf3054ea r92fab65  
    3939  !                                                                            *
    4040  !*****************************************************************************
     41
    4142
    4243  use unc_mod
     
    5556  real :: sp_fact
    5657  real :: outnum,densityoutrecept(maxreceptor),xl,yl
    57 ! RLT
    58   real :: densitydryrecept(maxreceptor)
    59   real :: factor_dryrecept(maxreceptor)
    6058
    6159  !real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid),
     
    8482  character :: adate*8,atime*6
    8583  character(len=3) :: anspec
    86   logical :: lexist
    8784  integer :: mind
    8885! mind        eso:added to ensure identical results between 2&3-fields versions
     
    161158        densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,mind)*dz1+ &
    162159             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
    166160      end do
    167161    end do
     
    175169    !densityoutrecept(i)=rho(iix,jjy,1,2)
    176170    densityoutrecept(i)=rho(iix,jjy,1,mind)
    177 ! RLT
    178     densitydryrecept(i)=rho_dry(iix,jjy,1,mind)
    179171  end do
    180172
    181 ! RLT
    182 ! conversion factor for output relative to dry air
    183   factor_drygrid=densityoutgrid/densitydrygrid
    184   factor_dryrecept=densityoutrecept/densitydryrecept
    185173
    186174  ! Output is different for forward and backward simulations
     
    205193
    206194  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
    217195  if ((iout.eq.1).or.(iout.eq.3).or.(iout.eq.5)) then
    218196    if (ldirect.eq.1) then
     
    227205     write(unitoutgrid) itime
    228206   endif
    229   endif
    230207
    231208  if ((iout.eq.2).or.(iout.eq.3)) then      ! mixing ratio
     
    558535  end do
    559536
    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
    601538
    602539  ! Reinitialization of grid
    603540  !*************************
    604541
    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
    626561  if (mp_measure_time) call mpif_mtime('iotime',1)
    627562  ! if (mp_measure_time) then
  • src/concoutput_surf_nest_mpi.f90

    rf3054ea r92fab65  
    633633
    634634  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.
    646645            end do
    647646          end do
     
    649648      end do
    650649    end do
     650  end do
    651651  end do
    652652
  • src/gributils/class_gribfile_mod.f90

    ra756649 r61e07ba  
    7878        ! module
    7979
    80         use grib_api
     80        USE grib_api
    8181
    8282        IMPLICIT NONE
  • src/gridcheck_ecmwf.f90

    ra756649 r92fab65  
    5555  !**********************************************************************
    5656
    57   use eccodes
     57  use grib_api
    5858  use par_mod
    5959  use com_mod
  • src/gridcheck_gfs.f90

    ra756649 r92fab65  
    5656  !**********************************************************************
    5757
    58   use eccodes
     58  use grib_api
    5959  use par_mod
    6060  use com_mod
  • src/gridcheck_nests.f90

    ra756649 r92fab65  
    1919  !*****************************************************************************
    2020
    21   use eccodes
     21  use grib_api
    2222  use par_mod
    2323  use com_mod
  • src/makefile

    r71f2128 rc56da45  
    6262        LIBPATH1 = ${ROOT_DIR}/lib
    6363else
    64 # Using system installed libraries at njord.nilu.no
     64# Compiled libraries under user ~flexpart, gfortran v5.4
     65        ROOT_DIR = /homevip/flexpart/
     66
    6567        F90       = /usr/bin/gfortran
    6668        MPIF90    = /usr/bin/mpifort
    67         LIBPATH1 = /opt/eccodes/lib
    68         INCPATH1  = /opt/eccodes/include
     69
     70        INCPATH1  = ${ROOT_DIR}/gcc-5.4.0/include       
    6971        INCPATH2  = /usr/include
    70 
    71 
    72 # INCPATH1  = /usr/include     
    73 # INCPATH2  = /usr/include
     72        LIBPATH1 = ${ROOT_DIR}/gcc-5.4.0/lib
    7473endif
    7574
     
    8988
    9089## OPTIMIZATION LEVEL
    91 O_LEV = 2 # [0,1,2,3,g,s,fast]
     90O_LEV = 0 # [0,1,2,3,g,s,fast]
    9291O_LEV_DBG = g # [0,g]
    9392
    9493## LIBRARIES
    95 LIBS = -leccodes -leccodes_f90 -lm  $(NCOPT)
     94#LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper -lnetcdff
     95LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper $(NCOPT)
    9696
    9797FFLAGS   = -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
     
    128128        redist.o                \
    129129        concoutput_surf.o       concoutput_surf_nest.o  \
     130        concoutput_inversion_nest.o     \
     131        concoutput_inversion.o \
    130132        getfields.o \
    131         readwind_ecmwf.o \
    132         initial_cond_output.o \
    133         initial_cond_output_inversion.o
     133        readwind_ecmwf.o
    134134
    135135## For MPI version
     
    145145        concoutput_surf_mpi.o   concoutput_surf_nest_mpi.o      \
    146146        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
    150148
    151149OBJECTS_NCF = netcdf_output_mod.o
    152150
    153151OBJECTS = \
    154 initial_cond_calc.o \
    155152advance.o               initialize.o            \
    156153writeheader.o           writeheader_txt.o       \
     
    205202drydepokernel_nest.o    zenithangle.o \
    206203ohreaction.o            getvdep_nests.o \
     204initial_cond_calc.o     initial_cond_output.o initial_cond_output_inversion.o \
    207205dynamic_viscosity.o     get_settling.o  \
    208206initialize_cbl_vel.o    re_initialize_particle.o \
    209 cbl.o \
    210 concoutput_inversion_nest.o     \
    211 concoutput_inversion.o \
    212 
     207cbl.o
    213208
    214209ifeq ($(ncf), yes)
     
    330325init_domainfill_mpi.o: com_mod.o mpi_mod.o par_mod.o point_mod.o random_mod.o
    331326initial_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
    333327initial_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
    335328initial_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 \
    338329        unc_mod.o
    339330initialize.o: com_mod.o hanna_mod.o interpol_mod.o par_mod.o random_mod.o
  • src/mpi_mod.f90

    rf3054ea r92fab65  
    25792579601 end subroutine mpif_tm_reduce_grid_nest
    25802580
    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    
    26332581
    26342582  subroutine mpif_mtime(ident,imode)
  • src/outgrid_init.f90

    rf3054ea r92fab65  
    297297         maxpointspec_act),stat=stat)
    298298    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
    307299  endif
    308300
  • src/par_mod.f90

    ra756649 r92fab65  
    133133  ! ECMWF
    134134! 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 level
     135!  integer,parameter :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138,nxshift=0 ! 1.0 degree 138 level
    136136!   integer,parameter :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138,nxshift=359 ! 1.0 degree 138 level
    137137! integer,parameter :: nxmax=721,nymax=361,nuvzmax=138,nwzmax=138,nzmax=138,nxshift=359  ! 0.5 degree 138 level
     
    139139
    140140! GFS
    141    ! integer,parameter :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138
    142    ! integer :: nxshift=0 ! shift not fixed for the executable
     141   integer,parameter :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138
     142   integer :: nxshift=0 ! shift not fixed for the executable
    143143
    144144
     
    205205  !**************************************************
    206206
    207   integer,parameter :: maxpart=10000000
    208   integer,parameter :: maxspec=6
     207  integer,parameter :: maxpart=100000
     208  integer,parameter :: maxspec=1
    209209
    210210  real,parameter :: minmass=0.0001
  • src/readwind_ecmwf.f90

    ra756649 r92fab65  
    4848!**********************************************************************
    4949
    50   use eccodes
     50  use grib_api
    5151  use par_mod
    5252  use com_mod
  • src/readwind_gfs.f90

    ra756649 r92fab65  
    4747  !***********************************************************************
    4848
    49   use eccodes
     49  use grib_api
    5050  use par_mod
    5151  use com_mod
  • src/readwind_nests.f90

    ra756649 r92fab65  
    2222  !*****************************************************************************
    2323
    24   use eccodes
     24  use grib_api
    2525  use par_mod
    2626  use com_mod
  • src/timemanager.f90

    rf3054ea r92fab65  
    9090  implicit none
    9191
    92   integer(selected_int_kind(16)) :: idummy,idummy2
    9392  integer :: metdata_format
    9493  integer :: j,ks,kp,l,n,itime=0,nstop,nstop1
    9594! integer :: ksp
    9695  integer :: loutnext,loutstart,loutend
    97   integer :: ix,jy,ldeltat,itage,nage
     96  integer :: ix,jy,ldeltat,itage,nage,idummy
    9897  integer :: i_nan=0,ii_nan,total_nan_intl=0  !added by mc to check instability in CBL scheme
    9998  real :: outnum,weight,prob_rec(maxspec),prob(maxspec),decfact,wetscav
     
    380379              call concoutput(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc)
    381380            endif
    382           else ! surf only
     381          else
    383382            if (verbosity.eq.1) then
    384               print*,'call concoutput_surf '
    385               call system_clock(count_clock)
    386               write(*,*) 'system clock',count_clock - count_clock0   
     383             print*,'call concoutput_surf '
     384             call system_clock(count_clock)
     385             write(*,*) 'system clock',count_clock - count_clock0   
    387386            endif
    388387            if (lnetcdfout.eq.1) then
     
    399398                endif
    400399              else
    401                 call concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc)
     400              call concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc,drygridtotalunc)
    402401              endif
    403402              if (verbosity.eq.1) then
     
    417416                  call concoutput_inversion_nest(itime,outnum)
    418417                else
    419                   call concoutput_surf_nest(itime,outnum)
    420                 endif
     418                call concoutput_surf_nest(itime,outnum)
     419              endif
    421420              endif
    422421            else
     
    582581       do ks=1,nspec
    583582         if  ((xscav_frac1(j,ks).lt.0)) then
    584             call get_wetscav(itime,lsynctime,loutnext,j,ks,grfraction,idummy,idummy2,wetscav)
     583            call get_wetscav(itime,lsynctime,loutnext,j,ks,grfraction,idummy,idummy,wetscav)
    585584            if (wetscav.gt.0) then
    586585                xscav_frac1(j,ks)=wetscav* &
  • src/timemanager_mpi.f90

    rf3054ea r92fab65  
    9191  implicit none
    9292
    93   integer(selected_int_kind(16)) :: idummy,idummy2
    9493  integer :: metdata_format
    9594  logical :: reqv_state=.false. ! .true. if waiting for a MPI_Irecv to complete
     
    9897  integer :: ip,irec
    9998  integer :: loutnext,loutstart,loutend
    100   integer :: ix,jy,ldeltat,itage,nage
     99  integer :: ix,jy,ldeltat,itage,nage,idummy
    101100  integer :: i_nan=0,ii_nan,total_nan_intl=0  !added by mc to check instability in CBL scheme
    102101  integer :: numpart_tot_mpi ! for summing particles on all processes
     
    160159!********************************************************************
    161160
    162 !    if (mp_dbg_mode) write(*,*) 'myid, itime: ',mp_pid,itime
     161    if (mp_dbg_mode) write(*,*) 'myid, itime: ',mp_pid,itime
    163162   
    164163    if (WETDEP .and. itime .ne. 0 .and. numpart .gt. 0) then
     
    281280
    282281    if (lmpreader.and.lmp_use_reader) then
    283       if (abs(itime).lt.ideltas*ldirect) then
     282      if (itime.lt.ideltas*ldirect) then
    284283        cycle
    285284      else
     
    481480              creceptor(:,:)=0.
    482481            end if
    483           else ! surf only
     482          else
    484483            if (lroot) then
    485484              if (lnetcdfout.eq.1) then
     
    489488#endif
    490489              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)
    496491              end if
    497492            else
     
    521516
    522517              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)
    536519              end if
    537520            else
     
    741724       do ks=1,nspec
    742725         if  ((xscav_frac1(j,ks).lt.0)) then
    743             call get_wetscav(itime,lsynctime,loutnext,j,ks,grfraction,idummy,idummy2,wetscav)
     726            call get_wetscav(itime,lsynctime,loutnext,j,ks,grfraction,idummy,idummy,wetscav)
    744727            if (wetscav.gt.0) then
    745728                xscav_frac1(j,ks)=wetscav* &
     
    894877!*****************************************************************************
    895878
    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
    903888  if (ipout.eq.2) then
    904889! MPI process 0 creates the file, the other processes append to it
     
    912897  end if
    913898
    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
    922901
    923902
  • src/unc_mod.f90

    rf3054ea r92fab65  
    3535
    3636  real,allocatable, dimension (:,:,:,:,:) :: init_cond
    37   real,allocatable, dimension (:,:,:,:,:) :: init_cond0 ! for MPI
    3837
    3938end module unc_mod
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG