Changeset 130 for trunk/SRC


Ignore:
Timestamp:
07/06/06 16:48:41 (18 years ago)
Author:
pinsard
Message:

improvements of ReadWrite/?*.pro header

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  
    33;------------------------------------------------------------ 
    44;+ 
    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 
    67; julian days of IDL. 
    78; 
    89; @categories reading ncdf_file 
    910; 
    10 ; @param cdfid {in}{required} the ID of the ncdf_file, which is already open 
    11 ; @param timeid {in}{required} the ID or the name of the variable which describe the calendar 
     11; @param cdfid {in}{required} 
     12; the ID of the ncdf_file, which is already open 
    1213; 
    13 ; @keyword /YYYYMMDD active to obtain the date as a longinterger with 
    14 ;        the format YearYearYearYearMonthMonthDayDay 
     14; @param timeid {in}{required} 
     15; the ID or the name of the variable which describe the calendar 
    1516; 
    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 
    1720; 
    18 ; @returns a long array of IDL julian days 
     21; @keyword _EXTRA 
     22; the keyword parameters of ncdf_varget 
    1923; 
    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 
    2129; following the syntaxe bellow: 
    2230; 
     
    2937; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    3038;                      June 2001 
     39; @version $Id$ 
    3140;- 
    3241;------------------------------------------------------------ 
    3342;------------------------------------------------------------ 
    3443;------------------------------------------------------------ 
    35 FUNCTION ncdf_timeget, cdfid, timeid, YYYYMMDD = yyyymmdd, _extra = ex 
     44FUNCTION ncdf_timeget, cdfid, timeid, YYYYMMDD = yyyymmdd, _EXTRA = ex 
    3645; 
    3746  compile_opt idl2, strictarrsubs 
     
    6271         'hours':time = julday(start[1], start[2], start[0])+time/long(24) 
    6372         'days':time = julday(start[1], start[2], start[0])+time 
    64          'months':BEGIN  
     73         'months':BEGIN 
    6574            for t = 0, n_elements(time)-1  do begin 
    6675               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  
    33;------------------------------------------------------------ 
    44;+ 
    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") 
    67; from the grads control file even if there is multiple data files. 
    78; 
    89; @categories reading function 
    910; 
    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. 
    1927;         lon2 > lon1 
    2028;         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. 
    3033; 
    3134; @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 
    3241;--------------- 
    3342; NOT yet available 
    3443;--------------- 
    3544; 
    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, 
    3746;       depth2], that specifies the area where data must be read 
    3847; 
    39 ;       @hidden EVERYTHING 
    40 ;  
    41 ;       @hidden NOSTRUCTURE 
    42 ;        
    43 ; @returns an array 
     48;       EVERYTHING 
     49; 
     50;       NOSTRUCTURE 
     51; 
     52; @returns 
     53; an array 
    4454; 
    4555; @uses common 
    4656; 
    47 ; @restriction define all the grid parameters (defined in common.pro) 
     57; @restriction 
     58; define all the grid parameters (defined in common.pro) 
    4859; associated to the data. 
    4960; 
    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 
    5264; 
    5365; @examples 
    54 ;    IDL> a=read_grads('sst',19900101,19900131,filename='outputs.ctl') 
    55 ;    IDL> plt, a 
     66; IDL> a=read_grads('sst',19900101,19900131,filename='outputs.ctl') 
     67; IDL> plt, a 
    5668; 
    5769; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
     70; 
     71; @version $Id$ 
    5872; 
    5973;- 
     
    211225            'float':a=assoc(unit,fltarr(jpi,jpj,/nozero), offset+4*f77sequential) 
    212226         endcase 
    213          res[*, *, i+alreadyread]=a[0]  
     227         res[*, *, i+alreadyread]=a[0] 
    214228      ENDIF ELSE BEGIN ; more than 1 level to be read 
    215229         if f77sequential then BEGIN ; sequential access 
     
    238252               'float':a=assoc(unit,fltarr(jpi,jpj,varslev[varid],/nozero),offset) 
    239253            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] 
    241255         ENDELSE 
    242256      ENDELSE 
  • trunk/SRC/ReadWrite/read_oasis.pro

    • Property svn:executable deleted
    • Property svn:keywords set to Id
    r121 r130  
    33;------------------------------------------------------------ 
    44;+ 
    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) 
    67; 
    78; @categories reading 
    89; 
    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 
    1411; 
    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 
    1923; to change the default format (R8) of the data to be read. 
    2024; 
     
    2933; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    3034;                      July 01, 2002 
     35; @version $Id$ 
    3136;- 
    3237;------------------------------------------------------------ 
     
    6974      ELSE:res = dblarr(jpi, jpj) 
    7075   endcase 
    71     
     76 
    7277   readu, unit, res 
    73     
     78 
    7479   free_lun,unit 
    7580 
  • trunk/SRC/ReadWrite/readbat.pro

    • Property svn:executable deleted
    • Property svn:keywords set to Id
    r114 r130  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; @file_comments reading the bathymetry ASCII file of OPA 
     5; @file_comments 
     6; reading the bathymetry ASCII file of OPA 
    67; 
    78; @categories for OPA 
    89; 
    9 ; @param filename {in}{required} a string containing the filename,   
     10; @param filename {in}{required} a string containing the filename, 
    1011; 
    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. 
    1213; 
    1314; @returns a 2d array 
     
    1617;                      May 31, 2002 
    1718;    based on batlec2.pro, written by Maurice Imbard, March 17, 1998 
     19; 
     20; @version $Id$ 
     21; 
    1822;- 
    1923FUNCTION readbat, filename, ZERO = zero 
  • trunk/SRC/ReadWrite/readoldopadistcoast.pro

    • Property svn:executable deleted
    • Property svn:keywords set to Id
    r121 r130  
    44;+ 
    55; @file_comments 
    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 
     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 
    99; 
    1010; @categories for OPA before NetCDF 
    11 ; 
    1211; 
    1312; @returns  a structure that contains two elements: tdistcoast (the 
     
    1716; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    1817;                      June, 2002 
     18; @version $Id$ 
    1919;- 
    2020;------------------------------------------------------------ 
     
    3636; @param jpiglo {in}{required} 
    3737; @param jpjglo {in}{required} 
    38 ; @param jpk {in}{required}  
     38; @param jpk {in}{required} 
    3939; dimensions of the opa grid 
    4040; 
     
    8181      return, -1 
    8282   endif 
    83 ; first record: six 64-bit integer to read.  
     83; first record: six 64-bit integer to read. 
    8484; default definition 
    8585   iimlu = long64(999) 
     
    8989   readu, numcost, iimlu, ijmlu, ikmlu 
    9090   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) 
    9292      return, -1 
    9393   endif 
    9494   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) 
    9696      return, -1 
    9797   endif 
    9898   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) 
    100100      return, -1 
    101101   endif 
  • trunk/SRC/ReadWrite/readoldoparestart.pro

    • Property svn:executable deleted
    • Property svn:keywords set to Id
    r121 r130  
    1010; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    1111;                      June 2002 
     12; @version $Id$ 
    1213;- 
    1314;------------------------------------------------------------ 
     
    2122; 
    2223   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) 
    2425   return, a[0] 
    2526end 
     
    3839 
    3940;+ 
    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; 
    4345; @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; 
    4550; @param jpiglo {in}{required} 
    4651; @param jpjglo {in}{required} 
    4752; @param jpk {in}{required} 
    4853; dimensions of the opa grid 
     54; 
    4955; @keyword IBLOC {default=4096L} ibloc size 
    5056; @keyword JPBYT {default=8L} jpbyt size 
     
    7076; @keyword BSFD 
    7177; @keyword EN 
    72 ; the variable we want to read.  
     78; the variable we want to read. 
    7379; 
    7480; @returns according to the given keywords. 
     
    7783; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    7884;                      June 2002 
     85; @version $Id$ 
    7986;- 
    8087 
     
    111118      return 
    112119   endif 
    113 ; first record: six 64-bit integer to read.  
     120; first record: six 64-bit integer to read. 
    114121; default definition 
    115122   ino1 = long64(9999) 
     
    190197 
    191198;CDIR$ LIST 
    192 ;      SUBROUTINE dtrlec  
    193 ;CCC---------------------------------------------------------------------  
     199;      SUBROUTINE dtrlec 
     200;CCC--------------------------------------------------------------------- 
    194201;CCC 
    195202;CCC                       ROUTINE dtrlec 
     
    206213;CC      after control with the present run, we read : 
    207214;CC      - prognostic variables on the second record 
    208 ;CC      - elliptic solver arrays  
     215;CC      - elliptic solver arrays 
    209216;CC     - barotropic stream function arrays (default option) 
    210217;CC       or free surface arrays ("key_freesurf_cstvol" defined) 
    211218;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. 
    214221;CC 
    215222;CC   Input : 
     
    225232;CC            /comnow/          : present fields (now) 
    226233;CC            /combsf/          : barotropic stream function 
    227 ;CC            /comspg/          : surface pressure  
     234;CC            /comspg/          : surface pressure 
    228235;CC            /comsol/          : diagonal preconditioned conjugate 
    229236;CC 
     
    273280;#endif 
    274281;C FETI method 
    275 ;      IF (nsolv .EQ. 3) THEN  
     282;      IF (nsolv .EQ. 3) THEN 
    276283;          isor0=2 
    277284;          ipcg0=2 
    278 ;      ENDIF  
     285;      ENDIF 
    279286;C 
    280287;      IF(lwp) THEN 
     
    283290;          WRITE(numout,*) ' ' 
    284291;          WRITE(numout,*) ' the present run :' 
    285 ;          WRITE(numout,*) '   job number : ', no  
     292;          WRITE(numout,*) '   job number : ', no 
    286293;          WRITE(numout,*) '   with nit000 : ', nit000 
    287294;          WRITE(numout,*) '   with pcg option ipcg0 : ', ipcg0 
  • trunk/SRC/ReadWrite/scanctl.pro

    • Property svn:executable deleted
    • Property svn:keywords set to Id
    r121 r130  
    11;+ 
    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$ 
    710;- 
    811PRO 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  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; @file_comments scan an Oasis file (version < 2.5) 
     5; @file_comments 
     6; scan an Oasis file (version < 2.5) 
    67; 
    78; @categories know what is inside 
     
    1213; 
    1314; @examples 
    14 ;  IDL> scanoasis,'grids_orca_t106' 
     15; IDL> scanoasis,'grids_orca_t106' 
    1516; 
    1617; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    17 ;                      July 01, 2002 
     18;                            July 01, 2002 
     19; @version $Id$ 
    1820;- 
    1921;------------------------------------------------------------ 
  • trunk/SRC/ReadWrite/write_oasis.pro

    • Property svn:executable deleted
    • Property svn:keywords set to Id
    r121 r130  
    44;+ 
    55; 
    6 ; @file_comments write an Oasis file (version < 2.5) 
     6; @file_comments 
     7; write an Oasis file (version < 2.5) 
    78; 
    89; @param filename {in}{required} the filename 
     
    1011; @param z2d {in}{required} the variable (2D array) to be written 
    1112; 
    12 ; @keyword /I2 
    13 ; @keyword /I4 
    14 ; @keyword /I8 
    15 ; @keyword /R4 
     13; @keyword I2 
     14; @keyword I4 
     15; @keyword I8 
     16; @keyword R4 
    1617; to change the default format (R8) of the data to be written. 
    1718; 
    18 ; @keyword /APPEND to open the file with the file pointer at the end of 
     19; @keyword APPEND to open the file with the file pointer at the end of 
    1920;        the file, ready for data to be appended. 
    2021; 
     
    2526; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    2627;                      July 01, 2002 
     28; @version $Id$ 
    2729;- 
    2830;------------------------------------------------------------ 
  • trunk/SRC/ReadWrite/writebat.pro

    • Property svn:executable deleted
    • Property svn:keywords set to Id
    r114 r130  
    44;+ 
    55; 
    6 ; @file_comments write the bathymetry ASCII file of OPA 
     6; @file_comments 
     7; write the bathymetry ASCII file of OPA 
    78; 
    89; @categories for OPA 
    910; 
    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, 
    1213; 
    1314; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    1415;                      Sept 30, 2003 
    1516;    based on batsav2.pro, written by Maurice Imbard, March 17, 1998 
     17; 
     18; @version $Id$ 
    1619;- 
    1720PRO writebat, zbat, filename 
Note: See TracChangeset for help on using the changeset viewer.