爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 4898|回复: 11

WPS3.9.1编译问题,只缺少metgrid.exe

[复制链接]

新浪微博达人勋

发表于 2018-8-13 12:38:41 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
本帖最后由 玄奘老乡 于 2018-8-17 08:33 编辑

(1)I installed it according to the teaching of this website.
http://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation_tutorial.php#STEP1
(2)I have the following error when compiling WPS3.9.1.
[ybjin@inode1 WPS]$ ./compile > log.compile
read_geogrid.c:23:0: warning: "BIG_ENDIAN" redefined [enabled by default]
#define BIG_ENDIAN    0
^
In file included from /usr/include/bits/waitstatus.h:64:0,
                 from /usr/include/stdlib.h:42,
                 from read_geogrid.c:12:
/usr/include/endian.h:46:0: note: this is the location of the previous definition
# define BIG_ENDIAN __BIG_ENDIAN
^
read_geogrid.c:24:0: warning: "LITTLE_ENDIAN" redefined [enabled by default]
#define LITTLE_ENDIAN 1
^
In file included from /usr/include/bits/waitstatus.h:64:0,
                 from /usr/include/stdlib.h:42,
                 from read_geogrid.c:12:
/usr/include/endian.h:45:0: note: this is the location of the previous definition
# define LITTLE_ENDIAN __LITTLE_ENDIAN
^
read_geogrid.c: In function ‘read_geogrid_’:
read_geogrid.c:124:13: warning: left shift count >= width of type [enabled by default]
             if ((*isigned) && (ival > (1 << 31))) ival -= (1 << 32);
             ^
Makefile:44: warning: overriding recipe for target `.f.o'
/media/small/ybjin/WRFV3.9.1.1/Build_WRF/WPS/configure.wps:100: warning: ignoring old recipe for target `.f.o'
Makefile:48: warning: overriding recipe for target `.c.o'
/media/small/ybjin/WRFV3.9.1.1/Build_WRF/WPS/configure.wps:96: warning: ignoring old recipe for target `.c.o'
ar: creating libw3.a
Makefile:67: warning: overriding recipe for target `.F.o'
/media/small/ybjin/WRFV3.9.1.1/Build_WRF/WPS/configure.wps:104: warning: ignoring old recipe for target `.F.o'
Makefile:72: warning: overriding recipe for target `.f.o'
/media/small/ybjin/WRFV3.9.1.1/Build_WRF/WPS/configure.wps:100: warning: ignoring old recipe for target `.f.o'
Makefile:75: warning: overriding recipe for target `.c.o'
/media/small/ybjin/WRFV3.9.1.1/Build_WRF/WPS/configure.wps:96: warning: ignoring old recipe for target `.c.o'
ar: creating libg2_4.a
Makefile:90: warning: overriding recipe for target `.F.o'
../../configure.wps:104: warning: ignoring old recipe for target `.F.o'
Makefile:95: warning: overriding recipe for target `.c.o'
../../configure.wps:96: warning: ignoring old recipe for target `.c.o'
ar: creating libpgu.a
/data/ybjin/WRFV3.9.1.1/Build_WRF/LIBRARIES/grib2/lib/libjasper.a(jas_stream.o): In function `jas_stream_tmpfile':
/data/ybjin/WRFV3.9.1.1/Build_WRF/LIBRARIES/jasper-1.900.1/src/libjasper/base/jas_stream.c:368: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
scan_input.f90:14.8:

    use netcdf
        1
Fatal Error: Can't open module file 'netcdf.mod' for reading at (1): No such file or directory
make[1]: [scan_input.o] Error 1 (ignored)
mpas_mesh.f90:14.8:

    use scan_input
        1
Fatal Error: Can't open module file 'scan_input.mod' for reading at (1): No such file or directory
make[1]: [mpas_mesh.o] Error 1 (ignored)
remapper.f90:14.8:

    use mpas_mesh
        1
Fatal Error: Can't open module file 'mpas_mesh.mod' for reading at (1): No such file or directory
make[1]: [remapper.o] Error 1 (ignored)
process_domain_module.f90:14.7:

   use mpas_mesh
       1
Fatal Error: Can't open module file 'mpas_mesh.mod' for reading at (1): No such file or directory
make[1]: [process_domain_module.o] Error 1 (ignored)
metgrid.f90:23.7:

   use process_domain_module
       1
Fatal Error: Can't open module file 'process_domain_module.mod' for reading at (1): No such file or directory
make[1]: [metgrid.o] Error 1 (ignored)
gfortran: error: metgrid.o: No such file or directory
gfortran: error: process_domain_module.o: No such file or directory
gfortran: error: scan_input.o: No such file or directory
gfortran: error: mpas_mesh.o: No such file or directory
gfortran: error: remapper.o: No such file or directory
make[1]: [metgrid.exe] Error 1 (ignored)
Makefile:90: warning: overriding recipe for target `.F.o'
../../configure.wps:104: warning: ignoring old recipe for target `.F.o'
Makefile:95: warning: overriding recipe for target `.c.o'
../../configure.wps:96: warning: ignoring old recipe for target `.c.o'
g1print.f90:661.71:

       'VSTR','M FLX','LMH','LMV','SGLYR','NLAT','ELON','UMAS','VMAS','XPRATE',&
                                                                       1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/6)
g1print.f90:600.64:

       'GWREC','QREC ','SNOWT','VBDSF','VDDSF','NBDSF','NDDSF','SNFALB',&
                                                                1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/6)
g1print.f90:601.58:

       'RLYRS','M FLX','   ','   ','     ','NLAT','ELON','FLDCAP','ACOND','SNOA
                                                          1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/6)
g1print.f90:602.66:

       'CCOND','LAI','SFCRH','SALBD','    ','    ','NDVI','DRIP','VBSALB','VWSA
                                                                  1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/6)
g1print.f90:602.75:

       'CCOND','LAI','SFCRH','SALBD','    ','    ','NDVI','DRIP','VBSALB','VWSA
                                                                           1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/6)
g1print.f90:603.8:

       'NBSALB','NWSALB','FRZR','FROZR','TSNOW','MTERH','   ','SBSNO','EVBS','E
        1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/6)
g1print.f90:603.17:

       'NBSALB','NWSALB','FRZR','FROZR','TSNOW','MTERH','   ','SBSNO','EVBS','E
                 1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/6)
g1print.f90:604.16:

       'VTCIN','VTCAPE','RSMIN','DSWRF','DLWRF','   ','MSTAV','SFEXC','     ','
                1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/6)
g1print.f90:608.31:

       'SNOWC','SNOT','POROS','SBT112','SBT113','SBT114','SBT115','     ','RCS'
                               1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/6)
g1print.f90:608.40:

       'SNOWC','SNOT','POROS','SBT112','SBT113','SBT114','SBT115','     ','RCS'
                                        1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/6)
g1print.f90:608.49:

       'SNOWC','SNOT','POROS','SBT112','SBT113','SBT114','SBT115','     ','RCS'
                                                 1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/6)
g1print.f90:608.58:

       'SNOWC','SNOT','POROS','SBT112','SBT113','SBT114','SBT115','     ','RCS'
                                                          1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/6)
g1print.f90:576.23:

       'ETSRG','RHPW','OZMAX1','OZMAX8','PDMAX1','PDMAX24','MAXREF','MXUPHL','M
                       1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/6)
g1print.f90:576.32:

       'ETSRG','RHPW','OZMAX1','OZMAX8','PDMAX1','PDMAX24','MAXREF','MXUPHL','M
                                1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/6)
g1print.f90:576.41:

       'ETSRG','RHPW','OZMAX1','OZMAX8','PDMAX1','PDMAX24','MAXREF','MXUPHL','M
                                         1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/6)
g1print.f90:576.50:

       'ETSRG','RHPW','OZMAX1','OZMAX8','PDMAX1','PDMAX24','MAXREF','MXUPHL','M
                                                  1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/7)
g1print.f90:576.60:

       'ETSRG','RHPW','OZMAX1','OZMAX8','PDMAX1','PDMAX24','MAXREF','MXUPHL','M
                                                            1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/6)
g1print.f90:576.69:

       'ETSRG','RHPW','OZMAX1','OZMAX8','PDMAX1','PDMAX24','MAXREF','MXUPHL','M
                                                                     1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/6)
g1print.f90:576.78:

    'ETSRG','RHPW','OZMAX1','OZMAX8','PDMAX1','PDMAX24','MAXREF','MXUPHL','MAXU
                                                                           1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/6)
g1print.f90:577.8:

       'MAXDVV','MAXVIG','RETOP','VRATE','TCSRG20','TCSRG30','TCSRG40','TCSRG50
        1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/6)
g1print.f90:577.17:

       'MAXDVV','MAXVIG','RETOP','VRATE','TCSRG20','TCSRG30','TCSRG40','TCSRG50
                 1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/6)
g1print.f90:577.42:

       'MAXDVV','MAXVIG','RETOP','VRATE','TCSRG20','TCSRG30','TCSRG40','TCSRG50
                                          1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/7)
g1print.f90:577.52:

       'MAXDVV','MAXVIG','RETOP','VRATE','TCSRG20','TCSRG30','TCSRG40','TCSRG50
                                                    1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/7)
g1print.f90:577.62:

       'MAXDVV','MAXVIG','RETOP','VRATE','TCSRG20','TCSRG30','TCSRG40','TCSRG50
                                                              1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/7)
g1print.f90:577.72:

       'MAXDVV','MAXVIG','RETOP','VRATE','TCSRG20','TCSRG30','TCSRG40','TCSRG50
                                                                        1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/7)
g1print.f90:577.82:

'MAXDVV','MAXVIG','RETOP','VRATE','TCSRG20','TCSRG30','TCSRG40','TCSRG50','TCSR
                                                                           1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/7)
g1print.f90:578.8:

       'TCSRG70','TCSRG80','TCSRG90','HINDX','DIFTEN','PSPCP','MAXUW','MAXVW','
        1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/7)
g1print.f90:578.18:

       'TCSRG70','TCSRG80','TCSRG90','HINDX','DIFTEN','PSPCP','MAXUW','MAXVW','
                  1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/7)
g1print.f90:578.28:

       'TCSRG70','TCSRG80','TCSRG90','HINDX','DIFTEN','PSPCP','MAXUW','MAXVW','
                            1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/7)
g1print.f90:578.46:

       'TCSRG70','TCSRG80','TCSRG90','HINDX','DIFTEN','PSPCP','MAXUW','MAXVW','
                                              1
Warning: Initialization string starting at (1) was truncated to fit the variable (5/6)
Makefile:90: warning: overriding recipe for target `.F.o'
../../configure.wps:104: warning: ignoring old recipe for target `.F.o'
Makefile:95: warning: overriding recipe for target `.c.o'
../../configure.wps:96: warning: ignoring old recipe for target `.c.o'
/data/ybjin/WRFV3.9.1.1/Build_WRF/LIBRARIES/grib2/lib/libjasper.a(jas_stream.o): In function `jas_stream_tmpfile':
/data/ybjin/WRFV3.9.1.1/Build_WRF/LIBRARIES/jasper-1.900.1/src/libjasper/base/jas_stream.c:368: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
(3)After that, I checked a lot of related content on the official forum, but most of them were not related to my question. Later I found a first pass, but I didn't understand it (http://www.starnix.ir/questions/&#1605;&#1588;&#1705;&#1604;-&#1583;&#1585;-&#1705;&#1575;&#1605;&#1662;&#1575;&#1740;&#1604;-&#1606;&#1605;&#1608;&#1583;&#1606;-wps)
(4)my compile.wps:
# configure.wps
#
# This file was automatically generated by the configure script in the
# top level directory. You may make changes to the settings in this
# file but be aware they will be overwritten each time you run configure.
# Ordinarily, it is necessary to run configure once, when the code is
# first installed.
#
# To permanently change options, change the settings for your platform
# in the file arch/configure.defaults, the preamble, and the postamble -
# then rerun configure.
#

.SUFFIXES: .F .f .c .o

SHELL           =       /bin/sh

NCARG_LIBS        =        -L$(NCARG_ROOT)/lib -lncarg -lncarg_gks -lncarg_c \
-lX11 -lXext -lpng -lz -lcairo -lfontconfig -lpixman-1 \
-lfreetype -lexpat -lpthread -lbz2 -lXrender -lgfortran -lgcc

NCARG_LIBS2        =        # May be overridden by architecture specific value 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

WRF_DIR        =        ../WRFV3

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

#### Architecture specific settings ####

COMPRESSION_LIBS        =  # intentionally left blank, fill in COMPRESSION_LIBS below

COMPRESSION_INC        =  # intentionally left blank, fill in COMPRESSION_INC below

#
#   Settings for Linux x86_64, gfortran    (serial)
#
#
COMPRESSION_LIBS    = -L/data/ybjin/WRFV3.9.1.1/Build_WRF/LIBRARIES/grib2/lib -ljasper -lpng -lz
COMPRESSION_INC     = -I/data/ybjin/WRFV3.9.1.1/Build_WRF/LIBRARIES/grib2/include
FDEFS               = -DUSE_JPEG2000 -DUSE_PNG
SFC                 = gfortran
SCC                 = gcc
DM_FC               = mpif90 -f90=gfortran
DM_CC               = mpicc -cc=gcc
FC                  = $(SFC)
CC                  = $(SCC)
LD                  = $(FC)
FFLAGS              = -ffree-form -O -fconvert=big-endian -frecord-marker=4
F77FLAGS            = -ffixed-form -O -fconvert=big-endian -frecord-marker=4
FCSUFFIX            =
FNGFLAGS            = $(FFLAGS)
LDFLAGS             =
CFLAGS              =
CPP                 = /usr/bin/cpp -P -traditional
CPPFLAGS            = -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL
RANLIB              = ranlib

########################################################################################################################
#
#        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

(5)please give me help , thank you very much .


scan_input.F

23.48 KB, 下载次数: 27, 下载积分: 金钱 -5

教授让替换的文件附上

密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2018-8-16 10:59:52 | 显示全部楼层
http://forum.mmm.ucar.edu/phpBB3/viewtopic.php?f=28&t=41
最后我请教了官方网站的教授,教授有了详细的说明。
密码修改失败请联系微信:mofangbao
回复 支持 1 反对 0

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2018-8-16 11:00:25 | 显示全部楼层
问题已经解决了
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-8-23 15:50:13 | 显示全部楼层
正好遇到相同的问题,非常受用,谢谢
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-9-23 17:53:05 | 显示全部楼层
谢谢楼主,通过你给的链接,我也解决了相同的问题
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-12-22 11:54:02 | 显示全部楼层
谢谢楼主,通过你给的链接,我也解决了相同的问题
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2019-1-23 14:45:37 | 显示全部楼层
甜酒果 发表于 2018-12-22 11:54
谢谢楼主,通过你给的链接,我也解决了相同的问题

我也是总结的吧,记录下来的。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2019-10-13 17:08:38 | 显示全部楼层
好东西,感谢分享
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2019-10-16 19:38:54 | 显示全部楼层
玄奘老乡 发表于 2018-8-16 10:59
http://forum.mmm.ucar.edu/phpBB3/viewtopic.php?f=28&t=41
最后我请教了官方网站的教授,教授有了详细的 ...

楼主,这个链接失效了,能不能把你的解决方法分享一下呢,我也遇到了这个问题
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2020-9-27 20:53:28 | 显示全部楼层
感谢楼主。同样的问题解决了
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表