- 积分
- 119
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-7-2
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
第一次装WRF,啥也不懂,跟着教程走,好不容易到了编译却出错了,版本WRFV3.8.1翻到最开始的错误提示应该是出现个PUT的错误
Error: Size of ‘put’ argument of ‘random_seed’ intrinsic at (1) too small (12/33)
module_cu_g3.f90:3236:41:
因该是两个长度不匹配的意思,难道put是12,random_seed为33?
再往后看就出现"Can't open file 'module_cu_g3.mod"出现的错误
大概意思就是前面的错误导致module_cu_g3.f90没被编译,自然也就没有module_cu_g3.mod
直接找文件看问题,根据module_cu_g3这个名字,在WRFV3\phys下找到两个不同后缀的文件,分别为.f和.f90
对照了原始的解压文件,.f90应该是后生成的,只是改了后缀而已,这个文件可以不用管
直接记事本打开module_cu_g3.f,找到call random_seed (PUT=seed)
再往上查到seed的定义为
integer, dimension (12) :: seed
问题铁定在维度这,不过fortran已经几百年没碰了,不知道改
恰好找到个类似的问题http://forum.wrfforum.com/viewtopic.php?t=10930,里面有人回答的部分刚好是改这个的
Checking 3.8.1 vs 3.9.1.1 for "module_cu_g3.F" shows a difference that is a bug fix for your problem.
See below. Your line number may vary. The key is the "dimension(12)::seed". Replace that with the new
code.
3125c3125,3126
< integer, dimension (12) :: seed
---
> integer, allocatable :: seed(:)
> integer :: seed_size
3135a3137,3139
> call random_seed(size=seed_size) ! Get size of seed array.
> allocate(seed(1:seed_size)) ! Allocate according to returned size
>
依葫芦画瓢,把3125行,也就是 integer, dimension (12) :: seed改成
integer, allocatable :: seed(:)
integer :: seed_size
在3136行后面,加入
call random_seed(size=seed_size) ! Get size of seed array.
allocate(seed(1:seed_size)) ! Allocate according to returned size
然后再编译,瞬间出来4个exe,幸福来得太突然
|
|