Skip to content

pacedproton/WRF_environment_installation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README WRF Environment Installation script facilitates the installation of the dependencies 
for WRF/WRF-Chem/WPS.

Buildtime: All the necessary parameterization is to fill out the block marked for required parameters.

2 environments are supported: AMD-generic and Intel-vsc. 

Use PLATFORM_ARCH=INTEL-vsc for Intel clusters with a module environment congruent with the modules in initialize(). 
Here, the Intel compilers, Intel MPI, cmake and perl need to be loadable through the module facility.

or

PLATFORM=AMD-generic for all other AMD and Intel ones (default). 

Tested environment INTEL-vsc:
    RHEL/CentOS Linux (tested 7.6)
    Intel Parellel Studio (tested 19.1.0)
    cmake (tested 3.15.1)
    perl (tested 5.26.2)
    automake (tested 1.16.1 for lex/yacc otherwise 1.13.4) 
    gettext (tested 0.19.8.1)
    yacc (tested 1.9)
    flex (tested 2.6.4)

Tested environment for AMD-generic:
    RHEL/CentOS Linux (tested 7.0)
    Intel oneAPI 2021.1
    cmake (tested 3.17.3)
    perl (tested 5.16)
    automake (tested 1.13.4 and 1.16.3: both needed) 
    gettext (tested 0.19.8.1)
    yacc (tested 1.9)
    flex (tested 2.6.4)


This script requires 2 passes to build WRF, 3 for WRF/WPS. 


(1) Edit the script worf.sh parameter block top of the file to match the local environment.

(2) Change to the script directory and run it from a bash shell: bash ./worf.sh

(3) If testing was enabled (test='test') and the optimization level via the parameter OPTI set to '-O3' then 
    the build time for the environment with dependencies on a 2020 high-end SMP is around 2 hours wallclock time;
    without testing and at OPTI to '-O0' about 10'.

(4) Check if the dependencies have all been deployed to 
    <PREFIX><CATEGORY>

(5) Source the WRF_ENVIRONMENT file (default location: ${PREFIX}/${PACKAGES}/wrf_environment.sh)
    source wrf_environment.sh 

(6) Configure WRF: ./configure [-d without optimization]
       
        select DMPAR - Intel (15)        

        edit configure.wrf, e.g. with
        DM_FC=mpiifort
        DM_CC=mpiicc

    issue ./clean before making changes to recompile or clean -a which also overwrites configure.wrf
 
(7) Compile WRF: ./compile <model name>
    a 2020 high-end SMP machine takes around an hour -O2 optmized wallclock compile time;
    about 10' unoptimized. Parallel compile is set to 2 proccess, do not increase. 

(8) For WRF-Chem compile the external emissions conversion as well: ./compile emi_conv
       
(9) Configure WPS: run: bash worf.sh wps 
    for a WPS build environment and follow the screen-printed instructions

    run ./configure and select option 19 for Intel/distributed memory parallelism

    edit the resulting file configure.wps with:
    DM_FC: mpiifort
    DM_CC: mpiicc
    LDFLAGS: -qopenmp

    then edit the library and include paths from the generated wrf_environment.sh file
    (see paramter section and wrf_environment.sh for the respective locations)

    COMPRESSION_LIBS=-L<jasperpath>/lib -L<zlibpath>/lib -L<libpngpath>/lib -ljasper -lpng -lz
    COMPRESSION_INC=-I<jasperpath>/include/jasper -I<zlibpath>/include -I<libpngpath>/include

    Example:

    COMPRESSION_LIBS=-L/gpfs/data/home/username/opt/jasper/lib64 -L/gpfs/data/data/home/usernameme/opt/zlib/lib -L/gpfs/data/data/home/username/opt/libpng/lib -ljasper -lpng -lz
    COMPRESSION_INC=-I/gpfs/data/home/username/opt/jasper/include/jasper -L/gpfs/data/home/username/opt/zlib/lib -L/gpfs/data/home/username/opt/libpng/lib

    then run ./compile
   
    geogrid.exe, metgrid.exe and ungrib.exe in the wps package directory signify a successful build



Runtime/Batch:

Always first source the WRF_ENVIRONMENT file (default location: ${PREFIX}/${PACKAGES}/wrf_environment.sh)
e.g. source wrf_environment.sh same as . wrf_environment.sh