Prior to running GEOS-Chem, you must compile the source code using a Fortran-90 compiler in order to create a GEOS-Chem executable. Compiling GEOS-Chem invokes the GNU Make utility which manages the entire compilation process. A series of scripts called makefiles directs GNU Make to compile the GEOS-Chem source code files in the proper order and with the proper options. The resultant binary executable has filename geos and is stored in the/bin and GeosCore/ subdirectories.
The GEOS-Chem source code is partitioned into several subdirectories and each subdirectory contains its own makefile. You will usually not have to modify any of the GEOS-Chem source code makefiles unless you are introducing new modules or module-dependencies into GEOS-Chem. In those cases, you will need to add the new modules to the appropriate makefile and update dependency lists accordingly.
In general there are two types of makefiles:
Router makefiles: Makefiles that tell GNU Make to look at makefiles in other directories.
Regular makefiles: Makefiles that are used by GNU Make to compile source code programs.
The top-level GEOS-Chem source code directory contains a router makefile, which calls down to the regular makefiles in the various subdirectories. In each subdirectory, the regular makefile tells GNU Make how to compile the source code files. When the source code in all subdirectories has been compiled, the top-level Makefile tells GNU Make to create the GEOS-Chem executable file. For this reason, you must always compile GEOS-Chem from the top-level source code directory. You may do this either at the command line within the top-level source code directory or using another router makefile such as the one that comes with run directories copied from the GEOS-Chem Unit Test repository.
Please consult the GEOS-Chem Makefile Structure wiki page for detailed information about GEOS-Chem makefiles and instructions for compiling GEOS-Chem. Quick links to subsections of this wiki page are included below:
You can find more information about GNU Make at the GNU Operating System website: https://www.gnu.org/software/make/.
Note that executables generally cannot be easily swapped between computers unless the computers have identical systems. We therefore recommend that you recompile GEOS-Chem if you decide to move GEOS-Chem to a different computer.