Changeset 530


Ignore:
Timestamp:
04/17/12 16:05:07 (12 years ago)
Author:
pinsard
Message:

prepare investigation on IO error

Location:
trunk/src
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/LectureLAIHDF.pro

    r513 r530  
    293293;*** enregistrement ascii 
    294294fileascii=iodirout+'LAI/'+'laisen'+an+'_num.txt' 
    295 OPENW,lun,fileascii,/GET_LUN 
     295OPENW,lun,fileascii,/GET_LUN, ERROR = error 
     296IF (error NE 0) then begin 
     297   ras = report(['eee : can not open for writing '$ 
     298         + '!C' $ 
     299         + fileascii]) 
     300   STOP 
     301ENDIF 
     302 
    296303print,fileascii 
    297304;printf,lun,datenum 
  • trunk/src/LectureLAI_2000_FM.pro

    r337 r530  
    158158file='/home/orchidee01/cbobee/donnees_sat/modis/lai/lai-2000/lai2000_float.txt' 
    159159 
    160 OPENW,lun,file,/GET_LUN 
     160OPENW,lun,file,/GET_LUN, ERROR = error 
     161IF (error NE 0) then begin 
     162   ras = report(['eee : can not open for writing '$ 
     163         + '!C' $ 
     164         + file]) 
     165   STOP 
     166ENDIF 
     167 
    161168printf,lun,datenum 
    162169FOR ilig=0,taille[2]-1 DO BEGIN 
  • trunk/src/cloud_day.pro

    r337 r530  
    7070; recherche des fichiers du mois 
    7171filemsg=project_id_env+'listmsg' 
    72 openr,1,filemsg 
     72openr,1,filemsg, ERROR = error 
     73IF (error NE 0) then begin 
     74   ras = report(['eee : can not open for reading '$ 
     75         + '!C' $ 
     76         + 'code : ' + !ERROR_STATE.MSG $ 
     77         + filemsg]) 
     78   STOP 
     79ENDIF 
    7380ijour=0 
    7481while not(eof(1)) do begin 
  • trunk/src/cloud_month.pro

    r337 r530  
    5858seuil=strcompress(string(threshold),/remove_all) 
    5959filemsg=project_id_env+'listmsg' 
    60 openr,1,filemsg 
     60openr,1,filemsg, ERROR = error 
     61IF (error NE 0) then begin 
     62   ras = report(['eee : can not open for reading '$ 
     63         + '!C' $ 
     64         + 'code : ' + !ERROR_STATE.MSG $ 
     65         + filemsg]) 
     66   STOP 
     67ENDIF 
     68 
    6169ijour=0 
    6270while not(eof(1)) do begin 
  • trunk/src/correct_nadir_amsu.pro

    r525 r530  
    205205cor_sa=fltarr(9,30) 
    206206 
    207 openr, lun1,cor_landa, /get_lun 
     207openr, lun1,cor_landa, /get_lun, ERROR = error 
     208IF (error NE 0) then begin 
     209   ras = report(['eee : can not open for reading '$ 
     210         + '!C' $ 
     211         + 'code : ' + !ERROR_STATE.MSG $ 
     212         + filemsg]) 
     213   STOP 
     214ENDIF 
     215 
    208216 
    209217for i=0, 8 do begin 
     
    527535    print, '#correct_nadir_amsu# ecriture du fichier resultant ', fichier2 
    528536 
    529 openw, lun_obsa, fichier2, /get_lun 
     537openw, lun_obsa, fichier2, /get_lun, ERROR=error 
     538if (error NE 0) THEN BEGIN 
     539    ras = report(['eee : can not open for writing '$ 
     540         + '!C' $ 
     541         + 'code : ' + !ERROR_STATE.MSG $ 
     542         + fichier2]) 
     543   STOP 
     544ENDIF 
    530545for i=0L, nn-1L do begin 
    531546    if (use_amsua eq 1) then begin 
  • trunk/src/cresamsu_cdf.pro

    r525 r530  
    255255                     + '_nadir.dat' 
    256256 
    257             openr,2,fichier2 
     257            openr,2,fichier2, ERROR = error 
     258            IF (error NE 0) then begin 
     259                  ras = report(['eee : can not open for reading '$ 
     260                        + '!C' $ 
     261                        + 'code : ' + !ERROR_STATE.MSG $ 
     262                        + fichier2]) 
     263                  STOP 
     264            ENDIF 
     265 
    258266            print,fichier2 
    259267            cont=0L 
  • trunk/src/extract_amsuab.pro

    r525 r530  
    232232 
    233233print, 'ouverture pour ecriture de ', fileout 
    234 openw, lun_obs, fileout, /get_lun 
     234openw, lun_obs, fileout, /get_lun, ERROR = error 
     235IF (error NE 0) then begin 
     236   ras = report(['eee : can not open for writing '$ 
     237         + '!C' $ 
     238         + 'code : ' + !ERROR_STATE.MSG $ 
     239         + fileout]) 
     240   STOP 
     241ENDIF 
     242 
    235243 
    236244; ouverture des fichiers liste (annee, mois, jour, tous satellites) pour 
  • trunk/src/file_amsu_t2_to_mem.pro

    r525 r530  
    189189; open file 
    190190print, 'iii : ouverture pour lecture de ', fullfilename 
    191 OPENR, lun, fullfilename, /GET_LUN 
     191OPENR, lun, fullfilename, /GET_LUN, ERROR = error 
     192IF (error NE 0) then begin 
     193   ras = report(['eee : can not open for reading'$ 
     194         + '!C' $ 
     195         + fullfilename]) 
     196   return, result 
     197ENDIF 
    192198; 
    193199; read header lines 
  • trunk/src/interpol_correc.pro

    r522 r530  
    182182      cor_landa=project_id_env+'AMSU/CORR_LAND_AMSUA5_DataFromJune2010_40deg_OrogInf500.DAT' 
    183183      cor_seaa=project_id_env+'AMSU/CORR_SEA_AMSUA5_DataFromJune2010_40deg.DAT' 
    184       openr, lun1,cor_landa, /get_lun 
     184      openr, lun1,cor_landa, /get_lun, ERROR = error 
     185      IF (error NE 0) then begin 
     186         ras = report(['eee : can not open for reading '$ 
     187               + '!C' $ 
     188               + 'code : ' + !ERROR_STATE.MSG $ 
     189               + cor_landa]) 
     190         STOP 
     191      ENDIF 
    185192      readf, lun1, t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,$ 
    186193             t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,$ 
     
    191198      cor_l=interpol(a,nfova,/lsquadratic)  
    192199      free_lun, lun1 
    193       openr, lun1,cor_seaa, /get_lun 
     200      openr, lun1,cor_seaa, /get_lun, ERROR = error 
     201      IF (error NE 0) then begin 
     202         ras = report(['eee : can not open for reading '$ 
     203               + '!C' $ 
     204               + cor_seaa]) 
     205         STOP 
     206      ENDIF 
    194207      readf, lun1, t1,t2,t3,t4,t5,$ 
    195208             t6,t7,t8,t9,t10,$ 
     
    209222      cor_s=interpol(a,nfova,/lsquadratic) ; normalement le dernier canal lu 
    210223    endif else begin 
    211       openr, lun1,cor_landa, /get_lun 
     224      openr, lun1,cor_landa, /get_lun, ERROR = error 
     225      IF (error NE 0) then begin 
     226         ras = report(['eee : can not open for reading '$ 
     227               + '!C' $ 
     228               + cor_landa]) 
     229         STOP 
     230      ENDIF 
    212231      for i=0, numcanal-1 do begin 
    213232          readf, lun1, t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,$ 
     
    221240       cor_l=interpol(a,nfova,/lsquadratic)    ; normalement le dernier canal lu 
    222241       free_lun, lun1 
    223        openr, lun1,cor_seaa, /get_lun 
     242       openr, lun1,cor_seaa, /get_lun, ERROR = error 
     243      IF (error NE 0) then begin 
     244         ras = report(['eee : can not open for reading '$ 
     245               + '!C' $ 
     246               + cor_seaa]) 
     247         STOP 
     248      ENDIF 
    224249       for i=0, numcanal-1 do begin 
    225250          readf, lun1, t1,t2,t3,t4,t5,$ 
     
    249274   cor_l=fltarr(nfovb) 
    250275   cor_s=fltarr(nfovb) 
    251    openr, lun1,cor_landb, /get_lun 
    252    for i=0, numcanal-1 do begin 
     276   openr, lun1,cor_landb, /get_lun, ERROR = error 
     277   IF (error NE 0) then begin 
     278      ras = report(['eee : can not open for reading '$ 
     279            + '!C' $ 
     280            + cor_landb]) 
     281      STOP 
     282   ENDIF 
     283for i=0, numcanal-1 do begin 
    253284      readf, lun1, t1,t2,t3,t4,t5,$ 
    254285             t6,t7,t8,t9,t10,$ 
     
    270301 
    271302   free_lun, lun1 
    272    openr, lun1,cor_seab, /get_lun 
     303   openr, lun1,cor_seab, /get_lun, ERROR = error 
     304   IF (error NE 0) then begin 
     305      ras = report(['eee : can not open for reading '$ 
     306            + '!C' $ 
     307            + cor_seab]) 
     308      STOP 
     309   ENDIF 
    273310   for i=0, numcanal-1 do begin 
    274311      readf, lun1, t1,t2,t3,t4,t5,$ 
  • trunk/src/msgnuage.pro

    r349 r530  
    290290ENDELSE 
    291291 
    292 openw,11,'/tmp/ssminuage.txt' 
     292fullfilename='/tmp/ssminuage.txt' 
     293openw,11,fullfilename, ERROR = error 
     294IF (error NE 0) then begin 
     295   ras = report(['eee : can not open for writing '$ 
     296         + '!C' $ 
     297         + fullfilename]) 
     298   STOP 
     299ENDIF 
     300 
    293301printf,11,"# filename :",file 
    294302printf,11,"# threshold:",threshold 
  • trunk/src/read_amsub1c.pro

    r513 r530  
    5050    ; Open input file 
    5151    ; 
    52     OPENR,1,filename     
     52    OPENR,1,filename, ERROR = error 
     53IF (error NE 0) then begin 
     54   ras = report(['eee : can not open for reading'$ 
     55         + '!C' $ 
     56         + 'code : ' + !ERROR_STATE.MSG $ 
     57         + filename]) 
     58   STOP 
     59ENDIF 
     60 
    5361    ; 
    5462    ; Define and read in header structure 
  • trunk/src/ssminuage.pro

    r513 r530  
    298298ENDELSE 
    299299 
    300 openw,11,'/tmp/ssminuage.txt' 
     300fullfilename = '/tmp/ssminuage.txt' 
     301openw,11,'/tmp/ssminuage.txt', ERROR = error 
     302IF (error NE 0) then begin 
     303   ras = report(['eee : can not open for writing '$ 
     304         + '!C' $ 
     305         + fullfilename]) 
     306   STOP 
     307ENDIF 
     308 
    301309printf,11,"# filename :",file 
    302310printf,11,"# threshold:",threshold 
Note: See TracChangeset for help on using the changeset viewer.