Large-scale open-source projects, such as WRF, NOAA-GFDL’s FMS, and CP2K, rely on strict coding guidelines to ensure code quality, readability, and optimization. This article highlights how Codee automates compliance with these guidelines through static analysis and automatic formatting, aligning with each project’s specific standards.
Codee’s Approach: Customizable Analysis and Formatting
Codee automatically scans Fortran, C, and C++ code, providing actionable “checks” to enforce best practices from the Open Catalog. Teams can customize these analyses to match their unique coding guidelines. Fortran developers also benefit from automatic code formatting, ensuring consistency across the codebase.
- Correctness, Modernization, Security, Portability, and Optimization: Detects opportunities to improve code based on the recommendations of the Open Catalog.
- Automatic Fortran Formatting: Applies project-specific styles using
.codee-formatconfiguration files. - CI/CD Integration: Seamlessly integrates into development pipelines to catch issues early.
1. WRF: Weather Research and Forecasting Model
The WRF project, a cornerstone for weather forecasting and climate research, faced challenges with decades of legacy Fortran code, contributions from a global community, and strict coding rules to maintain portability and performance.
✅ With Codee:
- Automatic Formatting: Consistent coding style with automatic indentation, line length limits, and more.
- Code Correctness Checks: Automatically detects missing
IMPLICIT NONEdeclarations (PWR007) and procedure intents (PWR008). - Legacy Code Detection: Flags disallowed constructs such as
STOP,PAUSE,EQUIVALENCE, andCOMMONblocks (PWR063, PWR073).
📊 Technical Impact:
- 11,366 improvement opportunities identified.
- 9,464 automatic corrections (AutoFix) available.
- 508 files analyzed (949,428 lines of code) in 1h 22m.
📈 Business Impact:
According to a Codee-generated ROI report, automating coding guideline enforcement in WRF saves 8,542 hours of manual effort—equivalent to 4.75 full-time developers per year. This results in an estimated annual cost saving of €474,555, based on an average developer cost of €100,000. By applying checks above, Codee enhances code quality while reducing operational expenses.

The result? More efficient reviews, improved consistency, and fewer production errors—empowering developers to focus on innovation while reducing costs and accelerating scientific research.
2. NOAA-GFDL: Modular Ocean Model (MOM) and Flexible Modeling System (FMS)
The NOAA-GFDL team models the world’s oceans to understand climate change. But maintaining a consistent Fortran style across contributions was a major challenge. Even minor errors could introduce numerical inaccuracies that compromise results.
✅ With Codee:
- Precise Formatting: Enforced indentation, operator spacing, removal of trailing whitespace, limited line length, and customization of “end” statements (“end do”, “end subroutine”, etc.).
- Module Imports: Required
ONLYclauses to limit imports (PWR069). - Data Flow Checks: Detection of global variables (PWR001) and missing procedure intents (PWR008).
- Arithmetic Optimizations: Replaced divisions with multiplications (PWR045, PWR046).
- Reproducibility Checks: Tuned operations for floating-point consistency (PWR031, RMK016).
📊 Technical Impact
- 417 improvement opportunities identified.
- Top issues included 377 instances of global variable declarations and 28 cases of missing procedure intents
- 110 files analyzed (63,127 lines of code) in just 1m 13s.
📈 Business Impact:
According to a Codee-generated ROI report, automating coding guideline enforcement in FMS saves 6,929 hours of manual effort—equivalent to 3.85 full-time developers per year. This results in an estimated annual cost saving of €384,944, based on an average developer cost of €100,000. By applying the checks above, Codee enhances code quality while reducing operational expenses.

With Codee, NOAA-GFDL maintained clean, consistent, and reproducible code, ensuring reliable scientific results while significantly reducing manual effort and operational costs.
3. CP2K: Quantum Chemistry and Solid-State Physics Package
In the demanding world of quantum chemistry, precision is everything. The CP2K team manages millions of lines of Fortran code, contributed by developers worldwide.
But style inconsistencies, legacy constructs, and OpenMP errors slowed development and introduced hard-to-find bugs.
✅ With Codee:
- Consistent Style Across Contributions: Enforced CP2K’s rules, including 3-space indentation, uppercase keywords, line length limit, operator whitespace rules, removal of empty lines, and removal of trailing whitespace.
- Stronger Module Practices: Flagged missing
ONLYclauses (PWR069). - Implicit Declarations: Disabled implicit variable declarations (PWR007) to prevent undefined behavior.
- OpenMP Scoping: Detected parallel regions missing
default(none)(PWR005). - Static Variable Management: Required
SAVEattributes to avoid hidden state issues (PWR072). - Floating-Point Consistency: Promoted
real(kind=kind_value)for numerical stability (PWR071). - Legacy and Extension Detection: Flagged
GOTOstatements (PWR063) and GNU Fortran extensions (PWR075).
📊 CP2K Analysis Results:
- 85 improvement opportunities identified.
- 32 automatic corrections (AutoFix) available.
- Top detections included:
- 22 cases of missing
IMPLICIT NONEdeclarations. - 20 OpenMP scoping errors.
- 26 instances of missing
ONLYclauses in module imports.
- 22 cases of missing
- 1,361 files analyzed (1,093,520 lines of code) in 36m 33s.
📈 Business Impact:
According to a Codee-generated ROI report, automating coding guideline enforcement in CP2K saves 59,167 hours of manual effort—equivalent to 32.87 full-time developers per year. This results in an estimated annual cost saving of €3,287,055, based on an average developer cost of €100,000. By applying the checks above, Codee enhances code quality while significantly reducing operational expenses.

With Codee, CP2K streamlined code maintenance and standardization, ensuring high-performance scientific computing while significantly reducing manual effort and development costs.
Get the Full Report
Learn how Codee automates Fortran coding guideline enforcement in WRF, NOAA-GFDL, and CP2K, with detailed checks, real examples, and AutoFix solutions.
📄 Access the full report
Conclusion
Codee not only applies the coding standards of leading projects such as WRF, NOAA-GFDL, and CP2K but also allows teams to customize rules to suit their unique Fortran, C, or C++ projects. With advanced AutoFix capabilities and thorough static analysis, Codee accelerates reviews, improves code quality, and reduces human errors, all while integrating smoothly into modern CI/CD workflows.
Build correct, secure, modern and fast Fortran, C and C++ scientific software
This company is capitalized by INNVIERTE, AN INVESTMENT PROGRAM OF CDTI, E.P.E
Leave a Reply