Fail to compile UPP 11.0.0

ykaore

New member
Hi people,

I want to convert my wrfout files from NetCDF to GRIB. While reading the options available to perform this task, I saw some people recommending the UPP software. However, I am struggling to install/compile the program. I followed the user guide, by I'm getting this error.

cd UPP/tests
./compile_upp.sh
Machine: unknown
-- The Fortran compiler identification is GNU 7.5.0
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working Fortran compiler: /usr/bin/gfortran
-- Check for working Fortran compiler: /usr/bin/gfortran - works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/gfortran supports Fortran 90
-- Checking whether /usr/bin/gfortran supports Fortran 90 - yes
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Release' as none was specified.
-- Found MPI_C: /usr/lib64/mpi/gcc/mpich/lib64/libmpi.so (found version "3.1")
-- Found MPI_CXX: /usr/lib64/mpi/gcc/mpich/lib64/libmpicxx.so (found version "3.1")
-- Found MPI_Fortran: /usr/lib64/mpi/gcc/mpich/lib64/libmpifort.so (found version "3.1")
-- Found MPI: TRUE (found version "3.1")
CMake Error at cmake/FindNetCDF.cmake:210 (message):
Unable to properly find NetCDF. Found static libraries at:
/home/ykaore/wrf/upp/UPP/NetCDF_C_LIBRARY-NOTFOUND but could not run nc-config: Call Stack (most recent call first): CMakeLists.txt:37 (find_package)
CMake Error at cmake/FindNetCDF.cmake:210 (message): Unable to properly find NetCDF. Found static libraries at: /home/ykaore/wrf/upp/UPP/NetCDF_Fortran_LIBRARY-NOTFOUND but could not run nc-config: Call Stack (most recent call first): CMakeLists.txt:37 (find_package)
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:164 (message): Could NOT find NetCDF (missing: NetCDF_INCLUDE_DIRS NetCDF_LIBRARIES Fortran)
Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
cmake/FindNetCDF.cmake:284 (find_package_handle_standard_args) CMakeLists.txt:37 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/ykaore/wrf/upp/UPP/tests/build/CMakeFiles/CMakeOutput.log".
See also "/home/ykaore/wrf/upp/UPP/tests/build/CMakeFiles/CMakeError.log".


Can someone help me? Thanks in advance.
 
Hi people,

I want to convert my wrfout files from NetCDF to GRIB. While reading the options available to perform this task, I saw some people recommending the UPP software. However, I am struggling to install/compile the program. I followed the user guide, by I'm getting this error.

cd UPP/tests
./compile_upp.sh
Machine: unknown
-- The Fortran compiler identification is GNU 7.5.0
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working Fortran compiler: /usr/bin/gfortran
-- Check for working Fortran compiler: /usr/bin/gfortran - works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/gfortran supports Fortran 90
-- Checking whether /usr/bin/gfortran supports Fortran 90 - yes
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Release' as none was specified.
-- Found MPI_C: /usr/lib64/mpi/gcc/mpich/lib64/libmpi.so (found version "3.1")
-- Found MPI_CXX: /usr/lib64/mpi/gcc/mpich/lib64/libmpicxx.so (found version "3.1")
-- Found MPI_Fortran: /usr/lib64/mpi/gcc/mpich/lib64/libmpifort.so (found version "3.1")
-- Found MPI: TRUE (found version "3.1")
CMake Error at cmake/FindNetCDF.cmake:210 (message):
Unable to properly find NetCDF. Found static libraries at:
/home/ykaore/wrf/upp/UPP/NetCDF_C_LIBRARY-NOTFOUND but could not run nc-config: Call Stack (most recent call first): CMakeLists.txt:37 (find_package)
CMake Error at cmake/FindNetCDF.cmake:210 (message): Unable to properly find NetCDF. Found static libraries at: /home/ykaore/wrf/upp/UPP/NetCDF_Fortran_LIBRARY-NOTFOUND but could not run nc-config: Call Stack (most recent call first): CMakeLists.txt:37 (find_package)
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:164 (message): Could NOT find NetCDF (missing: NetCDF_INCLUDE_DIRS NetCDF_LIBRARIES Fortran)
Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
cmake/FindNetCDF.cmake:284 (find_package_handle_standard_args) CMakeLists.txt:37 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/ykaore/wrf/upp/UPP/tests/build/CMakeFiles/CMakeOutput.log".
See also "/home/ykaore/wrf/upp/UPP/tests/build/CMakeFiles/CMakeError.log".


Can someone help me? Thanks in advance.
Somewhere I remember seeing on here that WRF wasn't compatible with newer UPP. Can someone confirm that here? @Ming Chen
 
I have talked to NOAA staff responsible for UPP update, and I was told that UPP still works for processing wrfout files. It is just that they no longer provide user support for UPP application in WRF.
 
I have talked to NOAA staff responsible for UPP update, and I was told that UPP still works for processing wrfout files. It is just that they no longer provide user support for UPP application in WRF.
I'm still struggling how I can install UPP software. I was reading this thread (How is UPP installed? | UFS Community Support), which it says UPPv4.1 was the last version to be officially supported and tested for WRF. Someone knows where can I find UPP version 4.1? I could find only versions 11.0.0 and 10.1.0 at Download | dtcenter.org
 
I'm still struggling how I can install UPP software. I was reading this thread (How is UPP installed? | UFS Community Support), which it says UPPv4.1 was the last version to be officially supported and tested for WRF. Someone knows where can I find UPP version 4.1? I could find only versions 11.0.0 and 10.1.0 at Download | dtcenter.org

It's a tricky process but it can be done. Here's the code snippet from my install code that gets upp 4.1 set up

Bash:
###############################NCEPlibs#####################################
#The libraries are built and installed with
# ./make_ncep_libs.sh -s MACHINE -c COMPILER -d NCEPLIBS_DIR -o OPENMP [-m mpi] [-a APPLICATION]
#It is recommended to install the NCEPlibs into their own directory, which must be created before running the installer. Further information on the command line arguments can be obtained with
# ./make_ncep_libs.sh -h

#If iand error occurs go to https://github.com/NCAR/NCEPlibs/pull/16/files make adjustment and re-run ./make_ncep_libs.sh
############################################################################



cd $WRF_FOLDER/Downloads
git clone https://github.com/NCAR/NCEPlibs.git
cd NCEPlibs
mkdir $DIR/nceplibs

export JASPER_INC=$DIR/grib2/include
export PNG_INC=$DIR/grib2/include
export NETCDF=$DIR/NETCDF

#for loop to edit linux.gnu for nceplibs to install
#make if statement for gcc-9 or older
export GCC_VERSION=$(/usr/bin/gcc -dumpfullversion | awk '{print$1}')
export GFORTRAN_VERSION=$(/usr/bin/gfortran -dumpfullversion | awk '{print$1}')
export GPLUSPLUS_VERSION=$(/usr/bin/g++ -dumpfullversion | awk '{print$1}')

export GCC_VERSION_MAJOR_VERSION=$(echo $GCC_VERSION | awk -F. '{print $1}')
export GFORTRAN_VERSION_MAJOR_VERSION=$(echo $GFORTRAN_VERSION | awk -F. '{print $1}')
export GPLUSPLUS_VERSION_MAJOR_VERSION=$(echo $GPLUSPLUS_VERSION | awk -F. '{print $1}')

export version_10="10"

if [ $GCC_VERSION_MAJOR_VERSION -ge $version_10 ] || [ $GFORTRAN_VERSION_MAJOR_VERSION -ge $version_10 ] || [ $GPLUSPLUS_VERSION_MAJOR_VERSION -ge $version_10 ]
then
    y="24 28 32 36 40 45 49 53 56 60 64 68 69 73 74 79"
    for X in $y; do
        sed -i "${X}s/= /= $fallow_argument $boz_argument /g" $WRF_FOLDER/Downloads/NCEPlibs/macros.make.linux.gnu
    done
else
    echo ""
    echo "Loop not needed"
fi

if [ ${auto_config} -eq 1 ]
    then
        echo yes | ./make_ncep_libs.sh -s linux -c gnu -d $DIR/nceplibs -o 0 -m 1 -a upp
    else
        ./make_ncep_libs.sh -s linux -c gnu -d $DIR/nceplibs -o 0 -m 1 -a upp
fi

export PATH=$DIR/nceplibs:$PATH

echo " "
################################UPPv4.1######################################
#Previous verison of UPP
#WRF Support page recommends UPPV4.1 due to too many changes to WRF and UPP code
#since the WRF was written
#Option 8 gfortran compiler with distributed memory
#############################################################################
cd $WRF_FOLDER/
git clone -b dtc_post_v4.1.0 --recurse-submodules https://github.com/NOAA-EMC/EMC_post UPPV4.1
cd UPPV4.1
mkdir postprd
export NCEPLIBS_DIR=$DIR/nceplibs
export NETCDF=$DIR/NETCDF

if [ ${auto_config} -eq 1 ]
    then
        echo 8 | ./configure  #Option 8 gfortran compiler with distributed memory
    else
        ./configure  #Option 8 gfortran compiler with distributed memory
fi


#make if statement for gcc-9 or older
export GCC_VERSION=$(/usr/bin/gcc -dumpfullversion | awk '{print$1}')
export GFORTRAN_VERSION=$(/usr/bin/gfortran -dumpfullversion | awk '{print$1}')
export GPLUSPLUS_VERSION=$(/usr/bin/g++ -dumpfullversion | awk '{print$1}')

export GCC_VERSION_MAJOR_VERSION=$(echo $GCC_VERSION | awk -F. '{print $1}')
export GFORTRAN_VERSION_MAJOR_VERSION=$(echo $GFORTRAN_VERSION | awk -F. '{print $1}')
export GPLUSPLUS_VERSION_MAJOR_VERSION=$(echo $GPLUSPLUS_VERSION | awk -F. '{print $1}')

export version_10="10"

if [ $GCC_VERSION_MAJOR_VERSION -ge $version_10 ] || [ $GFORTRAN_VERSION_MAJOR_VERSION -ge $version_10 ] || [ $GPLUSPLUS_VERSION_MAJOR_VERSION -ge $version_10 ]
    then
        z="58 63"
        for X in $z; do
            sed -i "${X}s/(FOPT)/(FOPT) $fallow_argument $boz_argument  /g" $WRF_FOLDER/UPPV4.1/configure.upp
        done
    else
        echo ""
        echo "Loop not needed"
fi

./compile
cd $WRF_FOLDER/UPPV4.1/scripts
echo $PASSWD | sudo -S cpan install XML::LibXML
chmod +x run_unipost

# IF statement to check that all files were created.
 cd $WRF_FOLDER/UPPV4.1/exec
 n=$(ls ./*.exe | wc -l)
 if (( $n == 1 ))
    then
        echo "All expected files created."
        read -r -t 5 -p "Finished installing UPPV4.1. I am going to wait for 5 seconds only ..."
 else
     echo "Missing one or more expected files. Exiting the script."
     read -r -p "Please contact script authors for assistance, press 'Enter' to exit script."
     exit
 fi

echo " "
 
Back
Top