Commit a7d020ca authored by cgz's avatar cgz
Browse files

Changed variable precision to include final footprint in average_fp.

parent 6b9570df
......@@ -170,7 +170,7 @@ subroutine average_fp(files, config, obs)
release_nr = release_nr+1
write(logid,*) 'average_fp: obs%jdate(i)+obs%avetime(i) = ',obs%jdate(i)+obs%avetime(i)
write(logid,*) 'average_fp: releases(release_nr,2) = ', releases(release_nr,2)
do while ( int(releases(release_nr,2)*1e5,kind=8).le.int((obs%jdate(i)+obs%avetime(i))*1e5,kind=8) .and. release_nr.lt.numpoint )
do while ( int(releases(release_nr,2)*1e4,kind=8).le.int((obs%jdate(i)+obs%avetime(i))*1e4,kind=8) .and. release_nr.lt.numpoint )
call caldate(releases(release_nr,1), jjjjmmdd, hhmiss)
month = jjjjmmdd/100
......
......@@ -55,7 +55,7 @@ module mod_flexpart
implicit none
character(len=max_path_len), intent(in) :: filename
character(*), intent(in) :: filename
integer, intent(in out) :: numpoint
integer, intent(in out) :: ibdate, ibtime
real(kind=8), dimension(maxpoint,2), intent(in out) :: releases
......@@ -132,10 +132,10 @@ module mod_flexpart
releases(1:numpoint,2) = juldate(ibdate,ibtime)+real(ireleaseend(:,1)/real(3600*24),kind=8)
releases(numpoint+1:maxpoint,:) = 0
! round dates
releases(1:numpoint,1) = dnint(releases(1:numpoint,1)*1.e5)
releases(1:numpoint,1) = releases(1:numpoint,1)/1.e5
releases(1:numpoint,2) = dnint(releases(1:numpoint,2)*1.e5)
releases(1:numpoint,2) = releases(1:numpoint,2)/1.e5
releases(1:numpoint,1) = dnint(releases(1:numpoint,1)*1.e6)
releases(1:numpoint,1) = releases(1:numpoint,1)/1.e6
releases(1:numpoint,2) = dnint(releases(1:numpoint,2)*1.e6)
releases(1:numpoint,2) = releases(1:numpoint,2)/1.e6
write(logid,*) 'numpoint:', numpoint
write(logid,*) 'RELEASES start, first 26 values:', releases(1:26,1)
write(logid,*) 'RELEASES end, first 26 values:', releases(1:26,2)
......
......@@ -120,8 +120,8 @@ subroutine read_obs(config, files)
! recs, yyyymmdd, hhmiss, jdate, conc, err, num
! endif
! round jdate
jdate = dnint(jdate*1.e5)/1.e5
avetime = dnint(avetime*1.e4)/1.e4
jdate = dnint(jdate*1.e6)/1.e6
avetime = dnint(avetime*1.e6)/1.e6
if ( ierr.ne.0 ) exit read_loop
if ( jdate.ge.(juldatef+1d0) ) exit read_loop
if ( jdate.lt.juldatei ) cycle read_loop
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment