@@ -325,6 +325,18 @@ However, we describe the typical workflow of the compilation, for anyone that wi
...
@@ -325,6 +325,18 @@ However, we describe the typical workflow of the compilation, for anyone that wi
## Conditional compilation
## Conditional compilation
Most Fortran compilers allow passing the source code through a C preprocessor (CPP; sometimes also called the Fortran preprocessor, FPP) to allow for conditional compilation. In the C programming language, there are some directives that make it possible to compile selectively portions of the source code.
In the WRF source code, Fortran files have an .F extension. cpp will parse these files and create corresponding .f90 files. The .f90 files will then be compiled by the Fortran compiler.
This means:
1. When editing the source code, always work on the .F files, otherwise changes will be lost on the next compilation.
2. In the .F files, it is possible to include `#ifdef` and `#ifndef` directives for conditional compilation.
To control conditional compilation:
1. Search for the variable `ARCHFLAGS` in `configure.wrf`