Changeset 534 for trunk


Ignore:
Timestamp:
04/20/12 10:43:38 (12 years ago)
Author:
pinsard
Message:

fix too many openr

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/extract_amsua.pro

    r531 r534  
    158158; 
    159159; $URL$ 
     160; 
     161; - fplod 20120420 
     162; 
     163;   * remove extra openr to avoid  
     164;     ``% GET_LUN: All available logical units are currently in use`` 
     165;     openr is included in :ref:`read_amsua1c.pro` 
    160166; 
    161167; - fplod 20120417 
     
    326332; boucle sur les elements de la liste 
    327333 
    328 msg = report(['iii : ' + routine + ' : traitement du jour' + string(yyyy, format='(1x,I4.4)') + string(mm, format='(I2.2)') + string(dd, format='(I2.2)')]) 
     334msg = report(['iii : ' + routine + ' : traitement du jour' $ 
     335      + string(yyyy, format='(1x,I4.4)') $ 
     336      + string(mm, format='(I2.2)') $ 
     337      + string(dd, format='(I2.2)')]) 
    329338a = STRARR(nb_file) 
     339 
    330340IF key_performance EQ 1 THEN BEGIN 
    331341    msg = report(['ppp : ' + routine + ' :  durï¿œe intermediaire demarrage boucle sur fichier ' $ 
     
    341351                   + string(SYSTIME(1)-time1,format='(F12.6)')]) 
    342352   ENDIF 
    343    openr,lu1,filea,Error=error,/get_lun 
    344    IF (error NE 0) then begin 
    345        ras = report(['eee : can not open for reading'$ 
    346              + '!C' $ 
    347              + 'code : ' + !ERROR_STATE.MSG $ 
    348              + filea]) 
    349        STOP 
    350    ENDIF 
    351  
    352353   read_amsua1c,filea, flag1 
    353    close,lu1 
    354    free_lun,lu1 
    355354   if (flag1 eq 0) then goto, labfile 
    356355   na=SIZE(reform(ama_scan.btemps[0,*,*])) 
     
    385384   msg = report(['iii : ' + routine + ' : nb de points du fichier dans le domaine geographique +15deg ' + string(nzon,format='(I8.8)')]) 
    386385   IF key_performance EQ 1 THEN BEGIN 
    387        msg = report(['ppp : ' + routine + ' : durï¿œe intermediaire avant openr filea' $ 
     386       msg = report(['ppp : ' + routine + ' : durï¿œe intermediaire avant test nzon' $ 
    388387                   + string(SYSTIME(1)-time1,format='(F12.6)')]) 
    389388   ENDIF 
    390    openr,lu1,filea,Error=error,/get_lun 
    391389   if nzon gt 1 then begin 
    392390      amalat=amalati[*,jnd] 
  • trunk/src/read_amsua1c.pro

    r528 r534  
    3434;  $Id: read_amsua1c.pro 235 2011-05-16 15:52:50Z pinsard $ 
    3535; 
     36; - fplod 20120420 
     37; 
     38;   * use get_lun instead of hard coded unit 
     39; 
    3640; - fplod 20120417 
    3741;  
     
    6367; 
    6468; Open input file 
    65 OPENR,1,filename, ERROR = error 
     69OPENR, lu,filename, ERROR = error,/GET_LUN 
    6670IF (error NE 0) then begin 
    6771   ras = report(['eee : can not open for reading'$ 
     
    7478; Define and read in header structure 
    7579define_amsua_header_struct 
    76 READU,1, ama_head 
     80READU, lu, ama_head 
    7781; byteorder,ama_head,/Lswap 
    7882; 
     
    8387; read each scanline sperately 
    8488FOR i = 0L,ama_head.h_scnlin-1 DO BEGIN 
    85    ; if (eof(1) eq 0) then goto, pb_file 
    86    READU,1,one_scana 
     89   ; if (eof(lu) eq 0) then goto, pb_file 
     90   READU, lu, one_scana 
    8791   ;byteorder,one_scana,/Lswap 
    8892   ama_scan[i] = one_scana 
     
    9195; Close input file 
    9296pb_file: 
    93 CLOSE,1 
     97CLOSE, lu 
     98FREE_LUN, lu 
    9499 
    95100IF key_performance EQ 1 THEN BEGIN 
Note: See TracChangeset for help on using the changeset viewer.