zhoufcumt的个人博客分享 http://blog.sciencenet.cn/u/zhoufcumt

博文

SPOTL安装出现问题解决

已有 10140 次阅读 2011-12-27 18:22 |个人分类:空间大地测量相关软件|系统分类:科研笔记|关键词:学者| loading, Setup, SPOTL, Ocean-Tide

SPOTL: Some Programs for Ocean-Tide Loading

源码下载地址:http://igppweb.ucsd.edu/~agnew/Spotl/spotlmain.html

安装平台以ubuntu11.10为例,系统脚本为bash

下载源码并解压,进入spotl/src,修改Makefile

# uncomment the following lines for linux-optimized compilation
FTN = g77
FFLAGS = -O2  -Wunused -Wno-globals -fno-f2c -fno-automatic -fno-backslash -fno-globals
CC = gcc
CFLAGS = -O -c

改为

# uncomment the following lines for linux-optimized compilation
FTN = gfortran
FFLAGS = -O3 -Wuninitialized -fno-f2c -ffast-math -fno-automatic -fno-backslash
CC = gcc
CFLAGS = -O -c

返回spotl/目录,运行spotl.install文件(./spotl.install),出现错误 ./spotl.install: line 5: Tobinary: command not found,打开spotl.install文件将第5行的Tobinary改为./Tobinary,删掉该目录下的源文件,重新复制源文件到该目录,将上述两个注意点修改好,重新运行 ./spotl.install,出现错误:

gfortran -O3 -Wuninitialized -fno-f2c -ffast-math -fno-automatic -fno-backslash mapcon.f  -o ../bin/mapcon
rm -f *.o
At line 66 of file mapcon.f (unit = 5, file = 'stdin')
Fortran runtime error: Value overflowed during integer read

此处的Value overflowed即编程中常见的数值溢出,经多次检验,发现是spotl/src目录下的mapcon.f函数下的map变量数值溢出,解决方法是修改spotl/src目录下的mapcon.f函数:

      integer*2 index
      integer*4 map

改为

      integer*4 index
      integer*8 map

因此删除源文件,重新复制源文件,分别对上述提到三处进行修改,即可编译成功,实现SPOTL软件的正确安装。

gfortran -O3 -Wuninitialized -fno-f2c -ffast-math -fno-automatic -fno-backslash mapcon.f  -o ../bin/mapcon
rm -f *.o
 16423 mixed cells written, dimension mapful to    525536
同时查看lndsea目录下生成两个binary文件1.0MB的lndsea.ind和4.3MB的lndsea.bit,而且在working目录下生成一大串快捷方式。

具体用法课参照doc目录下的说明书,bash下环境变量配置可参照:

http://blog.sciencenet.cn/home.php?mod=space&uid=350278&do=blog&id=500879



https://m.sciencenet.cn/blog-350278-522672.html

上一篇:贴上来两个GPS站点时间序列图,与大家分享
下一篇:roi_pac,新的方向,新的征程

0

发表评论 评论 (1 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-21 19:42

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部