MEGAN pre-processor installing and compillng

Posts related to the installation of WRF Chemistry

MEGAN pre-processor installing and compillng

Postby jwsmith9 » Thu Sep 05, 2013 3:44 pm

I get the series of error statements below when I execute the following the command below. The compilation seems to do fine all the way up to the forming the bio_emiss.f90 files. Does anyone have experience with compiling MEGAN with gfortran.

./make_util megan_bio_emiss
=============================================================================
Using /usr/bin/gfortran fortran compiler
=============================================================================
=============================================================================
netcdf top level directory = /data/starfs1/libs/netcdf-4.1.3
=============================================================================
/usr/bin/gfortran -g -c -I/data/starfs1/libs/netcdf-4.1.3/include misc_definitions_module.f90
/usr/bin/gfortran -g -c -I/data/starfs1/libs/netcdf-4.1.3/include constants_module.f90
/usr/bin/gfortran -g -c -I/data/starfs1/libs/netcdf-4.1.3/include bio_types.f90
/usr/bin/gfortran -g -c -I/data/starfs1/libs/netcdf-4.1.3/include area_mapper.f90
/usr/bin/gfortran -g -c -I/data/starfs1/libs/netcdf-4.1.3/include bio_emiss.f90
bio_emiss.f90:1231.132:

bal, attr_name(:slen), attr_xtype, attr_len, attrs(m)%attr_byte ), message
1
Error: Syntax error in argument list at (1)
bio_emiss.f90:1231.132:

bal, attr_name(:slen), attr_xtype, attr_len, attrs(m)%attr_byte ), message
1
Warning: Line truncated at (1)
bio_emiss.f90:1235.132:

bal, attr_name(:slen), attr_xtype, attr_len, attrs(m)%attr_short ), message
1
Error: Syntax error in argument list at (1)
bio_emiss.f90:1235.132:

bal, attr_name(:slen), attr_xtype, attr_len, attrs(m)%attr_short ), message
1
Warning: Line truncated at (1)
bio_emiss.f90:1237.132:

al, attr_name(:slen), attr_xtype, attr_len, attrs(m)%attr_int ), message )
1
Warning: Line truncated at (1)
bio_emiss.f90:1239.132:

bal, attr_name(:slen), attr_xtype, attr_len, attrs(m)%attr_real ), message
1
Error: Syntax error in argument list at (1)
bio_emiss.f90:1239.132:

bal, attr_name(:slen), attr_xtype, attr_len, attrs(m)%attr_real ), message
1
Warning: Line truncated at (1)
bio_emiss.f90:1241.132:

lobal, attr_name(:slen), attr_xtype, attr_len, attrs(m)%attr_dbl ), message
1
Error: Syntax error in argument list at (1)
bio_emiss.f90:1241.132:

lobal, attr_name(:slen), attr_xtype, attr_len, attrs(m)%attr_dbl ), message
1
Warning: Line truncated at (1)
make: *** [bio_emiss.o] Error 1
Failed to build megan_bio_emiss


Thanks,
Jonathan
jwsmith9
 
Posts: 7
Joined: Tue Jun 19, 2012 12:19 pm

Re: MEGAN pre-processor installing and compillng

Postby Guido_c » Thu Oct 12, 2017 11:31 am

Hello everyone,

I have a similar problem with MEGAN, could you solve it? let me know please.
My problem is that when I try to execute make_util megan_bio_emiss the executable is not generated. My error is as follows:
=============================================================================
Using gfortran fortran compiler
=============================================================================
=============================================================================
netcdf top level directory = /home/guido/Build_WRF/LIBRARIES/netcdf
=============================================================================
gfortran -g -ffree-line-length-none -c -I/home/guido/Build_WRF/LIBRARIES/netcdf/include misc_definitions_module.f90
gfortran -g -ffree-line-length-none -c -I/home/guido/Build_WRF/LIBRARIES/netcdf/include constants_module.f90
gfortran -g -ffree-line-length-none -c -I/home/guido/Build_WRF/LIBRARIES/netcdf/include bio_types.f90
gfortran -g -ffree-line-length-none -c -I/home/guido/Build_WRF/LIBRARIES/netcdf/include area_mapper.f90
gfortran -g -ffree-line-length-none -c -I/home/guido/Build_WRF/LIBRARIES/netcdf/include bio_emiss.f90
gfortran -o megan_bio_emiss misc_definitions_module.o constants_module.o bio_types.o area_mapper.o bio_emiss.o -L/home/guido/Build_WRF/LIBRARIES/netcdf/lib -lnetcdf -lnetcdff
/home/guido/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(fort-attio.o): In function `nf_put_att_text_':
/home/guido/Build_WRF/LIBRARIES/netcdf-4.1.3/fortran/fort-attio.c:14: undefined reference to `nc_put_att_text'
/home/guido/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(fort-attio.o): In function `nf_get_att_text_':
/home/guido/Build_WRF/LIBRARIES/netcdf-4.1.3/fortran/fort-attio.c:21: undefined reference to `nc_get_att_text'
//
//
/home/guido/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(fort-lib.o): In function `f2c_counts':
/home/guido/Build_WRF/LIBRARIES/netcdf-4.1.3/fortran/fort-lib.c:116: undefined reference to `nc_inq_varndims'
/home/guido/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(fort-lib.o):/home/guido/Build_WRF/LIBRARIES/netcdf-4.1.3/fortran/fort-lib.c:138: more undefined references to `nc_inq_varndims' follow
/home/guido/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(fort-misc.o): In function `nf_inq_libvers_':
/home/guido/Build_WRF/LIBRARIES/netcdf-4.1.3/fortran/fort-misc.c:20: undefined reference to `nc_inq_libvers'
//
//
/home/guido/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(fort-varaio.o): In function `nf_put_vara_':
/home/guido/Build_WRF/LIBRARIES/netcdf-4.1.3/fortran/fort-varaio.c:160: undefined reference to `nc_put_vara'
/home/guido/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(fort-varaio.o): In function `nf_get_vara_':
/home/guido/Build_WRF/LIBRARIES/netcdf-4.1.3/fortran/fort-varaio.c:163: undefined reference to `nc_get_vara'
collect2: error: ld returned 1 exit status
Makefile:45: recipe for target 'megan_bio_emiss' failed
make: *** [megan_bio_emiss] Error 1
Failed to build megan_bio_emiss

I installed netcdf using the manual compiling wrf (with precompiled code netcdf-4.1.3).
I have netcdf library installed on the correct path, I do not understand what the problem is with the library.
Could someone please help me?

This is my .tcshrc here my set environmental:

    ############# NCL variables #################

    setenv NCARG_ROOT /usr/local/ncl-6.3.0
    setenv PATH $NCARG_ROOT/bin:$PATH

    ################### NETCDF #########################

    setenv LD_LIBRARY_PATH
    setenv LD_LIBRARY_PATH /home/guido/Build_WRF/LIBRARIES/netcdf/lib:LD_LIBRARY_PATH

    ############# HDF5 variables #################

    setenv HDF5_LIBS /usr/lib/x86_64-linux-gnu
    setenv LD_LIBRARY_PATH
    setenv LD_LIBRARY_PATH /usr/local/hdf5-1.10.1/hdf5/lib:$LD_LIBRARY_PATH

    #######################################################

    ####### Set environment variables for NetCDF #######

    setenv DIR /home/guido/Build_WRF/LIBRARIES
    setenv CC gcc
    setenv CXX g++
    setenv FC gfortran
    setenv FCFLAGS -m64
    setenv F77 gfortran
    setenv F90 gfortran
    setenv FFLAGS -m64
    setenv PATH $DIR/netcdf/bin:$PATH
    setenv NETCDF $DIR/netcdf
    setenv NETCDF_DIR $DIR/netcdf

    #######################################################

    ####### Set environment variables for Mpich #######
    # This library is necessary to build WRF in parallel

    setenv PATH $DIR/mpich/bin:$PATH

    #######################################################

    ### Set environment variables for zlib, libpng, and JasPer ###
    # A compression library necessary for compiling WPS
    # (specifically ungrib) with GRIB2 capability

    setenv LDFLAGS -L$DIR/grib2/lib
    setenv CPPFLAGS -I$DIR/grib2/include

    #######################################################

    ####### Set environment variables for JasPer ######

    setenv JASPERLIB $DIR/grib2/lib
    setenv JASPERINC $DIR/grib2/include

    #######################################################

    ######## Set environment variables for WRF ########

    setenv WRFIO_NCD_LARGE_FILE_SUPPORT 1

    #######################################################

    ##### Set environment variables for WRF-Chem ######

    setenv WRF_EM_CORE 1
    setenv EM_CORE 1
    setenv NMM_CORE 0
    setenv WRF_CHEM 1
    setenv WRF_KPP 0
    setenv YACC '/usr/bin/yacc -d'
    setenv FLEX_LIB_DIR /usr/lib/x86_64-linux-gnu
    setenv PATH /usr/lib:$PATH

Best,
Guido
Guido_c
 
Posts: 5
Joined: Tue Mar 14, 2017 3:18 pm

Re: MEGAN pre-processor installing and compillng

Postby kwthomas » Thu Oct 12, 2017 6:29 pm

Hi Guido...

Your gfortran code is looking for "nc_put_att_text_" and your netcdf (C) library is using
"nc_put_att_text", without the trailing underscore.

Check the instructions for building libnetcdf.a and libnetcdff.a and see if there is a way to handle this.

If not, rebuld your netcdff library to use "-fno-underscoring" when compiling. Do the same
for WRF.
Kevin W. Thomas
Center for Analysis and Prediction of Storms
University of Oklahoma
kwthomas
 
Posts: 193
Joined: Thu Aug 07, 2008 6:53 pm


Return to Installation

Who is online

Users browsing this forum: No registered users and 1 guest

cron