爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 3376|回复: 4

[求助] IDL程序读取AMSR-E数据出错

[复制链接]

新浪微博达人勋

发表于 2014-8-25 17:00:04 | 显示全部楼层 |阅读模式

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

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

x
pro SOILMOISTURE_mpdi_36
  year=2005
  day1=julday(1,1,year)-julday(1,1,year)+1  ;对应实际资料第二天
;  print,day1
;  stop
  day2=julday(12,31,year)-julday(1,1,year)+1
  row_xj0=532       ;xinjiang area
  row_xj1=603
  line_xj0=328
  line_xj1=435
  row_xj=row_xj1-row_xj0+1
  line_xj=line_xj1-line_xj0+1
  mpdi1  =fltarr(row_xj,line_xj,day2-day1+1)
  TAO_VWC=fltarr(row_xj,line_xj,day2-day1+1)
  mpdimin=fltarr(row_xj,line_xj)
openr,lun,'J:\soilmoisture\PRODUCT\2005mpdi_minnew.txt',/get_lun
readf,lun,mpdimin
close,lun
free_lun,lun
for day=day1, day2 do begin
dday=STRTRIM(string(day),1)
if day lt 100 then dday='0'+STRTRIM(string(day),1)
if day lt 10 then dday='00'+STRTRIM(string(day),1)
orbit="d"
row=721
line=721
l=72
n=108
channel=uintarr(row,line,6)
mpdimin=fltarr(l,n)
;****************************************
i=0
filename='NL'+STRTRIM(string(year),1)+dday+orbit+'.36v'
openr,lun,filepath(filename,root_dir='J:\amsr\'+STRTRIM(string(year),1)),/get_lun
TB=uintarr(row,line)
readu,lun,TB
channel(*,*,i)=TB
close,lun
free_lun,lun
i++

这个程序是读取AMSR-E数据中的一部分,但是每次都在红色字体那报错,“OPENR:Error opening file. Unit 100, File:E:\data\2006.8.29\2006\2006001d.36v”
请问各位IDL的高手,程序错在哪里,要怎么改正?

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

新浪微博达人勋

发表于 2014-8-25 17:23:16 | 显示全部楼层
idl中 关闭用free_lun,lun,删除close,lun试一下
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-8-25 17:48:15 | 显示全部楼层
Leslie 发表于 2014-8-25 17:23
idl中 关闭用free_lun,lun,删除close,lun试一下

依旧是打不开文件
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-8-25 18:11:31 | 显示全部楼层
“OPENR:Error opening file. Unit 100, File:E:\data\2006.8.29\2006\2006001d.36v”
openr,lun,filepath(filename,root_dir='J:\amsr\'+STRTRIM(string(year),1)),/get_lun
你确定你贴出来的错误信息是正确的么?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-8-25 18:33:53 | 显示全部楼层
longlivehj 发表于 2014-8-25 18:11
“OPENR:Error opening file. Unit 100, File:E:\data\2006.8.29\2006\2006001d.36v”
openr,lun,filepath ...

呵呵,不好意思,因为程序是从办公室的电脑上拷回来的,我运行程序的电脑上不了网,所以直接上的拷回来的程序,谢谢版主及时指出错误
openr,lun,filepath(filename,root_dir='E:\data\'+STRTRIM(string(year),1)),/get_lun
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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