@@ -131,6 +131,7 @@ def check_if_more_star_job(job: "dict", work_dir="./") -> "list":
131131 Check if there are more star_job namelists to be read and returns a
132132 list of the paths to their inlists
133133 """
134+ print (job )
134135 inlists_to_be_read = []
135136 if job .get ("read_extra_star_job_inlist1" ) == ".true." :
136137 new_inlist = job .get ("extra_star_job_inlist1_name" ).strip ("'" ).strip ('"' )
@@ -147,6 +148,22 @@ def check_if_more_star_job(job: "dict", work_dir="./") -> "list":
147148 if job .get ("read_extra_star_job_inlist5" ) == ".true." :
148149 new_inlist = job .get ("extra_star_job_inlist5_name" ).strip ("'" ).strip ('"' )
149150 inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
151+ # MESA versions > 23.05.1 turned these into arrays
152+ if job .get ("read_extra_star_job_inlist(1)" ) == ".true." :
153+ new_inlist = job .get ("extra_star_job_inlist_name(1)" ).strip ("'" ).strip ('"' )
154+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
155+ if job .get ("read_extra_star_job_inlist(2)" ) == ".true." :
156+ new_inlist = job .get ("extra_star_job_inlist_name(2)" ).strip ("'" ).strip ('"' )
157+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
158+ if job .get ("read_extra_star_job_inlist(3)" ) == ".true." :
159+ new_inlist = job .get ("extra_star_job_inlist_name(3)" ).strip ("'" ).strip ('"' )
160+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
161+ if job .get ("read_extra_star_job_inlist(4)" ) == ".true." :
162+ new_inlist = job .get ("extra_star_job_inlist_name(4)" ).strip ("'" ).strip ('"' )
163+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
164+ if job .get ("read_extra_star_job_inlist(5)" ) == ".true." :
165+ new_inlist = job .get ("extra_star_job_inlist_name(5)" ).strip ("'" ).strip ('"' )
166+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
150167 return inlists_to_be_read
151168
152169
@@ -171,6 +188,22 @@ def check_if_more_eos(eos: "dict", work_dir="./") -> "list":
171188 if eos .get ("read_extra_eos_inlist5" ) == ".true." :
172189 new_inlist = eos .get ("extra_eos_inlist5_name" ).strip ("'" ).strip ('"' )
173190 inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
191+ # MESA versions > 23.05.1 turned these into arrays
192+ if eos .get ("read_extra_eos_inlist(1)" ) == ".true." :
193+ new_inlist = eos .get ("extra_eos_inlist_name(1)" ).strip ("'" ).strip ('"' )
194+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
195+ if eos .get ("read_extra_eos_inlist(2)" ) == ".true." :
196+ new_inlist = eos .get ("extra_eos_inlist_name(2)" ).strip ("'" ).strip ('"' )
197+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
198+ if eos .get ("read_extra_eos_inlist(3)" ) == ".true." :
199+ new_inlist = eos .get ("extra_eos_inlist_name(3)" ).strip ("'" ).strip ('"' )
200+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
201+ if eos .get ("read_extra_eos_inlist(4)" ) == ".true." :
202+ new_inlist = eos .get ("extra_eos_inlist_name(4)" ).strip ("'" ).strip ('"' )
203+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
204+ if eos .get ("read_extra_eos_inlist(5)" ) == ".true." :
205+ new_inlist = eos .get ("extra_eos_inlist_name(5)" ).strip ("'" ).strip ('"' )
206+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
174207 return inlists_to_be_read
175208
176209
@@ -195,6 +228,22 @@ def check_if_more_kap(kap: "dict", work_dir="./") -> "list":
195228 if kap .get ("read_extra_kap_inlist5" ) == ".true." :
196229 new_inlist = kap .get ("extra_kap_inlist5_name" ).strip ("'" ).strip ('"' )
197230 inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
231+ # MESA versions > 23.05.1 turned these into arrays
232+ if kap .get ("read_extra_kap_inlist(1)" ) == ".true." :
233+ new_inlist = kap .get ("extra_kap_inlist_name(1)" ).strip ("'" ).strip ('"' )
234+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
235+ if kap .get ("read_extra_kap_inlist(2)" ) == ".true." :
236+ new_inlist = kap .get ("extra_kap_inlist_name(2)" ).strip ("'" ).strip ('"' )
237+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
238+ if kap .get ("read_extra_kap_inlist(3)" ) == ".true." :
239+ new_inlist = kap .get ("extra_kap_inlist_name(3)" ).strip ("'" ).strip ('"' )
240+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
241+ if kap .get ("read_extra_kap_inlist(4)" ) == ".true." :
242+ new_inlist = kap .get ("extra_kap_inlist_name(4)" ).strip ("'" ).strip ('"' )
243+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
244+ if kap .get ("read_extra_kap_inlist(5)" ) == ".true." :
245+ new_inlist = kap .get ("extra_kap_inlist_name(5)" ).strip ("'" ).strip ('"' )
246+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
198247 return inlists_to_be_read
199248
200249
@@ -219,6 +268,22 @@ def check_if_more_binary_job(job: "dict", work_dir="./") -> "list":
219268 if job .get ("read_extra_binary_job_inlist5" ) == ".true." :
220269 new_inlist = job .get ("extra_binary_job_inlist5_name" ).strip ("'" ).strip ('"' )
221270 inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
271+ # MESA versions > 23.05.1 turned these into arrays
272+ if job .get ("read_extra_binary_job_inlist(1)" ) == ".true." :
273+ new_inlist = job .get ("extra_binary_job_inlist_name(1)" ).strip ("'" ).strip ('"' )
274+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
275+ if job .get ("read_extra_binary_job_inlist(2)" ) == ".true." :
276+ new_inlist = job .get ("extra_binary_job_inlist_name(2)" ).strip ("'" ).strip ('"' )
277+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
278+ if job .get ("read_extra_binary_job_inlist(3)" ) == ".true." :
279+ new_inlist = job .get ("extra_binary_job_inlist_name(3)" ).strip ("'" ).strip ('"' )
280+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
281+ if job .get ("read_extra_binary_job_inlist(4)" ) == ".true." :
282+ new_inlist = job .get ("extra_binary_job_inlist_name(4)" ).strip ("'" ).strip ('"' )
283+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
284+ if job .get ("read_extra_binary_job_inlist(5)" ) == ".true." :
285+ new_inlist = job .get ("extra_binary_job_inlist_name(5)" ).strip ("'" ).strip ('"' )
286+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
222287 return inlists_to_be_read
223288
224289
@@ -243,6 +308,22 @@ def check_if_more_controls(controls: "dict", work_dir="./") -> "inlist":
243308 if controls .get ("read_extra_controls_inlist5" ) == ".true." :
244309 new_inlist = controls .get ("extra_controls_inlist5_name" ).strip ("'" ).strip ('"' )
245310 inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
311+ # MESA versions > 23.05.1 turned these into arrays
312+ if controls .get ("read_extra_controls_inlist(1)" ) == ".true." :
313+ new_inlist = controls .get ("extra_controls_inlist_name(1)" ).strip ("'" ).strip ('"' )
314+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
315+ if controls .get ("read_extra_controls_inlist(2)" ) == ".true." :
316+ new_inlist = controls .get ("extra_controls_inlist_name(2)" ).strip ("'" ).strip ('"' )
317+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
318+ if controls .get ("read_extra_controls_inlist(3)" ) == ".true." :
319+ new_inlist = controls .get ("extra_controls_inlist_name(3)" ).strip ("'" ).strip ('"' )
320+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
321+ if controls .get ("read_extra_controls_inlist(4)" ) == ".true." :
322+ new_inlist = controls .get ("extra_controls_inlist_name(4)" ).strip ("'" ).strip ('"' )
323+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
324+ if controls .get ("read_extra_controls_inlist(5)" ) == ".true." :
325+ new_inlist = controls .get ("extra_controls_inlist_name(5)" ).strip ("'" ).strip ('"' )
326+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
246327 return inlists_to_be_read
247328
248329
@@ -267,6 +348,22 @@ def check_if_more_binary_controls(binary_controls: "dict", work_dir="./") -> "li
267348 if binary_controls .get ("read_extra_binary_controls_inlist5" ) == ".true." :
268349 new_inlist = binary_controls .get ("extra_binary_controls_inlist5_name" ).strip ("'" ).strip ('"' )
269350 inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
351+ # MESA versions > 23.05.1 turned these into arrays
352+ if binary_controls .get ("read_extra_binary_controls_inlist(1)" ) == ".true." :
353+ new_inlist = binary_controls .get ("extra_binary_controls_inlist_name(1)" ).strip ("'" ).strip ('"' )
354+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
355+ if binary_controls .get ("read_extra_binary_controls_inlist(2)" ) == ".true." :
356+ new_inlist = binary_controls .get ("extra_binary_controls_inlist_name(2)" ).strip ("'" ).strip ('"' )
357+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
358+ if binary_controls .get ("read_extra_binary_controls_inlist(3)" ) == ".true." :
359+ new_inlist = binary_controls .get ("extra_binary_controls_inlist_name(3)" ).strip ("'" ).strip ('"' )
360+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
361+ if binary_controls .get ("read_extra_binary_controls_inlist(4)" ) == ".true." :
362+ new_inlist = binary_controls .get ("extra_binary_controls_inlist_name(4)" ).strip ("'" ).strip ('"' )
363+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
364+ if binary_controls .get ("read_extra_binary_controls_inlist(5)" ) == ".true." :
365+ new_inlist = binary_controls .get ("extra_binary_controls_inlist_name(5)" ).strip ("'" ).strip ('"' )
366+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
270367 return inlists_to_be_read
271368
272369
@@ -291,6 +388,22 @@ def check_if_more_pgstar(pgstar: "dict", work_dir="./") -> "list":
291388 if pgstar .get ("read_extra_pgstar_inlist5" ) == ".true." :
292389 new_inlist = pgstar .get ("extra_pgstar_inlist5_name" ).strip ("'" ).strip ('"' )
293390 inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
391+ # MESA versions > 23.05.1 turned these into arrays
392+ if pgstar .get ("read_extra_pgstar_inlist(1)" ) == ".true." :
393+ new_inlist = pgstar .get ("extra_pgstar_inlist_name(1)" ).strip ("'" ).strip ('"' )
394+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
395+ if pgstar .get ("read_extra_pgstar_inlist(2)" ) == ".true." :
396+ new_inlist = pgstar .get ("extra_pgstar_inlist_name(2)" ).strip ("'" ).strip ('"' )
397+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
398+ if pgstar .get ("read_extra_pgstar_inlist(3)" ) == ".true." :
399+ new_inlist = pgstar .get ("extra_pgstar_inlist_name(3)" ).strip ("'" ).strip ('"' )
400+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
401+ if pgstar .get ("read_extra_pgstar_inlist(4)" ) == ".true." :
402+ new_inlist = pgstar .get ("extra_pgstar_inlist_name(4)" ).strip ("'" ).strip ('"' )
403+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
404+ if pgstar .get ("read_extra_pgstar_inlist(5)" ) == ".true." :
405+ new_inlist = pgstar .get ("extra_pgstar_inlist_name(5)" ).strip ("'" ).strip ('"' )
406+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
294407 return inlists_to_be_read
295408
296409
@@ -315,6 +428,22 @@ def check_if_more_binary_pgstar(binary_pgstar: "dict", work_dir="./") -> "list":
315428 if binary_pgstar .get ("read_extra_binary_pgstar_inlist5" ) == ".true." :
316429 new_inlist = binary_pgstar .get ("extra_binary_pgstar_inlist5_name" ).strip ("'" ).strip ('"' )
317430 inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
431+ # MESA versions > 23.05.1 turned these into arrays
432+ if binary_pgstar .get ("read_extra_binary_pgstar_inlist(1)" ) == ".true." :
433+ new_inlist = binary_pgstar .get ("extra_binary_pgstar_inlist_name(1)" ).strip ("'" ).strip ('"' )
434+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
435+ if binary_pgstar .get ("read_extra_binary_pgstar_inlist(2)" ) == ".true." :
436+ new_inlist = binary_pgstar .get ("extra_binary_pgstar_inlist_name(2)" ).strip ("'" ).strip ('"' )
437+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
438+ if binary_pgstar .get ("read_extra_binary_pgstar_inlist(3)" ) == ".true." :
439+ new_inlist = binary_pgstar .get ("extra_binary_pgstar_inlist_name(3)" ).strip ("'" ).strip ('"' )
440+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
441+ if binary_pgstar .get ("read_extra_binary_pgstar_inlist(4)" ) == ".true." :
442+ new_inlist = binary_pgstar .get ("extra_binary_pgstar_inlist_name(4)" ).strip ("'" ).strip ('"' )
443+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
444+ if binary_pgstar .get ("read_extra_binary_pgstar_inlist(5)" ) == ".true." :
445+ new_inlist = binary_pgstar .get ("extra_binary_pgstar_inlist_name(5)" ).strip ("'" ).strip ('"' )
446+ inlists_to_be_read = append_inlist_path (inlists_to_be_read , new_inlist , work_dir )
318447 return inlists_to_be_read
319448
320449
0 commit comments