Changeset 236 for trunk/SRC/ReadWrite


Ignore:
Timestamp:
03/21/07 18:18:44 (17 years ago)
Author:
pinsard
Message:

replace some print by some report in some .pro #2

Location:
trunk/SRC/ReadWrite
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ReadWrite/read_grads.pro

    r232 r236  
    9797   if keyword_set(timestep) then BEGIN 
    9898      if date1 GT date2 then begin 
    99          print, 'date2 must be larger than date1' 
     99         ras = report( 'date2 must be larger than date1') 
    100100         return, -1 
    101101      endif 
     
    106106      jdate2 = time[0] > date2jul(date2, /grads) 
    107107      if jdate1 GT jdate2 then begin 
    108          print, 'date2 must be larger than date1' 
     108         ras = report('date2 must be larger than date1') 
    109109         return, -1 
    110110      endif 
     
    114114   ENDELSE 
    115115   if t2 LT t1 then begin 
    116       print, 'There is no date between date1 and date2' 
     116      ras = report('There is no date between date1 and date2') 
    117117      return, -1 
    118118   endif 
     
    126126   varid = varid[0] 
    127127   if varid EQ -1 then begin 
    128       print, var+' not found in the variable list of '+filename 
     128      ras = report(var+' not found in the variable list of '+filename) 
    129129      return,  -1 
    130130   ENDIF 
     
    159159    , swap_endian = swapbytes 
    160160   if err ne 0 then begin 
    161       print,!err_string 
     161      ras = report(!err_string) 
    162162      return, -1 
    163163   endif 
     
    179179   infof2read=fstat(unit) 
    180180   if infof2read.size NE filesize then begin 
    181       print, 'According to '+filename+' the file size must be '+strtrim(filesize, 1)+' instead of '+strtrim(infof2read.size, 1) 
    182       print, 'jpi: '+strtrim(jpi, 2) 
    183       print, 'jpj: '+strtrim(jpj, 2) 
    184       print, 'jpt: '+strtrim(jpt, 2) 
    185       print, 'format size in byte: '+strtrim(fmtsz, 2) 
    186       print, 'number of xy arrays: '+strtrim(nxybloc, 2) 
     181      ras = report('According to '+filename+' the file size must be '+strtrim(filesize, 1)+' instead of '+strtrim(infof2read.size, 1)) 
     182      ras = report( 'jpi: '+strtrim(jpi, 2)) 
     183      ras = report( 'jpj: '+strtrim(jpj, 2)) 
     184      ras = report( 'jpt: '+strtrim(jpt, 2)) 
     185      ras = report( 'format size in byte: '+strtrim(fmtsz, 2)) 
     186      ras = report( 'number of xy arrays: '+strtrim(nxybloc, 2)) 
    187187      return, -1 
    188188   endif 
  • trunk/SRC/ReadWrite/read_oasis.pro

    r232 r236  
    4545    , error=err 
    4646   if err ne 0 then begin 
    47       print,!err_string 
     47      ras = report(!err_string) 
    4848      return, -1 
    4949   endif 
     
    5757      readu, unit 
    5858      if EOF(unit) then begin 
    59          print, varname+' not found in '+filename 
     59         ras = report(varname+' not found in '+filename) 
    6060         return, -1 
    6161      endif 
  • trunk/SRC/ReadWrite/readbat.pro

    r232 r236  
    3232   iname_file = findfile(filename) 
    3333   if iname_file[0] EQ '' then begin 
    34       print, 'Bad file name' 
     34      ras = report( 'Bad file name') 
    3535      return, -1 
    3636   ENDIF ELSE iname_file = iname_file[0] 
  • trunk/SRC/ReadWrite/readoldopadistcoast.pro

    r232 r236  
    8080   iname_file = findfile(filename) 
    8181   if iname_file[0] EQ '' then begin 
    82       print, 'Bad file name' 
     82      ras = report( 'Bad file name') 
    8383      return, -1 
    8484   ENDIF ELSE iname_file = iname_file[0] 
     
    103103   size = numrec*reclen-toomuch 
    104104   if size NE filepamameters.size then begin 
    105       print, 'The size of the file is not the expected one!' 
    106       print, 'Check your file or the values of ibloc, jpiglo,' 
    107       print, 'jpjglo, jpk, jpbyt, numrec in this program' 
     105      ras = report( 'The size of the file is not the expected one!') 
     106      ras = report( 'Check your file or the values of ibloc, jpiglo,') 
     107      ras = report( 'jpjglo, jpk, jpbyt, numrec in this program') 
    108108      return, -1 
    109109   endif 
     
    116116   readu, numcost, iimlu, ijmlu, ikmlu 
    117117   if iimlu NE jpiglo then begin 
    118       print, 'iimlu = '+strtrim(iimlu, 1)+' differs from jpiglo ='+strtrim(jpiglo, 1) 
     118      ras = report( 'iimlu = '+strtrim(iimlu, 1)+' differs from jpiglo ='+strtrim(jpiglo, 1)) 
    119119      return, -1 
    120120   endif 
    121121   if ijmlu NE jpjglo then begin 
    122       print, 'ijmlu = '+strtrim(ijmlu, 1)+' differs from jpjglo ='+strtrim(jpjglo, 1) 
     122      ras = report( 'ijmlu = '+strtrim(ijmlu, 1)+' differs from jpjglo ='+strtrim(jpjglo, 1)) 
    123123      return, -1 
    124124   endif 
    125125   if ikmlu NE jpk then begin 
    126       print, 'ikmlu = '+strtrim(ikmlu, 1)+' differs from jpk ='+strtrim(jpk, 1) 
     126      ras = report( 'ikmlu = '+strtrim(ikmlu, 1)+' differs from jpk ='+strtrim(jpk, 1)) 
    127127      return, -1 
    128128   endif 
  • trunk/SRC/ReadWrite/readoldoparestart.pro

    r231 r236  
    145145   iname_file = findfile(filename) 
    146146   if iname_file[0] EQ '' then begin 
    147       print, 'Bad file name' 
     147      ras = report( 'Bad file name') 
    148148      return 
    149149   ENDIF ELSE iname_file = iname_file[0] 
     
    165165   size = numrec*reclen-toomuch 
    166166   if size NE filepamameters.size then begin 
    167       print, 'The size of the file is not the expected one!' 
    168       print, 'Check your file or the values of ibloc, jpiglo,' 
    169       print, 'jpjglo, jpk, jpbyt, numrec in this program' 
     167      ras = report( 'The size of the file is not the expected one!') 
     168      ras = report( 'Check your file or the values of ibloc, jpiglo,') 
     169      ras = report( 'jpjglo, jpk, jpbyt, numrec in this program') 
    170170      return 
    171171   endif 
  • trunk/SRC/ReadWrite/scanctl.pro

    r232 r236  
    5454   spawn, '\grep -i "^DTYPE" '+filename, notgood 
    5555   if keyword_set(notgood) then begin 
    56       print, 'This program is not adapted to data type station or grib. Sorry...' 
     56      ras = report( 'This program is not adapted to data type station or grib. Sorry...') 
    5757      stop 
    5858   endif 
  • trunk/SRC/ReadWrite/scanoasis.pro

    r232 r236  
    2828    , error=err 
    2929   if err ne 0 then begin 
    30       print,!err_string 
     30      ras = report(!err_string) 
    3131      return 
    3232   endif 
     
    3535   WHILE NOT EOF(unit) DO BEGIN 
    3636      readu, unit, char8 
    37       print,  char8 
     37      ras = report(char8) 
    3838      readu, unit 
    3939   ENDWHILE 
  • trunk/SRC/ReadWrite/write_oasis.pro

    r231 r236  
    3939    , error=err, APPEND = append 
    4040   if err ne 0 then begin 
    41       print,!err_string 
     41      ras = report(!err_string) 
    4242      return 
    4343   endif 
  • trunk/SRC/ReadWrite/writebat.pro

    r231 r236  
    2626; basic checks 
    2727  IF n_params() NE 2 THEN BEGIN 
    28     print, 'bad number of arguments in the call of writebat' 
     28    ras = report( 'bad number of arguments in the call of writebat') 
    2929    return 
    3030  ENDIF 
    3131  IF size(filename, /type) NE 7 THEN BEGIN 
    32     print, 'the filename should be a string' 
     32    ras = report( 'the filename should be a string') 
    3333    return 
    3434  ENDIF 
    3535  sbat = size(zbat) 
    3636  IF sbat[0] NE 2 THEN BEGIN 
    37     print, 'bathymetry array should be 2d array' 
     37    ras = report( 'bathymetry array should be 2d array') 
    3838    return 
    3939  ENDIF 
Note: See TracChangeset for help on using the changeset viewer.