#-----------------------------------------------------------------------

#-----------------------------------------------------------------------
# Read the MAOOAM nature run
#-----------------------------------------------------------------------
infile = 'x_nature.pkl'
sv = state_vector()
sv = sv.load(infile)
x_nature = sv.getTrajectory()
maxit, xdim = np.shape(x_nature)

#-----------------------------------------------------------------------
# Read the MAOOAM observations
#-----------------------------------------------------------------------
infile = 'y_obs.pkl'
obs = obs_data()
obs = obs.load(infile)

#-----------------------------------------------------------------------
# Try reducing the observed dimensions
#-----------------------------------------------------------------------
yp = list(range(0, xdim))  #[0,1,2]
# Example for Lorenz-63:
#yp = [0]    # x only
#yp = [1]    # y only
#yp = [2]    # z only
#yp = [0,1]  # x and y only
#yp = [1,2]  # y and z only
#yp = [0,2]  # z and x only
if len(yp) < xdim:
    obs.reduceDim(yp)
Example #2
0
from module_obs_network import get_h_full_coverage, NDIM

infile = 'x_nature.pkl'
outfile = 'y_obs.pkl'

#--------------------------------------------------------------------------------
# Define observation bias (mu) and error (sigma)
# Note: sigma will be multiplied by nature run climatological standard deviation
#--------------------------------------------------------------------------------
mu = 0
sigma = 0.1

#--------------------------------------------------------------------------------
# Create observation object
#--------------------------------------------------------------------------------
obs = obs_data(name='observe_full_state', mu_init=mu, sigma_init=sigma)

#--------------------------------------------------------------------------------
# Read the nature run
#--------------------------------------------------------------------------------
sv = state_vector()
sv = sv.load(infile)
x_nature = sv.getTrajectory()

nr, nc = x_nature.shape
print('nr = ', nr)
print('nc = ', nc)

#--------------------------------------------------------------------------------
# Compute the climatological variance
#--------------------------------------------------------------------------------