[Wrf-users] Compiling RIP4

Tyle, Kevin R ktyle at albany.edu
Mon May 9 13:40:48 MDT 2016


Hi Ray,

If you have built the netcdf-fortran library, and it is in the same directory as the netcdf-c library, then yes, adding -lnetcdff should be all you need to do.  What other errors ensue when you do that?

--Kevin
_____________________________________________
Kevin Tyle, Manager of Departmental Computing
Dept. of Atmospheric & Environmental Sciences   
University at Albany
Earth Science 235, 1400 Washington Avenue                        
Albany, NY 12222
Email: ktyle at albany.edu
Phone: 518-442-4578                             
_____________________________________________


-----Original Message-----
From: wrf-users-bounces at ucar.edu [mailto:wrf-users-bounces at ucar.edu] On Behalf Of Ray D Wright
Sent: Monday, May 09, 2016 2:42 PM
To: wrf-users at ucar.edu
Subject: [Wrf-users] Compiling RIP4

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