|
46 | 46 | # section 5c1 with assimilation of all |
47 | 47 | # fields |
48 | 48 | generate_noda = False |
49 | | -gen_5c1_euler_full = False |
| 49 | +generate_oneda = False |
| 50 | +gen_5c1_euler_full = True |
50 | 51 | gen_5c1_euler_momenta = False |
51 | | -gen_loc_errors_tv = True |
| 52 | +gen_loc_errors_tv = False |
52 | 53 |
|
53 | 54 | # Otherwise, if gen_all = True, generate all |
54 | 55 | # results |
|
58 | 59 | # path_to_obs = '/srv/public/ray/' |
59 | 60 | path_to_obs = './' |
60 | 61 |
|
61 | | -enda_sfx = 'wda_varcov' |
| 62 | +enda_sfx = 'wda_obsconv' |
| 63 | +noda_sfx = '' |
| 64 | +ref_aux = '_truthgen' |
62 | 65 |
|
63 | 66 | if gen_5b_obs_truth_euler or gen_all: |
64 | 67 | ########################################## |
|
76 | 79 |
|
77 | 80 | # simulation parameters for the observation |
78 | 81 | ud = { |
79 | | - 'aux' : 'obs', |
| 82 | + 'aux' : 'obs%s' %ref_aux, |
| 83 | + 'initial_blending' : False |
80 | 84 | } |
81 | 85 |
|
82 | 86 | # data assimilation parameters for the |
|
94 | 98 |
|
95 | 99 | # simulation parameters for the truth |
96 | 100 | ud = { |
97 | | - 'aux' : 'truth', |
| 101 | + 'aux' : 'truth%s' %ref_aux, |
98 | 102 | # Do blending for the initial time-step |
99 | 103 | 'initial_blending' : True |
100 | 104 | } |
|
113 | 117 | # |
114 | 118 | ########################################## |
115 | 119 |
|
116 | | - da_times = np.arange(0.0,10.25,0.25)[1:] |
117 | | - da_times = np.arange(0.0,3.25,0.25)[1:] |
| 120 | + da_times = np.arange(0.0,10.05,0.05)[1:] |
| 121 | + # da_times = np.arange(0.0,3.25,0.25)[1:] |
118 | 122 | da_times = np.around(da_times,3) |
119 | 123 | da_times = da_times.tolist() |
120 | 124 |
|
|
125 | 129 |
|
126 | 130 | # Generate ensemble with no DA |
127 | 131 | ud = { |
128 | | - 'aux' : 'noda', |
| 132 | + 'aux' : 'noda%s' %noda_sfx, |
129 | 133 | # Do blending for initial time-step |
130 | 134 | 'initial_blending' : True |
131 | 135 | } |
|
137 | 141 | 'obs_attrs' : ['rho', 'rhou', 'rhov', 'rhoY', 'p2_nodes'], |
138 | 142 | 'loc_setter' : (11, 11), |
139 | 143 | # Path to the generated observation |
140 | | - 'obs_path' : path_to_obs + 'output_travelling_vortex/output_travelling_vortex_ensemble=1_64_64_3.0_obs.h5' |
| 144 | + 'obs_path' : path_to_obs + 'output_travelling_vortex/output_travelling_vortex_ensemble=1_64_64_10.0_obs%s.h5' %ref_aux |
141 | 145 | } |
142 | 146 |
|
143 | 147 | # run simulation |
|
146 | 150 | if generate_noda: |
147 | 151 | rp.queue_run() |
148 | 152 |
|
| 153 | + |
| 154 | + # Generate ensemble with one DA |
| 155 | + ud = { |
| 156 | + 'aux' : 'oneda%s' %noda_sfx, |
| 157 | + # Do blending for initial time-step |
| 158 | + 'initial_blending' : True |
| 159 | + } |
| 160 | + |
| 161 | + # For the data assimilation parameters, |
| 162 | + # do not do DA at any time-point. |
| 163 | + dap = { |
| 164 | + 'da_times' : [0.25], |
| 165 | + 'obs_attrs' : ['rho', 'rhou', 'rhov', 'rhoY', 'p2_nodes'], |
| 166 | + 'loc_setter' : (11, 11), |
| 167 | + # Path to the generated observation |
| 168 | + 'obs_path' : path_to_obs + 'output_travelling_vortex/output_travelling_vortex_ensemble=1_64_64_10.0_obs%s.h5' %ref_aux |
| 169 | + } |
| 170 | + |
| 171 | + # run simulation |
| 172 | + rp.ud = json.dumps(ud) |
| 173 | + rp.dap = json.dumps(dap) |
| 174 | + if generate_oneda: |
| 175 | + rp.queue_run() |
| 176 | + |
| 177 | + |
| 178 | + # Generate ensemble EnDA |
149 | 179 | ud = { |
150 | 180 | 'aux' : '%s' %enda_sfx, |
151 | 181 | # Do blending for initial time-step |
|
162 | 192 | pi = p**0.4 |
163 | 193 | v = 4.0 / u_ref |
164 | 194 |
|
| 195 | + |
| 196 | + sd_rho = 0.025 |
| 197 | + sd_rhou = 0.0325 |
| 198 | + sd_rhov = 0.0325 |
| 199 | + sd_rhoY = 0.00025 |
| 200 | + sd_pi = 0.0004 |
| 201 | + sds = np.array([sd_rho, sd_rhou, sd_rhov, sd_rhoY, sd_pi]) |
| 202 | + sds *= 2.0 # let's make it 10% |
| 203 | + sds = np.sqrt(sds) |
165 | 204 | dap = { |
166 | 205 | 'da_times' : da_times, |
167 | 206 | # Assimilate all fields |
168 | 207 | 'obs_attrs' : ['rho', 'rhou', 'rhov', 'rhoY', 'p2_nodes'], |
169 | 208 | # Path to the generated observation |
170 | | - 'obs_path' : path_to_obs + 'output_travelling_vortex/output_travelling_vortex_ensemble=1_64_64_3.0_obs.h5', |
171 | | - 'loc_setter' : (11, 11), |
| 209 | + 'obs_path' : path_to_obs + 'output_travelling_vortex/output_travelling_vortex_ensemble=1_64_64_10.0_obs%s.h5' %ref_aux, |
| 210 | + 'loc_setter' : (21, 21), |
172 | 211 | # using variance: 1K for temperature, 4ms^-1 for velocity, 50Pa for pressure |
173 | 212 | # 'sd_setter' : [rho**0.5, (rho*v)**0.5, (rho*v)**0.5, p**0.5, pi**0.5], |
| 213 | + # 'sd_setter' : [0.05**2, 0.05**2, 0.05**2, 0.1, 0.0004], |
| 214 | + # 'sd_setter' : list(sds), |
174 | 215 | } |
175 | 216 |
|
176 | 217 | # run simulation |
|
222 | 263 | # Assimilate the momentum fields |
223 | 264 | 'obs_attrs' : ['rhou', 'rhov'], |
224 | 265 | # Path to the generated observation |
225 | | - 'obs_path' : path_to_obs + 'output_travelling_vortex/output_travelling_vortex_ensemble=1_64_64_3.0_obs.h5' |
| 266 | + 'obs_path' : path_to_obs + 'output_travelling_vortex/output_travelling_vortex_ensemble=1_64_64_3.0_obs%s.h5' %ref_aux |
226 | 267 | } |
227 | 268 |
|
228 | 269 | # run simulation |
|
382 | 423 | # run simulation |
383 | 424 | rp.ud = json.dumps(ud) |
384 | 425 | rp.dap = json.dumps(dap) |
385 | | - # rp.queue_run() |
| 426 | + rp.queue_run() |
386 | 427 |
|
387 | 428 | ud = { |
388 | 429 | 'aux' : 'wda_7', |
|
394 | 435 | # run simulation |
395 | 436 | rp.ud = json.dumps(ud) |
396 | 437 | rp.dap = json.dumps(dap) |
397 | | - # rp.queue_run() |
| 438 | + rp.queue_run() |
398 | 439 |
|
399 | 440 |
|
400 | 441 |
|
|
0 commit comments