Ignore:
Timestamp:
Dec 23, 2013, 6:23:38 PM (11 years ago)
Author:
igpis
Message:

move version 9.1.8 form branches to trunk. Contributions from HSO, saeck, pesei, NIK, RT, XKF, IP and others

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/readreleases.f90

    r4 r20  
    5757  ! weta, wetb          parameters to determine the wet scavenging coefficient *
    5858  ! zpoint1,zpoint2     height range, over which release takes place           *
     59  ! num_min_discrete    if less, release cannot be randomized and happens at   *
     60  !                     time mid-point of release interval                     *
    5961  !                                                                            *
    6062  !*****************************************************************************
     
    6870
    6971  integer :: numpartmax,i,j,id1,it1,id2,it2,specnum_rel,idum,stat
     72  integer,parameter :: num_min_discrete=100
    7073  real :: vsh(ni),fracth(ni),schmih(ni),releaserate,xdum,cun
    71   real(kind=dp) :: jul1,jul2,juldate
     74  real(kind=dp) :: jul1,jul2,julm,juldate
    7275  character(len=50) :: line
    7376  logical :: old
     
    376379  jul1=juldate(id1,it1)
    377380  jul2=juldate(id2,it2)
     381  julm=(jul1+jul2)/2.
    378382  if (jul1.gt.jul2) then
    379383    write(*,*) 'FLEXPART MODEL ERROR'
     
    391395        stop
    392396      endif
    393       ireleasestart(numpoint)=int((jul1-bdate)*86400.)
    394       ireleaseend(numpoint)=int((jul2-bdate)*86400.)
     397      if (npart(numpoint).gt.num_min_discrete) then
     398        ireleasestart(numpoint)=int((jul1-bdate)*86400.)
     399        ireleaseend(numpoint)=int((jul2-bdate)*86400.)
     400      else
     401        ireleasestart(numpoint)=int((julm-bdate)*86400.)
     402        ireleaseend(numpoint)=int((julm-bdate)*86400.)
     403      endif
    395404    else if (ldirect.eq.-1) then
    396405      if ((jul1.lt.edate).or.(jul2.gt.bdate)) then
     
    401410        stop
    402411      endif
    403       ireleasestart(numpoint)=int((jul1-bdate)*86400.)
    404       ireleaseend(numpoint)=int((jul2-bdate)*86400.)
     412      if (npart(numpoint).gt.num_min_discrete) then
     413        ireleasestart(numpoint)=int((jul1-bdate)*86400.)
     414        ireleaseend(numpoint)=int((jul2-bdate)*86400.)
     415      else
     416        ireleasestart(numpoint)=int((julm-bdate)*86400.)
     417        ireleaseend(numpoint)=int((julm-bdate)*86400.)
     418      endif
    405419    endif
    406420  endif
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG