[NEW CASE] compiling ARW post ERROR

Discussions related to the use of ARWPost

[NEW CASE] compiling ARW post ERROR

Postby nos » Sat Apr 18, 2015 8:37 pm

hi

I have a problem in compile ARWpost. I think it is a new case. I have setting enviroment NETCDF=/home/nos/WRFV/Libraries/netcdf2 BUT in compiling process the link of NETCDF to other directory like this :
Code: Select all
/home/nos/WRFV/Libraries/netcdf2/lib/libnetcdff.a(fort-varaio.o): In function `nf_get_vara_real_':
/home/nos/netcdf-4.1.3/fortran/fort-varaio.c:143: undefined reference to `nc_get_vara_float'
/home/nos/WRFV/Libraries/netcdf2/lib/libnetcdff.a(fort-varaio.o): In function `nf_put_vara_double_':
/home/nos/netcdf-4.1.3/fortran/fort-varaio.c:151: undefined reference to `nc_put_vara_double'
/home/nos/WRFV/Libraries/netcdf2/lib/libnetcdff.a(fort-varaio.o): In function `nf_get_vara_double_':
/home/nos/netcdf-4.1.3/fortran/fort-varaio.c:158: undefined reference to `nc_get_vara_double'
/home/nos/WRFV/Libraries/netcdf2/lib/libnetcdff.a(fort-varaio.o): In function `nf_put_vara_':
/home/nos/netcdf-4.1.3/fortran/fort-varaio.c:161: undefined reference to `nc_put_vara'
/home/nos/WRFV/Libraries/netcdf2/lib/libnetcdff.a(fort-varaio.o): In function `nf_get_vara_':
/home/nos/netcdf-4.1.3/fortran/fort-varaio.c:164: undefined reference to `nc_get_vara'
collect2: ld returned 1 exit status
make: [ARWpost.exe] Error 1 (ignored)


OK, its my problem , I hope you can help me

Thanks
nos
 
Posts: 1
Joined: Sat Apr 18, 2015 8:05 pm

Re: [NEW CASE] compiling ARW post ERROR

Postby s2w » Tue Jun 02, 2015 12:28 pm

Try this: add " -L${NETCDF}/lib -lnetcdf -lnetcdff" to FFLAGS in your configure.arwp file after you run ./configure.
FFLAGS = -qfree=f90 -L${NETCDF}/lib -lnetcdf -lnetcdff
s2w
 
Posts: 3
Joined: Tue Jun 02, 2015 11:33 am

Re: [NEW CASE] compiling ARW post ERROR

Postby camilath » Thu Jul 09, 2015 12:38 pm

I have the same problem, and the previous answer don't help-me.. Could anyone fix this?
I'm using Netcdf-4.1.3 with gnu compilers.. WRFV3.7 and WPSV3.7 were successful compiled...

Thanks any help!

ps: I already included -lnetcdff on src/Makefile too, with no success..

-- updating: the solution is include -lnetcdff on ARWpost/src/Makefile, but BEFORE of -lnetcdf, like this:

ARWpost.exe: $(OBJS)
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $(OBJS) \
-L$(NETCDF)/lib -I$(NETCDF)/include -lnetcdff -lnetcdf

I hope this help someone!
camilath
 
Posts: 24
Joined: Mon Oct 31, 2011 10:43 am


Return to ARWPost

Who is online

Users browsing this forum: No registered users and 1 guest