[Wrf-users] Errors in compiling geogrid.exe in WPS

ashwinD12 . winash12 at gmail.com
Sun Jul 20 06:28:31 MDT 2014


Got past these errors with some help. Only few questions remain

I get these errors with rd_grib2.f90 -

gfortran -c -ffixed-form  -O -fdollar-ok -fconvert=big-endian
 -frecord-marker=4   rd_grib2.f90 -I. -I./ngl/g2
rd_grib2.f90:179.5:

    else
     1
Error: Non-numeric character in statement label at (1)
rd_grib2.f90:179.5:

    else
     1
Error: Unclassifiable statement at (1)
rd_grib2.f90:189.5:

    endif
     1
Error: Non-numeric character in statement label at (1)
rd_grib2.f90:189.5:

    endif
     1
Error: Unclassifiable statement at (1)
rd_grib2.f90:611.4:

   if (gfld%ipdtmpl(12) .eq. 2. .or.
    1
Error: Non-numeric character in statement label at (1)
rd_grib2.f90:611.4:

   if (gfld%ipdtmpl(12) .eq. 2. .or.
    1
Error: Unclassifiable statement at (1)
rd_grib2.f90:614.4:

   else
    1
Error: Non-numeric character in statement label at (1)
rd_grib2.f90:614.4:

   else
    1
Error: Unclassifiable statement at (1)
rd_grib2.f90:616.4:

   endif
    1
Error: Non-numeric character in statement label at (1)
rd_grib2.f90:616.4:

   endif
    1
Error: Unclassifiable statement at (1)
rd_grib2.f90:682.9:

      enddo VERSION ! skgb
         1
Error: Expecting END IF statement at (1)
rd_grib2.f90:696.9:

      END subroutine rd_grib2
         1
Error: Expecting END DO statement at (1)
rd_grib2.f90:727.6:

      SUBROUTINE edition_num(junit, gribflnm,
      1
Error: Unclassifiable statement at (1)
rd_grib2.f90:729.72:

      use grib_mod
                                                                        1
Error: Unexpected USE statement at (1)
rd_grib2.f90:730.72:

      use params
                                                                        1
Error: Unexpected USE statement at (1)
rd_grib2.f90:731.72:

      use module_debug
                                                                        1
Error: Unexpected USE statement at (1)
rd_grib2.f90:732.26:



Should I download the latest version of rd_grib2.f90 and recompile ? It
appears this file is being compiled in fixed format.

2) Second question is the NCARG_LIBS2 variable in configure.defaults which
is commented out for CYGWIN

#NCARG_LIBS2        = -L${PGI}/linux86/6.1/lib -lpgftnrtl -lpgc \
#                     -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.3 -lg2c


Anyone have any idea what should be supplied here ?

3) I presume again that although the grib2 option has not been specified
for CYGWIN in configure.defaults I must go ahead and add the required
changes for the following 2 variables -
WRF_LIB WRF_INCLUDE.



On Thu, Jul 17, 2014 at 6:18 PM, ashwinD12 . <winash12 at gmail.com> wrote:

> In WPS/ungrib/src/ngl/g2  there is a Makefile that contains the following
> segment
>
> .F.o:
>          $(CPP) $(FDEFS) $*.F > $*.f90
>           $(FC) -c $(F77FLAGS) $*.f90
>           /bin/rm -f $*.f90.
>
> Is this not a bug ? Because if I have fixed form with .f90 files the &
> symbol in addfield.f90 will not compile.
>
> Should this not be FFLAGS ? I can go ahead and compile my code but I just
> want to know what the other users on this list think.
>
>
> On Wed, Jul 16, 2014 at 7:51 PM, ashwinD12 . <winash12 at gmail.com> wrote:
>
>> Since WRF 3.6 compiled correctly why do I get these linking errors in WPS
>> 's geogrid.exe -
>>
>> SUFFIXES: .F .f .c .o
>>
>> SHELL                   =       /bin/sh
>>
>> NCARG_LIBS              =       -L$(NCARG_ROOT)/lib -lncarg -lncarg_gks
>> -lncarg_
>> c \
>>                                 -L/usr/X11R6/lib -lX11
>>
>> NCARG_LIBS2             =       # May be overridden by architecture
>> specific val
>> ue below
>>
>> FDEFS                   =       -DUSE_JPEG2000 -DUSE_PNG
>>
>> # Listing of options that are usually independent of machine type.
>> # When necessary, these are over-ridden by each architecture.
>>
>> ARFLAGS                 =
>>
>> PERL                    =       perl
>>
>> RANLIB                  =       echo
>>
>> COMPILING_ON_CYGWIN_NT = yes
>>
>> WRF_INCLUDE     =       -I$(WRF_DIR)/external/io_netcdf \
>>                         -I$(WRF_DIR)/external/io_grib_share \
>>                         -I$(WRF_DIR)/external/io_grib1 \
>>                         -I$(WRF_DIR)/external/io_int \
>>                         -I$(WRF_DIR)/inc \
>>                         -I$(NETCDF)/include
>>
>> WRF_LIB         =       -L$(WRF_DIR)/external/io_grib1 -lio_grib1 \
>>                         -L$(WRF_DIR)/external/io_grib_share
>> -lio_grib_share \
>>                         -L$(WRF_DIR)/external/io_int -lwrfio_int \
>>                         -L$(WRF_DIR)/external/io_netcdf -lwrfio_nf \
>>                         -L$(NETCDF)/lib -lnetcdff -lnetcdf
>>
>>
>> COMPRESSION_LIBS        =  # intentionally left blank, fill in
>> COMPRESSION_LIBS
>> below
>>
>> COMPRESSION_INC         =  # intentionally left blank, fill in
>> COMPRESSION_INC b
>> elow
>>
>> #
>> #   Settings for CYGWIN_NT i686 x86_64 PGI compiler on Windows
>>  (serial)
>> #
>> #
>> COMPRESSION_LIBS    = -L/usr/local/lib -ljasper -lpng -lz
>>  COMPRESSION_INC     = -I/usr/local/include/jasper
>> FDEFS               = -DUSE_JPEG2000 -DUSE_PNG
>> #NCARG_LIBS2        = -L${PGI}/linux86/6.1/lib -lpgftnrtl -lpgc \
>> #                     -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.3 -lg2c
>> WRF_LIB             = $(WRF_DIR)/external/io_grib1/libio_grib1.a \
>>
>> $(WRF_DIR)/external/io_grib_share/libio_grib_share.a \
>>                       $(WRF_DIR)/external/io_int/libwrfio_int.a \
>>                       $(WRF_DIR)/external/io_netcdf/libwrfio_nf.a \
>>                       $(NETCDF)/lib/libnetcdf.a                   \
>>                       $(NETCDF)/lib/libnetcdff.a
>> SFC                 = gfortran
>> SCC                 = gcc
>> DM_FC               = mpif90 -f90=$(SFC)
>> DM_CC               = mpicc  -cc=$(SCC)
>> FC                  = $(SFC)
>> CC                  = $(SCC)
>> LD                  = $(SFC)
>> FFLAGS              = -ffree-form -ffree-line-length-none -O
>> -fconvert=big-endia
>> n  -frecord-marker=4
>> F77FLAGS            = -ffree-form -O -fconvert=big-endian
>>  -frecord-marker=4
>> FCSUFFIX            =
>> FNGFLAGS            = $(FFLAGS)
>> LDFLAGS             = -g
>> CFLAGS              = -g
>> CPP                 = /lib/cpp -C -P
>> CPPFLAGS            = -D_UNDERSCORE -DBYTESWAP -DWIN32 -DIO_NETCDF
>> -DIO_BINARY -
>> DIO_GRIB1 -DBIT32
>> ARFLAGS             =
>>
>>
>> ################################################################################
>> ########################################
>> #
>> #       Macros, these should be generic for all machines
>>
>> LN              =       ln -sf
>> MAKE            =       make -i -r
>> RM              =       /bin/rm -f
>> CP              =       /bin/cp
>> AR              =       ar ru
>>
>> .IGNORE:
>> .SUFFIXES: .c .f .F .o
>>
>> #       There is probably no reason to modify these rules
>>
>> .c.o:
>>         $(RM) $@
>>         $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
>>
>> .f.o:
>>         $(RM) $@ $*.mod
>>         $(FC) $(F77FLAGS) -c $< $(WRF_INCLUDE)
>>
>> .F.o:
>>         $(RM) $@ $*.mod
>>         $(CPP) $(CPPFLAGS) $(FDEFS) $(WRF_INCLUDE) $< > $*.f90
>>         $(FC) $(FFLAGS) -c $*.f90 $(WRF_INCLUDE)
>> #       $(RM) $*.f90
>>
>>
>>
>> And here is my log file
>>
>>
>> gfortran -g -o geogrid.exe cio.o wrf_debug.o bitarray_module.o
>> constants_module.o module_stringutil.o geogrid.o gridinfo_module.o
>> hash_module.o interp_module.o list_module.o llxy_module.o
>> misc_definitions_module.o module_debug.o module_map_utils.o output_module.o
>> parallel_module.o process_tile_module.o proc_point_module.o queue_module.o
>> read_geogrid.o smooth_module.o source_data_module.o \
>>  ../../../WRFV3/frame/module_driver_constants.o \
>> ../../../WRFV3/frame/pack_utils.o ../../../WRFV3/frame/module_machine.o \
>>  ../../../WRFV3/frame/module_internal_header_util.o \
>> -I../../../WRFV3/external/io_netcdf
>> -I../../../WRFV3/external/io_grib_share -I../../../WRFV3/external/io_grib1
>> -I../../../WRFV3/external/io_int -I../../../WRFV3/inc
>> -I/home/lenovo/gz/WPS/netcdf_links/include \
>>  ../../../WRFV3/external/io_grib1/libio_grib1.a
>> ../../../WRFV3/external/io_grib_share/libio_grib_share.a
>> ../../../WRFV3/external/io_int/libwrfio_int.a
>> ../../../WRFV3/external/io_netcdf/libwrfio_nf.a
>> /home/lenovo/gz/WPS/netcdf_links/lib/libnetcdf.a
>> /home/lenovo/gz/WPS/netcdf_links/lib/libnetcdff.a \
>>  /home/lenovo/gz/WPS/netcdf_links/lib/libnetcdff.a(fort-misc.o): In
>> function `nf_inq_libvers_':
>> /home/lenovo/gz/netcdf-fortran-4.2/fortran/fort-misc.c:20: undefined
>> reference to `nc_inq_libvers'
>> /home/lenovo/gz/WPS/netcdf_links/lib/libnetcdff.a(fort-misc.o): In
>> function `nf_strerror_':
>> /home/lenovo/gz/netcdf-fortran-4.2/fortran/fort-misc.c:36: undefined
>> reference to `nc_strerror'
>> /home/lenovo/gz/WPS/netcdf_links/lib/libnetcdff.a(fort-varaio.o): In
>> function `nf_put_vara_text_':
>> /home/lenovo/gz/netcdf-fortran-4.2/fortran/fort-varaio.c:22: undefined
>> reference to `nc_put_vara_text'
>> /home/lenovo/gz/WPS/netcdf_links/lib/libnetcdff.a(fort-varaio.o): In
>> function `nf_get_vara_text_':
>> /home/lenovo/gz/netcdf-fortran-4.2/fortran/fort-varaio.c:29: undefined
>> reference to `nc_get_vara_text'
>> /home/lenovo/gz/WPS/netcdf_links/lib/libnetcdff.a(fort-varaio.o): In
>> function `nf_put_vara_int1_':
>> /home/lenovo/gz/netcdf-fortran-4.2/fortran/fort-varaio.c:37: undefined
>> reference to `nc_put_vara_schar'
>> /home/lenovo/gz/WPS/netcdf_links/lib/libnetcdff.a(fort-varaio.o): In
>> function `nf_get_vara_int1_':
>> /home/lenovo/gz/netcdf-fortran-4.2/fortran/fort-varaio.c:55: undefined
>> reference to `nc_get_vara_schar'
>> /home/lenovo/gz/WPS/netcdf_links/lib/libnetcdff.a(fort-varaio.o): In
>> function `nf_put_vara_int2_':
>> /home/lenovo/gz/netcdf-fortran-4.2/fortran/fort-varaio.c:73: undefined
>> reference to `nc_put_vara_short'
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/wrf-users/attachments/20140720/a04c0659/attachment-0001.html 


More information about the Wrf-users mailing list