...
First, if you need to override any of the default settings in the various header files (i.e. to increase parameter sizes), you can place updated files into this directory (you will need to create it) which are located here:
MITgcm_code/verification/global_pcb_llc90/code
Be aware that the /verification/pcb/code/ directory does not contain all pcb simulation code. It only contains the header files that you manually copied from the main code, edited, and saved to the directoryneed for the PCB simulation. Here is a list of the most important notable files and settings:
File | Modification |
---|
PROFILES_SIZE.h | Changed parameter NOBSGLOB from 500 to 400000 to allow MITgcm to read certain files in the run/profiles directory |
PCB_OPTIONS.h | You can define (or undefine) several C-preprocessor switches to turn activate (or deactivate) various PCB simulation options. - To activate an option, use
#define OPTION-NAME - To deactivate an option, use
#undef OPTION-NAME
Option | Description | Default status |
---|
#define PCBRIVER | Use a seprarate tracer for riverine PCBp | OFF | #define PCBAREFRACTORY | Use a separate tracer for refractory PCBa (either from river or from atmospheric deposition) | OFF | #define PCBPRREFRACTORY | Use a separate tracer for refractory PCBp (from rivers only) | OFF | #define PCBPR_IRREDUCIBLE | Is refractory PCBp irreducible? | OFF | #define PCBPR_SLOWRELEASING | Is refractory PCBp slow-releasing? | OFF | #define WALSH_FILTER | Activate Walsh & Nittrouer typology filter for riverine particles? | Activated when #define HGPREFRACTORY is ON | #define walsh_depth | disable sedimentation: 0: no disable 1: only river mouth 2: over depth <= 55 m (top 4 levels) 3: over depth <= 185 m (top 8 levels) 4: over river mouth AND depth shallower than 55 m | 0 | #define USE_EXFIWR | Use external forcing fields (needed for online run) | ON | #define VARI_RED_POOL | Is Hg2 reducible pool a function of DOC concentrations? | OFF |
|
PCB_SIZE.h | You can modify tracer indices and size parameters for the PCB simulation if necessary: Parameter | Description | Default status |
---|
iPCBa | PCBa tracer index | 1 | iPCBp | PCBp tracer index | 2 | iPCBaR | Refractory PCBa tracer index | 3 (when #define PCBAREFRACTORY is ON)
| iPCBPr | Refractory PCBp tracer index | 4 (when #define PCBAREFRACTORY is ON)
3 (when #define PCBAREFRACTORY is OFF) | nrmax | Number of rivers | 1 (only when #define PCBPRREFRACTORY is ON) |
|
...
Once you are sure that you have made the proper settings in th global_pcb_llc90/code
directory, change to the global_pcb_llc90/build directory:
cd ../build
and type the following commands:
premake
make -j13 depend 2>&1 | tee depend.log
make -j13 2>&1 | tee build.log
cp mitgcmuv ../run
Each of these commands will be described in more detail below:
Command | Description |
---|
premake | premake is an alias in your ~/.bashrc_mitgcm file.
premake calls the MITgcm_code/tools/genmake program, which
- Queries your computer system to find out where various libraries (i.e. MPI, netCDF, etc) are located,
- Uses the compilation options that you specify in the file
MITgcm_code/tools/build_options/inux_ifort_odyssey - Generates the main MITgcm makefiles.
- For more information about genmake, see the MITgcm User Manual, Chapter 3.4.2.
|
make -j13 depend | This command builds the “dependencies” listing and adds it to the Makefile. In other words, it tells the Makefile which source code files depend on which other files. This is done in order to reduce compilation time. - NOTE: the
-j13 option tells the Make command to use 13 CPUs.
- This number should be the same as the number of CPUs your interactive session uses. This will reduce the overall compilation time.
- Using the >& build.log suffix sends the stdout and stderr output to the log file that you specify. Build errors (if any) will be in this file.
|
make -j13 | Builds the MITgcm source code into an executable. - A symbolic link to each Fortran (
*.F ) and include file (*.h ) will be made in the build/ directory. - For each *.F file, include files will be inlined and C-preprocessor switches evaluated. The resultant "clean" Fortran file will be saved with a *.f extension.
- The *.f files will be compiled into an executable file named mitgcmuv. .
- Using the >>& build.log suffix appends the stdout and stderr output to the log file that you specify. Compile errors (if any) will be in this file.
|
cp mitgcmuv ../run | Copies the mitgcmuv executable to the run directory, where it will be used to run MITgcm simulations. |
Previous | Up | Next