-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFinal_abund.py
More file actions
34 lines (30 loc) · 1.45 KB
/
Final_abund.py
File metadata and controls
34 lines (30 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from nugridpy import nugridse as mp
from numpy import log10
#run1=mp.se('../mppnp/z1m2/m2z1m2/H5_surf','surf.h5')
run2=mp.se('../mppnp/z2m2/m2z2m2/H5_surf','surf.h5')
#run3=mp.se('../mppnp/z3m2/m2z3m2/H5_surf','surf.h5')
#run4=mp.se('../mppnp/z1m2/m3z1m2/H5_surf','surf.h5')
#run5=mp.se('../mppnp/z2m2/m3z2m2/H5_surf','surf.h5')
#run6=mp.se('../mppnp/z2m2/m3z2m2_hCBM_TDUx4p3/H5_surf','surf.h5')
#run7=mp.se('../mppnp/z3m2/m3z3m2/H5_surf','surf.h5')
#run8=mp.se('../mppnp/z3m2/m3z3m2_hCBM_TDUx4p3/H5_surf','surf.h5')
run_mass=[run2]#run1,run2,run3,run4,run5,run6,run7,run8]
final = []
initial = []
dum_fe_h = []
for i in run_mass:
final.append(mp.se.get_elemental_abunds(i,i.se.cycles[-1:]))
initial.append(mp.se.get_elemental_abunds(i,i.se.cycles[:1]))
#dum_fe_h.append(log10((float(i.se.get('zini')))/(0.018)))
dum_fe_h.append(i.se.get('zini'))
for j in i.se.cycles[-1:]:
dum_fe = float(i.se.get(j,'iso_massf','Fe-54'))+float(i.se.get(j,'iso_massf','Fe-56'))+float(i.se.get(j,'iso_massf','Fe-57'))+float(i.se.get(j,'iso_massf','Fe-58'))
print(dum_fe)
for j in i.se.cycles[:1]:
dum_fe1 = float(i.se.get(j,'iso_massf','Fe-54'))+float(i.se.get(j,'iso_massf','Fe-56'))+float(i.se.get(j,'iso_massf','Fe-57'))+float(i.se.get(j,'iso_massf','Fe-58'))
print(dum_fe1)
#print(final)
#print('################################################')
#print(initial)
#print('################################################')
print(dum_fe_h)