<jupyter_start><jupyter_text>i,j = 0,0ref = 3for qi,Qin in enumerate(Qin_array):    caseDict['Q']['In'].value  = Qin    for ri,r in enumerate(r_array):        caseDict['inCoord']['X'][1].value = caseDict['outCoord']['X'][1].value + r        caseDict['inCoord']['X'][2].value = caseDict['outCoord']['X'][2].value + r        Icentral = I_array[qi,ri]        I_guess_1 = np.linspace(Icentral/3.,Icentral,num=ref)        I_guess_2 = np.linspace(Icentral,Icentral*3.,num=ref)        I_guess = np.concatenate((I_guess_1,I_guess_2[1:]))        for ii, I in enumerate(I_guess):            caseDict['Gradient']['X'].value  = I            buildSim("{:02d}_{:02d}__I_=_{:.1E}".format(i,j,I))            j += 1        j = 0        i += 1  Run and plotmo.Model.runAllModels(nProcs=8)legendTitle = "Decay rates $\lambda$  [1/s]"plotResults()<jupyter_code>waterDensity = 999.65
m3ToL = 1000.
import os 
from pandas import read_csv

folderToPlot="Comparison_MASSBALANCES"

#os.system("rm -rf MASSBALANCES; mkdir MASSBALANCES")
#os.system("cp ./CASE**/*-mas.dat ./MASSBALANCES")

mo.Model.folderFixedToCSV(folderToPlot)     

indices = {'t':"Time [d]",\
           'q':"ExtractWell Water Mass [kg/d]",\
           'm':"ExtractWell Vaq [mol/d]"}
normalizeWith={'t':1.0,'q':waterDensity/m3ToL,'m':1.0}

listOfFiles = os.listdir(folderToPlot)
listOfFiles.sort()
      
logC_arr = np.zeros_like(listOfFiles)
    
for i,f in enumerate(listOfFiles):
    DATA = read_csv(\
    folderToPlot+"/"+f,\
    delimiter=",")

    q = DATA[indices['q']]/normalizeWith['q']
    m = DATA[indices['m']]/normalizeWith['m']
      
    Y = np.divide(m,q)
    maxY = np.max(Y)
    
    logC_val = -np.log10(maxY)
    logC_arr[i] = logC_val
i,j = 0,0
ref = 3

I = []
for qi,Qin in enumerate(Qin_array):
    for ri,r in enumerate(r_array):
        Icentral = I_array[qi,ri]
        I_guess_1 = np.linspace(Icentral/3.,Icentral,num=ref)
        I_guess_2 = np.linspace(Icentral,Icentral*3.,num=ref)
        I_guess = np.concatenate((I_guess_1,I_guess_2[1:]))
        I.append(I_guess)
        
minC_array = np.zeros(16)
minI_array = np.zeros(16)

for i,vect in enumerate(np.reshape(logC_arr,(16,5))):
    Ieach = I[i]
    minC_array[i] = min(vect)
    minI_array[i] = Ieach[np.argmin(vect)]
minI_array
minC_array<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.176163549369291, 'fraction_numerical': 0.025228360156589823, 'mean_word_length': 3.5098039215686274, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '229743', 'license': 'MIT', 'n_tokens_mistral': 999, 'n_tokens_neox': 949, 'n_words': 140, 'path': 'notebooks/WithPFLOTRAN/OUTLINED/.ipynb_checkpoints/RunABunchOfCases-WithFiltration-checkpoint.ipynb', 'repo_name': 'edsaac/bioparticle', 'size': '2299'}