[Wrf-users] Compiling RIP4

Ray D Wright rdw at spacefleet.org
Mon May 9 12:41:51 MDT 2016


I would be very grateful for a fix to a failure to compile RIP4 (so that
I can view WRF output files).I am running Centos 7 with the gfortran
compiler and have modified the "linux" clause in the makefile to look
like this:

linux:
	(cd src/ ; $(MAKE) all \
	"CF      = gfortran" \
	"FFLAGS  = -fconvert='big-endian' -fcray-pointer" \
	"FFLAGS2 = -fconvert='big-endian' -fcray-pointer" \
	"FFLAGS3 = $(FFLAGS2)" \
	"CCFLAGS = -DLITTLE -DUNDERSCORE -c" \
        "LDFLAGS = " \
	"LOCAL_LIBS = " \
	"NETCDFLIB = $(HOME)/Models/WRF/LIBRARIES/netcdf/lib" \
	"NETCDFINC = $(HOME)/Models/WRF/LIBRARIES/netcdf/include" \
	"LIBS    = -L$(NCARG_ROOT)/lib -lncarg -lcgm -lncarg_gks -lncarg_c
-L/usr/lib64 -lX11 -lfreetype -lcairo")
	( $(RM) $(RM_LIST_EXE) ; $(LN) src/rip . ; $(LN) src/ripdp_mm5 . ;
$(LN) src/ripdp_wrf . ; $(LN) src/ripcomp . ; $(LN) src/ripinterp . ;
$(LN) src/ripshow . ; $(LN) src/showtraj . ; $(LN) src/tabdiag . ; $(LN)
src/upscale . )

, since the original assumed the PGI compiler, and I want to use
gfortran (also because I've got the gfortran version of NCL/NCARG). I
have installed WRF3.7 and WPS according to the tutorial
(http://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation_tutorial.php),
and that works fine. Unfortunately, the make fails when it tries to
compile ripdp_wrf.f. Here's the compile statement, and a few of the
error lines:
gfortran  -o ripdp_wrf  -L/home/rdw/Models/WRF/LIBRARIES/netcdf/lib
-I/home/rdw/Models/WRF/LIBRARIES/netcdf/include ripdp_wrf.f \
	premaptform.o maptform.o fillarray.o mconvert.o writefile_rdp.o \
	virtual.o xtodot.o -lnetcdf
/tmp/cc0JCKmL.o: In function `process_':
ripdp_wrf.f:(.text+0x2ef7): undefined reference to `nf_open_'
ripdp_wrf.f:(.text+0x2f36): undefined reference to `nf_inq_dimid_'
ripdp_wrf.f:(.text+0x2f75): undefined reference to `nf_inq_dimlen_'
ripdp_wrf.f:(.text+0x2fc2): undefined reference to `nf_inq_'
.
.

I've looked around the internet for a solution and haven't found one,
but suspect that the undefined references are because of a missing
library, which could be lnetcdff. I tried recompiling ripdp_wrf.f
manually, with lnetcdff added, but I still get a great long list of
undefined references.

Has anybody had this problem and cracked it?

Ray Wright




More information about the Wrf-users mailing list