예제 #1
0
 def test_custom_tables_location(self):
     """Test constructor with custom tables location."""
     cwd = os.path.dirname(os.path.realpath(__file__))
     cmor_tables_path = os.path.join(cwd, '..', '..', '..', 'esmvalcore',
                                     'cmor', 'tables', 'cmip6')
     cmor_tables_path = os.path.abspath(cmor_tables_path)
     CMIP6Info(cmor_tables_path, default=None, strict=False)
예제 #2
0
    def setUpClass(cls):
        """
        Set up tests.

        We read CMIP6Info once to keep tests times manageable
        """
        cls.variables_info = CMIP6Info('cmip6', default=CustomInfo())
예제 #3
0
    def setUpClass(cls):
        """
        Set up tests.

        We read CMIP6Info once to keep tests times manageable
        """
        cls.variables_info = CMIP6Info(cmor_tables_path='obs4mips',
                                       default=CustomInfo())
예제 #4
0
    def setUpClass(cls):
        """Set up tests.

        We read CMIP6Info once to keep tests times manageable
        """
        cls.variables_info = CMIP6Info('cmip6',
                                       default=CustomInfo(),
                                       strict=True,
                                       alt_names=[
                                           ['sic', 'siconc'],
                                           ['tro3', 'o3'],
                                       ])
예제 #5
0
 def test_custom_tables_location(self):
     """Test constructor with custom tables location."""
     cmor_path = os.path.dirname(os.path.realpath(esmvalcore.cmor.__file__))
     cmor_tables_path = os.path.join(cmor_path, 'tables', 'cmip6')
     cmor_tables_path = os.path.abspath(cmor_tables_path)
     CMIP6Info(cmor_tables_path, None, True)