Skip to content
Snippets Groups Projects
Commit afb69eef authored by Philipp Griewank's avatar Philipp Griewank
Browse files

Total update with all paper plots

In preperation to make the code public for the (hopefully) upcoming paper publication. To many changes to explain easily. The getting started segment has to be revised. And there are lots of semi-redundant functions with _22 and _paper endings. No cleaning up of the inner workings happened. But it is still nice that all the paper plots are not reproducable with one notebook.
parent 3dcda5ae
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
......@@ -11,7 +11,7 @@ from misc_functions import *
def set_da_constants_22(ncyc=100,nt=1,dt=550,u_std=2.0,dhdt_std=0.,
True_std_obs=0.15,used_std_obs=0.15,pert_std_obs=0.15,
obs_loc=np.arange(49,299,100).astype(int),
True_std_obs_sat=0.25,used_std_obs_sat=0.25,pert_std_obs_sat=0.25,
True_std_obs_sat=0.15,used_std_obs_sat=0.15,pert_std_obs_sat=0.15,
obs_loc_sat=np.arange(7,299,15),
nens=32,nexp=1,
init_noise=0.,init_spread = False, init_spread_h=0.5,init_spread_x = 500.,
......@@ -285,6 +285,8 @@ def generate_obs_22(truth,truth_init,m_const,da_const,j,t,sat_operator):
if len(da_const['obs_loc_sat'])>0:
truth_sat = sat_operator(truth)
obs_sat = truth_sat + np.random.normal(0,da_const["True_std_obs_sat"],m_const["nx"])
obs_sat[obs_sat>1.]= 1.
obs_sat[obs_sat<0.]= 0.
else:
obs_sat = np.zeros(m_const['nx'])
......@@ -2228,6 +2230,9 @@ def generate_obs_22_single(truth,m_const,da_const,sat_operator,obs_seed):
if len(da_const['obs_loc_sat'])>0:
truth_sat = sat_operator(truth)
obs_sat = truth_sat + np.random.normal(0,da_const["True_std_obs_sat"],m_const["nx"])
obs_sat[obs_sat>1.]= 1.
obs_sat[obs_sat<0.]= 0.
else:
obs_sat = np.zeros(m_const['nx'])
......@@ -2355,7 +2360,7 @@ def create_states_dict_22(j,states,m_const,da_const,sat_operator):
def vr_reloaded_22(background,truth,m_const,da_const,sat_operator,
func_J=sum_mid_tri,
reduc = 1,reg_flag=1,
quad_state = None,dJdx_inv=None,alpha=None,mismatch_threshold=0.1,
quad_state = None,dJdx_inv=None,alpha=0.01,mismatch_threshold=0.1,
iterative_flag=0,explicit_sens_flag = 1,exp_num=0,obs_seed=0,model_seed=0):
"""
......
......
......@@ -4,7 +4,7 @@
import numpy as np
def reflectance_simulator(h,h_c=0.5,window=7,clear_sky=0.3,cloud=0.9):
def reflectance_simulator(h,h_c=0.5,window=7,clear_sky=0.3,cloud=0.7):
"""
calculates the "reflectance" which is a fixed clear sky value where h is below h_c, and a cloud value where h>h_c.
As a spatial averaging defined by window, with the total width over the averaging being 2*window+1
......
......
File added
File added
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment