Changeset 236 for trunk/SRC/ReadWrite
- Timestamp:
- 03/21/07 18:18:44 (17 years ago)
- Location:
- trunk/SRC/ReadWrite
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ReadWrite/read_grads.pro
r232 r236 97 97 if keyword_set(timestep) then BEGIN 98 98 if date1 GT date2 then begin 99 print, 'date2 must be larger than date1'99 ras = report( 'date2 must be larger than date1') 100 100 return, -1 101 101 endif … … 106 106 jdate2 = time[0] > date2jul(date2, /grads) 107 107 if jdate1 GT jdate2 then begin 108 print, 'date2 must be larger than date1'108 ras = report('date2 must be larger than date1') 109 109 return, -1 110 110 endif … … 114 114 ENDELSE 115 115 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') 117 117 return, -1 118 118 endif … … 126 126 varid = varid[0] 127 127 if varid EQ -1 then begin 128 print, var+' not found in the variable list of '+filename128 ras = report(var+' not found in the variable list of '+filename) 129 129 return, -1 130 130 ENDIF … … 159 159 , swap_endian = swapbytes 160 160 if err ne 0 then begin 161 print,!err_string161 ras = report(!err_string) 162 162 return, -1 163 163 endif … … 179 179 infof2read=fstat(unit) 180 180 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)) 187 187 return, -1 188 188 endif -
trunk/SRC/ReadWrite/read_oasis.pro
r232 r236 45 45 , error=err 46 46 if err ne 0 then begin 47 print,!err_string47 ras = report(!err_string) 48 48 return, -1 49 49 endif … … 57 57 readu, unit 58 58 if EOF(unit) then begin 59 print, varname+' not found in '+filename59 ras = report(varname+' not found in '+filename) 60 60 return, -1 61 61 endif -
trunk/SRC/ReadWrite/readbat.pro
r232 r236 32 32 iname_file = findfile(filename) 33 33 if iname_file[0] EQ '' then begin 34 print, 'Bad file name'34 ras = report( 'Bad file name') 35 35 return, -1 36 36 ENDIF ELSE iname_file = iname_file[0] -
trunk/SRC/ReadWrite/readoldopadistcoast.pro
r232 r236 80 80 iname_file = findfile(filename) 81 81 if iname_file[0] EQ '' then begin 82 print, 'Bad file name'82 ras = report( 'Bad file name') 83 83 return, -1 84 84 ENDIF ELSE iname_file = iname_file[0] … … 103 103 size = numrec*reclen-toomuch 104 104 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') 108 108 return, -1 109 109 endif … … 116 116 readu, numcost, iimlu, ijmlu, ikmlu 117 117 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)) 119 119 return, -1 120 120 endif 121 121 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)) 123 123 return, -1 124 124 endif 125 125 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)) 127 127 return, -1 128 128 endif -
trunk/SRC/ReadWrite/readoldoparestart.pro
r231 r236 145 145 iname_file = findfile(filename) 146 146 if iname_file[0] EQ '' then begin 147 print, 'Bad file name'147 ras = report( 'Bad file name') 148 148 return 149 149 ENDIF ELSE iname_file = iname_file[0] … … 165 165 size = numrec*reclen-toomuch 166 166 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') 170 170 return 171 171 endif -
trunk/SRC/ReadWrite/scanctl.pro
r232 r236 54 54 spawn, '\grep -i "^DTYPE" '+filename, notgood 55 55 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...') 57 57 stop 58 58 endif -
trunk/SRC/ReadWrite/scanoasis.pro
r232 r236 28 28 , error=err 29 29 if err ne 0 then begin 30 print,!err_string30 ras = report(!err_string) 31 31 return 32 32 endif … … 35 35 WHILE NOT EOF(unit) DO BEGIN 36 36 readu, unit, char8 37 print, char837 ras = report(char8) 38 38 readu, unit 39 39 ENDWHILE -
trunk/SRC/ReadWrite/write_oasis.pro
r231 r236 39 39 , error=err, APPEND = append 40 40 if err ne 0 then begin 41 print,!err_string41 ras = report(!err_string) 42 42 return 43 43 endif -
trunk/SRC/ReadWrite/writebat.pro
r231 r236 26 26 ; basic checks 27 27 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') 29 29 return 30 30 ENDIF 31 31 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') 33 33 return 34 34 ENDIF 35 35 sbat = size(zbat) 36 36 IF sbat[0] NE 2 THEN BEGIN 37 print, 'bathymetry array should be 2d array'37 ras = report( 'bathymetry array should be 2d array') 38 38 return 39 39 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.