compare_contam_sim_results
Compare two CONTAM simulation result files to analyze differences in airflow and contaminant transport modeling outputs.
Instructions
Use this when you want to compare two CONTAM .sim result files with simcomp.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| firstSimPath | Yes | ||
| secondSimPath | Yes | ||
| verbosity | No | ||
| timeoutSeconds | No |
Implementation Reference
- contam-mcp/src/server.js:2862-2899 (handler)The tool "compare_contam_sim_results" is registered and handled in server.js. It calls the "simcomp" executable to compare two simulation files.
server.tool( "compare_contam_sim_results", "Use this when you want to compare two CONTAM .sim result files with simcomp.", { firstSimPath: z.string(), secondSimPath: z.string(), verbosity: z.number().int().min(0).max(3).optional(), timeoutSeconds: z.number().int().min(1).max(600).optional() }, async ({ firstSimPath, secondSimPath, verbosity, timeoutSeconds }) => { const executablePath = await resolveExecutable("simcomp"); const resolvedFirstPath = asAbsolutePath(firstSimPath); const resolvedSecondPath = asAbsolutePath(secondSimPath); for (const filePath of [resolvedFirstPath, resolvedSecondPath]) { if (!(await fileExists(filePath))) { throw new Error(`SIM file not found: ${filePath}`); } } const args = [resolvedFirstPath, resolvedSecondPath, String(verbosity ?? 1)]; const result = await runProcess(executablePath, args, { cwd: path.dirname(resolvedFirstPath), timeoutSeconds: timeoutSeconds ?? 60 }); return toolResponse( result.ok ? "simcomp completed successfully." : "simcomp finished with errors or a non-zero exit code.", { executablePath, firstSimPath: resolvedFirstPath, secondSimPath: resolvedSecondPath, args, ...result } ); } );