def solar(filename_solar, solar_factor):
f0=open(filename_solar)<EOL>sol=f0.readlines()<EOL>f0.close<EOL>sol[<NUM_LIT:0>].split("<STR_LIT:U+0020>")<EOL>global names_sol<EOL>names_sol=[]<EOL>global z_sol<EOL>z_sol=[]<EOL>yps=np.zeros(len(sol))<EOL>mass_number=np.zeros(len(sol))<EOL>for i in range(len(sol)):<EOL><INDENT>z_sol.append(int(sol[i][<NUM_LIT:1>:<NUM_LIT:3>]))<EOL>names_sol.extend([sol[i].split("<STR_LIT:U+0020>")[<NUM_LIT:0>][<NUM_LIT:4>:]])<EOL>yps[i]=float(sol[i].split("<STR_LIT:U+0020>")[<NUM_LIT:1>]) * solar_factor<EOL>try:<EOL><INDENT>mass_number[i]=int(names_sol[i][<NUM_LIT:2>:<NUM_LIT:5>])<EOL><DEDENT>except ValueError:<EOL><INDENT>print("<STR_LIT>")<EOL>print("<STR_LIT>")<EOL>print("<STR_LIT>")<EOL>print("<STR_LIT>")<EOL>print("<STR_LIT>")<EOL>print("<STR_LIT>")<EOL>names_sol[i]='<STR_LIT>'<EOL>mass_number[i]=int(names_sol[i][<NUM_LIT:2>:<NUM_LIT:5>])<EOL><DEDENT>if mass_number[i] == <NUM_LIT:1> or mass_number[i] == <NUM_LIT:4>:<EOL><INDENT>yps[i] = old_div(yps[i],solar_factor)<EOL><DEDENT><DEDENT>global solar_abundance<EOL>solar_abundance={}<EOL>for a,b in zip(names_sol,yps):<EOL><INDENT>solar_abundance[a] = b<EOL><DEDENT>z_bismuth = <NUM_LIT><EOL>global solar_elem_abund<EOL>solar_elem_abund = np.zeros(z_bismuth)<EOL>for i in range(z_bismuth):<EOL><INDENT>dummy = <NUM_LIT:0.><EOL>for j in range(len(solar_abundance)):<EOL><INDENT>if z_sol[j] == i+<NUM_LIT:1>:<EOL><INDENT>dummy = dummy + float(solar_abundance[names_sol[j]])<EOL><DEDENT><DEDENT>solar_elem_abund[i] = dummy<EOL><DEDENT>
read solar abundances from filename_solar.

Parameters
----------
filename_solar : string
    The file name.
solar_factor : float
    The correction factor to apply, in case filename_solar is not
    solar, but some file used to get initial abundances at
    metallicity lower than solar. However, notice that this is
    really rude, since alpha-enahncements and things like that are
    not properly considered.  Only H and He4 are not multiplied. So,
    for publications PLEASE use proper filename_solar at...solar,
    and use solar_factor = 1. Marco