<div dir="ltr"><div>Hi,</div><div><br></div><div>It seems the variable "alist" is being constructed as a list of 4 distinct lists, and the error message indicates thats not supported. But I'm not certain why those 4 need to be lists? What if you changed them to arrays?  Are the components not of homogeneous types (in which case, yea, arrays won't work there).</div><div><br></div><div>Rick<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 15, 2020 at 12:57 AM Maxime Colin via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div 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="gmail-m_-2803332050004092723Signature">
<div>
<div></div>
<div id="gmail-m_-2803332050004092723divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif">
<p style="margin-top:0px;margin-bottom:0px"><span id="gmail-m_-2803332050004092723ms-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" id="gmail-m_-2803332050004092723LPNoLP" target="_blank"><span id="gmail-m_-2803332050004092723LPNoLP"><font size="2" face="Candara,sans-serif"><span style="font-size:9pt"></span></font></span></a></pre>
</font><span id="gmail-m_-2803332050004092723ms-rterangepaste-end"></span><br>
<p style="margin-top:0px;margin-bottom:0px"></p>
</div>
</div>
</div>
</div>
<div id="gmail-m_-2803332050004092723appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_-2803332050004092723divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Maxime Colin <<a href="mailto:m.colin@unsw.edu.au" target="_blank">m.colin@unsw.edu.au</a>><br>
<b>Sent:</b> Tuesday, 15 September 2020 4:28 PM<br>
<b>To:</b> <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a> <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><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>

<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="gmail-m_-2803332050004092723x_Signature">
<div>
<div></div>
<div id="gmail-m_-2803332050004092723x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif">
<p style="margin-top:0px;margin-bottom:0px"><span id="gmail-m_-2803332050004092723x_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" id="gmail-m_-2803332050004092723LPNoLP" target="_blank"><span id="gmail-m_-2803332050004092723LPNoLP"><font size="2" face="Candara,sans-serif"><span style="font-size:9pt"></span></font></span></a></pre>
</font><span id="gmail-m_-2803332050004092723x_ms-rterangepaste-end"></span><br>
<p style="margin-top:0px;margin-bottom:0px"></p>
</div>
</div>
</div>
</div>
</div>
</div>

_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>