<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div>Back to my question...<br>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
It looks like replacing [/ by (/ and replacing /] by /) for the different variables to be eventually included in the final "alist" (i.e., variable_string_list, all_day_average, exp_growth_days_ave, exp_decay_days_ave) solves the problem! Sweet!</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Maxime<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div></div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p style="margin-top:0px; margin-bottom:0px"><span id="ms-rterangepaste-start"></span><font size="3" face="Calibri,Arial,Helvetica,sans-serif" color="black"></font></p>
<font size="3" face="Calibri,Arial,Helvetica,sans-serif" color="black">
<pre style="margin-top:14pt; margin-bottom:14pt"><font size="2" face="Candara,sans-serif"><span style="font-size:9pt">Maxime Colin</span></font><font size="2" face="Candara,sans-serif"><span style="font-size:9pt">
---------------------------------------------</span></font><font size="2" face="Candara,sans-serif"><span style="font-size:9pt">
</span></font><a href="https://www.normalesup.org/phare/squirrelmail/src/compose.php?send_to=maxime.colin%40normalesup.org" target="_blank" id="LPNoLP"><span id="LPNoLP"><font size="2" face="Candara,sans-serif"><span style="font-size:9pt"></span></font></span></a></pre>
</font><span id="ms-rterangepaste-end"></span><br>
<p style="margin-top:0px; margin-bottom:0px"></p>
</div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Maxime Colin <m.colin@unsw.edu.au><br>
<b>Sent:</b> Tuesday, 15 September 2020 4:28 PM<br>
<b>To:</b> ncl-talk@ucar.edu <ncl-talk@ucar.edu><br>
<b>Subject:</b> Error when writing out a text file with write_table: "fatal:process_list: can not print list in list yet."</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Dear NCL-talk list,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I'm trying to output an ASCII .txt file with some basic stats on my data. The idea is to print a list of variables (vertically), for various time periods (horizontally).</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I've already done this successfully in the past, so I don't know what I'm doing wrong this time.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
The header and footer print out well, but not the data, with should have 14 rows and 4 columns. To try to fix the problem I also made a test with meaningless data that I have commented out, such as [/11,12,13,14/]. But this test fails as well.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I'm receiving the following error, and I don't see what's wrong with my list:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
"<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
fatal:process_list: can not print list in list yet.
<div><br>
</div>
<div>fatal:process_list: can not print list in list yet.</div>
<div>"</div>
<div><br>
</div>
<div>The relevant bit of code looks like this:</div>
<div><br>
</div>
<div>  variable_string_list = [/"PW","CAPE","CIN","LCL","LFC","temp_500hPa","rh_500hPa","mse_500hPa","qvapor_500hPa","theta_get_subcloud","rh_subcloud","mse_subcloud","qvapor_subcloud","temp_subcloud"/]
<div>  ;variable_string_list = [/"s1","s2","s3","s4"/]</div>
<div><br>
</div>
<div>  all_day_average      = [/pw_manual_members_ave,cape_0D_members_ave,cin_0D_members_ave,LCL_members_ave,LFC_members_ave,temp_500hPa_members_ave,rh_500hPa_members_ave,mse_500hPa_members_ave,qvapor_500hPa_members_ave,theta_get_subcloud_layer_ave_members_ave,rh_subcloud_layer_ave_members_ave,mse_subcloud_layer_ave_members_ave,qvapor_subcloud_layer_ave_members_ave,temp_subcloud_layer_ave_members_ave/]</div>
<div>  ;all_day_average      = [/11,12,13,14/]</div>
<div><br>
</div>
<div>  exp_growth_days_ave  = [/avg(pw_manual_members(0:last_growth_day-1)),avg(cape_0D_members(0:last_growth_day-1)),avg(cin_0D_members(0:last_growth_day-1)),avg(LCL_members(0:last_growth_day-1)),avg(LFC_members(0:last_growth_day-1)),avg(temp_500hPa_members(0:last_growth_day-1)),avg(rh_500hPa_members(0:last_growth_day-1)),avg(mse_500hPa_members(0:last_growth_day-1)),avg(qvapor_500hPa_members(0:last_growth_day-1)),avg(theta_get_subcloud_layer_ave_members(0:last_growth_day-1)),avg(rh_subcloud_layer_ave_members(0:last_growth_day-1)),avg(mse_subcloud_layer_ave_members(0:last_growth_day-1)),avg(qvapor_subcloud_layer_ave_members(0:last_growth_day-1)),avg(temp_subcloud_layer_ave_members(0:last_growth_day-1))/]</div>
<div>  ;exp_growth_days_ave  = [/5,6,7,8/]</div>
<div><br>
</div>
<div>  lin = num_day_max-1</div>
<div>  exp_decay_days_ave   = [/avg(pw_manual_members(last_growth_day:lin)),avg(cape_0D_members(last_growth_day:lin)),avg(cin_0D_members(last_growth_day:lin)),avg(LCL_members(last_growth_day:lin)),avg(LFC_members(last_growth_day:lin)),avg(temp_500hPa_members(last_growth_day:lin)),avg(rh_500hPa_members(last_growth_day:lin)),avg(mse_500hPa_members(last_growth_day:lin)),avg(qvapor_500hPa_members(last_growth_day:lin)),avg(theta_get_subcloud_layer_ave_members(last_growth_day:lin)),avg(rh_subcloud_layer_ave_members(last_growth_day:lin)),avg(mse_subcloud_layer_ave_members(last_growth_day:lin)),avg(qvapor_subcloud_layer_ave_members(last_growth_day:lin)),avg(temp_subcloud_layer_ave_members(last_growth_day:lin))/]</div>
<div>  print ("pw_manual_members(last_growth_day:lin) : " + pw_manual_members(last_growth_day:lin))</div>
<div>  ;exp_decay_days_ave   = [/1,2,3,4/]</div>
<br>
<br>
</div>
<div><br>
</div>
<div>  alist = [/variable_string_list, all_day_average, exp_growth_days_ave, exp_decay_days_ave/]</div>
<div><br>
</div>
<div>  dir_for_plots_idea = data_dir_for_plots(0)
<div>  header = (/"--------------------------------", \</div>
<div>            "Stats about the target profiles, depending on exp growth or decay", \</div>
<div>            alist_string, \</div>
<div>            "for the targets computed with " + dir_for_plots_idea, \</div>
<div>            "--------------------------------"/)</div>
<div>  footer = (/"--------------------------------", \</div>
<div>            "This is a file footer", \</div>
<div>            "--------------------------------"/)</div>
<div><br>
</div>
<div>  hlist = [/header/]</div>
<div>  flist = [/footer/]</div>
<br>
<br>
</div>
<div><br>
</div>
<div>  write_table("./C02_target_profile_analysis_without_getvar/stats_for_all_day_and_exp_growth_days_and_exp_decay_days.txt", "w", hlist, "%s")
<div>  write_table("./C02_target_profile_analysis_without_getvar/stats_for_all_day_and_exp_growth_days_and_exp_decay_days.txt", "a", alist, "%s%10.10f%10.10f%10.10f")</div>
<div>  write_table("./C02_target_profile_analysis_without_getvar/stats_for_all_day_and_exp_growth_days_and_exp_decay_days.txt", "a", flist, "%s")</div>
<br>
<br>
</div>
<div><br>
</div>
<div>Does anyone have a clue on where the problem comes from?</div>
<div><br>
</div>
<div>What else can I test to identify the culprit?</div>
<div><br>
</div>
<div>Thank you very much for any suggestions.</div>
<div><br>
</div>
<div>Maxime.<br>
</div>
<br>
<br>
</div>
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div id="x_Signature">
<div>
<div></div>
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p style="margin-top:0px; margin-bottom:0px"><span id="x_ms-rterangepaste-start"></span><font size="3" face="Calibri,Arial,Helvetica,sans-serif" color="black"></font></p>
<font size="3" face="Calibri,Arial,Helvetica,sans-serif" color="black">
<pre style="margin-top:14pt; margin-bottom:14pt"><font size="2" face="Candara,sans-serif"><span style="font-size:9pt">Maxime Colin</span></font><font size="2" face="Candara,sans-serif"><span style="font-size:9pt">
---------------------------------------------</span></font><font size="2" face="Candara,sans-serif"><span style="font-size:9pt">
</span></font><a href="https://www.normalesup.org/phare/squirrelmail/src/compose.php?send_to=maxime.colin%40normalesup.org" target="_blank" id="LPNoLP"><span id="LPNoLP"><font size="2" face="Candara,sans-serif"><span style="font-size:9pt"></span></font></span></a></pre>
</font><span id="x_ms-rterangepaste-end"></span><br>
<p style="margin-top:0px; margin-bottom:0px"></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>