爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 2983|回复: 2

[求助] 我用dat数据转换成txt数据出现了这种错误,该怎么解决??

[复制链接]

新浪微博达人勋

发表于 2017-11-16 13:30:31 | 显示全部楼层 |阅读模式

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

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

x
本帖最后由 贝加尔湖以西 于 2017-11-16 13:34 编辑

错误:
forrtl: severe (257): formatted I/O to unit open for unformatted transfers, unit
16, file C:\Users\Administrator\Desktop\southwest_daily_pre_1980_2012.dat
Image              PC        Routine            Line        Source
cha.exe            0040A589  Unknown               Unknown  Unknown
Press any key to continue
我的程序:
       program main
         parameter(l=11993)
       dimension sti(l),lon(l),lat(l),t(l),pre(l)
           character*8 sti
           integer i
       real lon,lat,t,pre
       open(15,file='D:\yjs\y\shuju.txt')
       open(16,file='C:\Users\Administrator\Desktop\southwest_daily_pre_1980_2012.dat',form='binary')               

        do i=1,l
      read(16,*) sti(i),lon(i),lat(i),t(i),pre(l)
        enddo


       do i=1,l   
       write(15,*) sti(i),lon(i),lat(i),t(i),pre(l)
       end do
           close(15)
           close(16)

        end

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

新浪微博达人勋

发表于 2017-11-16 14:21:42 | 显示全部楼层
你的资料是二进制的?那你看看你是怎么读取的
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-11-17 10:31:27 | 显示全部楼层
把 ,form='binary' 删掉试试
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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