Commit 2bc92c63 authored by thomas.forbriger's avatar thomas.forbriger

ref/tools [FIX]: minor fixes in flamop and flamops

- use correct way of specifying units
- avoid Hollerith constants
parent ed484aaa
......@@ -23,10 +23,12 @@ c
c V1.0 14/01/97 based von gemmodpg.f
c V1.1 11/02/97 reading new model format
c V1.2 22/02/97 writing ascii file
c V1.3 08/04/19 fix minor issues; use appropriate labels; get rid of
c Hollerith constants
c
c----------------------------------------------------------------------
character*70 version
parameter(version='FLAMOP V1.2 plot flat earth model')
parameter(version='FLAMOP V1.3 plot flat earth model')
c model
integer maxlayer, nlayer,ilay
parameter(maxlayer=1000)
......@@ -49,9 +51,9 @@ c commandline
character*40 optarg(maxopt)
logical optset(maxopt), opthasarg(maxopt)
c here are the keys to our commandline options
data optid/2h-d,2h-D,2h-z,2h-o/
data optid/'-d','-D','-z','-o'/
data opthasarg/.TRUE.,.FALSE.,2*.TRUE./
data optarg/3hx11,1h-,7h0.,1.e5,10hflamop.out/
data optarg/'x11','-','0.,1.e5','flamop.out'/
c----------------------------------------------------------------------
print *,version
print *,'Usage: flamop [-d device] [-z zmin,zmax] [-o file] file'
......@@ -110,18 +112,18 @@ c start plot
call pgp_setdevice(device, 3, 2)
c call pgsch(2.3)
c plot velocities
title='P-velocity [km/s]'
title='P-velocity / km s\u-1'
call plotcurve(maxlayer, nlayer, zmin, zmax, zb, alpha, title, debug)
call pgmtxt('T',1.,0.,0.,text)
title='S-velocity [km/s]'
title='S-velocity / km s\u-1'
call plotcurve(maxlayer, nlayer, zmin, zmax, zb, beta, title, debug)
title='density [g/cm^3]'
title='density / g cm\u-3'
call plotcurve(maxlayer, nlayer, zmin, zmax, zb, rho, title, debug)
title='Qalpha'
call plotcurve(maxlayer, nlayer, zmin, zmax, zb, qa, title, debug)
title='Qbeta'
call plotcurve(maxlayer, nlayer, zmin, zmax, zb, qb, title, debug)
title='dZ [km]'
title='dZ / km'
call plotcurve(maxlayer, nlayer, zmin, zmax, zb, dz, title, debug)
call pgend
50 format(f10.3,6(1x,f10.3))
......@@ -196,7 +198,7 @@ c
if (debug) print *,'DEBUG: go plot xmin/xmax',xmin,xmax
call pgslw(1)
call pgenv(xmin, xmax, ymax, ymin, 0, 2)
call pglab(title, 'depth [km]', ' ')
call pglab(title, 'depth / km', ' ')
call pgslw(4)
call pgline(nsteps, x, y)
call pgslw(1)
......
......@@ -23,11 +23,13 @@ c
c V1.0 14/01/97 based von flamop.f
c V1.1 11/02/97 reding new model format
c V1.2 12/09/03 now uses tf_cmdline (not tflib_cmdline)
c V1.3 08/04/19 fix minor issues; use appropriate labels; get rid of
c Hollerith constants
c
c----------------------------------------------------------------------
character*70 version
parameter(version=
& 'FLAMOPS V1.2 plot flat earth model in spherical geometry')
& 'FLAMOPS V1.3 plot flat earth model in spherical geometry')
c model
integer maxlayer, nlayer,ilay
parameter(maxlayer=1000)
......@@ -48,9 +50,9 @@ c commandline
character*40 optarg(maxopt)
logical optset(maxopt), opthasarg(maxopt)
c here are the keys to our commandline options
data optid/2h-d,2h-D,2h-r/
data optid/'-d','-D','-r'/
data opthasarg/.TRUE.,.FALSE.,.TRUE./
data optarg/3hx11,1h-,7h0.,1.e4/
data optarg/'x11','-','0.,1.e4'/
c----------------------------------------------------------------------
print *,version
print *,'Usage: flamops [ -d device ] [ -z zmin,zmax ] file'
......@@ -108,19 +110,19 @@ c start plot
call pgp_setdevice(device, 3, 2)
c call pgsch(2.3)
c plot velocities
title='P-velocity [km/s]'
title='P-velocity / km s\u-1'
call plotcurve(maxlayer, nlayer, r, zmin, zmax, zb, alpha, title,
& debug, 1)
call pgmtxt('T',1.,0.,0.,text)
title='S-velocity [km/s]'
title='S-velocity / km s\u-1'
call plotcurve(maxlayer, nlayer, r, zmin, zmax, zb, beta, title, debug, 1)
title='density [g/cm^3]'
title='density / g cm\u-3'
call plotcurve(maxlayer, nlayer, r, zmin, zmax, zb, rho, title, debug, 2)
title='Qalpha'
call plotcurve(maxlayer, nlayer, r, zmin, zmax, zb, qa, title, debug, 3)
title='Qbeta'
call plotcurve(maxlayer, nlayer, r, zmin, zmax, zb, qb, title, debug, 4)
title='dR [km]'
title='dR / km'
call plotcurve(maxlayer, nlayer, r, zmin, zmax, zb, dr, title, debug, 4)
call pgend
stop
......@@ -193,7 +195,7 @@ c no transform
if (debug) print *,'DEBUG: go plot xmin/xmax',xmin,xmax
call pgslw(1)
call pgenv(xmin, xmax, ymin, ymax, 0, 2)
call pglab(title, 'radius [km]', ' ')
call pglab(title, 'radius / km', ' ')
call pgslw(4)
call pgline(nsteps, x, y)
call pgslw(1)
......
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