Commit f619fc7d authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

gfortran initializes integers not to 0 by default

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.
-> check whether data was actually read before plotting


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 3058
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 40aaca0a
c this is <ttplot.f> c this is <ttplot.f>
c------------------------------------------------------------------------------ c------------------------------------------------------------------------------
c $Id: ttplot.f,v 1.5 2010-06-08 15:31:32 tforb Exp $ c $Id: ttplot.f,v 1.6 2010-06-08 15:45:10 tforb Exp $
c c
c 16/09/99 by Thomas Forbriger (IfG Stuttgart) c 16/09/99 by Thomas Forbriger (IfG Stuttgart)
c c
...@@ -9,13 +9,16 @@ c ...@@ -9,13 +9,16 @@ c
c REVISIONS and CHANGES c REVISIONS and CHANGES
c 16/09/99 V1.0 Thomas Forbriger c 16/09/99 V1.0 Thomas Forbriger
c 21/03/02 V1.1 get it running again c 21/03/02 V1.1 get it running again
c 08/06/10 V1.2 did not check whether data was actually read before
c plotting data values for a non-sense number of offsets
c now check, whether data values were actually read
c c
c============================================================================== c==============================================================================
c c
program ttplot program ttplot
c c
character*79 version character*79 version
parameter(version='TTPLOT V1.1 plot model and travel times for dipping layers') parameter(version='TTPLOT V1.2 plot model and travel times for dipping layers')
c c
real topdip, backoff, pgcheight,tterror real topdip, backoff, pgcheight,tterror
character*80 pgpdev,file1,file2,modelfile character*80 pgpdev,file1,file2,modelfile
...@@ -105,7 +108,7 @@ c ...@@ -105,7 +108,7 @@ c
print *,' ' print *,' '
call pgp_showdevices call pgp_showdevices
print *,' ' print *,' '
print *,'$Id: ttplot.f,v 1.5 2010-06-08 15:31:32 tforb Exp $' print *,'$Id: ttplot.f,v 1.6 2010-06-08 15:45:10 tforb Exp $'
stop stop
endif endif
if (iargc().lt.2) stop 'ERROR: missing arguments' if (iargc().lt.2) stop 'ERROR: missing arguments'
...@@ -138,8 +141,11 @@ c------------------------------------------------------------------------------ ...@@ -138,8 +141,11 @@ c------------------------------------------------------------------------------
c go c go
call getarg(1, modelfile) call getarg(1, modelfile)
call tt_readgrmod(modelfile, backoff, topdip, verbose) call tt_readgrmod(modelfile, backoff, topdip, verbose)
if (debug) print *,'DEBUG: read model from file'
if (readdata1) call readtt(file1,maxdata,ndata1,xdata1,tdata1,verbose) if (readdata1) call readtt(file1,maxdata,ndata1,xdata1,tdata1,verbose)
if (readdata2) call readtt(file2,maxdata,ndata2,xdata2,tdata2,verbose) if (readdata2) call readtt(file2,maxdata,ndata2,xdata2,tdata2,verbose)
c
if (debug) print *,'DEBUG: model and data read from files'
c c
pgpdevid=pgp_open(pgpdev) pgpdevid=pgp_open(pgpdev)
if (pgpdevid.eq.0) stop 'ERROR: could not open graphics device' if (pgpdevid.eq.0) stop 'ERROR: could not open graphics device'
...@@ -169,6 +175,7 @@ c check how large the model plot will be ...@@ -169,6 +175,7 @@ c check how large the model plot will be
xmin=-0.1*backoffset+min(0.,layd*sin(topdip*pi/180.)) xmin=-0.1*backoffset+min(0.,layd*sin(topdip*pi/180.))
xmax=1.1*backoffset xmax=1.1*backoffset
c c
if (debug) print *,'DEBUG: prepare plot window and viewport'
c prepare plot window and viewport c prepare plot window and viewport
if (asprat) then if (asprat) then
if (plotorig) then if (plotorig) then
...@@ -191,6 +198,7 @@ c prepare plot window and viewport ...@@ -191,6 +198,7 @@ c prepare plot window and viewport
call pglab('offset (m)','depth (m)',modelfile) call pglab('offset (m)','depth (m)',modelfile)
c c
c plot original GR-model interfaces c plot original GR-model interfaces
if (debug) print *,'DEBUG: plot original GR-model interfaces'
if (plotorig) then if (plotorig) then
do i=1,nlay do i=1,nlay
call tt_ingrmod(i,layphi,layd,layv) call tt_ingrmod(i,layphi,layd,layv)
...@@ -394,14 +402,18 @@ c plot data ...@@ -394,14 +402,18 @@ c plot data
call pgsave call pgsave
call pgslw(1) call pgslw(1)
call pgsci(2) call pgsci(2)
if (readdata1) then
do i=1,ndata1 do i=1,ndata1
call pgpt1(xdata1(i),tdata1(i),14) call pgpt1(xdata1(i),tdata1(i),14)
call pgerr1(6,xdata1(i),tdata1(i),tterror,1.) call pgerr1(6,xdata1(i),tdata1(i),tterror,1.)
enddo enddo
endif
if (readdata2) then
do i=1,ndata2 do i=1,ndata2
call pgpt1(backoff-xdata2(i),tdata2(i),14) call pgpt1(backoff-xdata2(i),tdata2(i),14)
call pgerr1(6,backoff-xdata2(i),tdata2(i),tterror,1.) call pgerr1(6,backoff-xdata2(i),tdata2(i),tterror,1.)
enddo enddo
endif
call pgunsa call pgunsa
c c
call pgclos call pgclos
......
Markdown is supported
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