From 8310a93b5a1334873188450a2aacf820631d9135 Mon Sep 17 00:00:00 2001
From: kamischi <karl-michael.schindler@web.de>
Date: Thu, 1 Jun 2023 18:59:28 +0200
Subject: [PATCH] make output so it matches

---
 source/f90/eels-boson.f90 | 8 +++++++-
 source/f90/eels.f90       | 8 ++++----
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/source/f90/eels-boson.f90 b/source/f90/eels-boson.f90
index 481eb15..0346f78 100644
--- a/source/f90/eels-boson.f90
+++ b/source/f90/eels-boson.f90
@@ -142,6 +142,10 @@ program eels_boson
   nw = 1 + int((wmax - wmin) / dw)
   allocate (wn_array(nw), f(nw))
 
+  write (*,*) 'length: ', len(comment(1))
+  write (*,*) 'length: ', comment(1)
+  write (*,*) 'length: ', len(comment(2))
+  write (*,*) 'length: ', comment(2)
   call doeels(e0, theta, phia, phib, wmin, wmax, dw, comment, size(comment),   &
               layers, neps, nper, name, size(name), thick, epsinf, nos, osc, size(osc, 2),&
               contrl, mode, wn_array, f, size(wn_array))
@@ -176,8 +180,10 @@ program eels_boson
   call doboson(t, width, gauss, asym, emin, emax, &
                wmin, wmax, nw, f, xout, yout, nout)
 
+  comment(2) = comment(1)
   open(unit = 14, file = bosou_name)
-  write(14, '(a, a, f6.1, a, f5.2)') comment(1), 'T =', t, ' GAUSS =', gauss
+  write(14, '(a, f6.2, a, f5.1, a, f5.2, a, f5.2, a, f6.1, a, f5.2)') &
+        'e0 =', e0, ' theta =', theta, ' phia =', phia, ' phib =', phib, ' T =', t, ' GAUSS =', gauss
   write(14, *) comment(2)
   do i = 1, nout
     write(14, '(2e15.7)') xout(i), yout(i)
diff --git a/source/f90/eels.f90 b/source/f90/eels.f90
index a439e8e..d6ac13f 100644
--- a/source/f90/eels.f90
+++ b/source/f90/eels.f90
@@ -134,9 +134,10 @@ program eels
               contrl, mode, wn_array, f, size(wn_array))
 
   open (unit = 12, file = 'eelsou')
-  write (12, 207) e0, theta, phia, phib, comment(1)
+  write (12, 207) e0, theta, phia, phib
+  write (12, '(a72)') comment(1)
   do i = 1, nw
-    write (12, 211) wn_array(i), f(i)
+    write (12, '(2e15.7)') wn_array(i), f(i)
   enddo
   close (unit = 12)
 
@@ -151,6 +152,5 @@ program eels
 106 format(45x, 'wlo , wp', 5x, 'q', 7x, 'gam/wlo')
 107 format(45x, 28('-'))
 108 format(41x, f12.4, f10.4, f9.4)
-207 format('e0 =', f6.2, ' theta =', f5.1, ' phia =', f5.2, ' phib =', f5.2 / a72)
-211 format(2e15.7)
+207 format('e0 =', f6.2, ' theta =', f5.1, ' phia =', f5.2, ' phib =', f5.2)
 end program eels
-- 
GitLab