<jupyter_start><jupyter_text>Load Evaporative Exposure results header into string array to use as header array<jupyter_code># Evaporative Exposure
with open('/Users/rmueller/Projects/MIDOSS/results/MediumFloater/SOG_21nov17-28nov17_EvapExposureTest/resOilOutput.sro', 'r') as the_file:
    all_data = [line.strip() for line in the_file.readlines()]
    header = all_data[4]  
    
# Order header into list array by splitting up string
header_arr = []
header_arr = header.split(' ')
# Remove emtpy entries from list
header_arr = np.asarray([x for x in header_arr if x != ''])
header_arr<jupyter_output><empty_output><jupyter_text>Load Evaporative Exposure output<jupyter_code>EvapExp_in = '/Users/rmueller/Projects/MIDOSS/results/MediumFloater/SOG_21nov17-28nov17_EvapExposureTest/resOilOutput.sro'
file_in = EvapExp_in
data_EE2D = np.genfromtxt(file_in, skip_header=6, skip_footer=4)/1000
nrows,ncols = data_EE2D.shape<jupyter_output><empty_output><jupyter_text>Load Fingas Evaporation output<jupyter_code>Fingas_in = '/Users/rmueller/Projects/MIDOSS/results/MediumFloater/SOG_21nov17-28nov17_FingasEvapTest/resOilOutput.sro'
file_in = Fingas_in
data_Fingas2D = np.genfromtxt(file_in, skip_header=6, skip_footer=4)/1000
nrows,ncols = data_Fingas2D.shape<jupyter_output><empty_output><jupyter_text>Create structured Array<jupyter_code># define structure of structured array
# This doesn't appear to be correct, but I haven't yet figured out what I've done wrong with the datatype
dtype = [('Header',(np.str_,22)),('Values', np.float64)]

# create index list for for-loop over columns
header_range = range(header_arr.size)
data_range = range(nrows)

# Assign 2D data and header strings to structured array
massbalance_EE = np.array([[(header_arr[hdr_index], data_EE2D[data_index, hdr_index]) for hdr_index in header_range] for data_index in data_range], dtype=dtype)
massbalance_Fingas = np.array([[(header_arr[hdr_index], data_Fingas2D[data_index, hdr_index]) for hdr_index in header_range] for data_index in data_range], dtype=dtype)
massbalance_EE.shape<jupyter_output><empty_output><jupyter_text>Plot results<jupyter_code>plot_data = [15,18,24,37]
header_arr[plot_data]
plot_data = [15,18,24,37]
#plt.plot([data_EE2D[range(191), data_index] for data_index in plot_data])
plt.plot(data_EE2D[range(191), plot_data[0]])
plt.plot(data_EE2D[range(191), plot_data[1]])
plt.plot(data_EE2D[range(191), plot_data[2]])
plt.plot(data_EE2D[range(191), plot_data[3]])
plt.ylabel('Mass (Tonnes)')
plt.xlabel('Time after oil release (hours) ')
plt.legend(['Evaporated', 'Dispersed','Disolved','Biodegraded'])
plt.title('Evaporative Exposure Mass Balance')
plt.savefig('MB_EvapExp.png')
plot_data = [15,18,24,37]
#plt.plot([data_EE2D[range(191), data_index] for data_index in plot_data])
plt.plot(data_Fingas2D[range(191), plot_data[0]])
plt.plot(data_Fingas2D[range(191), plot_data[1]])
plt.plot(data_Fingas2D[range(191), plot_data[2]])
plt.plot(data_Fingas2D[range(191), plot_data[3]])
plt.ylabel('Mass (Tonnes)')
plt.xlabel('Time after oil release (hours) ')
plt.legend(['Evaporated', 'Dispersed','Disolved','Biodegraded'])
plt.title('Fingas Evaporation Mass Balance')
plt.savefig('MB_Fingas.png')
plot_data = [15,18,24,37]
#plt.plot([data_EE2D[range(191), data_index] for data_index in plot_data])
plt.plot(data_EE2D[range(191), plot_data[0]])
plt.plot(data_Fingas2D[range(191), plot_data[0]])
plt.ylabel('Mass (Tonnes)')
plt.xlabel('Time after oil release (hours) ')
plt.legend(['Evaporative Exposure', 'Fingas'])
plt.title('Evaporation Mass Balance Comparison')
plt.savefig('MB_Fingas_EE_Comparison.png')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13623827909542197, 'fraction_numerical': 0.03916161059018202, 'mean_word_length': 8.723860589812332, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '46073', 'license': 'Apache-2.0', 'n_tokens_mistral': 1497, 'n_tokens_neox': 1381, 'n_words': 244, 'path': 'notebooks/mass_balance/compare_Fingas_EvaporativeExposure.ipynb', 'repo_name': 'MIDOSS/analysis-rachael', 'size': '3626'}