<reponame>strawpants/cate
from unittest import TestCase

from cate.util.misc import filter_fileset


class IncludeExcludeDataSourcesTest(TestCase):
    def test_none(self):
        filtered_data_sources = filter_fileset(ALL_DATA_SOURCES)
        self.assertIs(filtered_data_sources, ALL_DATA_SOURCES)

    def test_include(self):
        filtered_data_sources = filter_fileset(ALL_DATA_SOURCES,
                                               includes=['esacci.CLOUD.mon.*.multi-platform.*', 'esacci.OZONE.*'])
        self.assertEqual(sorted(filtered_data_sources),
                         ['esacci.CLOUD.mon.L3C.CLD_PRODUCTS.AVHRR.multi-platform.AVHRR-AM.2-0.r1',
                          'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.AVHRR.multi-platform.AVHRR-PM.2-0.r1',
                          'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.multi-sensor.multi-platform.ATSR2-AATSR.2-0.r1',
                          'esacci.OZONE.day.L3S.TC.multi-sensor.multi-platform.MERGED.fv0100.r1',
                          'esacci.OZONE.mon.L3.NP.multi-sensor.multi-platform.MERGED.fv0002.r1',
                          ])

    def test_exclude(self):
        filtered_data_sources = filter_fileset(ALL_DATA_SOURCES,
                                               excludes=['*.day.*', '*.satellite-orbit-frequency.*',
                                                         '*.multi-sensor.*'])
        print(repr(sorted(filtered_data_sources)))
        self.assertEqual(sorted(filtered_data_sources),
                         ['esacci.AEROSOL.5-days.L3C.AEX.GOMOS.Envisat.aergom.2-19.r1',
                          'esacci.AEROSOL.mon.L3C.AER_PRODUCTS.AATSR.Envisat.ORAC.03-02.r1',
                          'esacci.AEROSOL.mon.L3C.AER_PRODUCTS.AATSR.Envisat.SU.4-21.r1',
                          'esacci.AEROSOL.mon.L3C.AER_PRODUCTS.ATSR-2.ERS-2.ORAC.03-02.r1',
                          'esacci.AEROSOL.mon.L3C.AER_PRODUCTS.ATSR-2.ERS-2.SU.4-21.r1',
                          'esacci.AEROSOL.mon.L3C.AOD.MERIS.Envisat.MERIS_ENVISAT.2-2.r1',
                          'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.AVHRR.multi-platform.AVHRR-AM.2-0.r1',
                          'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.AVHRR.multi-platform.AVHRR-PM.2-0.r1',
                          'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.MODIS.Aqua.MODIS_AQUA.2-0.r1',
                          'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.MODIS.Terra.MODIS_TERRA.2-0.r1',
                          'esacci.LC.13-yrs.L4.WB.asar.Envisat.Map.4-0.r1'
                          ])

    def test_include_exclude(self):
        filtered_data_sources = filter_fileset(ALL_DATA_SOURCES,
                                               includes=['esacci.CLOUD.mon.*.multi-platform.*', 'esacci.OZONE.*'],
                                               excludes=['*.day.*', '*.ATSR2-AATSR.*'])
        print(repr(sorted(filtered_data_sources)))
        self.assertEqual(sorted(filtered_data_sources),
                         ['esacci.CLOUD.mon.L3C.CLD_PRODUCTS.AVHRR.multi-platform.AVHRR-AM.2-0.r1',
                          'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.AVHRR.multi-platform.AVHRR-PM.2-0.r1',
                          'esacci.OZONE.mon.L3.NP.multi-sensor.multi-platform.MERGED.fv0002.r1',
                          ])


ALL_DATA_SOURCES = [
    'esacci.AEROSOL.5-days.L3C.AEX.GOMOS.Envisat.aergom.2-19.r1',
    'esacci.AEROSOL.climatology.L3.AAI.multi-sensor.multi-platform.ms_uvai.1-5-7.r1',
    'esacci.AEROSOL.day.L3.AAI.multi-sensor.multi-platform.ms_uvai.1-5-7.r1',
    'esacci.AEROSOL.day.L3C.AER_PRODUCTS.AATSR.Envisat.ORAC.03-02.r1',
    'esacci.AEROSOL.day.L3C.AER_PRODUCTS.AATSR.Envisat.SU.4-21.r1',
    'esacci.AEROSOL.day.L3C.AER_PRODUCTS.ATSR-2.ERS-2.ORAC.03-02.r1',
    'esacci.AEROSOL.day.L3C.AER_PRODUCTS.ATSR-2.ERS-2.SU.4-21.r1',
    'esacci.AEROSOL.day.L3C.AOD.MERIS.Envisat.MERIS_ENVISAT.2-2.r1',
    'esacci.AEROSOL.mon.L3.AAI.multi-sensor.multi-platform.ms_uvai.1-5-7.r1',
    'esacci.AEROSOL.mon.L3C.AER_PRODUCTS.AATSR.Envisat.ORAC.03-02.r1',
    'esacci.AEROSOL.mon.L3C.AER_PRODUCTS.AATSR.Envisat.SU.4-21.r1',
    'esacci.AEROSOL.mon.L3C.AER_PRODUCTS.ATSR-2.ERS-2.ORAC.03-02.r1',
    'esacci.AEROSOL.mon.L3C.AER_PRODUCTS.ATSR-2.ERS-2.SU.4-21.r1',
    'esacci.AEROSOL.mon.L3C.AOD.MERIS.Envisat.MERIS_ENVISAT.2-2.r1',
    'esacci.AEROSOL.satellite-orbit-frequency.L2P.AOD.MERIS.Envisat.MERIS_ENVISAT.2-2.r1',
    'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.AVHRR.multi-platform.AVHRR-AM.2-0.r1',
    'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.AVHRR.multi-platform.AVHRR-PM.2-0.r1',
    'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.MODIS.Aqua.MODIS_AQUA.2-0.r1',
    'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.MODIS.Terra.MODIS_TERRA.2-0.r1',
    'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.multi-sensor.Envisat.MERIS-AATSR.2-0.r1',
    'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.multi-sensor.multi-platform.ATSR2-AATSR.2-0.r1',
    'esacci.FIRE.day.L4.BA.multi-sensor.multi-platform.MERIS.v4-1.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CH4.SCIAMACHY.Envisat.SCIAMACHY.v3-9.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CH4.SCIAMACHY.Envisat.SCIAMACHY.v7-1.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CH4.TANSO-FTS.GOSAT.GOSAT.v1.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CH4.TANSO-FTS.GOSAT.GOSAT.v2-3-7.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CH4.TANSO-FTS.GOSAT.GOSAT.v2-3-7.r2',
    'esacci.GHG.satellite-orbit-frequency.L2.CH4.TANSO-FTS.GOSAT.GOSAT.v6.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CH4.multi-sensor.multi-platform.VARIOUS.ch4_v1-0.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CO2.SCIAMACHY.Envisat.SCIAMACHY.v02-01-01.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CO2.SCIAMACHY.Envisat.SCIAMACHY.v3-9.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CO2.TANSO-FTS.GOSAT.GOSAT.v2-3-7.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CO2.TANSO-FTS.GOSAT.GOSAT.v6.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CO2.multi-sensor.multi-platform.VARIOUS.v2-1a.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CO2.multi-sensor.multi-platform.VARIOUS.v2-1b.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CO2.multi-sensor.multi-platform.VARIOUS.v2-1c.r1',
    'esacci.LC.13-yrs.L4.WB.asar.Envisat.Map.4-0.r1',
    'esacci.LC.5-yrs.L4.LCCS.multi-sensor.multi-platform.Map.1-6-1.r1',
    'esacci.OC.5-days.L3S.CHLOR_A.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.5-days.L3S.CHLOR_A.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.5-days.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.5-days.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.5-days.L3S.K_490.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.5-days.L3S.K_490.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.5-days.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.5-days.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.5-days.L3S.RRS.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.5-days.L3S.RRS.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.8-days.L3S.CHLOR_A.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.8-days.L3S.CHLOR_A.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.8-days.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.8-days.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.8-days.L3S.K_490.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.8-days.L3S.K_490.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.8-days.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.8-days.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.8-days.L3S.RRS.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.8-days.L3S.RRS.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.climatology.L3S.OC_PRODUCTS.multi-sensor.multi-platform.merged.2-0.0-25deg',
    'esacci.OC.climatology.L3S.OC_PRODUCTS.multi-sensor.multi-platform.merged.2-0.0-5deg',
    'esacci.OC.climatology.L3S.OC_PRODUCTS.multi-sensor.multi-platform.merged.2-0.1deg',
    'esacci.OC.climatology.L3S.OC_PRODUCTS.multi-sensor.multi-platform.merged.2-0.4km',
    'esacci.OC.day.L3S.CHLOR_A.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.day.L3S.CHLOR_A.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.1997-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.1998-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.1999-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2000-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2001-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2002-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2003-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2004-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2005-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2006-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2007-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2008-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2009-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2010-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2011-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2012-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2013-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.day.L3S.K_490.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.day.L3S.K_490.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.1997-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.1997-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.1998-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.1998-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.1999-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.1999-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2000-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2000-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2001-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2001-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2002-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2002-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2003-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2003-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2004-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2004-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2005-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2005-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2006-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2006-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2007-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2007-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2008-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2008-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2009-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2009-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2010-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2010-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2011-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2011-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2012-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2012-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2013-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2013-r2',
    'esacci.OC.day.L3S.RRS.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.day.L3S.RRS.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.mon.L3S.CHLOR_A.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.mon.L3S.CHLOR_A.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.mon.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.mon.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.mon.L3S.K_490.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.mon.L3S.K_490.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.mon.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.mon.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.mon.L3S.RRS.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.mon.L3S.RRS.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OZONE.day.L3S.TC.multi-sensor.multi-platform.MERGED.fv0100.r1',
    'esacci.OZONE.mon.L3.NP.multi-sensor.multi-platform.MERGED.fv0002.r1',
    'esacci.SEAICE.day.L4.SICONC.multi-sensor.multi-platform.AMSR_25kmEASE2.2-0.NH',
    'esacci.SEAICE.day.L4.SICONC.multi-sensor.multi-platform.AMSR_25kmEASE2.2-0.SH',
    'esacci.SEAICE.day.L4.SICONC.multi-sensor.multi-platform.AMSR_50kmEASE2.2-0.NH',
    'esacci.SEAICE.day.L4.SICONC.multi-sensor.multi-platform.AMSR_50kmEASE2.2-0.SH',
    'esacci.SEALEVEL.mon.IND.MSL.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.SEALEVEL.mon.IND.MSLAMPH.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.SEALEVEL.mon.IND.MSLTR.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.SOILMOISTURE.day.L3S.SSMS.multi-sensor.multi-platform.ACTIVE.03-2.r1',
    'esacci.SOILMOISTURE.day.L3S.SSMV.multi-sensor.multi-platform.COMBINED.03-2.r1',
    'esacci.SOILMOISTURE.day.L3S.SSMV.multi-sensor.multi-platform.PASSIVE.03-2.r1',
    'esacci.SST.day.L4.SSTdepth.multi-sensor.multi-platform.OSTIA.1-1.r1',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2002',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2003',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2004',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2005',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2006',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2007',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2008',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2009',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2010',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2011',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2012',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR-2.ERS-2.ATSR2.1-1.1995',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR-2.ERS-2.ATSR2.1-1.1996',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR-2.ERS-2.ATSR2.1-1.1997',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR-2.ERS-2.ATSR2.1-1.1998',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR-2.ERS-2.ATSR2.1-1.1999',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR-2.ERS-2.ATSR2.1-1.2000',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR-2.ERS-2.ATSR2.1-1.2001',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR-2.ERS-2.ATSR2.1-1.2002',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR-2.ERS-2.ATSR2.1-1.2003',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR.ERS-1.ATSR1.1-1.1991',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR.ERS-1.ATSR1.1-1.1992',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR.ERS-1.ATSR1.1-1.1993',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR.ERS-1.ATSR1.1-1.1994',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR.ERS-1.ATSR1.1-1.1995',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR.ERS-1.ATSR1.1-1.1996',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR.ERS-1.ATSR1.1-1.1997']

from unittest import TestCase

from cate.util.misc import filter_fileset


class IncludeExcludeDataSourcesTest(TestCase):
    def test_none(self):
        filtered_data_sources = filter_fileset(ALL_DATA_SOURCES)
        self.assertIs(filtered_data_sources, ALL_DATA_SOURCES)

    def test_include(self):
        filtered_data_sources = filter_fileset(ALL_DATA_SOURCES,
                                               includes=['esacci.CLOUD.mon.*.multi-platform.*', 'esacci.OZONE.*'])
        self.assertEqual(sorted(filtered_data_sources),
                         ['esacci.CLOUD.mon.L3C.CLD_PRODUCTS.AVHRR.multi-platform.AVHRR-AM.2-0.r1',
                          'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.AVHRR.multi-platform.AVHRR-PM.2-0.r1',
                          'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.multi-sensor.multi-platform.ATSR2-AATSR.2-0.r1',
                          'esacci.OZONE.day.L3S.TC.multi-sensor.multi-platform.MERGED.fv0100.r1',
                          'esacci.OZONE.mon.L3.NP.multi-sensor.multi-platform.MERGED.fv0002.r1',
                          ])

    def test_exclude(self):
        filtered_data_sources = filter_fileset(ALL_DATA_SOURCES,
                                               excludes=['*.day.*', '*.satellite-orbit-frequency.*',
                                                         '*.multi-sensor.*'])
        print(repr(sorted(filtered_data_sources)))
        self.assertEqual(sorted(filtered_data_sources),
                         ['esacci.AEROSOL.5-days.L3C.AEX.GOMOS.Envisat.aergom.2-19.r1',
                          'esacci.AEROSOL.mon.L3C.AER_PRODUCTS.AATSR.Envisat.ORAC.03-02.r1',
                          'esacci.AEROSOL.mon.L3C.AER_PRODUCTS.AATSR.Envisat.SU.4-21.r1',
                          'esacci.AEROSOL.mon.L3C.AER_PRODUCTS.ATSR-2.ERS-2.ORAC.03-02.r1',
                          'esacci.AEROSOL.mon.L3C.AER_PRODUCTS.ATSR-2.ERS-2.SU.4-21.r1',
                          'esacci.AEROSOL.mon.L3C.AOD.MERIS.Envisat.MERIS_ENVISAT.2-2.r1',
                          'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.AVHRR.multi-platform.AVHRR-AM.2-0.r1',
                          'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.AVHRR.multi-platform.AVHRR-PM.2-0.r1',
                          'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.MODIS.Aqua.MODIS_AQUA.2-0.r1',
                          'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.MODIS.Terra.MODIS_TERRA.2-0.r1',
                          'esacci.LC.13-yrs.L4.WB.asar.Envisat.Map.4-0.r1'
                          ])

    def test_include_exclude(self):
        filtered_data_sources = filter_fileset(ALL_DATA_SOURCES,
                                               includes=['esacci.CLOUD.mon.*.multi-platform.*', 'esacci.OZONE.*'],
                                               excludes=['*.day.*', '*.ATSR2-AATSR.*'])
        print(repr(sorted(filtered_data_sources)))
        self.assertEqual(sorted(filtered_data_sources),
                         ['esacci.CLOUD.mon.L3C.CLD_PRODUCTS.AVHRR.multi-platform.AVHRR-AM.2-0.r1',
                          'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.AVHRR.multi-platform.AVHRR-PM.2-0.r1',
                          'esacci.OZONE.mon.L3.NP.multi-sensor.multi-platform.MERGED.fv0002.r1',
                          ])


ALL_DATA_SOURCES = [
    'esacci.AEROSOL.5-days.L3C.AEX.GOMOS.Envisat.aergom.2-19.r1',
    'esacci.AEROSOL.climatology.L3.AAI.multi-sensor.multi-platform.ms_uvai.1-5-7.r1',
    'esacci.AEROSOL.day.L3.AAI.multi-sensor.multi-platform.ms_uvai.1-5-7.r1',
    'esacci.AEROSOL.day.L3C.AER_PRODUCTS.AATSR.Envisat.ORAC.03-02.r1',
    'esacci.AEROSOL.day.L3C.AER_PRODUCTS.AATSR.Envisat.SU.4-21.r1',
    'esacci.AEROSOL.day.L3C.AER_PRODUCTS.ATSR-2.ERS-2.ORAC.03-02.r1',
    'esacci.AEROSOL.day.L3C.AER_PRODUCTS.ATSR-2.ERS-2.SU.4-21.r1',
    'esacci.AEROSOL.day.L3C.AOD.MERIS.Envisat.MERIS_ENVISAT.2-2.r1',
    'esacci.AEROSOL.mon.L3.AAI.multi-sensor.multi-platform.ms_uvai.1-5-7.r1',
    'esacci.AEROSOL.mon.L3C.AER_PRODUCTS.AATSR.Envisat.ORAC.03-02.r1',
    'esacci.AEROSOL.mon.L3C.AER_PRODUCTS.AATSR.Envisat.SU.4-21.r1',
    'esacci.AEROSOL.mon.L3C.AER_PRODUCTS.ATSR-2.ERS-2.ORAC.03-02.r1',
    'esacci.AEROSOL.mon.L3C.AER_PRODUCTS.ATSR-2.ERS-2.SU.4-21.r1',
    'esacci.AEROSOL.mon.L3C.AOD.MERIS.Envisat.MERIS_ENVISAT.2-2.r1',
    'esacci.AEROSOL.satellite-orbit-frequency.L2P.AOD.MERIS.Envisat.MERIS_ENVISAT.2-2.r1',
    'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.AVHRR.multi-platform.AVHRR-AM.2-0.r1',
    'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.AVHRR.multi-platform.AVHRR-PM.2-0.r1',
    'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.MODIS.Aqua.MODIS_AQUA.2-0.r1',
    'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.MODIS.Terra.MODIS_TERRA.2-0.r1',
    'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.multi-sensor.Envisat.MERIS-AATSR.2-0.r1',
    'esacci.CLOUD.mon.L3C.CLD_PRODUCTS.multi-sensor.multi-platform.ATSR2-AATSR.2-0.r1',
    'esacci.FIRE.day.L4.BA.multi-sensor.multi-platform.MERIS.v4-1.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CH4.SCIAMACHY.Envisat.SCIAMACHY.v3-9.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CH4.SCIAMACHY.Envisat.SCIAMACHY.v7-1.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CH4.TANSO-FTS.GOSAT.GOSAT.v1.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CH4.TANSO-FTS.GOSAT.GOSAT.v2-3-7.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CH4.TANSO-FTS.GOSAT.GOSAT.v2-3-7.r2',
    'esacci.GHG.satellite-orbit-frequency.L2.CH4.TANSO-FTS.GOSAT.GOSAT.v6.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CH4.multi-sensor.multi-platform.VARIOUS.ch4_v1-0.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CO2.SCIAMACHY.Envisat.SCIAMACHY.v02-01-01.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CO2.SCIAMACHY.Envisat.SCIAMACHY.v3-9.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CO2.TANSO-FTS.GOSAT.GOSAT.v2-3-7.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CO2.TANSO-FTS.GOSAT.GOSAT.v6.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CO2.multi-sensor.multi-platform.VARIOUS.v2-1a.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CO2.multi-sensor.multi-platform.VARIOUS.v2-1b.r1',
    'esacci.GHG.satellite-orbit-frequency.L2.CO2.multi-sensor.multi-platform.VARIOUS.v2-1c.r1',
    'esacci.LC.13-yrs.L4.WB.asar.Envisat.Map.4-0.r1',
    'esacci.LC.5-yrs.L4.LCCS.multi-sensor.multi-platform.Map.1-6-1.r1',
    'esacci.OC.5-days.L3S.CHLOR_A.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.5-days.L3S.CHLOR_A.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.5-days.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.5-days.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.5-days.L3S.K_490.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.5-days.L3S.K_490.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.5-days.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.5-days.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.5-days.L3S.RRS.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.5-days.L3S.RRS.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.8-days.L3S.CHLOR_A.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.8-days.L3S.CHLOR_A.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.8-days.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.8-days.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.8-days.L3S.K_490.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.8-days.L3S.K_490.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.8-days.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.8-days.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.8-days.L3S.RRS.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.8-days.L3S.RRS.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.climatology.L3S.OC_PRODUCTS.multi-sensor.multi-platform.merged.2-0.0-25deg',
    'esacci.OC.climatology.L3S.OC_PRODUCTS.multi-sensor.multi-platform.merged.2-0.0-5deg',
    'esacci.OC.climatology.L3S.OC_PRODUCTS.multi-sensor.multi-platform.merged.2-0.1deg',
    'esacci.OC.climatology.L3S.OC_PRODUCTS.multi-sensor.multi-platform.merged.2-0.4km',
    'esacci.OC.day.L3S.CHLOR_A.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.day.L3S.CHLOR_A.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.1997-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.1998-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.1999-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2000-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2001-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2002-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2003-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2004-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2005-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2006-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2007-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2008-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2009-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2010-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2011-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2012-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.2013-r1',
    'esacci.OC.day.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.day.L3S.K_490.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.day.L3S.K_490.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.1997-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.1997-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.1998-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.1998-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.1999-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.1999-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2000-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2000-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2001-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2001-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2002-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2002-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2003-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2003-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2004-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2004-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2005-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2005-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2006-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2006-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2007-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2007-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2008-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2008-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2009-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2009-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2010-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2010-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2011-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2011-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2012-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2012-r2',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2013-r1',
    'esacci.OC.day.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.2013-r2',
    'esacci.OC.day.L3S.RRS.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.day.L3S.RRS.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.mon.L3S.CHLOR_A.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.mon.L3S.CHLOR_A.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.mon.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.mon.L3S.IOP.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.mon.L3S.K_490.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.mon.L3S.K_490.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.mon.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.mon.L3S.OC_PRODUCTS.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OC.mon.L3S.RRS.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.OC.mon.L3S.RRS.multi-sensor.multi-platform.MERGED.2-0.r2',
    'esacci.OZONE.day.L3S.TC.multi-sensor.multi-platform.MERGED.fv0100.r1',
    'esacci.OZONE.mon.L3.NP.multi-sensor.multi-platform.MERGED.fv0002.r1',
    'esacci.SEAICE.day.L4.SICONC.multi-sensor.multi-platform.AMSR_25kmEASE2.2-0.NH',
    'esacci.SEAICE.day.L4.SICONC.multi-sensor.multi-platform.AMSR_25kmEASE2.2-0.SH',
    'esacci.SEAICE.day.L4.SICONC.multi-sensor.multi-platform.AMSR_50kmEASE2.2-0.NH',
    'esacci.SEAICE.day.L4.SICONC.multi-sensor.multi-platform.AMSR_50kmEASE2.2-0.SH',
    'esacci.SEALEVEL.mon.IND.MSL.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.SEALEVEL.mon.IND.MSLAMPH.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.SEALEVEL.mon.IND.MSLTR.multi-sensor.multi-platform.MERGED.2-0.r1',
    'esacci.SOILMOISTURE.day.L3S.SSMS.multi-sensor.multi-platform.ACTIVE.03-2.r1',
    'esacci.SOILMOISTURE.day.L3S.SSMV.multi-sensor.multi-platform.COMBINED.03-2.r1',
    'esacci.SOILMOISTURE.day.L3S.SSMV.multi-sensor.multi-platform.PASSIVE.03-2.r1',
    'esacci.SST.day.L4.SSTdepth.multi-sensor.multi-platform.OSTIA.1-1.r1',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2002',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2003',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2004',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2005',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2006',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2007',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2008',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2009',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2010',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2011',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.AATSR.Envisat.AATSR.1-1.2012',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR-2.ERS-2.ATSR2.1-1.1995',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR-2.ERS-2.ATSR2.1-1.1996',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR-2.ERS-2.ATSR2.1-1.1997',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR-2.ERS-2.ATSR2.1-1.1998',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR-2.ERS-2.ATSR2.1-1.1999',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR-2.ERS-2.ATSR2.1-1.2000',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR-2.ERS-2.ATSR2.1-1.2001',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR-2.ERS-2.ATSR2.1-1.2002',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR-2.ERS-2.ATSR2.1-1.2003',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR.ERS-1.ATSR1.1-1.1991',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR.ERS-1.ATSR1.1-1.1992',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR.ERS-1.ATSR1.1-1.1993',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR.ERS-1.ATSR1.1-1.1994',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR.ERS-1.ATSR1.1-1.1995',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR.ERS-1.ATSR1.1-1.1996',
    'esacci.SST.satellite-orbit-frequency.L3U.SSTskin.ATSR.ERS-1.ATSR1.1-1.1997']