aboutsummaryrefslogtreecommitdiff
path: root/Cogsyn.f
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2021-08-03 14:41:53 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2021-08-03 14:41:53 -0400
commitaf8fa097905186e0d8ba257e4d70d63fe8901264 (patch)
tree647de7ddd01c750e9a80849b3cf79efddf32d4b2 /Cogsyn.f
downloadmoog-af8fa097905186e0d8ba257e4d70d63fe8901264.tar.gz
Initial commit
Diffstat (limited to 'Cogsyn.f')
-rwxr-xr-xCogsyn.f102
1 files changed, 102 insertions, 0 deletions
diff --git a/Cogsyn.f b/Cogsyn.f
new file mode 100755
index 0000000..b16de64
--- /dev/null
+++ b/Cogsyn.f
@@ -0,0 +1,102 @@
+
+ subroutine cogsyn
+c******************************************************************************
+c This program produces a curve-of-growth of a blended feature,
+c altering only a specified species' abundance.
+c******************************************************************************
+
+ implicit real*8 (a-h,o-z)
+ include 'Atmos.com'
+ include 'Linex.com'
+ include 'Factor.com'
+ include 'Mol.com'
+ include 'Pstuff.com'
+
+
+c*****examine the parameter file
+ call params
+
+
+c*****open the files for standard output and summary curves-of-growth
+ nf1out = 20
+ lscreen = 4
+ array = 'STANDARD OUTPUT'
+ nchars = 15
+ call infile ('output ',nf1out,'formatted ',0,nchars,
+ . f1out,lscreen)
+ nf2out = 21
+ lscreen = lscreen + 2
+ array = 'SUMMARY C-O-G OUTPUT'
+ nchars = 20
+ call infile ('output ',nf2out,'formatted ',0,nchars,
+ . f2out,lscreen)
+
+
+c*****open and read the model atmosphere
+ nfmodel = 30
+ lscreen = lscreen + 2
+ array = 'THE MODEL ATMOSPHERE'
+ nchars = 20
+ call infile ('input ',nfmodel,'formatted ',0,nchars,
+ . fmodel,lscreen)
+ call inmodel
+
+
+c*****open and read the line list file; get ready for the line calculations
+ nflines = 31
+ lscreen = lscreen + 2
+ array = 'THE LINE LIST'
+ nchars = 13
+ call infile ('input ',nflines,'formatted ',0,nchars,
+ . flines,lscreen)
+ call inlines (1)
+ call eqlib
+ call nearly (1)
+
+
+c*****do the syntheses
+ isynth = 1
+ isorun = 1
+ ncurve = 0
+ iatom =nint(cogatom)
+ pec(iatom) = 1
+ numpecatom = 1
+ pecabund(iatom,1) = 0.
+ mode = 3
+10 ncurve = ncurve + 1
+ nlines = 0
+ call synspec
+ call total
+ if (ncurve .eq. 1) then
+ wstart = 10.**(rwlow)*wave1(lim1)
+ wstop = 10.**(rwhigh)*wave1(lim1)
+ endif
+ molopt = 1
+ linprintopt = 0
+ if (w(ncurve) .gt. wstart) then
+ pecabund(iatom,1) = pecabund(iatom,1) - rwstep
+ go to 10
+ endif
+ pecabund(iatom,1) = rwstep
+20 ncurve = ncurve + 1
+ nlines = 0
+ call synspec
+ call total
+ molopt = 1
+ linprintopt = 0
+ if (w(ncurve) .lt. wstop) then
+ pecabund(iatom,1) = pecabund(iatom,1) + rwstep
+ go to 20
+ endif
+ call pltcog
+
+
+c*****finish
+ call finish (0)
+ end
+
+
+
+
+
+