#Create a directory somewhere under your $HOME, e.g. ttimm-v1.14
#copy the tar.bz2 there and

cd ttimm-v1.14
bunzip2 ttimm-v1.14-absoft.tar.bz2
tar xfv ttimm-v1.14-absoft.tar

# Let's guess you have a program directory $HOME/bin
cp bin/* $HOME/bin
rehash

# This is for the ABSOFT Fortran 77 (11.5.0) compiler:
export F77OPT="-v -O1 -N90 -f -s"
export F77MOPT="-O1 -N90 -f -s"
export F77COMP=af77

cd p
# create libttimm.a
for file in *.f; do
fcs $file ttimm
done

# create executable $HOME/bin/ttimm
cd m
./fcmd ttimm
./fcmd -m ttimm
# -m produces a link-loader map file to inspect if there are problems
# with locating subroutines
rehash

# test:
cd ../../
# There are a couple of instruction files ttimm*.ins
# edit e.g. ttimm4kl.ins, esp. adjust the path to the tide potential and the
# leap-seconds file:
# utc_file='filename', tpath='filename'
#
ttimm ttimm.ins '>TEST>'
#
# compare your petersonbay.ren with the file on the homepage.

#
# read ttimm.f for further options and use.



# Anticipated problems:
# call getarg
# call getenv
# call fortran utility subroutines. These may have to be changed to
# e.g. call get_command_argument and get_environment_variable
# respectively.

./p/openins.f:      call getarg (1,ans)
./p/openins.f:10    call getarg (1,ans)
./p/openins.f:         call getarg (1,ans)
./p/openins.f:         call getarg (2,ans(i:))

./p/m/ttimm.f:      call getenv ('term',buff)
./p/openf.f:      call getenv ('openf_dbg',SRSTR)
./p/openf.f:      CALL GETENV ('tty',SRSTR)
./p/openf.f:      call getenv ('openf_dbg',SRSTR)
./p/openf.f:11    CALL GETENV ('HOME',EHOME)
./p/openins.f:            call getenv ('tty',tty)
./p/openins.f:               call getenv ('term',term)
./p/repenv.f:         CALL GETENV(ENVSTR(:LES),ENVOUT)
./p/repenv.f:            CALL GETENV (ENVSTR(:LEI),ENVOUT)
./p/repenvl.f:         CALL GETENV(ENVSTR(:LES),ENVOUT)
./p/repenvl.f:            CALL GETENV (ENVSTR(:LEI),ENVOUT)
./p/repenvm.f:         CALL GETENV(ENVSTR(:LES),ENVOUT)
./p/repenvm.f:            CALL GETENV (ENVSTR(:LEI),ENVOUT)
./p/savefn.f:         CALL GETENV ('HOME',STR)
./p/stimmsg.f:      call getenv ('HOST',host)
./p/stringf.f:c         call getenv (envstr(:lei),envout)
./p/stringf.f:c         call getenv (envstr(:lei),envout)