Index: /trunk/divfred.pro
===================================================================
--- /trunk/divfred.pro	(revision 11)
+++ /trunk/divfred.pro	(revision 12)
@@ -44,7 +44,7 @@
 ; EXAMPLE:
 ;
-; MODIFICATION HISTORY:Guillaume Roullet (grlod@ipsl.jussieu.fr)
+; MODIFICATION HISTORY:Guillaume Roullet (grlod\@ipsl.jussieu.fr)
 ;                      Creation : printemps 1998
-;                      Sebastien Masson (smasson@lodyc.jussieu.fr)
+;                      Sebastien Masson (smasson\@lodyc.jussieu.fr)
 ;                      adaptation pour marcher avec un domaine reduit
 ;                      12/1/2000
Index: /trunk/grad.pro
===================================================================
--- /trunk/grad.pro	(revision 11)
+++ /trunk/grad.pro	(revision 12)
@@ -25,5 +25,5 @@
 ; EXAMPLE:
 ;
-; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr)
+; MODIFICATION HISTORY:Sebastien Masson (smasson\@lodyc.jussieu.fr)
 ;
 ;-
Index: /trunk/rseries_ncdf.pro
===================================================================
--- /trunk/rseries_ncdf.pro	(revision 11)
+++ /trunk/rseries_ncdf.pro	(revision 12)
@@ -1,93 +1,109 @@
-;------------------------------------------------------------
-;------------------------------------------------------------
 ;------------------------------------------------------------
 ;+
-; NAME: rseries_ncdf
-;
-; PURPOSE: reading timeseries writing on many files.
-;
-; CATEGORY: upper read_ncdf
-;
-; CALLING SEQUENCE: res = rseries_ncdf(var, date1, date2[, exp[, freq]])
-;
-; INPUTS:
-;        var: a scalar string; the name of the variable to be read
-;
-;        date1: a saclar giving the first date of the time
-;        series. Date format is ymmdd, yymmdd, yyymmdd, yyyymmdd,
-;        yyyyymmdd, yyyyyymmdd.
-;
-;        date2: same as date2
-;
-;        exp: a scalar string; the name of the experiment. If exp is
-;        undefined, exp = varexp.
-;
-;
-;        freq: a scalar string; the averaging frequency. if freq is
-;        undefined, freq = '5d'
-;
-; KEYWORD PARAMETERS:
-;
-;        CENTURY: and interger giving the true century of the
-;        calendar. for example if filename is
-;        AA5_5d_920101_921231* and the calendar variable in the file
-;        is 19920101 to 19921231 then CENTURY=19
-;
-;        /NOSTRUCT: Set this keyword to return an array instead of a
-;        structure.
-;
-;       NDAYSPM: developpe par eric, ca veut dire: nombre de jours par mois!
-;                par defaut c''est 30, sinon le specifier en donnant
-;                une valeur a ndayspm
-;                pour passer a un calendrier avec un nombre de jours constant par
-;                mois. Utilise en particulier ds julday et caldat
-;
-; OUTPUTS:
-;
-;        a structure: with the folowing Structure Tags:
-;                     arr:the array output
-;                     grid: the array grid
-;                     units: the array units
-;                     experiment: the name of the experiment
-;                     name: the name of the variable
-;
-; COMMON BLOCKS:common.pro
-;
-; SIDE EFFECTS:
-;
-;        Update the time and jpt common variables. Time is the
-;        calendar in IDL julian days.
-;
-;
-; RESTRICTIONS:
-;
-;        1) The file must contain an unlimited dimension, and the
-;        variable to be read must contain this unlimited dimension.
-;        2) The file must contain a one dimension variable which
-;        dimension is the unlimited dimension. This variable is the
-;        calendar.
-;        3) This variable calendar must have an attribut called "units"
-;        which must have a format similar to
-;                    "seconds since 0001-01-01 00:00:00"
-;                    "hours since 0001-01-01 00:00:00"
-;                    "days since 1979-01-01 00:00:00"
-;                    "months since 1979-01-01 00:00:00"
-;                    "years since 1979-01-01 00:00:00"
-;        4) The calendar must be the Gregorian calendar
-;        5) The name of the file must begining by
-;           exp_freq_datefirst_datelast_*
-;        6) The maximum gap between 2 consecutive files must be one
-;        day.
-;
-;
-; EXAMPLE:res = rseries_ncdf('sozotaux',920501,930410,'AA5','5d')
-;
-; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr)
-;                      Apr 23 2001
+; @file_comments
+; reading timeseries writing on many files
+;
+; @categories
+; Reading
+;
+; @param var {in} {type=string}
+; the name of the variable to be read
+;
+; @param date1 {in} {type=scalar}
+; give the first date of the time series.
+; Date format is ymmdd, yymmdd, yyymmdd, yyyymmdd, yyyyymmdd, yyyyyymmdd.
+;
+; @param date2  {in} {type=scalar}
+; give the last date of the time series.
+; Date format is ymmdd, yymmdd, yyymmdd, yyyymmdd, yyyyymmdd, yyyyyymmdd.
+;
+; @param expin {in} {type=string} {default=varexp}
+; the name of the experiment.
+;
+; @param freqin {in} {type=string} {default='5d'}
+; the averaging frequency.
+;
+; @keyword CENTURY {type=integer}
+; give the true century of the calendar.
+; for example if filename is AA5_5d_920101_921231* and the calendar variable
+; in the file is 19920101 to 19921231 then CENTURY=19
+;
+; @keyword NOSTRUCT {default=1}
+; Set this keyword to return an array instead of a structure.
+;
+; @keyword GRIDTYPE {type=string}
+; name of the grid to be read 'grid_T' ++'gridT'
+;
+; @keyword _EXTRA
+; Used to pass read_ncdf keywords
+;
+; @returns
+; a structure with the following Structure Tags:
+;  arr:the array output
+;  grid: the array grid
+;  units: the array units
+;  experiment: the name of the experiment
+;  name: the name of the variable
+;
+; @uses
+; common.pro
+;
+; @restrictions
+; Update the time and jpt common variables.
+; Time is the calendar in IDL julian days.
+; 1) The file must contain an unlimited dimension, and the
+; variable to be read must contain this unlimited dimension.
+; 2) The file must contain a one dimension variable which
+; dimension is the unlimited dimension. This variable is the
+; calendar.
+; 3) This variable calendar must have an attribut called "units"
+; which must have a format similar to
+; "seconds since 0001-01-01 00:00:00"
+; "hours since 0001-01-01 00:00:00"
+; "days since 1979-01-01 00:00:00"
+; "months since 1979-01-01 00:00:00"
+; "years since 1979-01-01 00:00:00"
+; 4) The calendar must be the Gregorian calendar
+; 5) The name of the file must begining by
+; exp_freq_datefirst_datelast_*
+; 6) The maximum gap between 2 consecutive files must be one day.
+;
+; @examples
+; IDL> res = rseries_ncdf('sozotaux',920501,930410,'AA5','5d')
+;
+; for ORCA2 outputs
+; IDL> iodir='/usr/work/sur/fvi/OPA/ORCA2/'
+; IDL> res= rseries_ncdf('votemper',010101,061231,'ESS','5d')
+; IDL> help,res,/structure
+;
+;** Structure <310ebc0>, 5 tags, length=1800, data length=1800, refs=1:
+;   ARR             FLOAT     Array[1, 1, 1, 438]
+;   GRID            STRING    'T'
+;   UNITS           STRING    'C'
+;   EXPERIMENT      STRING    'ESS_5d_060101_061231_grid_T.nc'
+;   NAME            STRING    'votemper'
+;
+; @history
+; Sebastien Masson (smasson\@lodyc.jussieu.fr) Apr 23 2001
+;
+; @todo
+; adaptation to Drakkar terminologie
+; ORCA2 terminology of output files
+; <i>experience</i>_5d_<i>yymmdd</i>_<i>yymmdd</i>_<i>grid</i>.nc
+; with experience in 'ESS'
+; with grid in 'grid_T'
+;
+; ORCA025 terminology of output files
+; /u/rech/cli/rcli002/ORCA025/ORCA025-<i>experience_drakkar<i>-S/<i>year_drakkar</i>/ORCA025-<i>experience_drakkar</i>-y<i>year_drakkar</i>n<i>mois</i>d<i>jour</i>_<i>grid</i>.nc
+; with experience_drakkar in 'G70',
+; with grid in 'gridT'
+;
+; @version
+; $Id$
 ;-
 ;------------------------------------------------------------
 ;------------------------------------------------------------
 ;------------------------------------------------------------
-FUNCTION rseries_ncdf, var, date1, date2, expin, freqin, CENTURY = century, NOSTRUCT = nostruct, GRIDTYPE = gridtype, _extra = ex
+FUNCTION rseries_ncdf, var, date1, date2, expin, freqin, CENTURY = century, NOSTRUCT = nostruct, GRIDTYPE = gridtype, _EXTRA = ex
 @common
 ; name of the file: exp_freq_datefirst_datelast_*
@@ -118,5 +134,5 @@
   datefirst = lonarr(npos)
   datelast = lonarr(npos)
-  sepshift = n_elements(str_sep(exp, sep))-1 
+  sepshift = n_elements(str_sep(exp, sep))-1
   for i = 0, npos-1 do BEGIN
     separate = str_sep(possiblenames[i], sep)
@@ -130,5 +146,5 @@
     'y':div = 10000
     ELSE:div = 1
-  ENDCASE    
+  ENDCASE
   goodfile = where(datefirst le date1/div and datelast GE date1/div)
   if goodfile[0] EQ -1 then return, report('filename :'+iodir+exp+sep+freq+'*'+gridtype+'.nc'+' not found with the dates containing '+strtrim(date1, 1))
@@ -230,5 +246,5 @@
     'y':div = 10000*datelast+360+(5+leapyr(datelast+century))*(key_caltype EQ 'greg')
     ELSE:div = 1
-  ENDCASE    
+  ENDCASE
   if date2 GT datelast THEN BEGIN
 ; if we need to read more than one file,
@@ -270,5 +286,5 @@
       ENDELSE
     ENDCASE
-  endif ELSE BEGIN 
+  endif ELSE BEGIN
     res = read_ncdf(var, date1+century*1000000L, date2+century*1000000L $
                     , filename = filename, /nostruct, _extra = ex)
