-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathHistogram_TasMIN.py
2074 lines (1870 loc) · 121 KB
/
Histogram_TasMIN.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
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
"""
Created on Thursday May 24th 2018
@author: s0899345
"""
import numpy as np
import iris
import iris.coord_categorisation as iriscc
import iris.analysis.cartography
#this file is split into parts as follows:
#PART 1: Load and Format all Past Models
#PART 2: Load and Format all Future Models
#PART 3: Load Observed Data
#PART 4: Format Data General
#PART 5: Format Baseline and Observed Data
#PART 6: Format for Time Periods
#PART 7: print data
def main():
#-------------------------------------------------------------------------
#PART 1: LOAD and FORMAT ALL PAST MODELS
CCCmaCanRCM_b = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/Historical_daily/tasmin_AFR-44_CCCma-CanESM2_historical_r1i1p1_CCCma-CanRCM4_r2_day_19710101-20001231.nc'
CCCmaSMHI_b = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/Historical_daily/tasmin_AFR-44_CCCma-CanESM2_historical_r1i1p1_SMHI-RCA4_v1_day_19710101-20001231.nc'
CNRM_b = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/Historical_daily/tasmin_AFR-44_CNRM-CERFACS-CNRM-CM5_historical_r1i1p1_CLMcom-CCLM4-8-17_v1_day_19710101-20001231.nc'
CNRMSMHI_b = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/Historical_daily/tasmin_AFR-44_CNRM-CERFACS-CNRM-CM5_historical_r1i1p1_SMHI-RCA4_v1_day_19710101-20001231.nc'
CSIRO_b = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/Historical_daily/tasmin_AFR-44_CSIRO-QCCCE-CSIRO-Mk3-6-0_historical_r1i1p1_SMHI-RCA4_v1_day_19710101-20001231.nc'
ICHECDMI_b = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/Historical_daily/tasmin_AFR-44_ICHEC-EC-EARTH_historical_r3i1p1_DMI-HIRHAM5_v2_day_19710101-20001231.nc'
ICHECCCLM_b = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/Historical_daily/tasmin_AFR-44_ICHEC-EC-EARTH_historical_r12i1p1_CLMcom-CCLM4-8-17_v1_day_19710101-20001231.nc'
ICHECKNMI_b = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/Historical_daily/tasmin_AFR-44_ICHEC-EC-EARTH_historical_r1i1p1_KNMI-RACMO22T_v1_day_19710101-20001231.nc'
ICHECMPI_b = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/Historical_daily/tasmin_AFR-44_ICHEC-EC-EARTH_historical_r12i1p1_MPI-CSC-REMO2009_v1_day_19710101-20001231.nc'
ICHECSMHI_b = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/Historical_daily/tasmin_AFR-44_ICHEC-EC-EARTH_historical_r12i1p1_SMHI-RCA4_v1_day_19710101-20001231.nc'
IPSL_b = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/Historical_daily/tasmin_AFR-44_IPSL-IPSL-CM5A-MR_historical_r1i1p1_SMHI-RCA4_v1_day_19710101-20001231.nc'
MIROC_b = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/Historical_daily/tasmin_AFR-44_MIROC-MIROC5_historical_r1i1p1_SMHI-RCA4_v1_day_19710101-20001231.nc'
MOHCCCLM_b = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/Historical_daily/tasmin_AFR-44_MOHC-HadGEM2-ES_historical_r1i1p1_CLMcom-CCLM4-8-17_v1_day_19710101-20001231.nc'
MOHCKNMI_b = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/Historical_daily/tasmin_AFR-44_MOHC-HadGEM2-ES_historical_r1i1p1_KNMI-RACMO22T_v2_day_19710101-20001231.nc'
MOHCSMHI_b = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/Historical_daily/tasmin_AFR-44_MOHC-HadGEM2-ES_historical_r1i1p1_SMHI-RCA4_v1_day_19710101-20001231.nc'
MPICCLM_b = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/Historical_daily/tasmin_AFR-44_MPI-M-MPI-ESM-LR_historical_r1i1p1_CLMcom-CCLM4-8-17_v1_day_19710101-20001231.nc'
MPIREMO_b = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/Historical_daily/tasmin_AFR-44_MPI-M-MPI-ESM-LR_historical_r1i1p1_MPI-CSC-REMO2009_v1_day_19710101-20001231.nc'
MPISMHI_b = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/Historical_daily/tasmin_AFR-44_MPI-M-MPI-ESM-LR_historical_r1i1p1_SMHI-RCA4_v1_day_19710101-20001231.nc'
NCCSMHI_b = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/Historical_daily/tasmin_AFR-44_NCC-NorESM1-M_historical_r1i1p1_SMHI-RCA4_v1_day_19710101-20001231.nc'
NOAA_b = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/Historical_daily/tasmin_AFR-44_NOAA-GFDL-GFDL-ESM2M_historical_r1i1p1_SMHI-RCA4_v1_day_19710101-20001231.nc'
#Load exactly one cube from given file
CCCmaCanRCM_b = iris.load_cube(CCCmaCanRCM_b)
CCCmaSMHI_b = iris.load_cube(CCCmaSMHI_b)
CNRM_b = iris.load_cube(CNRM_b)
CNRMSMHI_b = iris.load_cube(CNRMSMHI_b)
CSIRO_b = iris.load_cube(CSIRO_b)
ICHECDMI_b = iris.load_cube(ICHECDMI_b, 'air_temperature')
ICHECCCLM_b = iris.load_cube(ICHECCCLM_b)
ICHECKNMI_b = iris.load_cube(ICHECKNMI_b)
ICHECMPI_b = iris.load_cube(ICHECMPI_b)
ICHECSMHI_b = iris.load_cube(ICHECSMHI_b)
IPSL_b = iris.load_cube(IPSL_b)
MIROC_b = iris.load_cube(MIROC_b)
MOHCCCLM_b = iris.load_cube(MOHCCCLM_b)
MOHCKNMI_b = iris.load_cube(MOHCKNMI_b)
MOHCSMHI_b = iris.load_cube(MOHCSMHI_b)
MPICCLM_b = iris.load_cube(MPICCLM_b)
MPIREMO_b = iris.load_cube(MPIREMO_b)
MPISMHI_b = iris.load_cube(MPISMHI_b)
NCCSMHI_b = iris.load_cube(NCCSMHI_b)
NOAA_b = iris.load_cube(NOAA_b)
#remove flat latitude and longitude and only use grid latitude and grid longitude to make consistent with the observed data, also make sure all of the longitudes are monotonic.
lats = iris.coords.DimCoord(CCCmaCanRCM_b.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = CCCmaCanRCM_b.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
CCCmaCanRCM_b.remove_coord('latitude')
CCCmaCanRCM_b.remove_coord('longitude')
CCCmaCanRCM_b.remove_coord('grid_latitude')
CCCmaCanRCM_b.remove_coord('grid_longitude')
CCCmaCanRCM_b.add_dim_coord(lats, 1)
CCCmaCanRCM_b.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(CCCmaSMHI_b.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = CCCmaSMHI_b.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
CCCmaSMHI_b.remove_coord('latitude')
CCCmaSMHI_b.remove_coord('longitude')
CCCmaSMHI_b.remove_coord('grid_latitude')
CCCmaSMHI_b.remove_coord('grid_longitude')
CCCmaSMHI_b.add_dim_coord(lats, 1)
CCCmaSMHI_b.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(CNRM_b.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = CNRM_b.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
CNRM_b.remove_coord('latitude')
CNRM_b.remove_coord('longitude')
CNRM_b.remove_coord('grid_latitude')
CNRM_b.remove_coord('grid_longitude')
CNRM_b.add_dim_coord(lats, 1)
CNRM_b.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(CNRMSMHI_b.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = CNRMSMHI_b.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
CNRMSMHI_b.remove_coord('latitude')
CNRMSMHI_b.remove_coord('longitude')
CNRMSMHI_b.remove_coord('grid_latitude')
CNRMSMHI_b.remove_coord('grid_longitude')
CNRMSMHI_b.add_dim_coord(lats, 1)
CNRMSMHI_b.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(CSIRO_b.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = CSIRO_b.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
CSIRO_b.remove_coord('latitude')
CSIRO_b.remove_coord('longitude')
CSIRO_b.remove_coord('grid_latitude')
CSIRO_b.remove_coord('grid_longitude')
CSIRO_b.add_dim_coord(lats, 1)
CSIRO_b.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(ICHECDMI_b.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = ICHECDMI_b.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
ICHECDMI_b.remove_coord('latitude')
ICHECDMI_b.remove_coord('longitude')
ICHECDMI_b.remove_coord('grid_latitude')
ICHECDMI_b.remove_coord('grid_longitude')
ICHECDMI_b.add_dim_coord(lats, 1)
ICHECDMI_b.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(ICHECCCLM_b.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = ICHECCCLM_b.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
ICHECCCLM_b.remove_coord('latitude')
ICHECCCLM_b.remove_coord('longitude')
ICHECCCLM_b.remove_coord('grid_latitude')
ICHECCCLM_b.remove_coord('grid_longitude')
ICHECCCLM_b.add_dim_coord(lats, 1)
ICHECCCLM_b.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(ICHECKNMI_b.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = ICHECKNMI_b.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
ICHECKNMI_b.remove_coord('latitude')
ICHECKNMI_b.remove_coord('longitude')
ICHECKNMI_b.remove_coord('grid_latitude')
ICHECKNMI_b.remove_coord('grid_longitude')
ICHECKNMI_b.add_dim_coord(lats, 1)
ICHECKNMI_b.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(ICHECMPI_b.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = ICHECMPI_b.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
ICHECMPI_b.remove_coord('latitude')
ICHECMPI_b.remove_coord('longitude')
ICHECMPI_b.remove_coord('grid_latitude')
ICHECMPI_b.remove_coord('grid_longitude')
ICHECMPI_b.add_dim_coord(lats, 1)
ICHECMPI_b.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(ICHECSMHI_b.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = ICHECSMHI_b.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
ICHECSMHI_b.remove_coord('latitude')
ICHECSMHI_b.remove_coord('longitude')
ICHECSMHI_b.remove_coord('grid_latitude')
ICHECSMHI_b.remove_coord('grid_longitude')
ICHECSMHI_b.add_dim_coord(lats, 1)
ICHECSMHI_b.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(IPSL_b.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = IPSL_b.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
IPSL_b.remove_coord('latitude')
IPSL_b.remove_coord('longitude')
IPSL_b.remove_coord('grid_latitude')
IPSL_b.remove_coord('grid_longitude')
IPSL_b.add_dim_coord(lats, 1)
IPSL_b.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(MIROC_b.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = MIROC_b.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
MIROC_b.remove_coord('latitude')
MIROC_b.remove_coord('longitude')
MIROC_b.remove_coord('grid_latitude')
MIROC_b.remove_coord('grid_longitude')
MIROC_b.add_dim_coord(lats, 1)
MIROC_b.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(MOHCCCLM_b.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = MOHCCCLM_b.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
MOHCCCLM_b.remove_coord('latitude')
MOHCCCLM_b.remove_coord('longitude')
MOHCCCLM_b.remove_coord('grid_latitude')
MOHCCCLM_b.remove_coord('grid_longitude')
MOHCCCLM_b.add_dim_coord(lats, 1)
MOHCCCLM_b.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(MOHCKNMI_b.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = MOHCKNMI_b.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
MOHCKNMI_b.remove_coord('latitude')
MOHCKNMI_b.remove_coord('longitude')
MOHCKNMI_b.remove_coord('grid_latitude')
MOHCKNMI_b.remove_coord('grid_longitude')
MOHCKNMI_b.add_dim_coord(lats, 1)
MOHCKNMI_b.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(MOHCSMHI_b.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = MOHCSMHI_b.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
MOHCSMHI_b.remove_coord('latitude')
MOHCSMHI_b.remove_coord('longitude')
MOHCSMHI_b.remove_coord('grid_latitude')
MOHCSMHI_b.remove_coord('grid_longitude')
MOHCSMHI_b.add_dim_coord(lats, 1)
MOHCSMHI_b.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(MPICCLM_b.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = MPICCLM_b.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
MPICCLM_b.remove_coord('latitude')
MPICCLM_b.remove_coord('longitude')
MPICCLM_b.remove_coord('grid_latitude')
MPICCLM_b.remove_coord('grid_longitude')
MPICCLM_b.add_dim_coord(lats, 1)
MPICCLM_b.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(MPIREMO_b.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = MPIREMO_b.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
MPIREMO_b.remove_coord('latitude')
MPIREMO_b.remove_coord('longitude')
MPIREMO_b.remove_coord('grid_latitude')
MPIREMO_b.remove_coord('grid_longitude')
MPIREMO_b.add_dim_coord(lats, 1)
MPIREMO_b.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(MPISMHI_b.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = MPISMHI_b.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
MPISMHI_b.remove_coord('latitude')
MPISMHI_b.remove_coord('longitude')
MPISMHI_b.remove_coord('grid_latitude')
MPISMHI_b.remove_coord('grid_longitude')
MPISMHI_b.add_dim_coord(lats, 1)
MPISMHI_b.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(NCCSMHI_b.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = NCCSMHI_b.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
NCCSMHI_b.remove_coord('latitude')
NCCSMHI_b.remove_coord('longitude')
NCCSMHI_b.remove_coord('grid_latitude')
NCCSMHI_b.remove_coord('grid_longitude')
NCCSMHI_b.add_dim_coord(lats, 1)
NCCSMHI_b.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(NOAA_b.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons= NOAA_b.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
NOAA_b.remove_coord('latitude')
NOAA_b.remove_coord('longitude')
NOAA_b.remove_coord('grid_latitude')
NOAA_b.remove_coord('grid_longitude')
NOAA_b.add_dim_coord(lats, 1)
NOAA_b.add_dim_coord(lons, 2)
#guess bounds
CCCmaCanRCM_b.coord('latitude').guess_bounds()
CCCmaSMHI_b.coord('latitude').guess_bounds()
CNRM_b.coord('latitude').guess_bounds()
CNRMSMHI_b.coord('latitude').guess_bounds()
CSIRO_b.coord('latitude').guess_bounds()
ICHECDMI_b.coord('latitude').guess_bounds()
ICHECCCLM_b.coord('latitude').guess_bounds()
ICHECKNMI_b.coord('latitude').guess_bounds()
ICHECMPI_b.coord('latitude').guess_bounds()
ICHECSMHI_b.coord('latitude').guess_bounds()
IPSL_b.coord('latitude').guess_bounds()
MIROC_b.coord('latitude').guess_bounds()
MOHCCCLM_b.coord('latitude').guess_bounds()
MOHCKNMI_b.coord('latitude').guess_bounds()
MOHCSMHI_b.coord('latitude').guess_bounds()
MPICCLM_b.coord('latitude').guess_bounds()
MPIREMO_b.coord('latitude').guess_bounds()
MPISMHI_b.coord('latitude').guess_bounds()
NCCSMHI_b.coord('latitude').guess_bounds()
NOAA_b.coord('latitude').guess_bounds()
CCCmaCanRCM_b.coord('longitude').guess_bounds()
CCCmaSMHI_b.coord('longitude').guess_bounds()
CNRM_b.coord('longitude').guess_bounds()
CNRMSMHI_b.coord('longitude').guess_bounds()
CSIRO_b.coord('longitude').guess_bounds()
ICHECDMI_b.coord('longitude').guess_bounds()
ICHECCCLM_b.coord('longitude').guess_bounds()
ICHECKNMI_b.coord('longitude').guess_bounds()
ICHECMPI_b.coord('longitude').guess_bounds()
ICHECSMHI_b.coord('longitude').guess_bounds()
IPSL_b.coord('longitude').guess_bounds()
MIROC_b.coord('longitude').guess_bounds()
MOHCCCLM_b.coord('longitude').guess_bounds()
MOHCKNMI_b.coord('longitude').guess_bounds()
MOHCSMHI_b.coord('longitude').guess_bounds()
MPICCLM_b.coord('longitude').guess_bounds()
MPIREMO_b.coord('longitude').guess_bounds()
MPISMHI_b.coord('longitude').guess_bounds()
NCCSMHI_b.coord('longitude').guess_bounds()
NOAA_b.coord('longitude').guess_bounds()
#time constraint to make obsered data only from 1971-2000 for monthly comparison
iris.FUTURE.cell_datetime_objects = True
t_constraint_b = iris.Constraint(time=lambda cell: 1971 <= cell.point.year <= 2000)
CCCmaCanRCM_b = CCCmaCanRCM_b.extract(t_constraint_b)
CCCmaSMHI_b = CCCmaSMHI_b.extract(t_constraint_b)
CNRM_b = CNRM_b.extract(t_constraint_b)
CNRMSMHI_b = CNRMSMHI_b.extract(t_constraint_b)
CSIRO_b = CSIRO_b.extract(t_constraint_b)
ICHECDMI_b = ICHECDMI_b.extract(t_constraint_b)
ICHECCCLM_b = ICHECCCLM_b.extract(t_constraint_b)
ICHECKNMI_b = ICHECKNMI_b.extract(t_constraint_b)
ICHECMPI_b = ICHECMPI_b.extract(t_constraint_b)
ICHECSMHI_b = ICHECSMHI_b.extract(t_constraint_b)
IPSL_b = IPSL_b.extract(t_constraint_b)
MIROC_b = MIROC_b.extract(t_constraint_b)
MOHCCCLM_b = MOHCCCLM_b.extract(t_constraint_b)
MOHCKNMI_b = MOHCKNMI_b.extract(t_constraint_b)
MOHCSMHI_b = MOHCSMHI_b.extract(t_constraint_b)
MPICCLM_b = MPICCLM_b.extract(t_constraint_b)
MPIREMO_b = MPIREMO_b.extract(t_constraint_b)
MPISMHI_b = MPISMHI_b.extract(t_constraint_b)
NCCSMHI_b = NCCSMHI_b.extract(t_constraint_b)
NOAA_b = NOAA_b.extract(t_constraint_b)
#-------------------------------------------------------------------------
#PART 2: LOAD and FORMAT ALL FUTURE MODELS
CCCmaCanRCM = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/4.5/tasmin_AFR-44_CCCma-CanESM2_rcp45_r1i1p1_CCCma-CanRCM4_r2_day_20060101-20701231.nc'
CCCmaSMHI = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/4.5/tasmin_AFR-44_CCCma-CanESM2_rcp45_r1i1p1_SMHI-RCA4_v1_day_20060101-20701231.nc'
CNRM = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/4.5/tasmin_AFR-44_CNRM-CERFACS-CNRM-CM5_rcp45_r1i1p1_CLMcom-CCLM4-8-17_v1_day_20060101-20701231.nc'
CNRMSMHI = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/4.5/tasmin_AFR-44_CNRM-CERFACS-CNRM-CM5_rcp45_r1i1p1_SMHI-RCA4_v1_day_20060101-20701231.nc'
CSIRO = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/4.5/tasmin_AFR-44_CSIRO-QCCCE-CSIRO-Mk3-6-0_rcp45_r1i1p1_SMHI-RCA4_v1_day_20060101-20701231.nc'
ICHECDMI = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/4.5/tasmin_AFR-44_ICHEC-EC-EARTH_rcp45_r3i1p1_DMI-HIRHAM5_v2_day_20060101-20701231.nc'
ICHECCCLM = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/4.5/tasmin_AFR-44_ICHEC-EC-EARTH_rcp45_r12i1p1_CLMcom-CCLM4-8-17_v1_day_20060101-20701231.nc'
ICHECKNMI = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/4.5/tasmin_AFR-44_ICHEC-EC-EARTH_rcp45_r1i1p1_KNMI-RACMO22T_v1_day_20060101-20701231.nc'
ICHECMPI = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/4.5/tasmin_AFR-44_ICHEC-EC-EARTH_rcp45_r12i1p1_MPI-CSC-REMO2009_v1_day_20060101-20701231.nc'
ICHECSMHI = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/4.5/tasmin_AFR-44_ICHEC-EC-EARTH_rcp45_r12i1p1_SMHI-RCA4_v1_day_20060101-20701231.nc'
IPSL = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/4.5/tasmin_AFR-44_IPSL-IPSL-CM5A-MR_rcp45_r1i1p1_SMHI-RCA4_v1_day_20060101-20701231.nc'
MIROC = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/4.5/tasmin_AFR-44_MIROC-MIROC5_rcp45_r1i1p1_SMHI-RCA4_v1_day_20060101-20701231.nc'
MOHCCCLM = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/4.5/tasmin_AFR-44_MOHC-HadGEM2-ES_rcp45_r1i1p1_CLMcom-CCLM4-8-17_v1_day_20060101-20701231.nc'
MOHCKNMI = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/4.5/tasmin_AFR-44_MOHC-HadGEM2-ES_rcp45_r1i1p1_KNMI-RACMO22T_v2_day_20060101-20701231.nc'
MOHCSMHI = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/4.5/tasmin_AFR-44_MOHC-HadGEM2-ES_rcp45_r1i1p1_SMHI-RCA4_v1_day_20060101-20701231.nc'
MPICCLM = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/4.5/tasmin_AFR-44_MPI-M-MPI-ESM-LR_rcp45_r1i1p1_CLMcom-CCLM4-8-17_v1_day_20060101-20701231.nc'
MPIREMO = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/4.5/tasmin_AFR-44_MPI-M-MPI-ESM-LR_rcp45_r1i1p1_MPI-CSC-REMO2009_v1_day_20060101-20701231.nc'
MPISMHI = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/4.5/tasmin_AFR-44_MPI-M-MPI-ESM-LR_rcp45_r1i1p1_SMHI-RCA4_v1_day_20060101-20701231.nc'
NCCSMHI = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/4.5/tasmin_AFR-44_NCC-NorESM1-M_rcp45_r1i1p1_SMHI-RCA4_v1_day_20060101-20701231.nc'
NOAA = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/4.5/tasmin_AFR-44_NOAA-GFDL-GFDL-ESM2M_rcp45_r1i1p1_SMHI-RCA4_v1_day_20060101-20701231.nc'
CCCmaCanRCM85 = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/8.5/tasmin_AFR-44_CCCma-CanESM2_rcp85_r1i1p1_CCCma-CanRCM4_r2_day_20060101-20701231.nc'
CCCmaSMHI85 = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/8.5/tasmin_AFR-44_CCCma-CanESM2_rcp85_r1i1p1_SMHI-RCA4_v1_day_20060101-20701231.nc'
CNRM85 = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/8.5/tasmin_AFR-44_CNRM-CERFACS-CNRM-CM5_rcp85_r1i1p1_CLMcom-CCLM4-8-17_v1_day_20060101-20701231.nc'
CNRMSMHI85 = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/8.5/tasmin_AFR-44_CNRM-CERFACS-CNRM-CM5_rcp85_r1i1p1_SMHI-RCA4_v1_day_20060101-20701231.nc'
CSIRO85 = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/8.5/tasmin_AFR-44_CSIRO-QCCCE-CSIRO-Mk3-6-0_rcp85_r1i1p1_SMHI-RCA4_v1_day_20060101-20701231.nc'
ICHECDMI85 = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/8.5/tasmin_AFR-44_ICHEC-EC-EARTH_rcp85_r3i1p1_DMI-HIRHAM5_v2_day_20060101-20701231.nc'
ICHECCCLM85 = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/8.5/tasmin_AFR-44_ICHEC-EC-EARTH_rcp85_r12i1p1_CLMcom-CCLM4-8-17_v1_day_20060101-20701231.nc'
ICHECKNMI85 = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/8.5/tasmin_AFR-44_ICHEC-EC-EARTH_rcp85_r1i1p1_KNMI-RACMO22T_v1_day_20060101-20701231.nc'
ICHECMPI85 = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/8.5/tasmin_AFR-44_ICHEC-EC-EARTH_rcp85_r12i1p1_MPI-CSC-REMO2009_v1_day_20060101-20701231.nc'
ICHECSMHI85 = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/8.5/tasmin_AFR-44_ICHEC-EC-EARTH_rcp85_r12i1p1_SMHI-RCA4_v1_day_20060101-20701231.nc'
IPSL85 = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/8.5/tasmin_AFR-44_IPSL-IPSL-CM5A-MR_rcp85_r1i1p1_SMHI-RCA4_v1_day_20060101-20701231.nc'
MIROC85 = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/8.5/tasmin_AFR-44_MIROC-MIROC5_rcp85_r1i1p1_SMHI-RCA4_v1_day_20060101-20701231.nc'
MOHCCCLM85 = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/8.5/tasmin_AFR-44_MOHC-HadGEM2-ES_rcp85_r1i1p1_CLMcom-CCLM4-8-17_v1_day_20060101-20701231.nc'
MOHCKNMI85 = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/8.5/tasmin_AFR-44_MOHC-HadGEM2-ES_rcp85_r1i1p1_KNMI-RACMO22T_v2_day_20060101-20701231.nc'
MOHCSMHI85 = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/8.5/tasmin_AFR-44_MOHC-HadGEM2-ES_rcp85_r1i1p1_SMHI-RCA4_v1_day_20060101-20701231.nc'
MPICCLM85 = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/8.5/tasmin_AFR-44_MPI-M-MPI-ESM-LR_rcp85_r1i1p1_CLMcom-CCLM4-8-17_v1_day_20060101-20701231.nc'
MPIREMO85 = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/8.5/tasmin_AFR-44_MPI-M-MPI-ESM-LR_rcp85_r1i1p1_MPI-CSC-REMO2009_v1_day_20060101-20701231.nc'
MPISMHI85 = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/8.5/tasmin_AFR-44_MPI-M-MPI-ESM-LR_rcp85_r1i1p1_SMHI-RCA4_v1_day_20060101-20701231.nc'
NCCSMHI85 = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/8.5/tasmin_AFR-44_NCC-NorESM1-M_rcp85_r1i1p1_SMHI-RCA4_v1_day_20060101-20701231.nc'
NOAA85 = '/exports/csce/datastore/geos/users/s0899345/Climate_Modelling/AFR_44_tasmin/8.5/tasmin_AFR-44_NOAA-GFDL-GFDL-ESM2M_rcp85_r1i1p1_SMHI-RCA4_v1_day_20060101-20701231.nc'
#Load exactly one cube from given file
CCCmaCanRCM = iris.load_cube(CCCmaCanRCM)
CCCmaSMHI = iris.load_cube(CCCmaSMHI)
CNRM = iris.load_cube(CNRM)
CNRMSMHI = iris.load_cube(CNRMSMHI)
CSIRO = iris.load_cube(CSIRO)
ICHECDMI = iris.load_cube(ICHECDMI, 'air_temperature')
ICHECCCLM = iris.load_cube(ICHECCCLM)
ICHECKNMI = iris.load_cube(ICHECKNMI)
ICHECMPI = iris.load_cube(ICHECMPI)
ICHECSMHI = iris.load_cube(ICHECSMHI)
IPSL = iris.load_cube(IPSL)
MIROC = iris.load_cube(MIROC)
MOHCCCLM = iris.load_cube(MOHCCCLM)
MOHCKNMI = iris.load_cube(MOHCKNMI)
MOHCSMHI = iris.load_cube(MOHCSMHI)
MPICCLM = iris.load_cube(MPICCLM)
MPIREMO = iris.load_cube(MPIREMO)
MPISMHI = iris.load_cube(MPISMHI)
NCCSMHI = iris.load_cube(NCCSMHI)
NOAA = iris.load_cube(NOAA)
CCCmaCanRCM85 = iris.load_cube(CCCmaCanRCM85)
CCCmaSMHI85 = iris.load_cube(CCCmaSMHI85)
CNRM85 = iris.load_cube(CNRM85)
CNRMSMHI85 = iris.load_cube(CNRMSMHI85)
CSIRO85 = iris.load_cube(CSIRO85)
ICHECDMI85 = iris.load_cube(ICHECDMI85, 'air_temperature')
ICHECCCLM85 = iris.load_cube(ICHECCCLM85)
ICHECKNMI85 = iris.load_cube(ICHECKNMI85)
ICHECMPI85 = iris.load_cube(ICHECMPI85)
ICHECSMHI85 = iris.load_cube(ICHECSMHI85)
IPSL85 = iris.load_cube(IPSL85)
MIROC85 = iris.load_cube(MIROC85)
MOHCCCLM85 = iris.load_cube(MOHCCCLM85)
MOHCKNMI85 = iris.load_cube(MOHCKNMI85)
MOHCSMHI85 = iris.load_cube(MOHCSMHI85)
MPICCLM85 = iris.load_cube(MPICCLM85)
MPIREMO85 = iris.load_cube(MPIREMO85)
MPISMHI85 = iris.load_cube(MPISMHI85)
NCCSMHI85 = iris.load_cube(NCCSMHI85)
NOAA85 = iris.load_cube(NOAA85)
#remove flat latitude and longitude and only use grid latitude and grid longitude to make consistent with the observed data, also make sure all of the longitudes are monotonic.
lats = iris.coords.DimCoord(CCCmaCanRCM.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = CCCmaCanRCM.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
CCCmaCanRCM.remove_coord('latitude')
CCCmaCanRCM.remove_coord('longitude')
CCCmaCanRCM.remove_coord('grid_latitude')
CCCmaCanRCM.remove_coord('grid_longitude')
CCCmaCanRCM.add_dim_coord(lats, 1)
CCCmaCanRCM.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(CCCmaSMHI.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = CCCmaSMHI.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
CCCmaSMHI.remove_coord('latitude')
CCCmaSMHI.remove_coord('longitude')
CCCmaSMHI.remove_coord('grid_latitude')
CCCmaSMHI.remove_coord('grid_longitude')
CCCmaSMHI.add_dim_coord(lats, 1)
CCCmaSMHI.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(CNRM.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = CNRM.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
CNRM.remove_coord('latitude')
CNRM.remove_coord('longitude')
CNRM.remove_coord('grid_latitude')
CNRM.remove_coord('grid_longitude')
CNRM.add_dim_coord(lats, 1)
CNRM.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(CNRMSMHI.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = CNRMSMHI.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
CNRMSMHI.remove_coord('latitude')
CNRMSMHI.remove_coord('longitude')
CNRMSMHI.remove_coord('grid_latitude')
CNRMSMHI.remove_coord('grid_longitude')
CNRMSMHI.add_dim_coord(lats, 1)
CNRMSMHI.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(CSIRO.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = CSIRO.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
CSIRO.remove_coord('latitude')
CSIRO.remove_coord('longitude')
CSIRO.remove_coord('grid_latitude')
CSIRO.remove_coord('grid_longitude')
CSIRO.add_dim_coord(lats, 1)
CSIRO.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(ICHECDMI.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = ICHECDMI.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
ICHECDMI.remove_coord('latitude')
ICHECDMI.remove_coord('longitude')
ICHECDMI.remove_coord('grid_latitude')
ICHECDMI.remove_coord('grid_longitude')
ICHECDMI.add_dim_coord(lats, 1)
ICHECDMI.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(ICHECCCLM.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = ICHECCCLM.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
ICHECCCLM.remove_coord('latitude')
ICHECCCLM.remove_coord('longitude')
ICHECCCLM.remove_coord('grid_latitude')
ICHECCCLM.remove_coord('grid_longitude')
ICHECCCLM.add_dim_coord(lats, 1)
ICHECCCLM.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(ICHECKNMI.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = ICHECKNMI.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
ICHECKNMI.remove_coord('latitude')
ICHECKNMI.remove_coord('longitude')
ICHECKNMI.remove_coord('grid_latitude')
ICHECKNMI.remove_coord('grid_longitude')
ICHECKNMI.add_dim_coord(lats, 1)
ICHECKNMI.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(ICHECMPI.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = ICHECMPI.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
ICHECMPI.remove_coord('latitude')
ICHECMPI.remove_coord('longitude')
ICHECMPI.remove_coord('grid_latitude')
ICHECMPI.remove_coord('grid_longitude')
ICHECMPI.add_dim_coord(lats, 1)
ICHECMPI.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(ICHECSMHI.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = ICHECSMHI.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
ICHECSMHI.remove_coord('latitude')
ICHECSMHI.remove_coord('longitude')
ICHECSMHI.remove_coord('grid_latitude')
ICHECSMHI.remove_coord('grid_longitude')
ICHECSMHI.add_dim_coord(lats, 1)
ICHECSMHI.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(IPSL.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = IPSL.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
IPSL.remove_coord('latitude')
IPSL.remove_coord('longitude')
IPSL.remove_coord('grid_latitude')
IPSL.remove_coord('grid_longitude')
IPSL.add_dim_coord(lats, 1)
IPSL.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(MIROC.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = MIROC.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
MIROC.remove_coord('latitude')
MIROC.remove_coord('longitude')
MIROC.remove_coord('grid_latitude')
MIROC.remove_coord('grid_longitude')
MIROC.add_dim_coord(lats, 1)
MIROC.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(MOHCCCLM.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = MOHCCCLM.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
MOHCCCLM.remove_coord('latitude')
MOHCCCLM.remove_coord('longitude')
MOHCCCLM.remove_coord('grid_latitude')
MOHCCCLM.remove_coord('grid_longitude')
MOHCCCLM.add_dim_coord(lats, 1)
MOHCCCLM.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(MOHCKNMI.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = MOHCKNMI.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
MOHCKNMI.remove_coord('latitude')
MOHCKNMI.remove_coord('longitude')
MOHCKNMI.remove_coord('grid_latitude')
MOHCKNMI.remove_coord('grid_longitude')
MOHCKNMI.add_dim_coord(lats, 1)
MOHCKNMI.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(MOHCSMHI.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = MOHCSMHI.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
MOHCSMHI.remove_coord('latitude')
MOHCSMHI.remove_coord('longitude')
MOHCSMHI.remove_coord('grid_latitude')
MOHCSMHI.remove_coord('grid_longitude')
MOHCSMHI.add_dim_coord(lats, 1)
MOHCSMHI.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(MPICCLM.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = MPICCLM.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
MPICCLM.remove_coord('latitude')
MPICCLM.remove_coord('longitude')
MPICCLM.remove_coord('grid_latitude')
MPICCLM.remove_coord('grid_longitude')
MPICCLM.add_dim_coord(lats, 1)
MPICCLM.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(MPIREMO.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = MPIREMO.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
MPIREMO.remove_coord('latitude')
MPIREMO.remove_coord('longitude')
MPIREMO.remove_coord('grid_latitude')
MPIREMO.remove_coord('grid_longitude')
MPIREMO.add_dim_coord(lats, 1)
MPIREMO.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(MPISMHI.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = MPISMHI.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
MPISMHI.remove_coord('latitude')
MPISMHI.remove_coord('longitude')
MPISMHI.remove_coord('grid_latitude')
MPISMHI.remove_coord('grid_longitude')
MPISMHI.add_dim_coord(lats, 1)
MPISMHI.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(NCCSMHI.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = NCCSMHI.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
NCCSMHI.remove_coord('latitude')
NCCSMHI.remove_coord('longitude')
NCCSMHI.remove_coord('grid_latitude')
NCCSMHI.remove_coord('grid_longitude')
NCCSMHI.add_dim_coord(lats, 1)
NCCSMHI.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(NOAA.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = NOAA.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
NOAA.remove_coord('latitude')
NOAA.remove_coord('longitude')
NOAA.remove_coord('grid_latitude')
NOAA.remove_coord('grid_longitude')
NOAA.add_dim_coord(lats, 1)
NOAA.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(CCCmaCanRCM85.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = CCCmaCanRCM85.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
CCCmaCanRCM85.remove_coord('latitude')
CCCmaCanRCM85.remove_coord('longitude')
CCCmaCanRCM85.remove_coord('grid_latitude')
CCCmaCanRCM85.remove_coord('grid_longitude')
CCCmaCanRCM85.add_dim_coord(lats, 1)
CCCmaCanRCM85.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(CCCmaSMHI85.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = CCCmaSMHI85.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
CCCmaSMHI85.remove_coord('latitude')
CCCmaSMHI85.remove_coord('longitude')
CCCmaSMHI85.remove_coord('grid_latitude')
CCCmaSMHI85.remove_coord('grid_longitude')
CCCmaSMHI85.add_dim_coord(lats, 1)
CCCmaSMHI85.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(CNRM85.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = CNRM85.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
CNRM85.remove_coord('latitude')
CNRM85.remove_coord('longitude')
CNRM85.remove_coord('grid_latitude')
CNRM85.remove_coord('grid_longitude')
CNRM85.add_dim_coord(lats, 1)
CNRM85.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(CNRMSMHI85.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = CNRMSMHI85.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
CNRMSMHI85.remove_coord('latitude')
CNRMSMHI85.remove_coord('longitude')
CNRMSMHI85.remove_coord('grid_latitude')
CNRMSMHI85.remove_coord('grid_longitude')
CNRMSMHI85.add_dim_coord(lats, 1)
CNRMSMHI85.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(CSIRO85.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = CSIRO85.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
CSIRO85.remove_coord('latitude')
CSIRO85.remove_coord('longitude')
CSIRO85.remove_coord('grid_latitude')
CSIRO85.remove_coord('grid_longitude')
CSIRO85.add_dim_coord(lats, 1)
CSIRO85.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(ICHECDMI85.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = ICHECDMI85.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
ICHECDMI85.remove_coord('latitude')
ICHECDMI85.remove_coord('longitude')
ICHECDMI85.remove_coord('grid_latitude')
ICHECDMI85.remove_coord('grid_longitude')
ICHECDMI85.add_dim_coord(lats, 1)
ICHECDMI85.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(ICHECCCLM85.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = ICHECCCLM85.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
ICHECCCLM85.remove_coord('latitude')
ICHECCCLM85.remove_coord('longitude')
ICHECCCLM85.remove_coord('grid_latitude')
ICHECCCLM85.remove_coord('grid_longitude')
ICHECCCLM85.add_dim_coord(lats, 1)
ICHECCCLM85.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(ICHECKNMI85.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = ICHECKNMI85.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
ICHECKNMI85.remove_coord('latitude')
ICHECKNMI85.remove_coord('longitude')
ICHECKNMI85.remove_coord('grid_latitude')
ICHECKNMI85.remove_coord('grid_longitude')
ICHECKNMI85.add_dim_coord(lats, 1)
ICHECKNMI85.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(ICHECMPI85.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = ICHECMPI85.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
ICHECMPI85.remove_coord('latitude')
ICHECMPI85.remove_coord('longitude')
ICHECMPI85.remove_coord('grid_latitude')
ICHECMPI85.remove_coord('grid_longitude')
ICHECMPI85.add_dim_coord(lats, 1)
ICHECMPI85.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(ICHECSMHI85.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = ICHECSMHI85.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
ICHECSMHI85.remove_coord('latitude')
ICHECSMHI85.remove_coord('longitude')
ICHECSMHI85.remove_coord('grid_latitude')
ICHECSMHI85.remove_coord('grid_longitude')
ICHECSMHI85.add_dim_coord(lats, 1)
ICHECSMHI85.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(IPSL85.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = IPSL85.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
IPSL85.remove_coord('latitude')
IPSL85.remove_coord('longitude')
IPSL85.remove_coord('grid_latitude')
IPSL85.remove_coord('grid_longitude')
IPSL85.add_dim_coord(lats, 1)
IPSL85.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(MIROC85.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = MIROC85.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
MIROC85.remove_coord('latitude')
MIROC85.remove_coord('longitude')
MIROC85.remove_coord('grid_latitude')
MIROC85.remove_coord('grid_longitude')
MIROC85.add_dim_coord(lats, 1)
MIROC85.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(MOHCCCLM85.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = MOHCCCLM85.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
MOHCCCLM85.remove_coord('latitude')
MOHCCCLM85.remove_coord('longitude')
MOHCCCLM85.remove_coord('grid_latitude')
MOHCCCLM85.remove_coord('grid_longitude')
MOHCCCLM85.add_dim_coord(lats, 1)
MOHCCCLM85.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(MOHCKNMI85.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = MOHCKNMI85.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
MOHCKNMI85.remove_coord('latitude')
MOHCKNMI85.remove_coord('longitude')
MOHCKNMI85.remove_coord('grid_latitude')
MOHCKNMI85.remove_coord('grid_longitude')
MOHCKNMI85.add_dim_coord(lats, 1)
MOHCKNMI85.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(MOHCSMHI85.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = MOHCSMHI85.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')
MOHCSMHI85.remove_coord('latitude')
MOHCSMHI85.remove_coord('longitude')
MOHCSMHI85.remove_coord('grid_latitude')
MOHCSMHI85.remove_coord('grid_longitude')
MOHCSMHI85.add_dim_coord(lats, 1)
MOHCSMHI85.add_dim_coord(lons, 2)
lats = iris.coords.DimCoord(MPICCLM85.coord('latitude').points[:,0], standard_name='latitude', units='degrees')
lons = MPICCLM85.coord('longitude').points[0]
for i in range(len(lons)):
if lons[i]>100.:
lons[i] = lons[i]-360.
lons = iris.coords.DimCoord(lons, standard_name='longitude', units='degrees')