Import CliMAF

In [1]:
from climaf.api import *
Climaf version = 1.2.8
Cache directory set to : /data/jservon/climafcache (use $CLIMAF_CACHE if set) 
Cache directory for remote data set to : /data/jservon/climafcache/remote_data (use $CLIMAF_REMOTE_CACHE if set) 
Available macros read from ~/.climaf.macros are : []

The example we will illustrate here is:

  • make a CMIP5 multi-model ensemble of historical runs
  • make a CMIP6 IPSL-CM6A-LR ensemble of historical runs with the thirty members
  • compute the climatologies and regrid all the members on the same regular grid
  • find a member that has an error and exclude it from the ensemble
  • compute the ensemble means
  • get a reference (observations) for tos
  • compute the ensemble mean bias maps
  • and plot them

First, build the CMIP5 multi-model ensemble

  • request of all the models
  • check what is available with explore('choices') to ensure we have only one attribut with multiple choices
  • and build the ensemble with explore('ensemble')
In [2]:
req_cmip5 = ds(project='CMIP5',
               variable='tos',
               period='2000',
               experiment='historical',
               frequency='monthly',
               model='*',
               version='latest'
              )
req_cmip5.explore('choices')
Out[2]:
{'model': ['ACCESS1-0',
  'ACCESS1-3',
  'CESM1-CAM5-1-FV2',
  'IPSL-CM5B-LR',
  'GFDL-ESM2M',
  'CMCC-CMS',
  'HadCM3',
  'MIROC-ESM',
  'HadGEM2-ES',
  'CanESM2',
  'FGOALS-s2',
  'MPI-ESM-P',
  'MRI-ESM1',
  'MPI-ESM-MR',
  'CSIRO-Mk3-6-0',
  'CESM1-BGC',
  'HadGEM2-AO',
  'inmcm4',
  'CESM1-FASTCHEM',
  'GISS-E2-R-CC',
  'BNU-ESM',
  'CNRM-CM5-2',
  'FGOALS-g2',
  'GFDL-CM2p1',
  'GFDL-ESM2G',
  'CMCC-CM',
  'EC-EARTH',
  'CanCM4',
  'CCSM4',
  'NorESM1-M',
  'CESM1-WACCM',
  'IPSL-CM5A-MR',
  'IPSL-CM5A-LR',
  'GFDL-CM3',
  'GISS-E2-H',
  'MIROC-ESM-CHEM',
  'MRI-CGCM3',
  'NorESM1-ME',
  'MIROC5',
  'GISS-E2-R',
  'HadGEM2-CC',
  'GISS-E2-H-CC',
  'CMCC-CESM',
  'bcc-csm1-1-m',
  'MPI-ESM-LR',
  'bcc-csm1-1',
  'CESM1-CAM5'],
 'realm': 'ocean',
 'table': 'Omon'}

Ok we have the list of models; no other attribute has several values

Let's build the ensemble and check the files associated with the members with summary()

In [3]:
ens_cmip5 = req_cmip5.explore('ensemble')
summary(ens_cmip5)
Keys - values:
{'domain': 'global', 'realm': 'ocean', 'version': 'latest', 'period': 2000, 'simulation': '', 'project': 'CMIP5', 'experiment': 'historical', 'frequency': 'monthly', 'realization': 'r1i1p1', 'variable': 'tos', 'table': 'Omon', 'model': 'ACCESS1-0', 'root': '/prodigfs/project'}
-- Ensemble members:
ACCESS1-0
/prodigfs/project/CMIP5/output/CSIRO-BOM/ACCESS1-0/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
--
ACCESS1-3
/prodigfs/project/CMIP5/output/CSIRO-BOM/ACCESS1-3/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_ACCESS1-3_historical_r1i1p1_185001-200512.nc
--
CESM1-CAM5-1-FV2
/prodigfs/project/CMIP5/output/NSF-DOE-NCAR/CESM1-CAM5-1-FV2/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_CESM1-CAM5-1-FV2_historical_r1i1p1_185001-200512.nc
--
IPSL-CM5B-LR
/prodigfs/project/CMIP5/output/IPSL/IPSL-CM5B-LR/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_IPSL-CM5B-LR_historical_r1i1p1_185001-200512.nc
--
GFDL-ESM2M
/prodigfs/project/CMIP5/output/NOAA-GFDL/GFDL-ESM2M/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_GFDL-ESM2M_historical_r1i1p1_199601-200012.nc
--
CMCC-CMS
/prodigfs/project/CMIP5/output/CMCC/CMCC-CMS/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_CMCC-CMS_historical_r1i1p1_200001-200512.nc
--
HadCM3
/prodigfs/project/CMIP5/output/MOHC/HadCM3/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_HadCM3_historical_r1i1p1_198412-200512.nc
--
MIROC-ESM
/prodigfs/project/CMIP5/output/MIROC/MIROC-ESM/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_MIROC-ESM_historical_r1i1p1_185001-200512.nc
--
HadGEM2-ES
/prodigfs/project/CMIP5/output/MOHC/HadGEM2-ES/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_HadGEM2-ES_historical_r1i1p1_195912-200512.nc
--
CanESM2
/prodigfs/project/CMIP5/output/CCCma/CanESM2/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_CanESM2_historical_r1i1p1_185001-200512.nc
--
FGOALS-s2
/prodigfs/project/CMIP5/output/LASG-IAP/FGOALS-s2/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_FGOALS-s2_historical_r1i1p1_185001-200412.nc
--
MPI-ESM-P
/prodigfs/project/CMIP5/output/MPI-M/MPI-ESM-P/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_MPI-ESM-P_historical_r1i1p1_185001-200512.nc
--
MRI-ESM1
/prodigfs/project/CMIP5/output/MRI/MRI-ESM1/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_MRI-ESM1_historical_r1i1p1_185101-200512.nc
--
MPI-ESM-MR
/prodigfs/project/CMIP5/output/MPI-M/MPI-ESM-MR/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_MPI-ESM-MR_historical_r1i1p1_200001-200512.nc
--
CSIRO-Mk3-6-0
/prodigfs/project/CMIP5/output/CSIRO-QCCCE/CSIRO-Mk3-6-0/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_CSIRO-Mk3-6-0_historical_r1i1p1_185001-200512.nc
--
CESM1-BGC
/prodigfs/project/CMIP5/output/NSF-DOE-NCAR/CESM1-BGC/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_CESM1-BGC_historical_r1i1p1_185001-200512.nc
--
HadGEM2-AO
/prodigfs/project/CMIP5/output/NIMR-KMA/HadGEM2-AO/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_HadGEM2-AO_historical_r1i1p1_186001-200512.nc
--
inmcm4
/prodigfs/project/CMIP5/output/INM/inmcm4/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_inmcm4_historical_r1i1p1_185001-200512.nc
--
CESM1-FASTCHEM
/prodigfs/project/CMIP5/output/NSF-DOE-NCAR/CESM1-FASTCHEM/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_CESM1-FASTCHEM_historical_r1i1p1_185001-200512.nc
--
GISS-E2-R-CC
/prodigfs/project/CMIP5/output/NASA-GISS/GISS-E2-R-CC/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_GISS-E2-R-CC_historical_r1i1p1_197601-200012.nc
--
BNU-ESM
/prodigfs/project/CMIP5/output/BNU/BNU-ESM/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_BNU-ESM_historical_r1i1p1_185001-200512.nc
--
CNRM-CM5-2
/prodigfs/project/CMIP5/output/CNRM-CERFACS/CNRM-CM5-2/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_CNRM-CM5-2_historical_r1i1p1_200001-200512.nc
--
FGOALS-g2
/prodigfs/project/CMIP5/output/LASG-CESS/FGOALS-g2/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_FGOALS-g2_historical_r1i1p1_200001-200512.nc
--
GFDL-CM2p1
/prodigfs/project/CMIP5/output/NOAA-GFDL/GFDL-CM2p1/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_GFDL-CM2p1_historical_r1i1p1_199601-200012.nc
--
GFDL-ESM2G
/prodigfs/project/CMIP5/output/NOAA-GFDL/GFDL-ESM2G/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_GFDL-ESM2G_historical_r1i1p1_199601-200012.nc
--
CMCC-CM
/prodigfs/project/CMIP5/output/CMCC/CMCC-CM/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_CMCC-CM_historical_r1i1p1_200001-200512.nc
--
EC-EARTH
/prodigfs/project/CMIP5/output/ICHEC/EC-EARTH/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_EC-EARTH_historical_r1i1p1_200001-200601.nc
--
CanCM4
/prodigfs/project/CMIP5/output/CCCma/CanCM4/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_CanCM4_historical_r1i1p1_196101-200512.nc
--
CCSM4
/prodigfs/project/CMIP5/output/NCAR/CCSM4/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_CCSM4_historical_r1i1p1_185001-200512.nc
--
NorESM1-M
/prodigfs/project/CMIP5/output/NCC/NorESM1-M/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_NorESM1-M_historical_r1i1p1_185001-200512.nc
--
CESM1-WACCM
/prodigfs/project/CMIP5/output/NSF-DOE-NCAR/CESM1-WACCM/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_CESM1-WACCM_historical_r1i1p1_185001-200512.nc
--
IPSL-CM5A-MR
/prodigfs/project/CMIP5/output/IPSL/IPSL-CM5A-MR/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_IPSL-CM5A-MR_historical_r1i1p1_185001-200512.nc
--
IPSL-CM5A-LR
/prodigfs/project/CMIP5/output/IPSL/IPSL-CM5A-LR/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_IPSL-CM5A-LR_historical_r1i1p1_185001-200512.nc
--
GFDL-CM3
/prodigfs/project/CMIP5/output/NOAA-GFDL/GFDL-CM3/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_GFDL-CM3_historical_r1i1p1_200001-200412.nc
--
GISS-E2-H
/prodigfs/project/CMIP5/output/NASA-GISS/GISS-E2-H/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_GISS-E2-H_historical_r1i1p1_195101-200512.nc
--
MIROC-ESM-CHEM
/prodigfs/project/CMIP5/output/MIROC/MIROC-ESM-CHEM/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_MIROC-ESM-CHEM_historical_r1i1p1_185001-200512.nc
--
MRI-CGCM3
/prodigfs/project/CMIP5/output/MRI/MRI-CGCM3/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_MRI-CGCM3_historical_r1i1p1_185001-200512.nc
--
NorESM1-ME
/prodigfs/project/CMIP5/output/NCC/NorESM1-ME/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_NorESM1-ME_historical_r1i1p1_185001-200512.nc
--
MIROC5
/prodigfs/project/CMIP5/output/MIROC/MIROC5/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_MIROC5_historical_r1i1p1_185001-201212.nc
--
GISS-E2-R
/prodigfs/project/CMIP5/output/NASA-GISS/GISS-E2-R/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_GISS-E2-R_historical_r1i1p1_197601-200012.nc
--
HadGEM2-CC
/prodigfs/project/CMIP5/output/MOHC/HadGEM2-CC/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_HadGEM2-CC_historical_r1i1p1_195912-200511.nc
--
GISS-E2-H-CC
/prodigfs/project/CMIP5/output/NASA-GISS/GISS-E2-H-CC/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_GISS-E2-H-CC_historical_r1i1p1_195101-201012.nc
--
CMCC-CESM
/prodigfs/project/CMIP5/output/CMCC/CMCC-CESM/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_CMCC-CESM_historical_r1i1p1_200001-200512.nc
--
bcc-csm1-1-m
/prodigfs/project/CMIP5/output/BCC/bcc-csm1-1-m/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_bcc-csm1-1-m_historical_r1i1p1_185001-201212.nc
--
MPI-ESM-LR
/prodigfs/project/CMIP5/output/MPI-M/MPI-ESM-LR/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_MPI-ESM-LR_historical_r1i1p1_185001-200512.nc
--
bcc-csm1-1
/prodigfs/project/CMIP5/output/BCC/bcc-csm1-1/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_bcc-csm1-1_historical_r1i1p1_185001-201212.nc
--
CESM1-CAM5
/prodigfs/project/CMIP5/output/NSF-DOE-NCAR/CESM1-CAM5/historical/mon/ocean/Omon/r1i1p1/latest/tos/tos_Omon_CESM1-CAM5_historical_r1i1p1_185001-200512.nc
--

Now do the same with the CMIP6 IPSL-CM6A-LR grand ensemble with realization='*'

In [4]:
req_cmip6 = ds(project='CMIP6',
               experiment='historical',
               model='IPSL-CM6A-LR',
               period='2000',
               variable='tos',
               table='Omon',
               realization='*'
              )
req_cmip6.explore('choices')
Out[4]:
{'grid': 'gn',
 'institute': 'IPSL',
 'mip': 'CMIP',
 'realization': ['r10i1p1f1',
  'r14i1p1f1',
  'r29i1p1f1',
  'r20i1p1f1',
  'r16i1p1f1',
  'r21i1p1f1',
  'r11i1p1f1',
  'r6i1p1f1',
  'r1i1p1f1',
  'r3i1p1f1',
  'r7i1p1f1',
  'r28i1p1f1',
  'r22i1p1f1',
  'r5i1p1f1',
  'r23i1p1f1',
  'r13i1p1f1',
  'r2i1p1f1',
  'r8i1p1f1',
  'r19i1p1f1',
  'r26i1p1f1',
  'r9i1p1f1',
  'r18i1p1f1',
  'r27i1p1f1',
  'r17i1p1f1',
  'r24i1p1f1',
  'r4i1p1f1',
  'r31i1p1f1',
  'r30i1p1f1',
  'r25i1p1f1',
  'r15i1p1f1',
  'r12i1p1f1']}
In [5]:
ens_cmip6 = req_cmip6.explore('ensemble')
summary(ens_cmip6)
Keys - values:
{'domain': 'global', 'version': 'latest', 'institute': 'IPSL', 'realization': 'r10i1p1f1', 'period': 2000, 'simulation': '', 'project': 'CMIP6', 'experiment': 'historical', 'grid': 'gn', 'table': 'Omon', 'variable': 'tos', 'mip': 'CMIP', 'model': 'IPSL-CM6A-LR', 'root': '/bdd'}
-- Ensemble members:
r10i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r10i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r10i1p1f1_gn_185001-201412.nc
--
r14i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r14i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r14i1p1f1_gn_185001-201412.nc
--
r29i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r29i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r29i1p1f1_gn_185001-201412.nc
--
r20i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r20i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r20i1p1f1_gn_185001-201412.nc
--
r16i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r16i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r16i1p1f1_gn_185001-201412.nc
--
r21i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r21i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r21i1p1f1_gn_185001-201412.nc
--
r11i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r11i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r11i1p1f1_gn_185001-201412.nc
--
r6i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r6i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r6i1p1f1_gn_185001-201412.nc
--
r1i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r1i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r1i1p1f1_gn_185001-201412.nc
--
r3i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r3i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r3i1p1f1_gn_185001-201412.nc
--
r7i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r7i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r7i1p1f1_gn_185001-201412.nc
--
r28i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r28i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r28i1p1f1_gn_185001-201412.nc
--
r22i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r22i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r22i1p1f1_gn_185001-201412.nc
--
r5i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r5i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r5i1p1f1_gn_185001-201412.nc
--
r23i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r23i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r23i1p1f1_gn_185001-201412.nc
--
r13i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r13i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r13i1p1f1_gn_185001-201412.nc
--
r2i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r2i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r2i1p1f1_gn_185001-201412.nc
--
r8i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r8i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r8i1p1f1_gn_185001-201412.nc
--
r19i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r19i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r19i1p1f1_gn_185001-201412.nc
--
r26i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r26i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r26i1p1f1_gn_185001-201412.nc
--
r9i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r9i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r9i1p1f1_gn_185001-201412.nc
--
r18i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r18i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r18i1p1f1_gn_185001-201412.nc
--
r27i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r27i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r27i1p1f1_gn_185001-201412.nc
--
r17i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r17i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r17i1p1f1_gn_185001-201412.nc
--
r24i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r24i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r24i1p1f1_gn_185001-201412.nc
--
r4i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r4i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r4i1p1f1_gn_185001-201412.nc
--
r31i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r31i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r31i1p1f1_gn_185001-201412.nc
--
r30i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r30i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r30i1p1f1_gn_185001-201412.nc
--
r25i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r25i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r25i1p1f1_gn_185001-201412.nc
--
r15i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r15i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r15i1p1f1_gn_185001-201412.nc
--
r12i1p1f1
/bdd/CMIP6/CMIP/IPSL/IPSL-CM6A-LR/historical/r12i1p1f1/Omon/tos/gn/latest/tos_Omon_IPSL-CM6A-LR_historical_r12i1p1f1_gn_185001-201412.nc
--

Compute annual mean climatology of each member on both ensembles

In [6]:
anm_ens_cmip5 = clim_average(ens_cmip5,'ANM')

anm_ens_cmip6 = clim_average(ens_cmip6,'ANM')

Regrid over the same regular grid

In [7]:
rgrd_anm_ens_cmip5 = regridn(anm_ens_cmip5,
                             cdogrid='r360x180')
rgrd_anm_ens_cmip6 = regridn(anm_ens_cmip6,
                             cdogrid='r360x180')

And compute the ensemble mean with ccdo_ens(..., operator='ensavg')

In [8]:
ensmean_cmip5 = ccdo_ens(rgrd_anm_ens_cmip5,
                         operator='ensavg')
ensmean_cmip6 = ccdo_ens(rgrd_anm_ens_cmip6,
                         operator='ensavg')

Get some observations

In [9]:
ref = ds(project='ref_climatos', variable='tos',
         product='WOA13-v2').explore('resolve')

summary(ref)
/data/jservon/Evaluation/ReferenceDatasets/climatos/ocn/mo/tos/WOA13-v2/ac/tos_Omon_WOA13-v2_observations_195501-201212-clim.nc
Out[9]:
{'clim_period': '195501-201212',
 'domain': 'global',
 'frequency': 'annual_cycle',
 'obs_type': 'observations',
 'period': fx,
 'product': 'WOA13-v2',
 'project': 'ref_climatos',
 'simulation': 'refproduct',
 'table': 'Omon',
 'variable': 'tos'}

Regrid the reference as well after computing the climatology

In [10]:
rgrd_ref = regridn(clim_average(ref,'ANM'),
                   cdogrid='r360x180')

Plot the ensemble mean for CMIP6 to check if the result is ok

Reminder:

  • plot() is the basic CliMAF plot operator
  • iplot() is a layer on top of plot used to display a CliMAF plot in a Notebook; use => iplot(plot(dat, ...))
  • implot() can be used directly in notebooks to both do the plot and display it; use => implot(dat, ...)
In [11]:
implot(ensmean_cmip6)
Out[11]:

Same for CMIP5

In [12]:
implot(ensmean_cmip5)
Out[12]:

Ooops, we have a problem...

There is obviously a problem with one (or more) of the members of the ensemble.

Here is a way to display the members one by one

Plot a first series of 12 plots with iplot_members => N = 1

In [13]:
iplot_members(rgrd_anm_ens_cmip5, N=1)
Out[13]: