[ncl-talk] Error when writing out a text file with write_table: "fatal:process_list: can not print list in list yet."

Maxime Colin m.colin at unsw.edu.au
Tue Sep 15 00:57:23 MDT 2020


Back to my question...

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!

Maxime


Maxime Colin
---------------------------------------------
<https://www.normalesup.org/phare/squirrelmail/src/compose.php?send_to=maxime.colin%40normalesup.org>


________________________________
From: Maxime Colin <m.colin at unsw.edu.au>
Sent: Tuesday, 15 September 2020 4:28 PM
To: ncl-talk at ucar.edu <ncl-talk at ucar.edu>
Subject: Error when writing out a text file with write_table: "fatal:process_list: can not print list in list yet."

Dear NCL-talk list,

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).

I've already done this successfully in the past, so I don't know what I'm doing wrong this time.

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.

I'm receiving the following error, and I don't see what's wrong with my list:

"
fatal:process_list: can not print list in list yet.

fatal:process_list: can not print list in list yet.
"

The relevant bit of code looks like this:

  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"/]
  ;variable_string_list = [/"s1","s2","s3","s4"/]

  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/]
  ;all_day_average      = [/11,12,13,14/]

  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))/]
  ;exp_growth_days_ave  = [/5,6,7,8/]

  lin = num_day_max-1
  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))/]
  print ("pw_manual_members(last_growth_day:lin) : " + pw_manual_members(last_growth_day:lin))
  ;exp_decay_days_ave   = [/1,2,3,4/]



  alist = [/variable_string_list, all_day_average, exp_growth_days_ave, exp_decay_days_ave/]

  dir_for_plots_idea = data_dir_for_plots(0)
  header = (/"--------------------------------", \
            "Stats about the target profiles, depending on exp growth or decay", \
            alist_string, \
            "for the targets computed with " + dir_for_plots_idea, \
            "--------------------------------"/)
  footer = (/"--------------------------------", \
            "This is a file footer", \
            "--------------------------------"/)

  hlist = [/header/]
  flist = [/footer/]



  write_table("./C02_target_profile_analysis_without_getvar/stats_for_all_day_and_exp_growth_days_and_exp_decay_days.txt", "w", hlist, "%s")
  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")
  write_table("./C02_target_profile_analysis_without_getvar/stats_for_all_day_and_exp_growth_days_and_exp_decay_days.txt", "a", flist, "%s")



Does anyone have a clue on where the problem comes from?

What else can I test to identify the culprit?

Thank you very much for any suggestions.

Maxime.




Maxime Colin
---------------------------------------------
<https://www.normalesup.org/phare/squirrelmail/src/compose.php?send_to=maxime.colin%40normalesup.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200915/093dc8ef/attachment.html>


More information about the ncl-talk mailing list