User Tools

Site Tools


complilingpcschinook

Compliling PREP-CHEM-SRC 1.5 on Chinook

Status: May 2017

Prerequisites

PCS source code tar ball from ftp://aftp.fsl.noaa.gov/divisions/taq/global_emissions/ .

Also download the new Global_Emissions_V3 file (tagged “24aug2015”). PCS 1.5 expects some variables that are not available in the Global Emissions collection distributed for PCS 1.4.

Chinook programming environment. The following module load sequence loads all prerequisites (for all WRF compilation, in fact - JasPer and libpng are probably not needed for PCS, but you'll need them later anyway). Zlib is installed as a dependency automatically.

$ module purge
$ module load toolchain/pic-intel/2016b
$ module load data/netCDF-Fortran/4.4.4-pic-intel-2016b
$ module load vis/JasPer/1.900.1-pic-intel-2016b
$ module load lib/libpng/1.6.24-pic-intel-2016b

The end result is

$ module list
Currently Loaded Modulefiles:
  1) compiler/GCCcore/5.4.0                      9) lib/zlib/1.2.8-pic-intel-2016b
  2) tools/binutils/2.26-GCCcore-5.4.0          10) tools/Szip/2.1-pic-intel-2016b
  3) compiler/icc/2016.3.210-GCC-5.4.0-2.26     11) data/HDF5/1.8.15-pic-intel-2016b
  4) compiler/ifort/2016.3.210-GCC-5.4.0-2.26   12) tools/cURL/7.49.1-pic-intel-2016b
  5) openmpi/intel/1.10                         13) data/netCDF/4.4.1.1-pic-intel-2016b
  6) toolchain/pic-iompi/2016b                  14) data/netCDF-Fortran/4.4.4-pic-intel-2016b
  7) numlib/imkl/11.3.3.210-pic-iompi-2016b     15) vis/JasPer/1.900.1-pic-intel-2016b
  8) toolchain/pic-intel/2016b                  16) lib/libpng/1.6.24-pic-intel-2016b

Fix source code bug

In PREP-CHEM-SRC-1.5/src/ edit convert_edgar_to_RELACS_REAC.f90. In line 9, change

use chem1_list

to

!use chem1_list

Save & exit. For explanation, see this thread: http://forum.wrfforum.com/viewtopic.php?f=39&t=8994

Compilation

Follow the documentation in guide-PREP-CHEM-SRC-1.5.pdf (distributed in the tarball), p.5ff . However, there are some snags as listed below.

Edit makefile in PREP-CHEM-SRC-1.5/bin/build/. For Intel compilers, for WRF, you need to edit include.mk.intel.wrf. The suffix is the same as the make option used later (intel.wrf – don't bother with intel). The section to edit is this:

# NETCDF libraries

NETCDF=/usr/local/pkg/data/netCDF/4.4.1.1-pic-intel-2016b
NETCDF_INC=-I$(NETCDF)/include
NETCDF_LIBS=-L$(NETCDF)/lib64 -lnetcdff -lnetcdf

# HDF libraries

HDF5=/usr/local/pkg/data/HDF5/1.8.15-pic-intel-2016b/
HDF5_INC=-I$(HDF5)/include
HDF5_LIB=-L$(HDF5)/lib -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5 \\
    -L/usr/local/pkg/lib/zlib/1.2.8-pic-intel-2016b/lib -lz -ldl

These locations depend on the module versions you loaded. You can find them from your environment variables (using export) (so could PCS, but ¯\_(ツ)_/¯).

Compile!

$ make OPT=intel.wrf CHEM=RADM_WRF_FIM AER=SIMPLE

Clean-up

In PREP-CHEM-SRC-1.5/bin/, change the symbolic links:

$ ln -sf ../extra/UserData .
$ ln -sf link/to/new/Global_emissions_v3_24Aug2015 ./datain

Edit prep_chem_sources.inp, test and run.

complilingpcschinook.txt · Last modified: 2017/05/28 08:55 by chris