def write_STELLA_model(self,name):
<EOL>zn = np.array(self.get('<STR_LIT>'),np.int64)<EOL>Mr = self.get('<STR_LIT>')[::-<NUM_LIT:1>]<EOL>dM = <NUM_LIT> ** self.get('<STR_LIT>')[::-<NUM_LIT:1>] * self.header_attr['<STR_LIT>']<EOL>R = self.get('<STR_LIT>')[::-<NUM_LIT:1>] * ast.rsun_cm<EOL>dR = np.insert( np.diff(R), <NUM_LIT:0>, R[<NUM_LIT:0>] )<EOL>Rho = <NUM_LIT> ** self.get('<STR_LIT>')[::-<NUM_LIT:1>]<EOL>PRE = <NUM_LIT> ** self.get('<STR_LIT>')[::-<NUM_LIT:1>]<EOL>T = <NUM_LIT> ** self.get('<STR_LIT>')[::-<NUM_LIT:1>]<EOL>V = self.get('<STR_LIT>')[::-<NUM_LIT:1>]<EOL>def make_list(element,lowA,highA):<EOL><INDENT>l = []<EOL>for i in range(lowA,highA+<NUM_LIT:1>):<EOL><INDENT>l.append(element+str(i))<EOL><DEDENT>return l<EOL><DEDENT>abun_avail = list(self.cols.keys())<EOL>def elemental_abund(ilist,abun_avail):<EOL><INDENT>X = np.zeros(len(self.get('<STR_LIT>')))<EOL>for a in ilist:<EOL><INDENT>if a in abun_avail:<EOL><INDENT>X += self.get(a)[::-<NUM_LIT:1>]<EOL><DEDENT><DEDENT>return X<EOL><DEDENT>iH = ['<STR_LIT>','<STR_LIT>','<STR_LIT>']<EOL>XH  = elemental_abund(iH, abun_avail)<EOL>XHe = elemental_abund(make_list('<STR_LIT>',<NUM_LIT:1>,<NUM_LIT:5>), abun_avail)<EOL>XC  = elemental_abund(make_list('<STR_LIT:c>',<NUM_LIT:11>,<NUM_LIT:15>), abun_avail)<EOL>XN  = elemental_abund(make_list('<STR_LIT:n>',<NUM_LIT:12>,<NUM_LIT:16>), abun_avail)<EOL>XO  = elemental_abund(make_list('<STR_LIT:o>',<NUM_LIT>,<NUM_LIT:20>), abun_avail)<EOL>XNe = elemental_abund(make_list('<STR_LIT>',<NUM_LIT>,<NUM_LIT>), abun_avail)<EOL>XNa = elemental_abund(make_list('<STR_LIT>',<NUM_LIT:20>,<NUM_LIT>), abun_avail)<EOL>XMg = elemental_abund(make_list('<STR_LIT>',<NUM_LIT>,<NUM_LIT>), abun_avail)<EOL>XAl = elemental_abund(make_list('<STR_LIT>',<NUM_LIT>,<NUM_LIT:30>), abun_avail)<EOL>XSi = elemental_abund(make_list('<STR_LIT>',<NUM_LIT>,<NUM_LIT>), abun_avail)<EOL>XS  = elemental_abund(make_list('<STR_LIT:s>',<NUM_LIT>,<NUM_LIT>), abun_avail)<EOL>XAr = elemental_abund(make_list('<STR_LIT>',<NUM_LIT:32>,<NUM_LIT>), abun_avail)<EOL>XCa = elemental_abund(make_list('<STR_LIT>',<NUM_LIT>,<NUM_LIT>), abun_avail)<EOL>XFe = elemental_abund(make_list('<STR_LIT>',<NUM_LIT:50>,<NUM_LIT>), abun_avail)<EOL>XCo = elemental_abund(make_list('<STR_LIT>',<NUM_LIT>,<NUM_LIT>), abun_avail)<EOL>XNi = elemental_abund(make_list('<STR_LIT>',<NUM_LIT>,<NUM_LIT>), abun_avail)<EOL>XNi56 = self.get('<STR_LIT>')<EOL>file_hyd = name+'<STR_LIT>'<EOL>file_abn = name+'<STR_LIT>'<EOL>f = open(file_hyd,'<STR_LIT:w>')<EOL>f.write('<STR_LIT>')<EOL>f.write('<STR_LIT>')<EOL>f.write('<STR_LIT>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT:R>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT:T>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT:\n>')<EOL>for i in range(len(zn)):<EOL><INDENT>f.write( str(zn[i]).rjust(<NUM_LIT:5>) +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %Mr[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %dM[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %R[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %dR[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %Rho[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %PRE[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %T[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %V[i] +<EOL>'<STR_LIT:\n>')<EOL><DEDENT>f.close()<EOL>f = open(file_abn,'<STR_LIT:w>')<EOL>f.write('<STR_LIT>')<EOL>f.write('<STR_LIT>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT:H>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT:C>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT:N>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT:O>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT:S>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT>'.rjust(<NUM_LIT>)+<EOL>'<STR_LIT:\n>')<EOL>for i in range(len(zn)):<EOL><INDENT>f.write( str(zn[i]).rjust(<NUM_LIT:5>) +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %Mr[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %XH[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %XHe[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %XC[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %XN[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %XO[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %XNe[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %XNa[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %XMg[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %XAl[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %XSi[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %XS[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %XAr[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %XCa[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %XFe[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %XCo[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %XNi[i] +<EOL>'<STR_LIT>'.rjust(<NUM_LIT:11>) %XNi56[i] +<EOL>'<STR_LIT:\n>')<EOL><DEDENT>
Write an initial model in a format that may easily be read by the
radiation hydrodynamics code STELLA.

Parameters
----------
name : string
    an identifier for the model. There are two output files from
    this method, which will be <name>.hyd and <name>.abn, which
    contain the profiles for the hydro and abundance variables,
    respectively.