sigma=0.9
ki_mean=2.9e-15
deltax=1
deltay=0.5
dx=0.05
dy=0.025
x=2
y=1
m=int(y/dy+1)
n=int(x/dx+1)
root_directory=r'E:\EnKF_Gas_Modelling'
root_directory_true_obs=r'E:\EnKF_Gas_Modelling\true_obs'


##调取观测值样本
obs_Pressure1=generate_obs(time_step,obs_num,varR,N,root_directory_true_obs)
t=1
y_p1=obs_Pressure1[t]
y_obs_p1=pd.DataFrame(y_p1)
y_obs_p1=y_obs_p1.T
y_obs_p1=y_obs_p1.values

y_obs_prediction=np.zeros([obs_num,N])
p_after=np.zeros([Nod_num,N])

#产生初始p1
p1_initial=np.zeros([Nod_num,N])
p1_initial=p1_initial+101325

#产生初始参数
para_initial=para_init(sigma,deltax,deltay,dx,dy,m,n,Nod_num,N,ki_mean)
obs_Num=[172,180,254,262,336,344]
obs_num=len(obs_Num)
ki_mean=1e-18
sigma=0.6
deltax=0.04
deltay=0.1
dx=0.005
dy=0.005
x=0.05
y=0.2
m=int(y/dy+1)
n=int(x/dx+1)



obs_Pressure1,obs_Pressure2=generate_obs(time_step,obs_num,varR,N)
t=1
y_p1=obs_Pressure1[t]
y_obs_p1=pd.DataFrame(y_p1)
y_obs_p1=y_obs_p1.T
y_obs_p1=y_obs_p1.values
y_p2=obs_Pressure2[t]
y_obs_p2=pd.DataFrame(y_p2)
y_obs_p2=y_obs_p2.T
y_obs_p2=y_obs_p2.values
y_obs=np.vstack((y_obs_p1,y_obs_p2))
np.savetxt('y_obs.txt',y_obs)

p_after=np.zeros([Nod_num*2,N])
y_obs_prediction=np.zeros([obs_num*2,N])