From e9293da11f685d17e2002bb06f0fd756845dadfd Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Tue, 3 Aug 2021 14:49:58 -0400 Subject: Changeset: * Simplify Makefile * Accept input file as command line argument * Increase path length to 1024 for all path-related variables * Replace hard-coded path to \*.dat files with environment variable MOOG_DATA * SM needs double precision for several of its functions. Pass REAL8 not REAL4 to those. --- .gitignore | 2 ++ Abunplot.f | 1 - Atmos.com | 5 ++--- Begin.f | 42 +++++++++++++++++++++++++++-------- Findtic.f | 2 +- Makefile | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile.macdesk | 53 -------------------------------------------- Makefile.macdesksilent | 53 -------------------------------------------- Makefile.maclap | 54 --------------------------------------------- Makefile.maclapsilent | 53 -------------------------------------------- Makefile.rh | 52 ------------------------------------------- Makefile.rh64 | 53 -------------------------------------------- Makefile.rh64silent | 53 -------------------------------------------- Makefile.rhsilent | 53 -------------------------------------------- Moog.f | 6 ++--- Moogsilent.f | 3 +-- Pstuff.com | 4 ++-- Specplot.f | 11 ++++++--- Writenumber.f | 2 +- 19 files changed, 113 insertions(+), 449 deletions(-) create mode 100644 Makefile delete mode 100755 Makefile.macdesk delete mode 100755 Makefile.macdesksilent delete mode 100755 Makefile.maclap delete mode 100755 Makefile.maclapsilent delete mode 100755 Makefile.rh delete mode 100755 Makefile.rh64 delete mode 100755 Makefile.rh64silent delete mode 100755 Makefile.rhsilent diff --git a/.gitignore b/.gitignore index 08205a3..653e09b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ *.o +*.orig *.swp +*.rej .smhist diff --git a/Abunplot.f b/Abunplot.f index e305bc7..44a81c5 100755 --- a/Abunplot.f +++ b/Abunplot.f @@ -91,7 +91,6 @@ c*****draw and label the box for the excitation potential plot call sm_angle (90.) call sm_putlabel (5,array) call sm_angle (0.) - c*****make the excitation potential plot call defcolor (2) diff --git a/Atmos.com b/Atmos.com index 86ac940..6daa905 100755 --- a/Atmos.com +++ b/Atmos.com @@ -21,11 +21,10 @@ c****************************************************************************** . fluxintopt, plotopt, dampingopt, specfileopt, . linfileopt, printstrong, linecount, oldcount, . scatopt - character*80 f1out, f2out, f3out, f4out, f5out, f6out, + character*1024 f1out, f2out, f3out, f4out, f5out, f6out, . f7out, f8out, f9out, f10out, . fparam, fmodel, flines, fslines, fobs, ftable, - . fbarklem, fbarklemUV - character*60 moogpath + . fbarklem, fbarklemUV, moogpath character*2 names(95) character*10 modtype character*7 control diff --git a/Begin.f b/Begin.f index a256824..b45c623 100755 --- a/Begin.f +++ b/Begin.f @@ -10,6 +10,8 @@ c*************************************************************************** include 'Pstuff.com' character*80 line, systemcall integer num + integer nargs + logical fexist c*****define the number of text screen lines for silent mode; @@ -26,17 +28,26 @@ c*****define the number of lines available on the text screen for c interactive mode; this number is discovered from the "stty -a" c command, for which the output format is unique to the operating c system. - write (systemcall,*) 'stty -a > tmpsize' + write (systemcall,*) 'uname -s > /tmp/moog.tmpuname' call system (systemcall) - open (99,file='tmpsize') + open (99,file='/tmp/moog.tmpuname') + read (99,1010,end=15) line + machine = line + close(99,status='delete') + write (systemcall,*) 'rm -f /tmp/moog.tmpuname' + call system (systemcall) + + write (systemcall,*) 'stty -a > /tmp/moog.tmpsize' + call system (systemcall) + open (99,file='/tmp/moog.tmpsize') 5 read (99,1010,end=15) line do i=1,77 if (line(i:i+3) .eq. 'rows') then - if (machine .eq. 'pcl') then + if (machine .eq. 'Linux') then read (line(i+4:i+6),1011) maxline - elseif (machine .eq. 'mac') then + elseif (machine .eq. 'Darwin') then read (line(i-4:i-2),1011) maxline - elseif (machine .eq. 'uni') then + elseif (machine .eq. 'Solaris') then read (line(i+6:i+8),1011) maxline endif go to 10 @@ -54,7 +65,7 @@ c system. call finish (0) endif 10 close (99,status='delete') - write (systemcall,*) '\\rm -f tmpsize' + write (systemcall,*) 'rm -f /tmp/moog.tmpsize' call system (systemcall) if (maxline .lt. 10) then maxline = 24 @@ -103,11 +114,24 @@ c write a header and find the appropriate parameter file, and exit normally nchars = 15 nfparam = 50 lscreen = 4 - if (silent .eq. 'y') then - fparam = 'batch.par' + + nargs = command_argument_count() + if (nargs .gt. 0) then + call get_command_argument(1, fparam) else - fparam = 'no_filename_given' + if (silent .eq. 'y') then + fparam = 'batch.par' + else + fparam = 'no_filename_given' + endif + endif + + inquire(FILE=fparam, EXIST=fexist) + if (.NOT. fexist) then + write(0,*) "Input file does not exist" + call exit(1) endif + call infile ('input ',nfparam,'formatted ',0,nchars, . fparam,lscreen) read (nfparam,1002) control diff --git a/Findtic.f b/Findtic.f index b7d8b99..4b3e5ff 100755 --- a/Findtic.f +++ b/Findtic.f @@ -5,7 +5,7 @@ c this routine makes tic marks at nice round intervals. c****************************************************************************** implicit real*8(a-h,o-z) - real*4 end1, end2, bigtic, smltic, span, spanlog + real*8 end1, end2, bigtic, smltic, span, spanlog span = end2 - end1 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..35d39a2 --- /dev/null +++ b/Makefile @@ -0,0 +1,60 @@ +# makefile for MOOG with all of the common block assignments; +# this is for my Mac laptop + +# here are the object files +OBJECTS = Abfind.o Abpop.o Abunplot.o Batom.o Begin.o Binary.o \ + Binplot.o Binplotprep.o Blankstring.o Blends.o Bmolec.o Boxit.o \ + Calmod.o Cdcalc.o Chabund.o Cog.o Cogplot.o Cogsyn.o \ + Correl.o Crosscorr.o Curve.o Damping.o Defcolor.o Discov.o \ + Doflux.o Drawcurs.o Eqlib.o Ewfind.o \ + Ewweighted.o Fakeline.o Findtic.o Finish.o \ + Fluxplot.o Gammabark.o Getasci.o Getcount.o Getnum.o Getsyns.o \ + Gridplo.o Gridsyn.o Infile.o Inlines.o Inmodel.o Invert.o \ + Jexpint.o Lineinfo.o Lineabund.o Linlimit.o \ + Makeplot.o Molquery.o Mydriver.o \ + Nansi.o Nearly.o Number.o Obshead.o \ + Oneline.o Opaccouls.o OpacHelium.o OpacHydrogen.o \ + Opacit.o Opacmetals.o Opacscat.o Params.o Partfn.o \ + Partnew.o Plotit.o Plotremember.o Pltabun.o Pltcog.o \ + Pltflux.o Pltspec.o Pointcurs.o Prinfo.o Putasci.o Readobs.o \ + Rinteg.o Setmols.o Smooth.o Specplot.o Stats.o Sunder.o Synpop.o \ + Synspec.o Synth.o Tablepop.o Taukap.o Total.o Trudamp.o Ucalc.o \ + Vargauss.o Vmacro.o Voigt.o Wavecalc.o Weedout.o Writenumber.o + +MOOG_ENTRY = Moog.o +MOOGSILENT_ENTRY = Moogsilent.o + +# here are the common files +COMMON = Atmos.com Dummy.com Equivs.com Factor.com Kappa.com Linex.com \ + Mol.com Multistar.com Obspars.com Pstuff.com \ + Quants.com Multimod.com Dampdat.com + +# the following lines point to some needed libraries +X11LIB = /usr/X11/lib +SMLIB = /usr/local/lib + +FC = gfortran +FFLAGS = -std=legacy -w -ff2c +LDFLAGS = -L$(X11LIB) -lX11 -ltcl -ltk -L$(SMLIB) -lplotsub -ldevices -lutils + +# here are the compilation and linking commands +all: MOOG MOOGSILENT + @echo ----------------------------------------------------------------- + @echo + @echo Set MOOG_DATA environment variable to path containing file\(s\): + @for x in *.dat; \ + do echo $$x; \ + done + @echo + @echo ----------------------------------------------------------------- + +MOOG: $(OBJECTS); + $(FC) -o MOOG $(MOOG_ENTRY) $(OBJECTS) $(FFLAGS) $(LDFLAGS) + +MOOGSILENT: $(OBJECTS) $(MOOGSILENT_ENTRY); + $(FC) -o MOOGSILENT $(MOOGSILENT_ENTRY) $(OBJECTS) $(FFLAGS) $(LDFLAGS) + +$(OBJECTS): $(COMMON) $(MOOG_ENTRY) $(MOOGSILENT_ENTRY) + +clean: + -rm -f *.o MOOG MOOGSILENT diff --git a/Makefile.macdesk b/Makefile.macdesk deleted file mode 100755 index 808cf56..0000000 --- a/Makefile.macdesk +++ /dev/null @@ -1,53 +0,0 @@ -# makefile for MOOG with all of the common block assignments; -# this is for my Mac laptop - -# here are the object files -OBJECTS = Abfind.o Abpop.o Abunplot.o Batom.o Begin.o Binary.o \ - Binplot.o Binplotprep.o Blankstring.o Blends.o Bmolec.o Boxit.o \ - Calmod.o Cdcalc.o Chabund.o Cog.o Cogplot.o Cogsyn.o \ - Correl.o Crosscorr.o Curve.o Damping.o Defcolor.o Discov.o \ - Doflux.o Drawcurs.o Eqlib.o Ewfind.o \ - Ewweighted.o Fakeline.o Findtic.o Finish.o \ - Fluxplot.o Gammabark.o Getasci.o Getcount.o Getnum.o Getsyns.o \ - Gridplo.o Gridsyn.o Infile.o Inlines.o Inmodel.o Invert.o \ - Jexpint.o Lineinfo.o Lineabund.o Linlimit.o \ - Makeplot.o Molquery.o Moog.o Mydriver.o \ - Nansi.o Nearly.o Number.o Obshead.o \ - Oneline.o Opaccouls.o OpacHelium.o OpacHydrogen.o \ - Opacit.o Opacmetals.o Opacscat.o Params.o Partfn.o \ - Partnew.o Plotit.o Plotremember.o Pltabun.o Pltcog.o \ - Pltflux.o Pltspec.o Pointcurs.o Prinfo.o Putasci.o Readobs.o \ - Rinteg.o Setmols.o Smooth.o Specplot.o Stats.o Sunder.o Synpop.o \ - Synspec.o Synth.o Tablepop.o Taukap.o Total.o Trudamp.o Ucalc.o \ - Vargauss.o Vmacro.o Voigt.o Wavecalc.o Weedout.o Writenumber.o - -# here are the common files -COMMON = Atmos.com Dummy.com Equivs.com Factor.com Kappa.com Linex.com \ - Mol.com Multistar.com Obspars.com Pstuff.com \ - Quants.com Multimod.com Dampdat.com - -FC = g77 -w - -# the following lines point to some needed libraries -X11LIB = /usr/X11R6/lib -SMLIB = /Applications/scisoft/i386/Packages/sm/lib -AQLIB = /usr/local/scisoft/lib - -# here are the compilation and linking commands -all: MOOG ; - @echo ----------------------------------------------------------------- - @echo - @echo make sure that you have entered the proper parameters - @echo for MOOG into the FORTRAN source driver - @echo routine Moog.f !!!!!!!!!!!! - @echo - @echo ----------------------------------------------------------------- - -MOOG: $(OBJECTS); - $(FC) $(OBJECTS) -o MOOG -L$(X11LIB) -lX11 \ - -L$(SMLIB) -lplotsub -ldevices -lutils -L$(AQLIB) -laquaterm - -$(OBJECTS): $(COMMON) - -clean: - -rm -f *.o MOOG libMOOG.a diff --git a/Makefile.macdesksilent b/Makefile.macdesksilent deleted file mode 100755 index 0d98bb6..0000000 --- a/Makefile.macdesksilent +++ /dev/null @@ -1,53 +0,0 @@ -# makefile for MOOGSILENT with all of the common block assignments; -# this is for my Mac laptop - -# here are the object files -OBJECTS = Abfind.o Abpop.o Abunplot.o Batom.o Begin.o Binary.o \ - Binplot.o Binplotprep.o Blankstring.o Blends.o Bmolec.o Boxit.o \ - Calmod.o Cdcalc.o Chabund.o Cog.o Cogplot.o Cogsyn.o \ - Correl.o Crosscorr.o Curve.o Damping.o Defcolor.o Discov.o \ - Doflux.o Drawcurs.o Eqlib.o Ewfind.o \ - Ewweighted.o Fakeline.o Findtic.o Finish.o \ - Fluxplot.o Gammabark.o Getasci.o Getcount.o Getnum.o Getsyns.o \ - Gridplo.o Gridsyn.o Infile.o Inlines.o Inmodel.o Invert.o \ - Jexpint.o Lineinfo.o Lineabund.o Linlimit.o \ - Makeplot.o Molquery.o Moog.o Mydriver.o \ - Nansi.o Nearly.o Number.o Obshead.o \ - Oneline.o Opaccouls.o OpacHelium.o OpacHydrogen.o \ - Opacit.o Opacmetals.o Opacscat.o Params.o Partfn.o \ - Partnew.o Plotit.o Plotremember.o Pltabun.o Pltcog.o \ - Pltflux.o Pltspec.o Pointcurs.o Prinfo.o Putasci.o Readobs.o \ - Rinteg.o Setmols.o Smooth.o Specplot.o Stats.o Sunder.o Synpop.o \ - Synspec.o Synth.o Tablepop.o Taukap.o Total.o Trudamp.o Ucalc.o \ - Vargauss.o Vmacro.o Voigt.o Wavecalc.o Weedout.o Writenumber.o - -# here are the common files -COMMON = Atmos.com Dummy.com Equivs.com Factor.com Kappa.com Linex.com \ - Mol.com Multistar.com Obspars.com Pstuff.com \ - Quants.com Multimod.com Dampdat.com - -FC = g77 -w - -# the following lines point to some needed libraries -X11LIB = /usr/X11R6/lib -SMLIB = /Applications/scisoft/i386/Packages/sm/lib -AQLIB = /usr/local/scisoft/lib - -# here are the compilation and linking commands -all: MOOGSILENT ; - @echo ----------------------------------------------------------------- - @echo - @echo make sure that you have entered the proper parameters - @echo for MOOGSILENT into the FORTRAN source driver - @echo routine Moogsilent.f !!!!!!!!!!!! - @echo - @echo ----------------------------------------------------------------- - -MOOGSILENT: $(OBJECTS); - $(FC) $(OBJECTS) -o MOOGSILENT -L$(X11LIB) -lX11 \ - -L$(SMLIB) -lplotsub -ldevices -lutils -L$(AQLIB) -laquaterm - -$(OBJECTS): $(COMMON) - -clean: - -rm -f *.o MOOGSILENT libMOOGSILENT.a diff --git a/Makefile.maclap b/Makefile.maclap deleted file mode 100755 index 90ce764..0000000 --- a/Makefile.maclap +++ /dev/null @@ -1,54 +0,0 @@ -# makefile for MOOG with all of the common block assignments; -# this is for my Mac laptop - -# here are the object files -OBJECTS = Abfind.o Abpop.o Abunplot.o Batom.o Begin.o Binary.o \ - Binplot.o Binplotprep.o Blankstring.o Blends.o Bmolec.o Boxit.o \ - Calmod.o Cdcalc.o Chabund.o Cog.o Cogplot.o Cogsyn.o \ - Correl.o Crosscorr.o Curve.o Damping.o Defcolor.o Discov.o \ - Doflux.o Drawcurs.o Eqlib.o Ewfind.o \ - Ewweighted.o Fakeline.o Findtic.o Finish.o \ - Fluxplot.o Gammabark.o Getasci.o Getcount.o Getnum.o Getsyns.o \ - Gridplo.o Gridsyn.o Infile.o Inlines.o Inmodel.o Invert.o \ - Jexpint.o Lineinfo.o Lineabund.o Linlimit.o \ - Makeplot.o Molquery.o Moog.o Mydriver.o \ - Nansi.o Nearly.o Number.o Obshead.o \ - Oneline.o Opaccouls.o OpacHelium.o OpacHydrogen.o \ - Opacit.o Opacmetals.o Opacscat.o Params.o Partfn.o \ - Partnew.o Plotit.o Plotremember.o Pltabun.o Pltcog.o \ - Pltflux.o Pltspec.o Pointcurs.o Prinfo.o Putasci.o Readobs.o \ - Rinteg.o Setmols.o Smooth.o Specplot.o Stats.o Sunder.o Synpop.o \ - Synspec.o Synth.o Tablepop.o Taukap.o Total.o Trudamp.o Ucalc.o \ - Vargauss.o Vmacro.o Voigt.o Wavecalc.o Weedout.o Writenumber.o - - -# here are the common files -COMMON = Atmos.com Dummy.com Equivs.com Factor.com Kappa.com Linex.com \ - Mol.com Multistar.com Obspars.com Pstuff.com \ - Quants.com Multimod.com Dampdat.com - -FC = gfortran -std=legacy -w - -# the following lines point to some needed libraries -X11LIB = /usr/X11R6/lib -SMLIB = /usr/local/lib - -# here are the compilation and linking commands -all: MOOG ; - @echo ----------------------------------------------------------------- - @echo - @echo make sure that you have entered the proper parameters - @echo for MOOG into the FORTRAN source driver - @echo routine Moog.f !!!!!!!!!!!! - @echo - @echo ----------------------------------------------------------------- - -MOOG: $(OBJECTS); - $(FC) $(OBJECTS) -o MOOG -L$(X11LIB) -lX11 \ - -L$(SMLIB) -lplotsub -ldevices -lutils -#-L$(AQLIB) -laquaterm - -$(OBJECTS): $(COMMON) - -clean: - -rm -f *.o MOOG libMOOG.a diff --git a/Makefile.maclapsilent b/Makefile.maclapsilent deleted file mode 100755 index 21ca029..0000000 --- a/Makefile.maclapsilent +++ /dev/null @@ -1,53 +0,0 @@ -# makefile for MOOGSILENT with all of the common block assignments; -# this is for my Mac laptop - -# here are the object files -OBJECTS = Abfind.o Abpop.o Abunplot.o Batom.o Begin.o Binary.o \ - Binplot.o Binplotprep.o Blankstring.o Blends.o Bmolec.o Boxit.o \ - Calmod.o Cdcalc.o Chabund.o Cog.o Cogplot.o Cogsyn.o \ - Correl.o Crosscorr.o Curve.o Damping.o Defcolor.o Discov.o \ - Doflux.o Drawcurs.o Eqlib.o Ewfind.o \ - Ewweighted.o Fakeline.o Findtic.o Finish.o \ - Fluxplot.o Gammabark.o Getasci.o Getcount.o Getnum.o Getsyns.o \ - Gridplo.o Gridsyn.o Infile.o Inlines.o Inmodel.o Invert.o \ - Jexpint.o Lineinfo.o Lineabund.o Linlimit.o \ - Makeplot.o Molquery.o Moogsilent.o Mydriver.o \ - Nansi.o Nearly.o Number.o Obshead.o \ - Oneline.o Opaccouls.o OpacHelium.o OpacHydrogen.o \ - Opacit.o Opacmetals.o Opacscat.o Params.o Partfn.o \ - Partnew.o Plotit.o Plotremember.o Pltabun.o Pltcog.o \ - Pltflux.o Pltspec.o Pointcurs.o Prinfo.o Putasci.o Readobs.o \ - Rinteg.o Setmols.o Smooth.o Specplot.o Stats.o Sunder.o Synpop.o \ - Synspec.o Synth.o Tablepop.o Taukap.o Total.o Trudamp.o Ucalc.o \ - Vargauss.o Vmacro.o Voigt.o Wavecalc.o Weedout.o Writenumber.o - - -# here are the common files -COMMON = Atmos.com Dummy.com Equivs.com Factor.com Kappa.com Linex.com \ - Mol.com Multistar.com Obspars.com Pstuff.com \ - Quants.com Multimod.com Dampdat.com - -FC = gfortran -std=legacy -w - -# the following lines point to some needed libraries -X11LIB = /usr/X11R6/lib -SMLIB = /usr/local/lib - -# here are the compilation and linking commands -all: MOOGSILENT ; - @echo ----------------------------------------------------------------- - @echo - @echo make sure that you have entered the proper parameters - @echo for MOOGSILENT into the FORTRAN source driver - @echo routine Moogsilent.f !!!!!!!!!!!! - @echo - @echo ----------------------------------------------------------------- - -MOOGSILENT: $(OBJECTS); - $(FC) $(OBJECTS) -o MOOGSILENT -L$(X11LIB) -lX11 \ - -L$(SMLIB) -lplotsub -ldevices -lutils - -$(OBJECTS): $(COMMON) - -clean: - -rm -f *.o MOOGSILENT libMOOGSILENT.a diff --git a/Makefile.rh b/Makefile.rh deleted file mode 100755 index 428fceb..0000000 --- a/Makefile.rh +++ /dev/null @@ -1,52 +0,0 @@ -# makefile for MOOG with all of the common block assignments; -# this is for a Redhat linux machine - -# here are the object files -OBJECTS = Abfind.o Abpop.o Abunplot.o Batom.o Begin.o Binary.o \ - Binplot.o Binplotprep.o Blankstring.o Blends.o Bmolec.o Boxit.o \ - Calmod.o Cdcalc.o Chabund.o Cog.o Cogplot.o Cogsyn.o \ - Correl.o Crosscorr.o Curve.o Damping.o Defcolor.o Discov.o \ - Doflux.o Drawcurs.o Eqlib.o Ewfind.o \ - Ewweighted.o Fakeline.o Findtic.o Finish.o \ - Fluxplot.o Gammabark.o Getasci.o Getcount.o Getnum.o Getsyns.o \ - Gridplo.o Gridsyn.o Infile.o Inlines.o Inmodel.o Invert.o \ - Jexpint.o Lineinfo.o Lineabund.o Linlimit.o \ - Makeplot.o Molquery.o Moog.o Mydriver.o \ - Nansi.o Nearly.o Number.o Obshead.o \ - Oneline.o Opaccouls.o OpacHelium.o OpacHydrogen.o \ - Opacit.o Opacmetals.o Opacscat.o Params.o Partfn.o \ - Partnew.o Plotit.o Plotremember.o Pltabun.o Pltcog.o \ - Pltflux.o Pltspec.o Pointcurs.o Prinfo.o Putasci.o Readobs.o \ - Rinteg.o Setmols.o Smooth.o Specplot.o Stats.o Sunder.o Synpop.o \ - Synspec.o Synth.o Tablepop.o Taukap.o Total.o Trudamp.o Ucalc.o \ - Vargauss.o Vmacro.o Voigt.o Wavecalc.o Weedout.o Writenumber.o - -COMMON = Atmos.com Dummy.com Equivs.com Factor.com Kappa.com Linex.com \ - Mol.com Multistar.com Obspars.com Pstuff.com \ - Quants.com Multimod.com Dampdat.com - -CC = cc -FC = f77 -Wall - -# the following lines point to some needed libraries -X11LIB = /usr/X11R6/lib -SMLIB = /opt/local/lib - -# here are the compilation and linking commands -all: MOOG ; - @echo ----------------------------------------------------------------- - @echo - @echo make sure that you have entered the proper parameters - @echo for MOOG into the FORTRAN source driver - @echo routine Moog.f !!!!!!!!!!!! - @echo - @echo ----------------------------------------------------------------- - -MOOG: $(OBJECTS); - $(FC) $(OBJECTS) -o MOOG -L$(X11LIB) -lX11 \ - -L$(SMLIB) -lplotsub -ldevices -lutils - -$(OBJECTS): $(COMMON) - -clean: - -rm -f *.o MOOG libMOOG.a diff --git a/Makefile.rh64 b/Makefile.rh64 deleted file mode 100755 index d0c9a97..0000000 --- a/Makefile.rh64 +++ /dev/null @@ -1,53 +0,0 @@ -# makefile for MOOG with all of the common block assignments; -# this is for a 64-bit linux machine - -# here are the object files -OBJECTS = Abfind.o Abpop.o Abunplot.o Batom.o Begin.o Binary.o \ - Binplot.o Binplotprep.o Blankstring.o Blends.o Bmolec.o Boxit.o \ - Calmod.o Cdcalc.o Chabund.o Cog.o Cogplot.o Cogsyn.o \ - Correl.o Crosscorr.o Curve.o Damping.o Defcolor.o Discov.o \ - Doflux.o Drawcurs.o Eqlib.o Ewfind.o \ - Ewweighted.o Fakeline.o Findtic.o Finish.o \ - Fluxplot.o Gammabark.o Getasci.o Getcount.o Getnum.o Getsyns.o \ - Gridplo.o Gridsyn.o Infile.o Inlines.o Inmodel.o Invert.o \ - Jexpint.o Lineinfo.o Lineabund.o Linlimit.o \ - Makeplot.o Molquery.o Moog.o Mydriver.o \ - Nansi.o Nearly.o Number.o Obshead.o \ - Oneline.o Opaccouls.o OpacHelium.o OpacHydrogen.o \ - Opacit.o Opacmetals.o Opacscat.o Params.o Partfn.o \ - Partnew.o Plotit.o Plotremember.o Pltabun.o Pltcog.o \ - Pltflux.o Pltspec.o Pointcurs.o Prinfo.o Putasci.o Readobs.o \ - Rinteg.o Setmols.o Smooth.o Specplot.o Stats.o Sunder.o Synpop.o \ - Synspec.o Synth.o Tablepop.o Taukap.o Total.o Trudamp.o Ucalc.o \ - Vargauss.o Vmacro.o Voigt.o Wavecalc.o Weedout.o Writenumber.o - -# here are the common files -COMMON = Atmos.com Dummy.com Equivs.com Factor.com Kappa.com Linex.com \ - Mol.com Multistar.com Obspars.com Pstuff.com \ - Quants.com Multimod.com Dampdat.com - -CC = cc -FC = gfortran -ff2c -Wall - -# the following lines point to some needed libraries -X11LIB = /usr/lib64 -SMLIB = /astro/apps6/opt/sm-2.4.35/lib - -# here are the compilation and linking commands -all: MOOG ; - @echo ----------------------------------------------------------------- - @echo - @echo make sure that you have entered the proper parameters - @echo for MOOG into the FORTRAN source driver - @echo routine Moog.f !!!!!!!!!!!! - @echo - @echo ----------------------------------------------------------------- - -MOOG: $(OBJECTS); - $(FC) $(OBJECTS) -o MOOG -L$(X11LIB) -lX11 \ - -L$(SMLIB) -lplotsub -ldevices -lutils - -$(OBJECTS): $(COMMON) - -clean: - -rm -f *.o MOOG libMOOG.a diff --git a/Makefile.rh64silent b/Makefile.rh64silent deleted file mode 100755 index 9ba8b47..0000000 --- a/Makefile.rh64silent +++ /dev/null @@ -1,53 +0,0 @@ -# makefile for MOOGSILENT with all of the common block assignments; -# this is for a 64-bit linux machine - -# here are the object files -OBJECTS = Abfind.o Abpop.o Abunplot.o Batom.o Begin.o Binary.o \ - Binplot.o Binplotprep.o Blankstring.o Blends.o Bmolec.o Boxit.o \ - Calmod.o Cdcalc.o Chabund.o Cog.o Cogplot.o Cogsyn.o \ - Correl.o Crosscorr.o Curve.o Damping.o Defcolor.o Discov.o \ - Doflux.o Drawcurs.o Eqlib.o Ewfind.o \ - Ewweighted.o Fakeline.o Findtic.o Finish.o \ - Fluxplot.o Gammabark.o Getasci.o Getcount.o Getnum.o Getsyns.o \ - Gridplo.o Gridsyn.o Infile.o Inlines.o Inmodel.o Invert.o \ - Jexpint.o Lineinfo.o Lineabund.o Linlimit.o \ - Makeplot.o Molquery.o Moogsilent.o Mydriver.o \ - Nansi.o Nearly.o Number.o Obshead.o \ - Oneline.o Opaccouls.o OpacHelium.o OpacHydrogen.o \ - Opacit.o Opacmetals.o Opacscat.o Params.o Partfn.o \ - Partnew.o Plotit.o Plotremember.o Pltabun.o Pltcog.o \ - Pltflux.o Pltspec.o Pointcurs.o Prinfo.o Putasci.o Readobs.o \ - Rinteg.o Setmols.o Smooth.o Specplot.o Stats.o Sunder.o Synpop.o \ - Synspec.o Synth.o Tablepop.o Taukap.o Total.o Trudamp.o Ucalc.o \ - Vargauss.o Vmacro.o Voigt.o Wavecalc.o Weedout.o Writenumber.o - -# here are the common files -COMMON = Atmos.com Dummy.com Equivs.com Factor.com Kappa.com Linex.com \ - Mol.com Multistar.com Obspars.com Pstuff.com \ - Quants.com Multimod.com Dampdat.com - -CC = cc -FC = gfortran -ff2c -Wall - -# the following lines point to some needed libraries -X11LIB = /usr/lib64 -SMLIB = /astro/apps6/opt/sm-2.4.35/lib - -# here are the compilation and linking commands -all: MOOGSILENT ; - @echo ----------------------------------------------------------------- - @echo - @echo make sure that you have entered the proper parameters - @echo for MOOGSILENT into the FORTRAN source driver - @echo routine Moogsilent.f !!!!!!!!!!!! - @echo - @echo ----------------------------------------------------------------- - -MOOGSILENT: $(OBJECTS); - $(FC) $(OBJECTS) -o MOOGSILENT -L$(X11LIB) -lX11 \ - -L$(SMLIB) -lplotsub -ldevices -lutils - -$(OBJECTS): $(COMMON) - -clean: - -rm -f *.o MOOGSILENT libMOOGSILENT.a diff --git a/Makefile.rhsilent b/Makefile.rhsilent deleted file mode 100755 index d45b554..0000000 --- a/Makefile.rhsilent +++ /dev/null @@ -1,53 +0,0 @@ -# makefile for MOOGSILENT with all of the common block assignments; -# this is for a Redhat linux machine - -# here are the object files -OBJECTS = Abfind.o Abpop.o Abunplot.o Batom.o Begin.o Binary.o \ - Binplot.o Binplotprep.o Blankstring.o Blends.o Bmolec.o Boxit.o \ - Calmod.o Cdcalc.o Chabund.o Cog.o Cogplot.o Cogsyn.o \ - Correl.o Crosscorr.o Curve.o Damping.o Defcolor.o Discov.o \ - Doflux.o Drawcurs.o Eqlib.o Ewfind.o \ - Ewweighted.o Fakeline.o Findtic.o Finish.o \ - Fluxplot.o Gammabark.o Getasci.o Getcount.o Getnum.o Getsyns.o \ - Gridplo.o Gridsyn.o Infile.o Inlines.o Inmodel.o Invert.o \ - Jexpint.o Lineinfo.o Lineabund.o Linlimit.o \ - Makeplot.o Molquery.o Moog.o Mydriver.o \ - Nansi.o Nearly.o Number.o Obshead.o \ - Oneline.o Opaccouls.o OpacHelium.o OpacHydrogen.o \ - Opacit.o Opacmetals.o Opacscat.o Params.o Partfn.o \ - Partnew.o Plotit.o Plotremember.o Pltabun.o Pltcog.o \ - Pltflux.o Pltspec.o Pointcurs.o Prinfo.o Putasci.o Readobs.o \ - Rinteg.o Setmols.o Smooth.o Specplot.o Stats.o Sunder.o Synpop.o \ - Synspec.o Synth.o Tablepop.o Taukap.o Total.o Trudamp.o Ucalc.o \ - Vargauss.o Vmacro.o Voigt.o Wavecalc.o Weedout.o Writenumber.o - -# here are the common files -COMMON = Atmos.com Dummy.com Equivs.com Factor.com Kappa.com Linex.com \ - Mol.com Multistar.com Obspars.com Pstuff.com \ - Quants.com Multimod.com Dampdat.com - -CC = cc -FC = f77 -Wall - -# the following lines point to some needed libraries -X11LIB = /usr/X11R6/lib -SMLIB = /opt/local/lib - -# here are the compilation and linking commands -all: MOOGSILENT ; - @echo ----------------------------------------------------------------- - @echo - @echo make sure that you have entered the proper parameters - @echo for MOOGSILENT into the FORTRAN source driver - @echo routine Moogsilent.f !!!!!!!!!!!! - @echo - @echo ----------------------------------------------------------------- - -MOOGSILENT: $(OBJECTS); - $(FC) $(OBJECTS) -o MOOGSILENT -L$(X11LIB) -lX11 \ - -L$(SMLIB) -lplotsub -ldevices -lutils - -$(OBJECTS): $(COMMON) - -clean: - -rm -f *.o MOOGSILENT libMOOGSILENT.a diff --git a/Moog.f b/Moog.f index e78e525..c54335f 100755 --- a/Moog.f +++ b/Moog.f @@ -18,15 +18,15 @@ c declared. First, define the directory where MOOG lives, in order to c be able to pull in auxiliary data files; executing 'make' will c generate a reminder of this necessity write (moogpath,1001) - moogpath = - . '/Users/chris/CODES/moognov2019/' + call get_environment_variable("MOOG_DATA", moogpath) c*****What kind of machine are you using? Possible ones are: +c OBSOLETE c "mac" = Intel-based Apple Mac c "pcl" = a PC or desktop running some standard linux like Redhat c "uni" = a machine running Unix, specifically Sun Solaris - machine = "mac" + machine = "" c*****for x11 terminal types, define the parameters of plotting windows; diff --git a/Moogsilent.f b/Moogsilent.f index 6ae7d95..61e9bef 100755 --- a/Moogsilent.f +++ b/Moogsilent.f @@ -18,8 +18,7 @@ c declared. First, define the directory where MOOG lives, in order to c be able to pull in auxiliary data files; executing 'make' will c generate a reminder of this write (moogpath,1001) - moogpath = - . '/Users/chris/CODES/moognov2019/' + call get_environment_variable("MOOG_DATA", moogpath) c*****What kind of machine are you using? Possible ones are: diff --git a/Pstuff.com b/Pstuff.com index c261690..155cf52 100755 --- a/Pstuff.com +++ b/Pstuff.com @@ -18,8 +18,8 @@ c****************************************************************************** . half, power, powerrot, powermac, . average, deviate, oldhalf real*4 xobs(500000), yobs(500000) - real*4 xlo, xhi, ylo, yhi, - . origxlo, origxhi, origylo, origyhi, + real*8 xlo, xhi, ylo, yhi + real*8 origxlo, origxhi, origylo, origyhi, . oldxlo, oldxhi, oldylo, oldyhi, . xadd, yadd, ymult, veladd, deltavel, . origxadd, origyadd, origymult, origveladd, diff --git a/Specplot.f b/Specplot.f index 4e8f026..03ea153 100755 --- a/Specplot.f +++ b/Specplot.f @@ -15,7 +15,7 @@ c****************************************************************************** real*4 style(1) real*4 yup,ydown integer iflip - + real*8 inx1,inx2,iny1,iny2 c*****for grid syntheses, dump out relevant information to a file if (choice .eq. 'g') then @@ -25,9 +25,15 @@ c*****for grid syntheses, dump out relevant information to a file c*****begin with a default window + inx1 = 0.0 + inx2 = 1.0 + iny1 = 0.0 + iny2 = 1.0 + call sm_location (3500,31000,4000,30000) call sm_window (1,1,1,1,1,1) - call sm_limits (0.0,1.0,0.0,1.0) +c call sm_limits (inx1, inx2, iny1, iny2) + call sm_limits (0d0, 1d0, 0d0, 1d0) call defcolor (1) @@ -53,7 +59,6 @@ c*****write smoothing information at the top of the plot write (nf6out,3002) isoitle(1:120) write (nf6out,3002) isoitle(121:240) endif - c*****define the real plot limits if (xlo .lt. xhi) then diff --git a/Writenumber.f b/Writenumber.f index 9ff3a30..66cdb6c 100755 --- a/Writenumber.f +++ b/Writenumber.f @@ -6,7 +6,7 @@ c writes it to a character string in a reasonable format c****************************************************************************** include 'Pstuff.com' - real*4 xnum, lognum + real*8 xnum, lognum integer numdec -- cgit