CALIPSO-project / SPINacc

A spinup acceleration procedure for land surface models (LSM) . Developer team Mandresy Rasolonjatovo, Tianzhang Cai, Matthew Archer, Daniel Goll
4 stars 0 forks source link

LOOCV crashes when using compressed forcing) #24

Open dsgoll123 opened 1 year ago

dsgoll123 commented 1 year ago

After running task 1-4 in production mode (i.e. with compressed forcing) the task 5 fails. There are two types of task 5.

type (1), i.e. config[15] = 0. This global evaluation cannot be performed in production mode. We should add a stop command telling the users this option is not available in production mode.

type (2), i.e. config[15] = 1. The LOOCV is needed in production mode to test the ML performance. W need to fix the crash such that the LOOCV can run sucessfully. I copied the error code below.

File "/home/surface3/dgoll/SPINUP_ML/20221220/SPINacc-main/main.py", line 238, in eval_plot_un.plot_metric(resultpath,npfts,ipool,subLabel,dims,sect_n,subpool_name) File "/home/surface3/dgoll/SPINUP_ML/20221220/SPINacc-main/Tools/eval_plot_un.py", line 37, in plot_metric R22 =np.genfromtxt(data_path+ipool+"_R2.txt",delimiter=",")[:,:-1] IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed

dsgoll123 commented 1 year ago

I have identified an issues related to type (2). The text file for the statistical information are not filled with information although it is computed. A solution is to move the writing right after the information is produced in ML.py. I have attached a file which contains the edits. If they are confirmed to be good, I can commit them. ML.py.txt