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 doTest(generate, expectedResults): config = MpasAnalysisConfigParser() config.add_section('output') config.set('output', 'generate', generate) for analysisName in expectedResults: expectedResult = expectedResults[analysisName] result = checkGenerate( config, analysisName=analysisName, mpasCore=cores[analysisName], analysisCategory=categories[analysisName]) self.assertEqual(result, expectedResult)
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, autocloseFileLimitFraction=0.5): config = MpasAnalysisConfigParser() config.add_section('input') config.set('input', 'autocloseFileLimitFraction', str(autocloseFileLimitFraction)) return config
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)) 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.set('output', 'mpasRemappedClimSubdirectory', 'clim/mpas/remap') 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