each day for all years for(i in 1:(dias-K)){ for(j in 1:anos){ for(l in 0:(K-1)){

for(n in 0:(2^K-1)){

} # closes the j loop } # closes the i loop

for(i in 1:(dias-K)){ for(j in 1:anos){

for(m in 1:(2^K)){ n\_m0[i,m] = count\_Km[m,1] n\_m1[i,m] = count\_Km[m,2] } count\_Km <- matrix(0, 2^K, 2)

} # closes de i loop

for(i in 1:(dias-K)){ for(m in 1:2^K){

} #closes the m loop for(m in 1:2^K){

alpha\_m0[i,m] = 4

if(ozonio\_sw[i+K,j] == 0){ for(n in 0:(2^K-1)){ if(mbase[i,j] == n){

if(ozonio\_sw[i+K,j] == 1){

count\_Km[n+1,1] = count\_Km[n+1,1]+1}}}

alpha\_m0 <- matrix(0, (dias - K), 2^K) alpha\_m1 <- matrix(0, (dias - K), 2^K)

if(n\_m0[i,m] == 0){alpha\_m0[i,m] = 3} if(n\_m1[i,m] == 0){alpha\_m1[i,m] = 3}

for(n in 0:(2^K-1)){if(mbase[i,j] == n){ count\_Km[n+1,2] = count\_Km[n+1,2]+1}}} }
