- Timestamp:
- 07/06/06 16:48:41 (18 years ago)
- Location:
- trunk/SRC/ReadWrite
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ReadWrite/ncdf_timeget.pro
- Property svn:eol-style deleted
- Property svn:executable deleted
- Property svn:keywords changed from Author Date Id Revision to Id
r114 r130 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; @file_comments get the time axis fom a netcdf_file and transforms it in 5 ; @file_comments 6 ; get the time axis fom a netcdf_file and transforms it in 6 7 ; julian days of IDL. 7 8 ; 8 9 ; @categories reading ncdf_file 9 10 ; 10 ; @param cdfid {in}{required} the ID of the ncdf_file, which is already open11 ; @param timeid {in}{required} the ID or the name of the variable which describe the calendar11 ; @param cdfid {in}{required} 12 ; the ID of the ncdf_file, which is already open 12 13 ; 13 ; @ keyword /YYYYMMDD active to obtain the date as a longinterger with14 ; the format YearYearYearYearMonthMonthDayDay14 ; @param timeid {in}{required} 15 ; the ID or the name of the variable which describe the calendar 15 16 ; 16 ; @file_comments the keyword parameters of ncdf_varget 17 ; @keyword YYYYMMDD 18 ; active to obtain the date as a longinterger with 19 ; the format YearYearYearYearMonthMonthDayDay 17 20 ; 18 ; @returns a long array of IDL julian days 21 ; @keyword _EXTRA 22 ; the keyword parameters of ncdf_varget 19 23 ; 20 ; @restrictions the calendar variable must have the units attribute 24 ; @returns 25 ; a long array of IDL julian days 26 ; 27 ; @restrictions 28 ; the calendar variable must have the units attribute 21 29 ; following the syntaxe bellow: 22 30 ; … … 29 37 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 30 38 ; June 2001 39 ; @version $Id$ 31 40 ;- 32 41 ;------------------------------------------------------------ 33 42 ;------------------------------------------------------------ 34 43 ;------------------------------------------------------------ 35 FUNCTION ncdf_timeget, cdfid, timeid, YYYYMMDD = yyyymmdd, _ extra= ex44 FUNCTION ncdf_timeget, cdfid, timeid, YYYYMMDD = yyyymmdd, _EXTRA = ex 36 45 ; 37 46 compile_opt idl2, strictarrsubs … … 62 71 'hours':time = julday(start[1], start[2], start[0])+time/long(24) 63 72 'days':time = julday(start[1], start[2], start[0])+time 64 'months':BEGIN 73 'months':BEGIN 65 74 for t = 0, n_elements(time)-1 do begin 66 75 time[t] = julday(start[1]+time[t], start[2], start[0]) -
trunk/SRC/ReadWrite/read_grads.pro
- Property svn:executable deleted
- Property svn:keywords set to Id
r121 r130 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; @file_comments reading grads file (except "data type station" or "grib") 5 ; @file_comments 6 ; reading grads file (except "data type station" or "grib") 6 7 ; from the grads control file even if there is multiple data files. 7 8 ; 8 9 ; @categories reading function 9 10 ; 10 ; @param var {in}{required} the variable name 11 ; @param date1 {in}{required} date of the beginning (yyyymmdd if TIMESTEP is not activate) 12 ; @param date2 {in}{optional} last date. Optionnal, if not scpecified date2=date1 13 ; 14 ; @keyword FILENAME the grads control file name: 'xxxx.ctl' 15 ; 16 ; @file_comments keyword GLAMBOUNDARY (via computegrid.pro) a 2 elements vector, 17 ; {lon1,lon2], giving the longitude boundaries that should be 18 ; used to visualize the data. 11 ; @param var {in}{required} 12 ; the variable name 13 ; 14 ; @param date1 {in}{required} 15 ; date of the beginning (yyyymmdd if TIMESTEP is not activate) 16 ; 17 ; @param date2 {in}{optional} 18 ; last date. Optionnal, if not scpecified date2=date1 19 ; 20 ; @keyword FILENAME 21 ; the grads control file name: 'xxxx.ctl' 22 ; 23 ; @file_comments 24 ; keyword GLAMBOUNDARY (via computegrid.pro) a 2 elements vector, 25 ; {lon1,lon2], giving the longitude boundaries that should be 26 ; used to visualize the data. 19 27 ; lon2 > lon1 20 28 ; lon2 - lon1 eq 360 21 ; key_shift will be automatically defined according to 22 ; GLAMBOUNDARY. 23 ; 24 ; @keyword /TIMESTEP to specify that the dates are time steps instead of 25 ; true calendar. 26 ; 27 ; @file_comments keyword IODIRECTORY a string giving the name of iodirectory (see 28 ; isafile.pro for all possibilities). default value is common 29 ; variable iodir 29 ; key_shift will be automatically defined according to GLAMBOUNDARY. 30 ; 31 ; @keyword TIMESTEP 32 ; to specify that the dates are time steps instead of true calendar. 30 33 ; 31 34 ; @file_comments 35 ; keyword IODIRECTORY 36 ; a string giving the name of iodirectory 37 ; (see isafile.pro for all possibilities). 38 ; default value is common variable iodir 39 ; 40 ; @todo 32 41 ;--------------- 33 42 ; NOT yet available 34 43 ;--------------- 35 44 ; 36 ; @hidden BOX a 4 or 6 elements 1d array, [lon1,lon2,lat1,lat2, depth1,45 ; BOX a 4 or 6 elements 1d array, [lon1,lon2,lat1,lat2, depth1, 37 46 ; depth2], that specifies the area where data must be read 38 47 ; 39 ; @hidden EVERYTHING 40 ; 41 ; @hidden NOSTRUCTURE 42 ; 43 ; @returns an array 48 ; EVERYTHING 49 ; 50 ; NOSTRUCTURE 51 ; 52 ; @returns 53 ; an array 44 54 ; 45 55 ; @uses common 46 56 ; 47 ; @restriction define all the grid parameters (defined in common.pro) 57 ; @restriction 58 ; define all the grid parameters (defined in common.pro) 48 59 ; associated to the data. 49 60 ; 50 ; @restrictions this function call the procedure scanfile that use the 51 ; unix commands grep and sed 61 ; @restrictions 62 ; this function call the procedure scanfile that use the 63 ; unix commands grep and sed 52 64 ; 53 65 ; @examples 54 ; 55 ; 66 ; IDL> a=read_grads('sst',19900101,19900131,filename='outputs.ctl') 67 ; IDL> plt, a 56 68 ; 57 69 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 70 ; 71 ; @version $Id$ 58 72 ; 59 73 ;- … … 211 225 'float':a=assoc(unit,fltarr(jpi,jpj,/nozero), offset+4*f77sequential) 212 226 endcase 213 res[*, *, i+alreadyread]=a[0] 227 res[*, *, i+alreadyread]=a[0] 214 228 ENDIF ELSE BEGIN ; more than 1 level to be read 215 229 if f77sequential then BEGIN ; sequential access … … 238 252 'float':a=assoc(unit,fltarr(jpi,jpj,varslev[varid],/nozero),offset) 239 253 endcase 240 if keyword_set(key_zreverse) then res[*, *, *, i+alreadyread]=reverse(a[0], 3) ELSE res[*, *, *, i+alreadyread]=a[0] 254 if keyword_set(key_zreverse) then res[*, *, *, i+alreadyread]=reverse(a[0], 3) ELSE res[*, *, *, i+alreadyread]=a[0] 241 255 ENDELSE 242 256 ENDELSE -
trunk/SRC/ReadWrite/read_oasis.pro
- Property svn:executable deleted
- Property svn:keywords set to Id
r121 r130 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; @file_comments read the f77 unformated files used in Oasis (version < 2.5) 5 ; @file_comments 6 ; read the f77 unformated files used in Oasis (version < 2.5) 6 7 ; 7 8 ; @categories reading 8 9 ; 9 ; @param filename {in}{required} the filename 10 ; @param varname {in}{required} the name of the variable to be read 11 ; @param jpi {in}{required} 12 ; @param jpj {in}{required} 13 ; the size of the 2d array to be read 10 ; @param filename {in}{required} the filename 14 11 ; 15 ; @keyword /I2 16 ; @keyword /I4 17 ; @keyword /I8 18 ; @keyword /R4 12 ; @param varname {in}{required} the name of the variable to be read 13 ; 14 ; @param jpi {in}{required} 15 ; 16 ; @param jpj {in}{required} 17 ; the size of the 2d array to be read 18 ; 19 ; @keyword I2 20 ; @keyword I4 21 ; @keyword I8 22 ; @keyword R4 19 23 ; to change the default format (R8) of the data to be read. 20 24 ; … … 29 33 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 30 34 ; July 01, 2002 35 ; @version $Id$ 31 36 ;- 32 37 ;------------------------------------------------------------ … … 69 74 ELSE:res = dblarr(jpi, jpj) 70 75 endcase 71 76 72 77 readu, unit, res 73 78 74 79 free_lun,unit 75 80 -
trunk/SRC/ReadWrite/readbat.pro
- Property svn:executable deleted
- Property svn:keywords set to Id
r114 r130 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; @file_comments reading the bathymetry ASCII file of OPA 5 ; @file_comments 6 ; reading the bathymetry ASCII file of OPA 6 7 ; 7 8 ; @categories for OPA 8 9 ; 9 ; @param filename {in}{required} a string containing the filename, 10 ; @param filename {in}{required} a string containing the filename, 10 11 ; 11 ; @keyword /ZERO to put 0 on land instead of negatives values for the islands.12 ; @keyword ZERO to put 0 on land instead of negatives values for the islands. 12 13 ; 13 14 ; @returns a 2d array … … 16 17 ; May 31, 2002 17 18 ; based on batlec2.pro, written by Maurice Imbard, March 17, 1998 19 ; 20 ; @version $Id$ 21 ; 18 22 ;- 19 23 FUNCTION readbat, filename, ZERO = zero -
trunk/SRC/ReadWrite/readoldopadistcoast.pro
- Property svn:executable deleted
- Property svn:keywords set to Id
r121 r130 4 4 ;+ 5 5 ; @file_comments 6 ; 7 ; 8 ; 6 ; read the old binary direct access file that contains the 7 ; distance to the coast in OPA. 8 ; based on the OPA subroutines dtacof and parctl 9 9 ; 10 10 ; @categories for OPA before NetCDF 11 ;12 11 ; 13 12 ; @returns a structure that contains two elements: tdistcoast (the … … 17 16 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 18 17 ; June, 2002 18 ; @version $Id$ 19 19 ;- 20 20 ;------------------------------------------------------------ … … 36 36 ; @param jpiglo {in}{required} 37 37 ; @param jpjglo {in}{required} 38 ; @param jpk {in}{required} 38 ; @param jpk {in}{required} 39 39 ; dimensions of the opa grid 40 40 ; … … 81 81 return, -1 82 82 endif 83 ; first record: six 64-bit integer to read. 83 ; first record: six 64-bit integer to read. 84 84 ; default definition 85 85 iimlu = long64(999) … … 89 89 readu, numcost, iimlu, ijmlu, ikmlu 90 90 if iimlu NE jpiglo then begin 91 print, 'iimlu = '+strtrim(iimlu, 1)+' differs from jpiglo ='+strtrim(jpiglo, 1) 91 print, 'iimlu = '+strtrim(iimlu, 1)+' differs from jpiglo ='+strtrim(jpiglo, 1) 92 92 return, -1 93 93 endif 94 94 if ijmlu NE jpjglo then begin 95 print, 'ijmlu = '+strtrim(ijmlu, 1)+' differs from jpjglo ='+strtrim(jpjglo, 1) 95 print, 'ijmlu = '+strtrim(ijmlu, 1)+' differs from jpjglo ='+strtrim(jpjglo, 1) 96 96 return, -1 97 97 endif 98 98 if ikmlu NE jpk then begin 99 print, 'ikmlu = '+strtrim(ikmlu, 1)+' differs from jpk ='+strtrim(jpk, 1) 99 print, 'ikmlu = '+strtrim(ikmlu, 1)+' differs from jpk ='+strtrim(jpk, 1) 100 100 return, -1 101 101 endif -
trunk/SRC/ReadWrite/readoldoparestart.pro
- Property svn:executable deleted
- Property svn:keywords set to Id
r121 r130 10 10 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 11 11 ; June 2002 12 ; @version $Id$ 12 13 ;- 13 14 ;------------------------------------------------------------ … … 21 22 ; 22 23 offset=params.reclen*params.jpk*(num-1L) 23 a=assoc(unit,dblarr(params.jpiglo,params.jpjglo,/nozero),offset) 24 a=assoc(unit,dblarr(params.jpiglo,params.jpjglo,/nozero),offset) 24 25 return, a[0] 25 26 end … … 38 39 39 40 ;+ 40 ; @file_comments read the old restart files of OPA (before NetCDF) 41 ; based on the OPA subroutine dtrlec included at the end of the 42 ; file. 41 ; @file_comments 42 ; read the old restart files of OPA (before NetCDF) 43 ; based on the OPA subroutine dtrlec included at the end of the file. 44 ; 43 45 ; @categories for OPA before NetCDF 44 ; @param filename {in}{required} with the whole path if necessary 46 ; 47 ; @param filename {in}{required} 48 ; with the whole path if necessary 49 ; 45 50 ; @param jpiglo {in}{required} 46 51 ; @param jpjglo {in}{required} 47 52 ; @param jpk {in}{required} 48 53 ; dimensions of the opa grid 54 ; 49 55 ; @keyword IBLOC {default=4096L} ibloc size 50 56 ; @keyword JPBYT {default=8L} jpbyt size … … 70 76 ; @keyword BSFD 71 77 ; @keyword EN 72 ; the variable we want to read. 78 ; the variable we want to read. 73 79 ; 74 80 ; @returns according to the given keywords. … … 77 83 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 78 84 ; June 2002 85 ; @version $Id$ 79 86 ;- 80 87 … … 111 118 return 112 119 endif 113 ; first record: six 64-bit integer to read. 120 ; first record: six 64-bit integer to read. 114 121 ; default definition 115 122 ino1 = long64(9999) … … 190 197 191 198 ;CDIR$ LIST 192 ; SUBROUTINE dtrlec 193 ;CCC--------------------------------------------------------------------- 199 ; SUBROUTINE dtrlec 200 ;CCC--------------------------------------------------------------------- 194 201 ;CCC 195 202 ;CCC ROUTINE dtrlec … … 206 213 ;CC after control with the present run, we read : 207 214 ;CC - prognostic variables on the second record 208 ;CC - elliptic solver arrays 215 ;CC - elliptic solver arrays 209 216 ;CC - barotropic stream function arrays (default option) 210 217 ;CC or free surface arrays ("key_freesurf_cstvol" defined) 211 218 ;CC - tke arrays ("key_zdftke" defined) 212 ;CC for this last three records, the previous characteristics 213 ;CC could be different with those used in the present run. 219 ;CC for this last three records, the previous characteristics 220 ;CC could be different with those used in the present run. 214 221 ;CC 215 222 ;CC Input : … … 225 232 ;CC /comnow/ : present fields (now) 226 233 ;CC /combsf/ : barotropic stream function 227 ;CC /comspg/ : surface pressure 234 ;CC /comspg/ : surface pressure 228 235 ;CC /comsol/ : diagonal preconditioned conjugate 229 236 ;CC … … 273 280 ;#endif 274 281 ;C FETI method 275 ; IF (nsolv .EQ. 3) THEN 282 ; IF (nsolv .EQ. 3) THEN 276 283 ; isor0=2 277 284 ; ipcg0=2 278 ; ENDIF 285 ; ENDIF 279 286 ;C 280 287 ; IF(lwp) THEN … … 283 290 ; WRITE(numout,*) ' ' 284 291 ; WRITE(numout,*) ' the present run :' 285 ; WRITE(numout,*) ' job number : ', no 292 ; WRITE(numout,*) ' job number : ', no 286 293 ; WRITE(numout,*) ' with nit000 : ', nit000 287 294 ; WRITE(numout,*) ' with pcg option ipcg0 : ', ipcg0 -
trunk/SRC/ReadWrite/scanctl.pro
- Property svn:executable deleted
- Property svn:keywords set to Id
r121 r130 1 1 ;+ 2 ; @file_comments GLAMBOUNDARY 2 elements vector, {lon1,lon2], the longitude 3 ; boundaries that should be used to visualize the data. 4 ; lon2 > lon1 5 ; lon2 - lon1 le 360 6 ; key_shift will be defined according to GLAMBOUNDARY. 2 ; @file_comments 3 ; GLAMBOUNDARY 2 elements vector, {lon1,lon2], the longitude 4 ; boundaries that should be used to visualize the data. 5 ; lon2 > lon1 6 ; lon2 - lon1 le 360 7 ; key_shift will be defined according to GLAMBOUNDARY. 8 ; 9 ; @version $Id$ 7 10 ;- 8 11 PRO scanctl, filename, filesname, jpt1file, varsname, varslev, swapbytes, bigendian, littleendian, f77sequential, fileheader, theader, xyheader, VARFMT = varfmt, _EXTRA = ex -
trunk/SRC/ReadWrite/scanoasis.pro
- Property svn:executable deleted
- Property svn:keywords set to Id
r114 r130 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; @file_comments scan an Oasis file (version < 2.5) 5 ; @file_comments 6 ; scan an Oasis file (version < 2.5) 6 7 ; 7 8 ; @categories know what is inside … … 12 13 ; 13 14 ; @examples 14 ; 15 ; IDL> scanoasis,'grids_orca_t106' 15 16 ; 16 17 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 17 ; July 01, 2002 18 ; July 01, 2002 19 ; @version $Id$ 18 20 ;- 19 21 ;------------------------------------------------------------ -
trunk/SRC/ReadWrite/write_oasis.pro
- Property svn:executable deleted
- Property svn:keywords set to Id
r121 r130 4 4 ;+ 5 5 ; 6 ; @file_comments write an Oasis file (version < 2.5) 6 ; @file_comments 7 ; write an Oasis file (version < 2.5) 7 8 ; 8 9 ; @param filename {in}{required} the filename … … 10 11 ; @param z2d {in}{required} the variable (2D array) to be written 11 12 ; 12 ; @keyword /I213 ; @keyword /I414 ; @keyword /I815 ; @keyword /R413 ; @keyword I2 14 ; @keyword I4 15 ; @keyword I8 16 ; @keyword R4 16 17 ; to change the default format (R8) of the data to be written. 17 18 ; 18 ; @keyword /APPEND to open the file with the file pointer at the end of19 ; @keyword APPEND to open the file with the file pointer at the end of 19 20 ; the file, ready for data to be appended. 20 21 ; … … 25 26 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 26 27 ; July 01, 2002 28 ; @version $Id$ 27 29 ;- 28 30 ;------------------------------------------------------------ -
trunk/SRC/ReadWrite/writebat.pro
- Property svn:executable deleted
- Property svn:keywords set to Id
r114 r130 4 4 ;+ 5 5 ; 6 ; @file_comments write the bathymetry ASCII file of OPA 6 ; @file_comments 7 ; write the bathymetry ASCII file of OPA 7 8 ; 8 9 ; @categories for OPA 9 10 ; 10 ; @param zbat {in}{required} the bathymetry, a 2d array 11 ; @param filename {in}{required} a string containing the filename, 11 ; @param zbat {in}{required} the bathymetry, a 2d array 12 ; @param filename {in}{required} a string containing the filename, 12 13 ; 13 14 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 14 15 ; Sept 30, 2003 15 16 ; based on batsav2.pro, written by Maurice Imbard, March 17, 1998 17 ; 18 ; @version $Id$ 16 19 ;- 17 20 PRO writebat, zbat, filename
Note: See TracChangeset
for help on using the changeset viewer.