爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 5579|回复: 16

[求助] 数据太多,超出了fortran的最大容量,编程不行不知道怎么改?谢谢!

[复制链接]

新浪微博达人勋

发表于 2016-2-27 10:20:37 | 显示全部楼层 |阅读模式

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

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

x
需要将每天四个时次的typnone降水分离出来。
编译错误:
Linking...
Debug/typhonejiangshuifenli.exe : warning LNK4084: total image size 323461120 exceeds max (268435456); image may not run
程序:
program precip
implicit none
integer,parameter::n=8467092,m=10303
character*8 xuhao1(n),xuhao2(n)
integer i,j
integer year1(n),day1(n), year2(m),day2(m)
real lat1(n),lon1(n),lat2(m),lon2(m),pre1(n)
open(1,file='d:\3h\result\07per6h\07-00h.txt',status='old')!降水 data
open(2,file='d\3h\result\07per6h\2003to200800h.txt',status='old')!typhone data
open(3,file='h:\07-2003to200800typhone.txt',status='replace')
do i=1,n
  read(1,100)year1(i),day1(i),lon1(i),lat1(i),pre1(i)
100 format(4x,i4,2x,i2,15x,f8.3,6x,f8.3,5x,f8.1)
  write(*,100)year1(i),day1(i),lon1(i),lat1(i),pre1(i)
enddo
write(*,*)"OK!"
do i=1,m
  read(2,200)year2(i),day2(i),lat2(i),lon2(i)
    200 format(i4,11x,i2,6x,f8.3,f8.3)
write(*,*)year2(i),day2(i),lat2(i),lon2(i)
enddo
write(*,*)"OK!"
do i=1,m
  do j=1,n
     if(year2(i)==year1(j)) then
        IF(day2(i)==day1(j)) THEN
           d=6371.11/(cos(cos(lat2(i))*cos(lon2(i))*cos(lat1(j))*cos(lon1(j))+cos(lat2(i))*sin(lon2(i))*cos(lat1(j))*sin(lon1(j))+sin(lat2(i))*sin(lat1(j))))
               !分离台风降水
           if(d<=800) then
              write(3,*) year1(j),day1(j),lat1(j),lon1(j),pre1(j)
                  300 format(i4,1x,i2,1x,i2,1x,i2,1x,f8.3,1x,f8.3,1x,f8.1)
          ENDIF
    ENDIF
ENDIF
   enddo
  write(*,*)i
enddo
write(*,*)"OK!"
close(1)
close(2)
close(3)
end
降水部分数据:
20030702           0   144.0000       7.375000      0.0000000E+00
    20030702           0   144.2500       7.375000      0.0000000E+00
    20030702           0   144.5000       7.375000      0.0000000E+00
    20030702           0   144.7500       7.375000      0.0000000E+00
    20030702           0   145.0000       7.375000      0.0000000E+00
    20030702           0   145.2500       7.375000      0.0000000E+00
    20030702           0   145.5000       7.375000      0.0000000E+00
    20030702           0   145.7500       7.375000      0.0000000E+00
    20030702           0   146.0000       7.375000      0.0000000E+00
    20030702           0   146.2500       7.375000      0.0000000E+00
    20030702           0   146.5000       7.375000      0.0000000E+00
typhone data:
2003 200301  1 11  6   1.9  180.2  15 1006
2003 200301  1 11 12   1.9  179.6  15 1006
2003 200301  1 11 18   1.9  179.0  15 1006
2003 200301  1 12  0   1.8  178.5  15 1006
2003 200301  1 12  6   1.6  178.0  15 1006
2003 200301  1 12 12   1.3  177.6  15 1006
2003 200301  1 12 18   1.6  177.2  15 1006
2003 200301  1 13  0   1.9  176.8  15 1006
2003 200301  1 13  6   2.4  176.2  15 1006

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

新浪微博达人勋

发表于 2016-2-27 12:35:37 | 显示全部楼层
不要闹,什么叫超过fortran容量
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2016-2-27 14:15:51 | 显示全部楼层
又是那隻貓 发表于 2016-2-27 12:35
不要闹,什么叫超过fortran容量

total image size 323461120 exceeds max (268435456)
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2016-2-27 20:13:11 | 显示全部楼层
春天花开 发表于 2016-2-27 14:15
total image size 323461120 exceeds max (268435456)

只是warning的话,你直接运行是可以的  不一定会出错
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2016-2-28 08:43:33 | 显示全部楼层
fortran语言有点难学习
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2016-2-28 09:14:29 | 显示全部楼层
total image size 323461120 exceeds max (268435456)是因为你定义的静态数组太大了
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2016-2-28 12:58:45 | 显示全部楼层
小傅之追梦 发表于 2016-2-27 20:13
只是warning的话,你直接运行是可以的  不一定会出错

哦,谢谢!
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2016-2-28 13:00:17 | 显示全部楼层
星雨 发表于 2016-2-28 09:14
total image size 323461120 exceeds max (268435456)是因为你定义的静态数组太大了

可是我的数据就有那么多行,有没有其它的定义方法
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2016-2-29 08:16:59 | 显示全部楼层
春天花开 发表于 2016-2-28 13:00
可是我的数据就有那么多行,有没有其它的定义方法

我猜你这个资料包含时间维,解决的办法当然就是把时间作为循环。如果不包含时间维,那就得改虚拟内存大小了,具体方法你自己查查吧。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2016-2-29 10:16:25 | 显示全部楼层
星雨 发表于 2016-2-29 08:16
我猜你这个资料包含时间维,解决的办法当然就是把时间作为循环。如果不包含时间维,那就得改虚拟内存大小 ...

谢谢!我试试
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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