---
# System prepended metadata

title: WRF1
tags: [WRF]

---

# WRF1

###### tags: `WRF`
```=
FROM centos:7
WORKDIR /
# post
RUN rm -f /var/run/yum.pid && \
    yum -y update && \
    yum -y groupinstall "Development Tools" && \
    yum -y install make gcc gcc-c++ csh wget time cmake unzip git libstdc++-devel libXScrnSaver m4 net-snmp-devel mysql-devel openssl-devel libtool dos2unix help2man && \
    mkdir -p /Build_WRF/src && \
    mkdir -p /Build_WRF/LIBRARIES && \
    cd /Build_WRF/src && \
    echo -e "https://download.open-mpi.org/release/open-mpi/v3.1/openmpi-3.1.4.tar.gz\nftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-c-4.7.3.tar.gz\nftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-fortran-4.5.2.tar.gz\nhttp://www.zlib.net/fossils/zlib-1.2.11.tar.gz\nftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/libpng-1.6.37.tar.gz\nhttp://www.ece.uvic.ca/~mdadams/jasper/software/jasper-1.900.1.zip\nhttps://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.17/src/hdf5-1.8.17.tar.gz" > /url.txt && \
    wget -i /url.txt -P /Build_WRF/src && \
    for f in /Build_WRF/src/*.tar.gz; do tar -xvf "$f" -C /Build_WRF/src; done && \
    unzip /Build_WRF/src/jasper-1.900.1.zip -d /Build_WRF/src && \
# opempi
    cd /Build_WRF/src/openmpi-3.1.4 && \
    ./configure --prefix=/openmpi && \
    make && \
    make install
# Setting up the environemnt for compiler
ENV PATH=$PATH:/Build_WRF/src/openmpi/bin LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/Build_WRF/src/openmpi/lib
# zlib    
RUN cd /Build_WRF/src/zlib-1.2.11 && \
    ./configure --prefix=/Build_WRF/LIBRARIES/zlib && \ 
    make && \ 
    make install && \ 
# HDF5
    cd /Build_WRF/src/hdf5-1.8.17 && \
    ./configure --prefix=/Build_WRF/LIBRARIES/ --with-zlib=/Build_WRF/LIBRARIES/ --enable-fortran && \
    make && \
    make install
# netcdf    
ENV LD_LIBRARY_PATH=/Build_WRF/LIBRARIES/lib
ENV LDFLAGS=-L/Build_WRF/LIBRARIES/lib
ENV CPPFLAGS=-I/Build_WRF/LIBRARIES/include
RUN cd /Build_WRF/src/netcdf-c-4.7.3 && \
    yum -y install curl && \
    ./configure --prefix=/Build_WRF/LIBRARIES/ --disable-dap && \
    make && \
    make install && \
    cd /Build_WRF/src/netcdf-fortran-4.5.2 && \
    ./configure --prefix=/Build_WRF/LIBRARIES/ && \
    make && \
    make install
# libpng
RUN cd /Build_WRF/src/libpng-1.6.37/ && \
    CPPFLAGS='-I/usr/local/zlib/include' LDFLAGS='-L/usr/local/zlib/lib' /Build_WRF/src/libpng-1.6.37/configure --prefix=/Build_WRF/LIBRARIES/libpng && \
    make -j2 && \
    make install
ENV LD_LIBRARY_PATH=/Build_WRF/LIBRARIES/libpng/lib:$LD_LIBRARY_PATH
# jasper
RUN cd /Build_WRF/src/jasper-1.900.1 && \
    ./configure --prefix=/Build_WRF/LIBRARIES/ && \
    make && \
    make install && \
# WRF_ISC21
    cd /Build_WRF/ && \
    git clone https://github.com/wrf-model/WRF /Build_WRF/WRF_ISC21 && \
    cd /Build_WRF/WRF_ISC21 && \
    git checkout tags/ISC21 -b ISC21-branch
ENV NETCDF=/Build_WRF/LIBRARIES/
ENV HDF5=/Build_WRF/LIBRARIES/
ENV WRFIO_NCD_LARGE_FILE_SUPPORT=1
ENV NETCDF_classic=1
RUN cd /Build_WRF/WRF_ISC21/ && \
    ./configure <<< $'34\r1\r'
```