@@ -188,7 +188,7 @@ def visualizeData():
188188 for type, ftype, dens in zip([ " WWPR" , " WOPR" , " WGPR" ],[ " FWPT" , " FOPT" , " FGPT" ],[999.04100, 852.95669, 0.90358]):
189189 fmass[ftype] = dens*smspec[ftype+ " H" ][-1]
190190 for well in nwells:
191- if sum(smspec[type+ " H:" +well]) >0:
191+ if np. sum(smspec[type+" H:" +well]) >0:
192192 wells[type].append(type+":"+well)
193193 j += 1
194194 linei = [[ ] for _ in range(j)]
@@ -417,14 +417,14 @@ def visualizeData():
417417 data = smspec[wells[type][i]]
418418 datah = smspec[wells[type][i][:4]+"H"+wells[type][i][4:]]
419419 axs[j].plot(smsp_dates, data, color='m', label = 'opm-tests')
420- if sum(datah>0):
420+ if np. sum(datah>0):
421421 axs[j].errorbar(smsp_dates, datah, yerr= [max(minerr[type],var[type]*d_2) for d_2 in datah], color=[128 / 255.0, 128 / 255.0, 128 / 255.0], markersize='.5', elinewidth=.5, fmt='o', linestyle='', label = 'Data')
422422 axs[j].set_ylabel(f'{wells[type][i]} [SM3/day]', fontsize=12)
423423 axs[j].set_xlabel('Time [years]', fontsize=12)
424424 axs[j].xaxis.set_tick_params(size=6, rotation=45)
425425 axs[j].legend()
426426 axs[j].set_ylim(bottom=0)
427- if sum(datah>0):
427+ if np. sum(datah>0):
428428 figs[j].savefig(f"{output_folder}/postprocessing/wells/HISTO_DATA_{wells[type][i][:4]}_{wells[type][i][5:]}.png", bbox_inches="tight")
429429 else:
430430 figs[j].savefig(f"{output_folder}/postprocessing/wells/{wells[type][i][:4]}_{wells[type][i][5:]}.png", bbox_inches="tight")
@@ -455,7 +455,7 @@ def visualizeData():
455455 figs, ax = plt.subplots()
456456 tab20s = matplotlib.colormaps['tab20']
457457 for i in range(I):
458- ax.plot(i,sum(error_hist[i])/(len(error_hist[i])), markersize='10', marker='o', label=r"$N_{ens}=$"+f"{n_e[i]}", c=tab20s.colors[i])
458+ ax.plot(i,np. sum(error_hist[i])/(len(error_hist[i])), markersize='10', marker='o', label=r"$N_{ens}=$"+f"{n_e[i]}", c=tab20s.colors[i])
459459 ax.axhline(y=error_standard, color="black", ls="--", lw=1, label=f'opm-tests (#Active cells:{numCellsDefault})')
460460 ax.set_title(r"$O_i=\frac{1}{N_{ens}}\sum_{j}^{N_{e}}O_{i,j}$, "+f"#HM parameters: {len(csvData)}, #Active cells: {numCellsHm}")
461461 ax.legend()
@@ -578,7 +578,7 @@ def visualizeData():
578578 f.write(f'Missmatch (standard simulation from opm-test deck): {error_standard : .4e}\n')
579579 for i in range(I):
580580 f.write(f'Iteration {i}; Number of ensembles {int(n_e[i])}\n')
581- f.write(f'Missmatch (mean): {sum(error_hist[i])/(len(error_hist[i])) : .4e} \n')
581+ f.write(f'Missmatch (mean): {np. sum(error_hist[i])/(len(error_hist[i])) : .4e} \n')
582582 f.write(f'Missmatch (closest realization to all obs): {error_ens[i][eobs[i][0][0]]: .4e}\n')
583583 print(f'\nClosest final realization to all obs:{eobs[-1][0][0]}')
584584 print(f'Number of parameters to HM: {len(csvData)}')
@@ -587,7 +587,7 @@ def visualizeData():
587587 print(f'Missmatch (standard simulation from opm-test deck): {error_standard : .4e}')
588588 for i in range(I):
589589 print(f'Iteration {i}; Number of ensembles {int(n_e[i])}')
590- print(f'Missmatch (mean): {sum(error_hist[i])/(len(error_hist[i])) : .4e}')
590+ print(f'Missmatch (mean): {np. sum(error_hist[i])/(len(error_hist[i])) : .4e}')
591591 print(f'Missmatch (closest realization to all obs): {error_ens[i][eobs[i][0][0]] : .4e}')
592592 else:
593593 with open(f"{output_folder}/postprocessing/errors.txt", 'w') as f:
0 commit comments