Skip to content
Snippets Groups Projects
Commit 23a16466 authored by Coda Phillips's avatar Coda Phillips
Browse files

Fix rttov build

parent 5dc7cc7e
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,9 @@ chmod 777 out
#python get_objs.py
#docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --rm -v $(pwd):/host/ -v /apollo:/apollo -it netcdf_hdf:7 /bin/bash --init-file /host/inner_build.sh
docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --rm -v $(pwd):/host/ -it netcdf_hdf:7 /bin/bash --init-file /host/inner_build.sh
python rename_clavrxorb.py
docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --rm -v $(pwd):/host/ -it gitlab.ssec.wisc.edu:5555/cphillips/netcdf_hdf_docker /bin/bash --init-file /host/inner_build.sh
#python rename_clavrxorb.py
#docker run --rm -v $(pwd):/host/ -it netcdf_hdf:7 /bin/bash --init-file /host/inner_build.sh
#docker run --rm -v $(pwd):/host/ -it netcdf_hdf:7 /bin/bash --init-file /host/build_librttov.sh
#docker run --rm -v $(pwd):/host/ -it gitlab.ssec.wisc.edu:5555/cphillips/netcdf_hdf_docker /bin/bash --init-file /host/build_libhim.sh
#docker run --rm -v $(pwd):/host/ -it gitlab.ssec.wisc.edu:5555/cphillips/netcdf_hdf_docker /bin/bash --init-file /host/build_librttov.sh
#!/bin/bash
cp -r /host/rttov /root/
cp /host/rttov_makefile.local /root/rttov/build/Makefile.local
cd /root/rttov/src
export CC=gcc
#make
#export OUTDIR=/host/out/rttov
#cd ..
#mkdir $OUTDIR
#cp -r include src lib mod $OUTDIR/
make
cd hdf
make
cd ../brdf_atlas/
make
cd ../emis_atlas/
make
cd ../mw_scatt/
make
cd ../other/
make
cd ../parallel/
make
cd ../../
cp -r include src lib mod /host/out/rttov
# ------------------------------------------------------------------------------
# Use this file to include external libraries when compiling RTTOV.
# It is recommended to compile RTTOV with the HDF5 library.
# Any other external libraries required may also be specified here.
# ------------------------------------------------------------------------------
# To compile RTTOV against the HDF5 library you must:
# - specify the path to the library in the HDF5_PREFIX variable below
# - uncomment one FFLAGS_HDF5 line and one LDFLAGS_HDF5 line which are
# appropriate for your installed library.
# To compile RTTOV against the NetCDF library (for HTFRTC) you must:
# - specify the path to the library in the NETCDF_PREFIX variable below
# - uncomment one FFLAGS_NETCDF line and one LDFLAGS_NETCDF line which are
# appropriate for your installed library.
# Similarly you can optionally specify a LAPACK library to compile against
# instead of using the LAPACK source included in the RTTOV package.
# After editing this file run the build/rttov_compile.sh script from within the
# RTTOV src/ directory to compile RTTOV.
# ------------------------------------------------------------------------------
# HDF5 library: optional, required for HDF5 coefficient file I/O,
# emissivity/BRDF atlases and RTTOV GUI.
#
# NB The _RTTOV_HDF macro must be defined to compile with HDF: this is done
# within the FFLAGS_HDF5 specified below. If not using the rttov_compile.sh
# script, then from within the src/ directory you must first run:
# $ ../build/Makefile.PL RTTOV_HDF=1
# ------------------------------------------------------------------------------
HDF5_PREFIX=/root/hdf5
# --- Uncomment one FFLAGS_HDF5 line:
# For most compilers:
FFLAGS_HDF5 = -D_RTTOV_HDF $(FFLAG_MOD)$(HDF5_PREFIX)/include
# For xlf on AIX:
# FFLAGS_HDF5 = -WF,-D_RTTOV_HDF $(FFLAG_MOD)$(HDF5_PREFIX)/include
# --- Uncomment one LDFLAGS_HDF5 line:
# In most cases:
# LDFLAGS_HDF5 = -L$(HDF5_PREFIX)/lib -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5
# But you may find that you must also specify libz:
# (NB for NAG Fortran you may also need to add -ldl)
LDFLAGS_HDF5 = -L$(HDF5_PREFIX)/lib -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lz
# ------------------------------------------------------------------------------
# NetCDF v4 library - optional, required for HTFRTC
#
# NB The _RTTOV_NETCDF macro must be defined to compile with NetCDF: this is
# done within the FFLAGS_NETCDF specified below.
#
# Since NetCDF v4 depends on the HDF5 library you may also need to link against
# the HDF5 library as above.
# ------------------------------------------------------------------------------
NETCDF_PREFIX = path-to-netcdf-install
# --- Uncomment one FFLAGS_NETCDF line:
# For xlf on AIX:
# FFLAGS_NETCDF = -WF,-D_RTTOV_NETCDF -I$(NETCDF_PREFIX)/include
# For most other compilers:
# FFLAGS_NETCDF = -D_RTTOV_NETCDF -I$(NETCDF_PREFIX)/include
# --- Uncomment one LDFLAGS_NETCDF line:
# For NetCDF v4.1:
# LDFLAGS_NETCDF = -L$(NETCDF_PREFIX)/lib -lnetcdff -lnetcdf
# For NetCDF v4.2 and later:
# LDFLAGS_NETCDF = -L$(NETCDF_PREFIX)/lib -lnetcdff
# ------------------------------------------------------------------------------
# LAPACK library: optional
# The LAPACK routines used by RTTOV are included in src/main/lapack.f.
# If you want to compile RTTOV against an external LAPACK library instead (e.g.
# in order to resolve conflicts at the linking stage) then specify this here.
# If not using the rttov_compile.sh script, then from within the src/ directory
# you must first run the ../build/Makefile.PL script with the argument
# RTTOV_USER_LAPACK=1 to exclude lapack.f from the Makefiles.
# ------------------------------------------------------------------------------
LAPACK_PREFIX = path-to-lapack-install
# --- Uncomment the FFLAGS_LAPACK and LDFLAGS_LAPACK lines and edit as
# required for your installation:
# FFLAGS_LAPACK = $(FFLAG_MOD)$(LAPACK_PREFIX)/include
# LDFLAGS_LAPACK = -L$(LAPACK_PREFIX)/lib -llapack
# ------------------------------------------------------------------------------
# Usually there is no need to edit anything below this line
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# Optional: specify other libraries here e.g. DrHook
# ------------------------------------------------------------------------------
DRHOOK_PREFIX = path-to-drhook-install
# FFLAGS_DRHOOK = -I$(DRHOOK_PREFIX)
# LDFLAGS_DRHOOK = -L$(DRHOOK_PREFIX) -ldrhook -lmpi_serial
# ------------------------------------------------------------------------------
# Include all macros on the following lines:
# (Does not need editing unless you add more libraries)
# ------------------------------------------------------------------------------
FFLAGS_EXTERN = $(FFLAGS_NETCDF) $(FFLAGS_HDF5) $(FFLAGS_DRHOOK) $(FFLAGS_LAPACK)
LDFLAGS_EXTERN = $(LDFLAGS_NETCDF) $(LDFLAGS_HDF5) $(LDFLAGS_DRHOOK) $(LDFLAGS_LAPACK)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment