[Wrf-users] Compiling RIP4

David Ovens ovens at atmos.washington.edu
Mon May 9 13:50:51 MDT 2016


Hello Ray,

I use Debian, not Centos, but compile RIP all the time and have seen
that error multiple times.  For me, the fix is to make sure that I
have -lnetcdff and -lnetcf.  Using Intel compilers, my compilation
requires that I put them in this order:
  -lnetcdf -lnetcdff
So, give that a try.

David
-- 
David Ovens
Research Meteorologist
Dept of Atm. Sciences
University of Washington




On Mon, May 09, 2016 at 07:41:51PM +0100, Ray D Wright wrote:
> 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
> 
> 
> _______________________________________________
> Wrf-users mailing list
> Wrf-users at ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/wrf-users



More information about the Wrf-users mailing list