Commit b7ae015d authored by Ignacio Pisso's avatar Ignacio Pisso
Browse files

clean up runtime messages and adjust verbosity level

parent 52aabab9
...@@ -61,7 +61,8 @@ program flexpart ...@@ -61,7 +61,8 @@ program flexpart
! FLEXPART version string ! FLEXPART version string
! flexversion='Version 9.2 beta (2014-07-01)' ! flexversion='Version 9.2 beta (2014-07-01)'
flexversion='Version 9.2.0.1 (2015-01-27)' !flexversion='Version 9.2.0.1 (2015-01-27)'
flexversion='Version 9.2.0.2 (2015-03-01)'
! default inlide options ! default inlide options
inline_options='none' inline_options='none'
!verbosity flags defined in com_mod.f90 !verbosity flags defined in com_mod.f90
...@@ -112,7 +113,6 @@ program flexpart ...@@ -112,7 +113,6 @@ program flexpart
verbosity=2 verbosity=2
endif endif
print*, 'verbosity level=', verbosity !inline_options(index_v+1:index_v+1) print*, 'verbosity level=', verbosity !inline_options(index_v+1:index_v+1)
endif endif
!iif (trim(inline_options).eq.'-v2') then !iif (trim(inline_options).eq.'-v2') then
! print*, 'Verbose mode 2: display more detailed information during run' ! print*, 'Verbose mode 2: display more detailed information during run'
...@@ -120,33 +120,24 @@ program flexpart ...@@ -120,33 +120,24 @@ program flexpart
!endif !endif
if (index(inline_options,'i').gt.0) then if (index(inline_options,'i').gt.0) then
!if (trim(inline_options).eq.'-i') then
index_v=index(inline_options,'i') index_v=index(inline_options,'i')
print*, 'Info mode: provide run specific information and stop' print*, 'Info mode: provide compile and run specific information, then stop'
verbosity=1 verbosity=1
info_flag=1 info_flag=1
!if (trim(inline_options).eq.'-i2') then
if (inline_options(index_v+1:index_v+1).eq.'2') then if (inline_options(index_v+1:index_v+1).eq.'2') then
print*, 'Including input files'
! verbosity=1
info_flag=2 info_flag=2
endif endif
endif endif
!if (trim(inline_options).eq.'-i2') then
! print*, 'Info mode: provide more detailed run specific information and stop'
! verbosity=1
! info_flag=2
!endif
if (index(inline_options,'t').gt.0) then if (index(inline_options,'t').gt.0) then
time_flag=1 time_flag=1
print*, 'timing execution: not implemented' print*, 'timing execution activated'
!stop !stop
endif endif
if (index(inline_options,'d').gt.0) then if (index(inline_options,'d').gt.0) then
debug_flag=1 debug_flag=1
print*, 'debug: not implemented' print*, 'debug messages activated'
print*, 'debug_flag=', debug_flag print*, 'debug_flag=', debug_flag
!stop !these messages give additional info on top on verbose mode
endif endif
endif endif
...@@ -185,7 +176,7 @@ program flexpart ...@@ -185,7 +176,7 @@ program flexpart
!******************************************************* !*******************************************************
if (verbosity.gt.0) then if (verbosity.gt.0) then
write(*,*) 'call readcommand' write(*,*) 'FLEXPART> call readcommand'
endif endif
call readcommand call readcommand
if (verbosity.gt.0) then if (verbosity.gt.0) then
...@@ -201,7 +192,7 @@ program flexpart ...@@ -201,7 +192,7 @@ program flexpart
! Read the age classes to be used ! Read the age classes to be used
!******************************** !********************************
if (verbosity.gt.0) then if (verbosity.gt.0) then
write(*,*) 'call readageclasses' write(*,*) 'FLEXPART> call readageclasses'
endif endif
call readageclasses call readageclasses
...@@ -214,7 +205,7 @@ program flexpart ...@@ -214,7 +205,7 @@ program flexpart
!****************************************************************** !******************************************************************
if (verbosity.gt.0) then if (verbosity.gt.0) then
write(*,*) 'call readavailable' write(*,*) 'FLEXPART> call readavailable'
endif endif
call readavailable call readavailable
...@@ -233,7 +224,7 @@ program flexpart ...@@ -233,7 +224,7 @@ program flexpart
endif endif
if (verbosity.gt.0) then if (verbosity.gt.0) then
write(*,*) 'call gridcheck_nests' write(*,*) 'FLEXPART> call gridcheck_nests'
endif endif
call gridcheck_nests call gridcheck_nests
...@@ -295,7 +286,7 @@ program flexpart ...@@ -295,7 +286,7 @@ program flexpart
!**************************************************************** !****************************************************************
if (verbosity.gt.0) then if (verbosity.gt.0) then
print*,'call readdepo' print*,'FLEXPART> call readdepo'
endif endif
call readdepo call readdepo
...@@ -304,14 +295,14 @@ program flexpart ...@@ -304,14 +295,14 @@ program flexpart
call coordtrafo call coordtrafo
if (verbosity.gt.0) then if (verbosity.gt.0) then
print*,'call coordtrafo' print*,'FLEXPART> call coordtrafo'
endif endif
! Initialize all particles to non-existent ! Initialize all particles to non-existent
!***************************************** !*****************************************
if (verbosity.gt.0) then if (verbosity.gt.0) then
print*,'Initialize all particles to non-existent' print*,'FLEXPART> Initialize all particles to non-existent'
endif endif
do j=1,maxpart do j=1,maxpart
itra1(j)=-999999999 itra1(j)=-999999999
...@@ -322,12 +313,12 @@ program flexpart ...@@ -322,12 +313,12 @@ program flexpart
if (ipin.eq.1) then if (ipin.eq.1) then
if (verbosity.gt.0) then if (verbosity.gt.0) then
print*,'call readpartpositions' print*,'FLEXPART> call readpartpositions'
endif endif
call readpartpositions call readpartpositions
else else
if (verbosity.gt.0) then if (verbosity.gt.0) then
print*,'set numpart=0, numparticlecount=0' print*,'FLEXPART> set numpart=0, numparticlecount=0'
endif endif
numpart=0 numpart=0
numparticlecount=0 numparticlecount=0
...@@ -338,7 +329,7 @@ program flexpart ...@@ -338,7 +329,7 @@ program flexpart
!*************************************************************** !***************************************************************
if (verbosity.gt.0) then if (verbosity.gt.0) then
print*,'call outgrid_init' print*,'FLEXPART> call outgrid_init'
endif endif
call outgrid_init call outgrid_init
if (nested_output.eq.1) call outgrid_init_nest if (nested_output.eq.1) call outgrid_init_nest
...@@ -348,7 +339,7 @@ program flexpart ...@@ -348,7 +339,7 @@ program flexpart
if (OHREA.eqv..TRUE.) then if (OHREA.eqv..TRUE.) then
if (verbosity.gt.0) then if (verbosity.gt.0) then
print*,'call readOHfield' print*,'FLEXPART> call readOHfield'
endif endif
call readOHfield call readOHfield
endif endif
...@@ -358,7 +349,7 @@ program flexpart ...@@ -358,7 +349,7 @@ program flexpart
!****************************************************************** !******************************************************************
if (verbosity.gt.0) then if (verbosity.gt.0) then
print*,'call writeheader' print*,'FLEXPART> call variuos writeheader routines'
endif endif
call writeheader call writeheader
...@@ -372,7 +363,7 @@ program flexpart ...@@ -372,7 +363,7 @@ program flexpart
!open(unitdates,file=path(2)(1:length(2))//'dates') !open(unitdates,file=path(2)(1:length(2))//'dates')
if (verbosity.gt.0) then if (verbosity.gt.0) then
print*,'call openreceptors' print*,'FLEXPART> call openreceptors'
endif endif
call openreceptors call openreceptors
if ((iout.eq.4).or.(iout.eq.5)) call openouttraj if ((iout.eq.4).or.(iout.eq.5)) call openouttraj
...@@ -381,7 +372,7 @@ program flexpart ...@@ -381,7 +372,7 @@ program flexpart
!*************************************************************************** !***************************************************************************
if (verbosity.gt.0) then if (verbosity.gt.0) then
print*,'discretize release times' print*,'FLEXPART> discretize release times'
endif endif
do i=1,numpoint do i=1,numpoint
ireleasestart(i)=nint(real(ireleasestart(i))/real(lsynctime))*lsynctime ireleasestart(i)=nint(real(ireleasestart(i))/real(lsynctime))*lsynctime
...@@ -392,7 +383,7 @@ program flexpart ...@@ -392,7 +383,7 @@ program flexpart
!************************************************************ !************************************************************
if (verbosity.gt.0) then if (verbosity.gt.0) then
print*,'Initialize cloud-base mass fluxes for the convection scheme' print*,'FLEXPART> Initialize cloud-base mass fluxes for the convection scheme'
endif endif
do jy=0,nymin1 do jy=0,nymin1
...@@ -416,11 +407,11 @@ program flexpart ...@@ -416,11 +407,11 @@ program flexpart
write(*,*) 'SYSTEM_CLOCK',(count_clock - count_clock0)/real(count_rate) !, count_rate, count_max write(*,*) 'SYSTEM_CLOCK',(count_clock - count_clock0)/real(count_rate) !, count_rate, count_max
endif endif
if (info_flag.eq.2) then if (info_flag.eq.2) then
print*, 'info only mode (stop before call timemanager)' print*, 'FLEXPART> info only mode (stop before call timemanager)'
stop stop
endif endif
if (verbosity.gt.0) then if (verbosity.gt.0) then
print*,'call timemanager' print*,'FLEXPART> call timemanager'
endif endif
call timemanager call timemanager
......
...@@ -285,6 +285,14 @@ subroutine gridcheck ...@@ -285,6 +285,14 @@ subroutine gridcheck
xaux2=xaux2in xaux2=xaux2in
yaux1=yaux1in yaux1=yaux1in
yaux2=yaux2in yaux2=yaux2in
if (verbosity.gt.1) then
print*, 'longitudeOfFirstGridPointInDegrees', xaux1in
print*, 'longitudeOfLastGridPointInDegrees ', xaux2in
print*, 'latitudeOfLastGridPointInDegrees ', yaux1in
print*, 'latitudeOfFirstGridPointInDegrees ', yaux2in
endif
if (xaux1.gt.180.) xaux1=xaux1-360.0 if (xaux1.gt.180.) xaux1=xaux1-360.0
if (xaux2.gt.180.) xaux2=xaux2-360.0 if (xaux2.gt.180.) xaux2=xaux2-360.0
if (xaux1.lt.-180.) xaux1=xaux1+360.0 if (xaux1.lt.-180.) xaux1=xaux1+360.0
...@@ -444,11 +452,11 @@ subroutine gridcheck ...@@ -444,11 +452,11 @@ subroutine gridcheck
write(*,'(a,2i7)') ' Vertical levels in ECMWF data: ', & write(*,'(a,2i7)') ' Vertical levels in ECMWF data: ', &
nuvz+1,nwz nuvz+1,nwz
write(*,*) !write(*,*)
write(*,'(a)') 'gridcheck> Mother domain:' write(*,'(a)') ' Mother domain:'
write(*,'(a,f10.5,a,f10.5,a,f10.5)') 'gridcheck> Longitude range: ', & write(*,'(a,f10.5,a,f10.5,a,f10.5)') ' Longitude range: ', &
xlon0,' to ',xlon0+(nx-1)*dx,' Grid distance: ',dx xlon0,' to ',xlon0+(nx-1)*dx,' Grid distance: ',dx
write(*,'(a,f10.5,a,f10.5,a,f10.5)') 'gridcheck> Latitude range : ', & write(*,'(a,f10.5,a,f10.5,a,f10.5)') ' Latitude range : ', &
ylat0,' to ',ylat0+(ny-1)*dy,' Grid distance: ',dy ylat0,' to ',ylat0+(ny-1)*dy,' Grid distance: ',dy
write(*,*) write(*,*)
......
...@@ -5,7 +5,8 @@ FC = gfortran ...@@ -5,7 +5,8 @@ FC = gfortran
INCPATH = /xnilu_wrk/flex_wrk/bin64/grib_api/include INCPATH = /xnilu_wrk/flex_wrk/bin64/grib_api/include
LIBPATH1 = /xnilu_wrk/flex_wrk/bin64/grib_api/lib LIBPATH1 = /xnilu_wrk/flex_wrk/bin64/grib_api/lib
LIBPATH2 = /usr/lib/x86_64-linux-gnu/ LIBPATH2 = /usr/lib/x86_64-linux-gnu/
FFLAGS = -O2 -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -I$(INCPATH) #FFLAGS = -O2 -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -I$(INCPATH)
FFLAGS = -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -I$(INCPATH)
#FFLAGS = -fbounds-check -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -I$(INCPATH) #FFLAGS = -fbounds-check -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -I$(INCPATH)
LDFLAGS = $(FFLAGS) -L$(LIBPATH2) -L$(LIBPATH1) -lgrib_api_f90 -lgrib_api -lm -ljasper LDFLAGS = $(FFLAGS) -L$(LIBPATH2) -L$(LIBPATH1) -lgrib_api_f90 -lgrib_api -lm -ljasper
......
...@@ -64,27 +64,30 @@ subroutine readpaths !(pathfile) ...@@ -64,27 +64,30 @@ subroutine readpaths !(pathfile)
if (verbosity.gt.0) then if (verbosity.gt.0) then
print*, 'path read', i, '=', path(i) print*, 'path read', i, '=', trim(path(i))
end if end if
end do end do
do i=1,numpath do i=1,numpath
string_test = path(i) string_test = path(i)
character_test = string_test(length(i):length(i)) character_test = string_test(length(i):length(i))
!print*, 'character_test, string_test ', character_test, string_test ! print*, 'character_test, string_test ', character_test, string_test
if ((character_test .NE. '/') .AND. (i .LT. 4)) then ! include nested fields
if ((character_test .NE. '/') .AND. ((i .LT. 4) .OR. (i .EQ. 5) )) then
if (verbosity.gt.0) then
print*, 'readpaths> WARNING: path not ending in /' print*, 'readpaths> WARNING: path not ending in /'
print*, path(i) print*, path(i)
endif
path(i) = string_test(1:length(i)) // '/' path(i) = string_test(1:length(i)) // '/'
length(i)=length(i)+1 length(i)=length(i)+1
if (verbosity.gt.0) then
print*, 'fix: padded with /' print*, 'fix: padded with /'
print*, path(i) print*, path(i)
print*, 'length(i) increased 1', length(i) print*, 'length(i) increased 1', length(i)
endif
endif endif
end do end do
...@@ -106,11 +109,11 @@ subroutine readpaths !(pathfile) ...@@ -106,11 +109,11 @@ subroutine readpaths !(pathfile)
30 numbnests=i-1 30 numbnests=i-1
if (verbosity.gt.0) then !if (verbosity.gt.0) then
do i=1,numpath ! do i=1,numpath
print*, 'path tested', i, '=', path(i) ! print*, 'path tested', i, '=', path(i)
end do ! end do
end if !end if
close(unitpath) close(unitpath)
return return
......
...@@ -258,7 +258,9 @@ subroutine readreleases ...@@ -258,7 +258,9 @@ subroutine readreleases
allocate(xmasssave(numpoint),stat=stat) allocate(xmasssave(numpoint),stat=stat)
if (stat.ne.0) write(*,*)'ERROR: could not allocate xmasssave' if (stat.ne.0) write(*,*)'ERROR: could not allocate xmasssave'
write (*,*) 'readreleases> Releasepoints : ', numpoint if (verbosity.gt.0) then
write (*,*) 'readreleases> Releasepoints : ', numpoint
endif
do i=1,numpoint do i=1,numpoint
xmasssave(i)=0. xmasssave(i)=0.
...@@ -366,18 +368,26 @@ subroutine readreleases ...@@ -366,18 +368,26 @@ subroutine readreleases
if (weta(i).gt.0.) then if (weta(i).gt.0.) then
WETDEP=.true. WETDEP=.true.
write (*,*) 'Below-cloud scavenging: ON' write (*,*) 'Below-cloud scavenging: ON'
if (verbosity.gt.0) then
write (*,*) 'Below-cloud scavenging coefficients: ',weta(i),i write (*,*) 'Below-cloud scavenging coefficients: ',weta(i),i
endif
else else
if (verbosity.gt.0) then
write (*,*) 'Below-cloud scavenging: OFF' write (*,*) 'Below-cloud scavenging: OFF'
endif
endif endif
! NIK 31.01.2013 + 10.12.2013 ! NIK 31.01.2013 + 10.12.2013
if (weta_in(i).gt.0.) then if (weta_in(i).gt.0.) then
WETDEP=.true. WETDEP=.true.
write (*,*) 'In-cloud scavenging: ON' write (*,*) 'In-cloud scavenging: ON'
if (verbosity.gt.0) then
write (*,*) 'In-cloud scavenging coefficients: ',weta_in(i),wetb_in(i), wetc_in(i), wetd_in(i),i write (*,*) 'In-cloud scavenging coefficients: ',weta_in(i),wetb_in(i), wetc_in(i), wetd_in(i),i
else endif
write (*,*) 'In-cloud scavenging: OFF' else
if (verbosity.gt.0) then
write (*,*) 'In-cloud scavenging: OFF'
endif
endif endif
if (ohreact(i).gt.0) then if (ohreact(i).gt.0) then
......
...@@ -139,6 +139,9 @@ subroutine timemanager ...@@ -139,6 +139,9 @@ subroutine timemanager
endif endif
do itime=0,ideltas,lsynctime do itime=0,ideltas,lsynctime
if (verbosity.gt.0) then
write (*,*) 'timemanager> itime=', itime
endif
! Computation of wet deposition, OH reaction and mass transfer ! Computation of wet deposition, OH reaction and mass transfer
...@@ -196,9 +199,9 @@ subroutine timemanager ...@@ -196,9 +199,9 @@ subroutine timemanager
! Release particles ! Release particles
!****************** !******************
if (verbosity.gt.0) then !if (verbosity.gt.0) then
write (*,*) 'timemanager> Release particles' ! write (*,*) 'timemanager> Release particles'
endif !endif
if (mdomainfill.ge.1) then if (mdomainfill.ge.1) then
if (itime.eq.0) then if (itime.eq.0) then
...@@ -214,7 +217,7 @@ subroutine timemanager ...@@ -214,7 +217,7 @@ subroutine timemanager
endif endif
else else
if (verbosity.gt.0) then if (verbosity.gt.0) then
print*,'call releaseparticles' print*,'timemanager> call releaseparticles'
endif endif
call releaseparticles(itime) call releaseparticles(itime)
if (verbosity.gt.1) then if (verbosity.gt.1) then
......
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