Ejemplo n.º 1
0
 def setup_config(self, autocloseFileLimitFraction=0.5, maxChunkSize=10000):
     config = MpasAnalysisConfigParser()
     config.add_section('input')
     config.set('input', 'autocloseFileLimitFraction',
                str(autocloseFileLimitFraction))
     config.set('input', 'maxChunkSize', str(maxChunkSize))
     return config
    def setup_config(self, maxChunkSize=10000):
        config = MpasAnalysisConfigParser()

        config.add_section('diagnostics')
        config.set('diagnostics', 'baseDirectory', self.test_dir)
        config.set('diagnostics', 'customDirectory', 'none')
        config.set('diagnostics', 'mappingSubdirectory', 'maps')

        config.add_section('input')
        config.set('input', 'maxChunkSize', str(maxChunkSize))
        config.set('input', 'mpasMeshName', 'QU240')

        config.add_section('output')
        config.set('output', 'baseDirectory', self.test_dir)
        config.set('output', 'mappingSubdirectory', '.')
        config.set('output', 'mpasClimatologySubdirectory', 'clim/mpas')

        config.add_section('climatology')
        config.set('climatology', 'startYear', '2')
        config.set('climatology', 'endYear', '2')
        config.set('climatology', 'comparisonLatResolution', '0.5')
        config.set('climatology', 'comparisonLonResolution', '0.5')

        config.set('climatology', 'mpasInterpolationMethod', 'bilinear')

        config.add_section('oceanObservations')
        config.set('oceanObservations', 'interpolationMethod', 'bilinear')
        config.set('oceanObservations', 'climatologySubdirectory', 'clim/obs')
        config.set('oceanObservations', 'remappedClimSubdirectory',
                   'clim/obs/remap')

        return config
Ejemplo n.º 3
0
 def doTest(generate, expectedResults):
     config = MpasAnalysisConfigParser()
     config.add_section('output')
     config.set('output', 'generate', generate)
     for taskName in expectedResults:
         genericTask = AnalysisTask(config=config,
                                    taskName=taskName,
                                    componentName=cores[taskName],
                                    tags=tags[taskName])
         expectedResult = expectedResults[taskName]
         result = genericTask.check_generate()
         self.assertEqual(result, expectedResult)
 def setup_config(self, maxChunkSize=10000):
     config = MpasAnalysisConfigParser()
     config.add_section('input')
     config.set('input', 'maxChunkSize', str(maxChunkSize))
     return config