-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_convergence_eescomparison_plot_weakforcing.py
519 lines (449 loc) · 51.8 KB
/
make_convergence_eescomparison_plot_weakforcing.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
import numpy as np
import matplotlib.pyplot as plt
from datetime import datetime
from netCDF4 import Dataset
import numpy.ma as ma
from datetime import datetime
import seaborn as sns
import matplotlib
import os
import argparse
import scipy.stats as ss
import pickle
sns.set(color_codes = True)
sns.set_style('whitegrid')
################################################
# plot used to compare convergence between the strong and weak forcings. Store in weak_forcing_1's directories.
# change when using script:
# file for input data
################################################
parser = argparse.ArgumentParser(description='Plots comparison convergence plots with an emphasis on estimating the effective ensemble size (ees). Input variables please.')
parser.add_argument('--time',required=True, type=int, help='time')
args = parser.parse_args()
time = args.time
#################################################################################################
# load data
n_half_sizes = [2,10,20,50,100,200,500]
# weak forcing
wind_mean_2 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[0])+'_wind_2','rb'))
wind_stdev_2 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[0])+'_wind_2','rb'))
wind_q95_2 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[0])+'_wind_2','rb'))
wind_mean_10 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[1])+'_wind_2','rb'))
wind_stdev_10 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[1])+'_wind_2','rb'))
wind_q95_10 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[1])+'_wind_2','rb'))
wind_mean_20 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[2])+'_wind_2','rb'))
wind_stdev_20 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[2])+'_wind_2','rb'))
wind_q95_20 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[2])+'_wind_2','rb'))
wind_mean_50 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[3])+'_wind_2','rb'))
wind_stdev_50 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[3])+'_wind_2','rb'))
wind_q95_50 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[3])+'_wind_2','rb'))
wind_mean_100 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[4])+'_wind_2','rb'))
wind_stdev_100 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[4])+'_wind_2','rb'))
wind_q95_100 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[4])+'_wind_2','rb'))
wind_mean_200 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[5])+'_wind_2','rb'))
wind_stdev_200 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[5])+'_wind_2','rb'))
wind_q95_200 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[5])+'_wind_2','rb'))
#wind_mean_500 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[6])+'_wind_2','rb'))
#wind_stdev_500 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[6])+'_wind_2','rb'))
#wind_q95_500 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[6])+'_wind_2','rb'))
height_mean_2 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[0])+'_height_2','rb'))
height_stdev_2 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[0])+'_height_2','rb'))
height_q95_2 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[0])+'_height_2','rb'))
height_mean_10 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[1])+'_height_2','rb'))
height_stdev_10 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[1])+'_height_2','rb'))
height_q95_10 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[1])+'_height_2','rb'))
height_mean_20 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[2])+'_height_2','rb'))
height_stdev_20 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[2])+'_height_2','rb'))
height_q95_20 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[2])+'_height_2','rb'))
height_mean_50 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[3])+'_height_2','rb'))
height_stdev_50 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[3])+'_height_2','rb'))
height_q95_50 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[3])+'_height_2','rb'))
height_mean_100 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[4])+'_height_2','rb'))
height_stdev_100 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[4])+'_height_2','rb'))
height_q95_100 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[4])+'_height_2','rb'))
height_mean_200 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[5])+'_height_2','rb'))
height_stdev_200 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[5])+'_height_2','rb'))
height_q95_200 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[5])+'_height_2','rb'))
#height_mean_500 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[6])+'_height_2','rb'))
#height_stdev_500 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[6])+'_height_2','rb'))
#height_q95_500 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[6])+'_height_2','rb'))
rain_mean_2 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[0])+'_rain_2','rb'))
rain_stdev_2 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[0])+'_rain_2','rb'))
rain_q95_2 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[0])+'_rain_2','rb'))
rain_mean_10 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[1])+'_rain_2','rb'))
rain_stdev_10 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[1])+'_rain_2','rb'))
rain_q95_10 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[1])+'_rain_2','rb'))
rain_mean_20 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[2])+'_rain_2','rb'))
rain_stdev_20 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[2])+'_rain_2','rb'))
rain_q95_20 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[2])+'_rain_2','rb'))
rain_mean_50 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[3])+'_rain_2','rb'))
rain_stdev_50 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[3])+'_rain_2','rb'))
rain_q95_50 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[3])+'_rain_2','rb'))
rain_mean_100 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[4])+'_rain_2','rb'))
rain_stdev_100 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[4])+'_rain_2','rb'))
rain_q95_100 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[4])+'_rain_2','rb'))
rain_mean_200 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[5])+'_rain_2','rb'))
rain_stdev_200 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[5])+'_rain_2','rb'))
rain_q95_200 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[5])+'_rain_2','rb'))
#rain_mean_500 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[6])+'_rain_2','rb'))
#rain_stdev_500 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[6])+'_rain_2','rb'))
#rain_q95_500 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_weakforcing_gp_500half_size_'+str(n_half_sizes[6])+'_rain_2','rb'))
# import single grid point data
wind_mean = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_mean_extendedrun1_weakforcing_gp_500_wind','rb'))
height_mean = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_mean_extendedrun1_weakforcing_gp_500_height','rb'))
rain_mean = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_mean_extendedrun1_weakforcing_gp_500_rain','rb'))
wind_stdev = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_stdev_extendedrun1_weakforcing_gp_500_wind','rb'))
height_stdev = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_stdev_extendedrun1_weakforcing_gp_500_height','rb'))
rain_stdev = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_stdev_extendedrun1_weakforcing_gp_500_rain','rb'))
wind_q95 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_q95_extendedrun1_weakforcing_gp_500_wind','rb'))
height_q95 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_q95_extendedrun1_weakforcing_gp_500_height','rb'))
rain_q95 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_data_q95_extendedrun1_weakforcing_gp_500_rain','rb'))
# strong forcing
sf_wind_mean_2 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[0])+'_wind_2','rb'))
sf_wind_stdev_2 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[0])+'_wind_2','rb'))
sf_wind_q95_2 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[0])+'_wind_2','rb'))
sf_wind_mean_10 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[1])+'_wind_2','rb'))
sf_wind_stdev_10 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[1])+'_wind_2','rb'))
sf_wind_q95_10 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[1])+'_wind_2','rb'))
sf_wind_mean_20 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[2])+'_wind_2','rb'))
sf_wind_stdev_20 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[2])+'_wind_2','rb'))
sf_wind_q95_20 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[2])+'_wind_2','rb'))
sf_wind_mean_50 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[3])+'_wind_2','rb'))
sf_wind_stdev_50 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[3])+'_wind_2','rb'))
sf_wind_q95_50 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[3])+'_wind_2','rb'))
sf_wind_mean_100 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[4])+'_wind_2','rb'))
sf_wind_stdev_100 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[4])+'_wind_2','rb'))
sf_wind_q95_100 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[4])+'_wind_2','rb'))
sf_wind_mean_200 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[5])+'_wind_2','rb'))
sf_wind_stdev_200 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[5])+'_wind_2','rb'))
sf_wind_q95_200 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[5])+'_wind_2','rb'))
#sf_wind_mean_500 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[6])+'_wind_2','rb'))
#sf_wind_stdev_500 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[6])+'_wind_2','rb'))
#sf_wind_q95_500 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[6])+'_wind_2','rb'))
sf_height_mean_2 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[0])+'_height_2','rb'))
sf_height_stdev_2 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[0])+'_height_2','rb'))
sf_height_q95_2 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[0])+'_height_2','rb'))
sf_height_mean_10 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[1])+'_height_2','rb'))
sf_height_stdev_10 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[1])+'_height_2','rb'))
sf_height_q95_10 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[1])+'_height_2','rb'))
sf_height_mean_20 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[2])+'_height_2','rb'))
sf_height_stdev_20 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[2])+'_height_2','rb'))
sf_height_q95_20 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[2])+'_height_2','rb'))
sf_height_mean_50 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[3])+'_height_2','rb'))
sf_height_stdev_50 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[3])+'_height_2','rb'))
sf_height_q95_50 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[3])+'_height_2','rb'))
sf_height_mean_100 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[4])+'_height_2','rb'))
sf_height_stdev_100 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[4])+'_height_2','rb'))
sf_height_q95_100 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[4])+'_height_2','rb'))
sf_height_mean_200 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[5])+'_height_2','rb'))
sf_height_stdev_200 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[5])+'_height_2','rb'))
sf_height_q95_200 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[5])+'_height_2','rb'))
#sf_height_mean_500 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[6])+'_height_2','rb'))
#sf_height_stdev_500 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[6])+'_height_2','rb'))
#sf_height_q95_500 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[6])+'_height_2','rb'))
sf_rain_mean_2 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[0])+'_rain_2','rb'))
sf_rain_stdev_2 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[0])+'_rain_2','rb'))
sf_rain_q95_2 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[0])+'_rain_2','rb'))
sf_rain_mean_10 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[1])+'_rain_2','rb'))
sf_rain_stdev_10 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[1])+'_rain_2','rb'))
sf_rain_q95_10 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[1])+'_rain_2','rb'))
sf_rain_mean_20 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[2])+'_rain_2','rb'))
sf_rain_stdev_20 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[2])+'_rain_2','rb'))
sf_rain_q95_20 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[2])+'_rain_2','rb'))
sf_rain_mean_50 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[3])+'_rain_2','rb'))
sf_rain_stdev_50 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[3])+'_rain_2','rb'))
sf_rain_q95_50 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[3])+'_rain_2','rb'))
sf_rain_mean_100 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[4])+'_rain_2','rb'))
sf_rain_stdev_100 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[4])+'_rain_2','rb'))
sf_rain_q95_100 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[4])+'_rain_2','rb'))
sf_rain_mean_200 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[5])+'_rain_2','rb'))
sf_rain_stdev_200 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[5])+'_rain_2','rb'))
sf_rain_q95_200 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[5])+'_rain_2','rb'))
#sf_rain_mean_500 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_mean_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[6])+'_rain_2','rb'))
#sf_rain_stdev_500 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_stdev_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[6])+'_rain_2','rb'))
#sf_rain_q95_500 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_neighbourhood_q95_extendedrun1_strongforcing15_gp_500half_size_'+str(n_half_sizes[6])+'_rain_2','rb'))
# import single grid point data
sf_wind_mean = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_mean_extendedrun1_strongforcing15_singlegp_500_wind','rb'))
sf_height_mean = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_mean_extendedrun1_strongforcing15_singlegp_500_height','rb'))
sf_rain_mean = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_mean_extendedrun1_strongforcing15_singlegp_500_rain','rb'))
sf_wind_stdev = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_stdev_extendedrun1_strongforcing15_singlegp_500_wind','rb'))
sf_height_stdev = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_stdev_extendedrun1_strongforcing15_singlegp_500_height','rb'))
sf_rain_stdev = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_stdev_extendedrun1_strongforcing15_singlegp_500_rain','rb'))
sf_wind_q95 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_q95_extendedrun1_strongforcing15_singlegp_500_wind','rb'))
sf_height_q95 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_q95_extendedrun1_strongforcing15_singlegp_500_height','rb'))
sf_rain_q95 = pickle.load(open('/scratch/k/K.Tempest/Model_extension/strong_forcing_15/convergence_data/convergence_data_q95_extendedrun1_strongforcing15_singlegp_500_rain','rb'))
# define function and calculate b variable
x = np.arange(1,121)
def func(x,b):
y = (10**b)*x**(-1/2)
return y
wind_mean_b = np.sum(((np.log10(wind_mean_20))) + (0.5 * np.log10(x)),axis=1)/len(wind_mean_20[0,:]) # change this to 200 when have full data!!!
height_mean_b = np.sum(((np.log10(height_mean_20))) + (0.5 * np.log10(x)),axis=1)/len(height_mean_20[0,:])
rain_mean_b = np.sum(((np.log10(rain_mean_20))) + (0.5 * np.log10(x)),axis=1)/len(rain_mean_20[0,:])
wind_q95_b = np.sum(((np.log10(wind_q95_20))) + (0.5 * np.log10(x)),axis=1)/len(wind_q95_20[0,:])
height_q95_b = np.sum(((np.log10(height_q95_20))) + (0.5 * np.log10(x)),axis=1)/len(height_q95_20[0,:])
rain_q95_b = np.sum(((np.log10(rain_q95_20))) + (0.5 * np.log10(x)),axis=1)/len(rain_q95_20[0,:])
wind_stdev_b = np.sum(((np.log10(wind_stdev_20[:,1:]))) + (0.5 * np.log10(x[1:])),axis=1)/len(wind_stdev_20[0,1:])
height_stdev_b = np.sum(((np.log10(height_stdev_20[:,1:]))) + (0.5 * np.log10(x[1:])),axis=1)/len(height_stdev_20[0,1:])
rain_stdev_b = np.sum(((np.log10(rain_stdev_20[:,1:]))) + (0.5 * np.log10(x[1:])),axis=1)/len(rain_stdev_20[0,1:])
# plot mean #
fig, (ax1, ax2, ax3)= plt.subplots(1, 3,figsize=[14,5])
plt.subplots_adjust(wspace = 0.5,hspace = 0)
plt.grid(True)
#################################################################################################
# do for only one time
ax1.plot(x,sf_wind_mean[time],linestyle='-',lw=4,alpha=0.5,color = 'dodgerblue',label='thicker=strong forcing 15') # strong forcing
ax1.plot(x,sf_wind_mean_2[time],linestyle='-',lw=4,alpha=0.5,color = 'firebrick')
ax1.plot(x,sf_wind_mean_10[time],linestyle='-',lw=4,alpha=0.5,color = 'darkorange')
ax1.plot(x,sf_wind_mean_20[time],linestyle='-',lw=4,alpha=0.5,color = 'goldenrod')
ax1.plot(x,sf_wind_mean_50[time],linestyle='-',lw=4,alpha=0.5,color = 'chartreuse')
ax1.plot(x,sf_wind_mean_100[time],linestyle='-',lw=4,alpha=0.5,color = 'forestgreen')
ax1.plot(x,sf_wind_mean_200[time],linestyle='-',lw=4,alpha=0.5,color = 'rosybrown')
#ax1.plot(x,sf_wind_mean_500[time],linestyle='-',lw=4,alpha=0.5,color = 'mediumturquoise')
f = func(x, wind_mean_b[time]) #weak forcing
ax1.fill_between(x,f+0.05*f,f-0.05*f,color='silver',alpha=0.5)
ax1.plot(x,wind_mean[time],linestyle='-',lw=1,color = 'dodgerblue',label='single gp')
ax1.plot(x,wind_mean_2[time],linestyle='-',lw=1,color = 'firebrick',label='r=2')
ax1.plot(x,wind_mean_10[time],linestyle='-',lw=1,color = 'darkorange',label='r=10')
ax1.plot(x,wind_mean_20[time],linestyle='-',lw=1,color = 'goldenrod',label='r=20')
ax1.plot(x,wind_mean_50[time],linestyle='-',lw=1,color = 'chartreuse',label='r=50')
ax1.plot(x,wind_mean_100[time],linestyle='-',lw=1,color = 'forestgreen',label='r=100')
ax1.plot(x,wind_mean_200[time],linestyle='-',lw=1,color = 'rosybrown',label='r=200 i='+str(time+5)+'hours a='+str("{:.2f}".format(10**wind_mean_b[time])))
#ax1.plot(x,wind_mean_500[time],linestyle='-',lw=1,color = 'mediumturquoise',label='r=500')
ax1.legend()
ax1.set_yscale('log')
ax1.set_xscale('log')
ax1.tick_params(axis='x', labelsize=19)
ax1.tick_params(axis='y', labelsize=19)
ax1.set_ylabel('$Width$ $of$ $95\%$ $CI$ $(ms^{-1})$',fontsize=19);
ax1.set_xlabel('$Ensemble$ $size$ $(n)$',fontsize=19);
ax1.set_title('$Wind$ $mean$',fontsize=19)
#################################################################################################
ax2.plot(x,sf_height_mean[time],linestyle='-',lw=4,alpha=0.5,color = 'dodgerblue',label='thicker=strong forcing 15') # strong forcing
ax2.plot(x,sf_height_mean_2[time],linestyle='-',lw=4,alpha=0.5,color = 'firebrick')
ax2.plot(x,sf_height_mean_10[time],linestyle='-',lw=4,alpha=0.5,color = 'darkorange')
ax2.plot(x,sf_height_mean_20[time],linestyle='-',lw=4,alpha=0.5,color = 'goldenrod')
ax2.plot(x,sf_height_mean_50[time],linestyle='-',lw=4,alpha=0.5,color = 'chartreuse')
ax2.plot(x,sf_height_mean_100[time],linestyle='-',lw=4,alpha=0.5,color = 'forestgreen')
ax2.plot(x,sf_height_mean_200[time],linestyle='-',lw=4,alpha=0.5,color = 'rosybrown')
#ax2.plot(x,sf_height_mean_500[time],linestyle='-',lw=4,alpha=0.5,color = 'mediumturquoise')
f = func(x, height_mean_b[time])
ax2.fill_between(x,f+0.05*f,f-0.05*f,color='silver',alpha=0.5)
ax2.plot(x,height_mean[time],linestyle='-',lw=1,color = 'dodgerblue',label='single gp')
ax2.plot(x,height_mean_2[time],linestyle='-',lw=1,color = 'firebrick',label='r=2')
ax2.plot(x,height_mean_10[time],linestyle='-',lw=1,color = 'darkorange',label='r=10')
ax2.plot(x,height_mean_20[time],linestyle='-',lw=1,color = 'goldenrod',label='r=20')
ax2.plot(x,height_mean_50[time],linestyle='-',lw=1,color = 'chartreuse',label='r=50')
ax2.plot(x,height_mean_100[time],linestyle='-',lw=1,color = 'forestgreen',label='r=100')
ax2.plot(x,height_mean_200[time],linestyle='-',lw=1,color = 'rosybrown',label='r=200 i='+str(time+5)+'hours a='+str("{:.2f}".format(10**height_mean_b[time])))
#ax2.plot(x,height_mean_500[time],linestyle='-',lw=1,color = 'mediumturquoise',label='r=500')
ax2.set_yscale('log')
ax2.set_xscale('log')
ax2.tick_params(axis='x', labelsize=19)
ax2.tick_params(axis='y', labelsize=19)
ax2.set_ylabel('$Width$ $of$ $95\%$ $CI$ $(m)$',fontsize=19);
ax2.set_xlabel('$Ensemble$ $size$ $(n)$',fontsize=19);
ax2.set_title('$Height$ $mean$',fontsize=19)
#################################################################################################
ax3.plot(x,sf_rain_mean[time],linestyle='-',lw=4,alpha=0.5,color = 'dodgerblue',label='thicker=strong forcing 15') # strong forcing
ax3.plot(x,sf_rain_mean_2[time],linestyle='-',lw=4,alpha=0.5,color = 'firebrick')
ax3.plot(x,sf_rain_mean_10[time],linestyle='-',lw=4,alpha=0.5,color = 'darkorange')
ax3.plot(x,sf_rain_mean_20[time],linestyle='-',lw=4,alpha=0.5,color = 'goldenrod')
ax3.plot(x,sf_rain_mean_50[time],linestyle='-',lw=4,alpha=0.5,color = 'chartreuse')
ax3.plot(x,sf_rain_mean_100[time],linestyle='-',lw=4,alpha=0.5,color = 'forestgreen')
ax3.plot(x,sf_rain_mean_200[time],linestyle='-',lw=4,alpha=0.5,color = 'rosybrown')
#ax3.plot(x,sf_rain_mean_500[time],linestyle='-',lw=4,alpha=0.5,color = 'mediumturquoise')
f = func(x, rain_mean_b[time])
ax3.fill_between(x,f+0.05*f,f-0.05*f,color='silver',alpha=0.5)
ax3.plot(x,rain_mean[time],linestyle='-',lw=1,color = 'dodgerblue',label='single gp')
ax3.plot(x,rain_mean_2[time],linestyle='-',lw=1,color = 'firebrick',label='r=2')
ax3.plot(x,rain_mean_10[time],linestyle='-',lw=1,color = 'darkorange',label='r=10')
ax3.plot(x,rain_mean_20[time],linestyle='-',lw=1,color = 'goldenrod',label='r=20')
ax3.plot(x,rain_mean_50[time],linestyle='-',lw=1,color = 'chartreuse',label='r=50')
ax3.plot(x,rain_mean_100[time],linestyle='-',lw=1,color = 'firebrick',label='r=100')
ax3.plot(x,rain_mean_200[time],linestyle='-',lw=1,color = 'forestgreen',label='r=200 i='+str(time+5)+'hours a='+str("{:.2f}".format(10**rain_mean_b[time])))
#ax3.plot(x,rain_mean_500[time],linestyle='-',lw=1,color = 'mediumturquoise',label='r=500')
ax3.set_yscale('log')
ax3.set_xscale('log')
ax3.tick_params(axis='x', labelsize=19)
ax3.tick_params(axis='y', labelsize=19)
ax3.set_ylabel('$Width$ $of$ $95\%$ $CI$',fontsize=19);
ax3.set_xlabel('$Ensemble$ $size$ $(n)$',fontsize=19);
ax3.set_title('$Rain$ $mean$',fontsize=19)
#################################################################################################
plt.tight_layout()
plt.savefig('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_plot_neighbourhood_eescomparison_mean_extendedrun1_weakforcing_time_'+str(time)+'.pdf')
# plot stdev #
fig, (ax1, ax2, ax3)= plt.subplots(1, 3,figsize=[14,5])
plt.subplots_adjust(wspace = 0.5,hspace = 0)
plt.grid(True)
#################################################################################################
# do for only one time
ax1.plot(x,sf_wind_stdev[time],linestyle='-',lw=4,alpha=0.5,color = 'dodgerblue',label='thicker=strong forcing 15') # strong forcing
ax1.plot(x,sf_wind_stdev_2[time],linestyle='-',lw=4,alpha=0.5,color = 'firebrick')
ax1.plot(x,sf_wind_stdev_10[time],linestyle='-',lw=4,alpha=0.5,color = 'darkorange')
ax1.plot(x,sf_wind_stdev_20[time],linestyle='-',lw=4,alpha=0.5,color = 'goldenrod')
ax1.plot(x,sf_wind_stdev_50[time],linestyle='-',lw=4,alpha=0.5,color = 'chartreuse')
ax1.plot(x,sf_wind_stdev_100[time],linestyle='-',lw=4,alpha=0.5,color = 'forestgreen')
ax1.plot(x,sf_wind_stdev_200[time],linestyle='-',lw=4,alpha=0.5,color = 'rosybrown')
#ax1.plot(x,sf_wind_stdev_500[time],linestyle='-',lw=4,alpha=0.5,color = 'mediumturquoise')
f = func(x, wind_stdev_b[time])
ax1.fill_between(x,f+0.05*f,f-0.05*f,color='silver',alpha=0.5)
ax1.plot(x,wind_stdev[time],linestyle='-',lw=1,color = 'dodgerblue',label='single gp')
ax1.plot(x,wind_stdev_2[time],linestyle='-',lw=1,color = 'firebrick',label='r=2')
ax1.plot(x,wind_stdev_10[time],linestyle='-',lw=1,color = 'darkorange',label='r=10')
ax1.plot(x,wind_stdev_20[time],linestyle='-',lw=1,color = 'goldenrod',label='r=20')
ax1.plot(x,wind_stdev_50[time],linestyle='-',lw=1,color = 'chartreuse',label='r=50')
ax1.plot(x,wind_stdev_100[time],linestyle='-',lw=1,color = 'forestgreen',label='r=100')
ax1.plot(x,wind_stdev_200[time],linestyle='-',lw=1,color = 'rosybrown',label='r=200 i='+str(time+5)+'hours a='+str("{:.2f}".format(10**wind_stdev_b[time])))
#ax1.plot(x,wind_stdev_500[time],linestyle='-',lw=1,color = 'mediumturquoise',label='r=500')
ax1.legend()
ax1.set_yscale('log')
ax1.set_xscale('log')
ax1.tick_params(axis='x', labelsize=19)
ax1.tick_params(axis='y', labelsize=19)
ax1.set_ylabel('$Width$ $of$ $95\%$ $CI$',fontsize=19);
ax1.set_xlabel('$Ensemble$ $size$ $(n)$',fontsize=19);
ax1.set_title('$Wind$ $stdev$',fontsize=19)
#################################################################################################
ax2.plot(x,sf_height_stdev[time],linestyle='-',lw=4,alpha=0.5,color = 'dodgerblue',label='thicker=strong forcing 15') # strong forcing
ax2.plot(x,sf_height_stdev_2[time],linestyle='-',lw=4,alpha=0.5,color = 'firebrick')
ax2.plot(x,sf_height_stdev_10[time],linestyle='-',lw=4,alpha=0.5,color = 'darkorange')
ax2.plot(x,sf_height_stdev_20[time],linestyle='-',lw=4,alpha=0.5,color = 'goldenrod')
ax2.plot(x,sf_height_stdev_50[time],linestyle='-',lw=4,alpha=0.5,color = 'chartreuse')
ax2.plot(x,sf_height_stdev_100[time],linestyle='-',lw=4,alpha=0.5,color = 'forestgreen')
ax2.plot(x,sf_height_stdev_200[time],linestyle='-',lw=4,alpha=0.5,color = 'rosybrown')
#ax2.plot(x,sf_height_stdev_500[time],linestyle='-',lw=4,alpha=0.5,color = 'mediumturquoise')
f = func(x, height_stdev_b[time])
ax2.fill_between(x,f+0.05*f,f-0.05*f,color='silver',alpha=0.5)
ax2.plot(x,height_stdev[time],linestyle='-',lw=1,color = 'dodgerblue',label='single gp')
ax2.plot(x,height_stdev_2[time],linestyle='-',lw=1,color = 'firebrick',label='r=2')
ax2.plot(x,height_stdev_10[time],linestyle='-',lw=1,color = 'darkorange',label='r=10')
ax2.plot(x,height_stdev_20[time],linestyle='-',lw=1,color = 'goldenrod',label='r=20')
ax2.plot(x,height_stdev_50[time],linestyle='-',lw=1,color = 'chartreuse',label='r=50')
ax2.plot(x,height_stdev_100[time],linestyle='-',lw=1,color = 'forestgreen',label='r=100')
ax2.plot(x,height_stdev_200[time],linestyle='-',lw=1,color = 'rosybrown',label='r=200 i='+str(time+5)+'hours a='+str("{:.2f}".format(10**height_stdev_b[time])))
#ax2.plot(x,height_stdev_500[time],linestyle='-',lw=1,color = 'mediumturquoise',label='r=500')
ax2.set_yscale('log')
ax2.set_xscale('log')
ax2.tick_params(axis='x', labelsize=19)
ax2.tick_params(axis='y', labelsize=19)
ax2.set_ylabel('$Width$ $of$ $95\%$ $CI$',fontsize=19);
ax2.set_xlabel('$Ensemble$ $size$ $(n)$',fontsize=19);
ax2.set_title('$Height$ $stdev$',fontsize=19)
#################################################################################################
ax3.plot(x,sf_rain_stdev[time],linestyle='-',lw=4,alpha=0.5,color = 'dodgerblue',label='thicker=strong forcing 15') # strong forcing
ax3.plot(x,sf_rain_stdev_2[time],linestyle='-',lw=4,alpha=0.5,color = 'firebrick')
ax3.plot(x,sf_rain_stdev_10[time],linestyle='-',lw=4,alpha=0.5,color = 'darkorange')
ax3.plot(x,sf_rain_stdev_20[time],linestyle='-',lw=4,alpha=0.5,color = 'goldenrod')
ax3.plot(x,sf_rain_stdev_50[time],linestyle='-',lw=4,alpha=0.5,color = 'chartreuse')
ax3.plot(x,sf_rain_stdev_100[time],linestyle='-',lw=4,alpha=0.5,color = 'forestgreen')
ax3.plot(x,sf_rain_stdev_200[time],linestyle='-',lw=4,alpha=0.5,color = 'rosybrown')
#ax3.plot(x,sf_rain_stdev_500[time],linestyle='-',lw=4,alpha=0.5,color = 'mediumturquoise')
f = func(x, rain_stdev_b[time])
ax3.fill_between(x,f+0.05*f,f-0.05*f,color='silver',alpha=0.5)
ax3.plot(x,rain_stdev[time],linestyle='-',lw=1,color = 'dodgerblue',label='single gp')
ax3.plot(x,rain_stdev_2[time],linestyle='-',lw=1,color = 'firebrick',label='r=2')
ax3.plot(x,rain_stdev_10[time],linestyle='-',lw=1,color = 'darkorange',label='r=10')
ax3.plot(x,rain_stdev_20[time],linestyle='-',lw=1,color = 'goldenrod',label='r=20')
ax3.plot(x,rain_stdev_50[time],linestyle='-',lw=1,color = 'chartreuse',label='r=50')
ax3.plot(x,rain_stdev_100[time],linestyle='-',lw=1,color = 'firebrick',label='r=100')
ax3.plot(x,rain_stdev_200[time],linestyle='-',lw=1,color = 'forestgreen',label='r=200 i='+str(time+5)+'hours a='+str("{:.2f}".format(10**rain_stdev_b[time])))
#ax3.plot(x,rain_stdev_500[time],linestyle='-',lw=1,color = 'mediumturquoise',label='r=500')
ax3.set_yscale('log')
ax3.set_xscale('log')
ax3.tick_params(axis='x', labelsize=19)
ax3.tick_params(axis='y', labelsize=19)
ax3.set_ylabel('$Width$ $of$ $95\%$ $CI$',fontsize=19);
ax3.set_xlabel('$Ensemble$ $size$ $(n)$',fontsize=19);
ax3.set_title('$Rain$ $stdev$',fontsize=19)
#################################################################################################
plt.tight_layout()
plt.savefig('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_plot_neighbourhood_eescomparison_stdev_extendedrun1_weakforcing_time_'+str(time)+'.pdf')
# plot q95 #
fig, (ax1, ax2, ax3)= plt.subplots(1, 3,figsize=[14,5])
plt.subplots_adjust(wspace = 0.5,hspace = 0)
plt.grid(True)
#################################################################################################
# do for only one time
ax1.plot(x,sf_wind_q95[time],linestyle='-',lw=4,alpha=0.5,color = 'dodgerblue',label='thicker=strong forcing 15') # strong forcing
ax1.plot(x,sf_wind_q95_2[time],linestyle='-',lw=4,alpha=0.5,color = 'firebrick')
ax1.plot(x,sf_wind_q95_10[time],linestyle='-',lw=4,alpha=0.5,color = 'darkorange')
ax1.plot(x,sf_wind_q95_20[time],linestyle='-',lw=4,alpha=0.5,color = 'goldenrod')
ax1.plot(x,sf_wind_q95_50[time],linestyle='-',lw=4,alpha=0.5,color = 'chartreuse')
ax1.plot(x,sf_wind_q95_100[time],linestyle='-',lw=4,alpha=0.5,color = 'forestgreen')
ax1.plot(x,sf_wind_q95_200[time],linestyle='-',lw=4,alpha=0.5,color = 'rosybrown')
#ax1.plot(x,sf_wind_q95_500[time],linestyle='-',lw=4,alpha=0.5,color = 'mediumturquoise')
f = func(x, wind_q95_b[time])
ax1.fill_between(x,f+0.05*f,f-0.05*f,color='silver',alpha=0.5)
ax1.plot(x,wind_q95[time],linestyle='-',lw=1,color = 'dodgerblue',label='single gp')
ax1.plot(x,wind_q95_2[time],linestyle='-',lw=1,color = 'firebrick',label='r=2')
ax1.plot(x,wind_q95_10[time],linestyle='-',lw=1,color = 'darkorange',label='r=10')
ax1.plot(x,wind_q95_20[time],linestyle='-',lw=1,color = 'goldenrod',label='r=20')
ax1.plot(x,wind_q95_50[time],linestyle='-',lw=1,color = 'chartreuse',label='r=50')
ax1.plot(x,wind_q95_100[time],linestyle='-',lw=1,color = 'forestgreen',label='r=100')
ax1.plot(x,wind_q95_200[time],linestyle='-',lw=1,color = 'rosybrown',label='r=200 i='+str(time+5)+'hours a='+str("{:.2f}".format(10**wind_q95_b[time])))
#ax1.plot(x,wind_q95_500[time],linestyle='-',lw=1,color = 'mediumturquoise',label='r=500')
ax1.legend()
ax1.set_yscale('log')
ax1.set_xscale('log')
ax1.tick_params(axis='x', labelsize=19)
ax1.tick_params(axis='y', labelsize=19)
ax1.set_ylabel('$Width$ $of$ $95\%$ $CI$',fontsize=19);
ax1.set_xlabel('$Ensemble$ $size$ $(n)$',fontsize=19);
ax1.set_title('$Wind$ $q95$',fontsize=19)
#################################################################################################
ax2.plot(x,sf_height_q95[time],linestyle='-',lw=4,alpha=0.5,color = 'dodgerblue',label='thicker=strong forcing 15') # strong forcing
ax2.plot(x,sf_height_q95_2[time],linestyle='-',lw=4,alpha=0.5,color = 'firebrick')
ax2.plot(x,sf_height_q95_10[time],linestyle='-',lw=4,alpha=0.5,color = 'darkorange')
ax2.plot(x,sf_height_q95_20[time],linestyle='-',lw=4,alpha=0.5,color = 'goldenrod')
ax2.plot(x,sf_height_q95_50[time],linestyle='-',lw=4,alpha=0.5,color = 'chartreuse')
ax2.plot(x,sf_height_q95_100[time],linestyle='-',lw=4,alpha=0.5,color = 'forestgreen')
ax2.plot(x,sf_height_q95_200[time],linestyle='-',lw=4,alpha=0.5,color = 'rosybrown')
#ax2.plot(x,sf_height_q95_500[time],linestyle='-',lw=4,alpha=0.5,color = 'mediumturquoise')
f = func(x, height_q95_b[time])
ax2.fill_between(x,f+0.05*f,f-0.05*f,color='silver',alpha=0.5)
ax2.plot(x,height_q95[time],linestyle='-',lw=1,color = 'dodgerblue',label='single gp')
ax2.plot(x,height_q95_2[time],linestyle='-',lw=1,color = 'firebrick',label='r=2')
ax2.plot(x,height_q95_10[time],linestyle='-',lw=1,color = 'darkorange',label='r=10')
ax2.plot(x,height_q95_20[time],linestyle='-',lw=1,color = 'goldenrod',label='r=20')
ax2.plot(x,height_q95_50[time],linestyle='-',lw=1,color = 'chartreuse',label='r=50')
ax2.plot(x,height_q95_100[time],linestyle='-',lw=1,color = 'forestgreen',label='r=100')
ax2.plot(x,height_q95_200[time],linestyle='-',lw=1,color = 'rosybrown',label='r=200 i='+str(time+5)+'hours a='+str("{:.2f}".format(10**height_q95_b[time])))
#ax2.plot(x,height_q95_500[time],linestyle='-',lw=1,color = 'mediumturquoise',label='r=500')
ax2.set_yscale('log')
ax2.set_xscale('log')
ax2.tick_params(axis='x', labelsize=19)
ax2.tick_params(axis='y', labelsize=19)
ax2.set_ylabel('$Width$ $of$ $95\%$ $CI$',fontsize=19);
ax2.set_xlabel('$Ensemble$ $size$ $(n)$',fontsize=19);
ax2.set_title('$Height$ $q95$',fontsize=19)
#################################################################################################
ax3.plot(x,sf_rain_q95[time],linestyle='-',lw=4,alpha=0.5,color = 'dodgerblue',label='thicker=strong forcing 15') # strong forcing
ax3.plot(x,sf_rain_q95_2[time],linestyle='-',lw=4,alpha=0.5,color = 'firebrick')
ax3.plot(x,sf_rain_q95_10[time],linestyle='-',lw=4,alpha=0.5,color = 'darkorange')
ax3.plot(x,sf_rain_q95_20[time],linestyle='-',lw=4,alpha=0.5,color = 'goldenrod')
ax3.plot(x,sf_rain_q95_50[time],linestyle='-',lw=4,alpha=0.5,color = 'chartreuse')
ax3.plot(x,sf_rain_q95_100[time],linestyle='-',lw=4,alpha=0.5,color = 'forestgreen')
ax3.plot(x,sf_rain_q95_200[time],linestyle='-',lw=4,alpha=0.5,color = 'rosybrown')
#ax3.plot(x,sf_rain_q95_500[time],linestyle='-',lw=4,alpha=0.5,color = 'mediumturquoise')
f = func(x, rain_q95_b[time])
ax3.fill_between(x,f+0.05*f,f-0.05*f,color='silver',alpha=0.5)
ax3.plot(x,rain_q95[time],linestyle='-',lw=1,color = 'dodgerblue',label='single gp')
ax3.plot(x,rain_q95_2[time],linestyle='-',lw=1,color = 'firebrick',label='r=2')
ax3.plot(x,rain_q95_10[time],linestyle='-',lw=1,color = 'darkorange',label='r=10')
ax3.plot(x,rain_q95_20[time],linestyle='-',lw=1,color = 'goldenrod',label='r=20')
ax3.plot(x,rain_q95_50[time],linestyle='-',lw=1,color = 'chartreuse',label='r=50')
ax3.plot(x,rain_q95_100[time],linestyle='-',lw=1,color = 'forestgreen',label='r=100')
ax3.plot(x,rain_q95_200[time],linestyle='-',lw=1,color = 'rosybrown',label='r=200 i='+str(time+5)+'hours a='+str("{:.2f}".format(10**rain_q95_b[time])))
#ax3.plot(x,rain_q95_500[time],linestyle='-',lw=1,color = 'mediumturquoise',label='r=500')
ax3.set_yscale('log')
ax3.set_xscale('log')
ax3.tick_params(axis='x', labelsize=19)
ax3.tick_params(axis='y', labelsize=19)
ax3.set_ylabel('$Width$ $of$ $95\%$ $CI$',fontsize=19);
ax3.set_xlabel('$Ensemble$ $size$ $(n)$',fontsize=19);
ax3.set_title('$Rain$ $q95$',fontsize=19)
#################################################################################################
plt.tight_layout()
plt.savefig('/scratch/k/K.Tempest/Model_extension/weak_forcing_1/convergence_data/convergence_plot_neighbourhood_eescomparison_q95_extendedrun1_weakforcing_time_'+str(time)+'.pdf')