Index: /trunk/adm/website/Readme.rst
===================================================================
--- /trunk/adm/website/Readme.rst	(revision 201)
+++ /trunk/adm/website/Readme.rst	(revision 202)
@@ -8,5 +8,5 @@
 -----------------------------
 
-The TropFlux project aims at providing daily, timely, accurate air-sea heat and momentum flux data for the entire 30°N-30°S region.  Wind stresses and the four components of net surface heat flux are currently available for the entire 1979 to July 2012 period. We are currently working on a regular (~monthly) update of the TropFlux product until 3-4 months behind realtime, which should be available in 2013.
+The TropFlux project aims at providing daily, timely, accurate air-sea heat and momentum flux data for the entire 30°N-30°S region.  Wind stresses and the four components of net surface heat flux are currently available for the entire 1979 to March 2013 period. We are currently working on a regular (~monthly) update of the TropFlux product until 3-4 months behind realtime.
 
 TropFlux is largely derived from a combination of ERA-I re-analysis data for turbulent and longwave fluxes, and ISCCP surface radiation data for shortwave flux. All input products are bias- and amplitude-corrected on the basis of Global Tropical Moored Buoy Array data, before surface net heat flux and wind stresses are computed using the COARE v3 bulk algorithm. A precise description of the flux computation procedure, as well as a detailed evaluation against other timely, daily air-sea heat flux alternatives (OAFLUX, NCEP, NCEP2, ERA-I) is provided in Praveen Kumar et al. 2012. The wind stress product is described, evaluated and compared against other widely used products (QuikSCAT, NCEP, NCEP2, ERA-I) in Praveen Kumar et al. 2013
@@ -15,5 +15,5 @@
 
  - better variability and less biases than re-analysis fluxes (and equivalent or slightly better than the best performing products: OAFLUX for heat fluxes and ERA-I for wind stresses) ,
- - available until July 2012, and soon updated every month, lagging realtime by ~3 months,
+ - available until March 2013, and soon updated every month, lagging realtime by ~3 months,
  - a simple estimate of surface shortwave radiation is provided from OLR data, as a near-realtime alternative to the more accurate but irregularly updated ISCCP data.
 
Index: /trunk/adm/website/_templates/layout.html
===================================================================
--- /trunk/adm/website/_templates/layout.html	(revision 201)
+++ /trunk/adm/website/_templates/layout.html	(revision 202)
@@ -36,5 +36,5 @@
 <a href="http://www.ipsl.fr"><img src="{{pathto("_static/sponso_simon.jpg", 1) }}" border="0" alt="IPSL logo"/></a>
 </p>
-<p style="color:red; font-weight: bold; font-size: 1.5em; padding: 2"> New: data updated until July 2012 included</p>
+<p style="color:red; font-weight: bold; font-size: 1.5em; padding: 2"> New: data updated until March 2013 included</p>
 </div>
 {{ super() }}
Index: /trunk/adm/website/data/changes.rst
===================================================================
--- /trunk/adm/website/data/changes.rst	(revision 201)
+++ /trunk/adm/website/data/changes.rst	(revision 202)
@@ -23,5 +23,8 @@
 .. $URL$
 ..
-.. 
+.. - fplod 20130725T150201Z cratos.locean-ipsl.upmc.fr (Linux)
+..
+..   * introducting update until March 2013 included
+..
 .. - fplod 20130725T131036Z cratos.locean-ipsl.upmc.fr (Linux)
 ..
@@ -30,5 +33,5 @@
 .. - fplod 20121221T174433Z cratos.locean-ipsl.upmc.fr (Linux)
 ..
-..   * introducting update until july 2012 included
+..   * introducting update until July 2012 included
 ..
 .. - fplod 20120229
@@ -86,4 +89,11 @@
 ++++++++++++++
 
+.. _20130725:
+
+20130725
+~~~~~~~~
+
+Data updated until March 2013 included
+
 .. _20121227:
 
@@ -94,5 +104,4 @@
 
 .. _20120209:
-
 
 20120209
Index: /trunk/adm/website/data_access.rst
===================================================================
--- /trunk/adm/website/data_access.rst	(revision 201)
+++ /trunk/adm/website/data_access.rst	(revision 202)
@@ -21,4 +21,8 @@
 ..
 .. $URL$
+..
+.. - fplod 20130726T175139Z cratos.locean-ipsl.upmc.fr (Linux)
+..
+..   * introducting update until March 2013 included
 ..
 .. - fplod 20130725T131417Z cratos.locean-ipsl.upmc.fr (Linux)
@@ -89,5 +93,5 @@
 
 See in :ref:`data_out_user` for access surface heat and momentum flux 
-data over the January 1979 to July 2012 period.
+data over the January 1979 to March 2013 period.
 
 See in :ref:`changes` for information about changes with respect to the 
Index: /trunk/adm/website/overview.rst
===================================================================
--- /trunk/adm/website/overview.rst	(revision 201)
+++ /trunk/adm/website/overview.rst	(revision 202)
@@ -73,8 +73,7 @@
 
 Wind stresses and the four components of net surface heat flux are currently
-available for the entire 1979 to July 2012 period.
+available for the entire 1979 to March 2013 period.
 We are currently working on a regular (~monthly) update of the
-TropFlux product until 3-4 months behind realtime, which should be
-available in 2013.
+TropFlux product until 3-4 months behind realtime.
 
 TropFlux is largely derived from a combination of
@@ -102,5 +101,5 @@
    |erai|_ 
    for wind stresses) ,
- - available until July 2012, and soon updated every month, lagging
+ - available until March 2013, and soon updated every month, lagging
    realtime by ~3 months,
  - a simple estimate of surface shortwave radiation is provided from OLR
Index: /trunk/docs/docs_dev/source/guides/updatedata/updatedata_20130725.rst
===================================================================
--- /trunk/docs/docs_dev/source/guides/updatedata/updatedata_20130725.rst	(revision 201)
+++ /trunk/docs/docs_dev/source/guides/updatedata/updatedata_20130725.rst	(revision 202)
@@ -41,5 +41,10 @@
 Only time coverage extension from July 2012 to March 2013
 
-:file:`${PROJECT}/website/data/changes.rst` and :file:`${PROJECT}/adm/website/Readme.rst` are updated. 
+Following files are updated :
+:file:`${PROJECT}/adm/website/data/changes.rst`
+:file:`${PROJECT}/adm/website/data_access.rst`
+:file:`${PROJECT}/adm/website/overview.rst`
+:file:`${PROJECT}/adm/website/Readme.rst` 
+:file:`${PROJECT}/adm/website/_templates/layout.html`
 
 .. _saveold:
@@ -74,4 +79,7 @@
 
 Is there enought space ?
+
+::
+
    $ du -sh ${newdir}/daily
    12G     /net/adonis/usr/adonis/varclim/tropflux_v2/daily
@@ -84,4 +92,6 @@
 20GB vs 12.4 GB = yes
 
+then, copy ::
+
    $ cp ${PROJECT}/adm/website/Readme.rst /usr/lodyc/incas/fplod/tropflux_d/to_be_published/Readme.rst
    $ cp -r ${newdir}/daily /usr/lodyc/incas/fplod/tropflux_d/to_be_published
@@ -95,53 +105,11 @@
 A set of tools must be run to compare obsolete and new versions
 
-TDB
-
-.. parsed-literal::
-
-   $ ++compare.sh -o obsolete_${datemodif} -n /usr/lodyc/incas/fplod/tropflux_d/to_be_published
-
-   mkdir -p /usr/work/incas/fplod/tropflux_d//compare_update/
-   varlist="lhf lwr netflux q2m shf swr t2m tau taux tauy ws"
-   period_list="daily monthly"
-   lastyear=2012
-   for var in $varlist
-   do
-      for period in ${period_list}
-      do 
-         if [ "${period}" == "daily" ]
-         then 
-            suffix=1d
-         else
-            suffix=1m
-         fi
-         newfile=/usr/lodyc/incas/fplod/tropflux_d/to_be_published/${period}/${var}_tropflux_${suffix}_1979_march2013.nc
-         newfile_oldtimecoverage=${PROJECT_ID}/compare_update/${var}_tropflux_${suffix}_1979_${lastdate}.nc
-         # extract old time coverage in the new file
-         nt=$(ncdump -h $oldfile | grep "time = UNLIMITED ;" | sed -e "s@\(time = UNLIMITED ; // (\)\(.*\)\( currently)\)@\2@")
-         slabtime=$(printf "time,0,%d" $((${nt} -1 )))
-         ncks -d ${slabtime} -O -o ${newfile_oldtimecoverage} ${newfile}
-         oldfile=/usr/lodyc/incas/fplod/tropflux_d/obsolete_${datemodif}/${period}/${var}_tropflux_${suffix}_1979_${lastyear}.nc
-         oldfiledump=${PROJECT_ID}/compare_update/${var}_tropflux_${suffix}_1979_${lastyear}.nc_ncdump
-         cdo diff  ${newfile_oldtimecoverage} ${oldfile}
-         read a
-         # we must see "0 of $nt records differ"
-         ncdump -h ${newfile_oldtimecoverage} > ${newfile_oldtimecoverage}_ncdump
-         ncdump -h ${oldfile} > ${oldfiledump}
-         diff ${newfile_oldtimecoverage}_ncdump ${oldfiledump}
-         # we must see a difference in creation date and coverage
-         read a
-         rm ${newfile_oldtimecoverage}_ncdump
-         rm ${oldfiledump}
-         unset suffix
-      done
-      unset period
-      unset period_list
-   done
-   unset var
-   unset varlist
-   rm -rf /usr/work/incas/fplod/tropflux_d//compare_update/
+
+see draft tool :ref:`compare.sh`
+
+::
 
    log=${PROJECT_LOG}/compare.log
-   script ${PROJECT_LOG}/compare.log
+   script ${log}
    compare.sh
    exit
@@ -154,5 +122,5 @@
 
    grep "records differ" ${log}
-  
+
 If only "0 of" begin all lines, its ok. Otherwise look inside the log file to
 locate troubles.
@@ -160,20 +128,46 @@
 Second, check for differences on global attributes
 
+On creation_date
+
 ::
 
    grep "^>" ${log} | grep creation_date
 
-If nothing appears, you must modified this attributes. see :ref:`change_creation_date.sh` ++
-
+If nothing appears, you must modified this attributes. see :ref:`change_creation_date.sh`.
+
+It is what happened in this 20130725 data update, so:
+
+::
+
+   change_creation_date.sh -d /usr/lodyc/incas/fplod/tropflux_d/to_be_published/ -c 20130725
+   tlogd.sh change_creation_date
+
+
+On time_range
+::
 
    grep "^>" ${log} | grep time_range
 
-If nothing appears, you must modified this attributes. see :ref:`change_timerange.sh` ++
-
-Clean log file::
+If nothing appears, you must modified this attributes. see :ref:`change_time_range.sh`
+
+It is what happened in this 20130725 data update, so::
+
+   change_time_range.sh -d /usr/lodyc/incas/fplod/tropflux_d/to_be_published/ -b 19790101 -e 20130331
+   tlogd.sh change_time_range
+
+Clean comparison log file::
 
    rm ${log}
 
-If modifications has been made, re-run comparaison before next step
+Correct terminology if still necessary:
+
+::
+
+  correct_terminology.sh -d /usr/lodyc/incas/fplod/tropflux_d/to_be_published/ -good "1979_2013" -bad "1979_march2013"
+  tlogd.sh correct_terminology
+
+If modifications has been made, re-run comparison (go back to
+:ref:`compareversion_20130725`)
+before next step
 
 Once comparison is done and PI happy,
@@ -202,10 +196,16 @@
 To avoid confusion, old version has to be removed from the website:
 
-.. parsed-literal::
-
-   fplod@sonmac$ ftp www.locean-ipsl.upmc.fr
-   ftp> cd |project_id|/data/
-   ftp> mdelete daily/*
-   ftp> mdelete monthly/*
+.. warning::
+
+   This sequence do not work  on cratos because no ftp command on this plateform.
+   It has been launched on cerbere.locean-ipsl.upmmc.fr
+
+.. parsed-literal::
+
+   ftp www.locean-ipsl.upmc.fr
+   cd |project_id|/data/
+   mdelete daily/*
+   mdelete monthly/*
+   bye
 
 .. _installdata_20130725:
@@ -216,39 +216,41 @@
 L'installation se fait ainsi:
 
-.. parsed-literal::
-
-   fplod@sonmac$ cd /Volumes/Lcerbere/tropflux_d/
-   fplod@sonmac$ ftp www.locean-ipsl.upmc.fr
-   ftp> cd |project_id|/data/
-   ftp> put Readme.rst
-   ftp> cd daily
-   ftp> lcd daily
-   ftp> mput \*.nc
-   ftp> put ../Readme.rst
-   ftp> cd ../monthly
-   ftp> lcd ../monthly
-   ftp> put ../Readme.rst
-   ftp> mput \*.nc
-
-
-.. note::
-
-   :file:`/Volumes/Lcerbere/tropflux_d/` is equivalent to file:`/usr/lodyc/incas/fplod/tropflux_d/` thanks to sshfs command.
-
-   .. parsed-literal::
-
-      $ diskext="/Volumes/LCerbere"
-      $ mkdir ${diskext}
-      $ sshfs fplod@cerbere:/usr/lodyc/incas/fplod ${diskext} -odefer_permissions -o sshfs_debug
-
-
- et template pour NEW
-
-et build doc et install doc
-
-(see also :ref:`builddoc` to synchronize dataset and documentation).
-
-
-et svn commit ppur ce fichier et tous ceux mentionnes ici
+.. warning::
+
+   This sequence do not work  on cratos because no ftp command on this plateform.
+   It has been launched on cerbere.locean-ipsl.upmmc.fr
+
+.. parsed-literal::
+
+   cd /usr/lodyc/incas/fplod/tropflux_d/
+   ftp www.locean-ipsl.upmc.fr
+   cd |project_id|/data/
+   put Readme.rst
+   cd daily
+   lcd daily
+   mput \*.nc
+   put ../Readme.rst
+   cd ../monthly
+   lcd ../monthly
+   put ../Readme.rst
+   mput \*.nc
+   bye
+
+
+Update news of website
+----------------------
+
+
+Files in :file:`${PROJECT}/adm/website/` have been modified to tell the new time coverage so 
+see also :ref:`builddoc` to synchronize dataset and documentation
+
+Update svn repository
+---------------------
+
+svn commit pour tous les fichiers modifiés lors de cette mise à jour
+
+Cleanning
+---------
+
 rm /usr/lodyc/incas/fplod/tropflux_d/to_be_published/
 
Index: /trunk/src/change_creation_date.sh
===================================================================
--- /trunk/src/change_creation_date.sh	(revision 201)
+++ /trunk/src/change_creation_date.sh	(revision 202)
@@ -33,5 +33,5 @@
 #    base location of the dataset to be changed
 #
-# Modify creation_date global attribute if the dataset based under dirin parameter
+# Modify creation_date global attribute in the dataset based under dirin parameter
 #
 # Log file is written on :file:`${PROJECT_LOG}/change_creation_date.sh.log.{YYYYMMDDTHHMMSSZ}`
@@ -83,5 +83,5 @@
 # debug not used
 #
-# terminology march2013 non normative
+# terminology 1979_2013 hard coded
 #
 # EVOLUTIONS
@@ -246,5 +246,5 @@
             suffix=1m
          fi
-         filein=${dirin}/${period}/${var}_tropflux_${suffix}_1979_march2013.nc
+         filein=${dirin}/${period}/${var}_tropflux_${suffix}_1979_2013.nc
          if [ ! -f ${filein} ]
          then
Index: /trunk/src/change_time_range.sh
===================================================================
--- /trunk/src/change_time_range.sh	(revision 201)
+++ /trunk/src/change_time_range.sh	(revision 202)
@@ -37,5 +37,5 @@
 #    base location of the dataset to be changed
 #
-# Modify time_range global attribute if the dataset based under dirin parameter
+# Modify time_range global attribute in the dataset based under dirin parameter
 #
 # Log file is written on :file:`${PROJECT_LOG}/change_time_range.sh.log.{YYYYMMDDTHHMMSSZ}`
@@ -87,5 +87,5 @@
 # debug not used
 #
-# terminology march2013 non normative
+# terminology 1979_2013 hardcoded
 #
 # build time period according to time in the file instead of parameter
@@ -257,5 +257,5 @@
             suffix=1m
          fi
-         filein=${dirin}/${period}/${var}_tropflux_${suffix}_1979_march2013.nc
+         filein=${dirin}/${period}/${var}_tropflux_${suffix}_1979_2013.nc
          if [ ! -f ${filein} ]
          then
Index: /trunk/src/correct_terminology.sh
===================================================================
--- /trunk/src/correct_terminology.sh	(revision 202)
+++ /trunk/src/correct_terminology.sh	(revision 202)
@@ -0,0 +1,281 @@
+#! /bin/sh
+#
+#+
+#
+# .. program:: correct_terminology.sh
+#
+# .. _correct_terminology.sh:
+#
+# =======================
+# correct_terminology.sh
+# =======================
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ correct_terminology.sh [--debug] -good goodend -bad badend -d directory
+#
+# DESCRIPTION
+# ===========
+#
+# .. option:: --debug
+#
+#    If this option is set, :samp:`ncdump -v tt` will be added to log file
+#
+# .. option:: -good goodend
+#
+#    good end part of the name
+#
+# .. option:: -bad badend
+#
+#    bad end part of the name
+#
+# .. option:: -d <dirin>
+#
+#    base location of the dataset to be changed
+#
+# Modify filenames in the dataset based under dirin parameter
+#
+# Log file is written on :file:`${PROJECT_LOG}/correct_terminology.sh.log.{YYYYMMDDTHHMMSSZ}`
+#
+#     .. graphviz::
+#
+#        digraph correct_terminology {
+#
+#           correct_terminology [shape=box,
+#           fontname=Courier,
+#           color=blue,
+#           URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/correct_terminology.sh",
+#           label="${PROJECT}/src/correct_terminology.sh"];
+#
+#           {filein} -> {correct_terminology} -> {fileout}
+#
+#       }
+#
+# EXAMPLES
+# ========
+#
+# To modify files under /usr/lodyc/incas/fplod/tropflux_d/to_be_published/ because files are not named
+# :file:`var_tropflux_1d_${yyyy}_{yyyy}.nc` but :file:`var_tropflux_1d_{yyyy}_{month}{yyyy}.nc`::
+#
+#  $ correct_terminology.sh -d /usr/lodyc/incas/fplod/tropflux_d/to_be_published/ -good "1979_2013" -bad "1979_march2013"
+#
+# And look at log file with ::
+#
+#  $ tlogd.sh correct_terminology
+#
+# SEE ALSO
+# ========
+#
+# :ref:`updatedata`
+#
+# :ref:`project_profile.sh`
+#
+# TODO
+# ====
+#
+# coding rules
+#
+# overwrite : may be an other option to avoid scratch
+#
+# debug not used
+#
+# build file name according to time in the file instead of parameter
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+# $URL$
+#
+# - fplod 20130726T112836Z cratos.locean-ipsl.upmc.fr (Linux)
+#
+#   * creation
+#
+#-
+system=$(uname)
+case "${system}" in
+   AIX|IRIX64)
+      echo "www : no specific posix checking"
+      date_cmd=date
+   ;;
+   Darwin)
+      set -o posix
+      date_cmd=gdate
+   ;;
+   Linux)
+      set -o posix
+      date_cmd=date
+   ;;
+   *)
+     set -o posix
+   ;;
+esac
+unset system
+#
+LANG=POSIX
+#
+set -u
+#
+command=$(basename ${0})
+log_date=$(date -u +"%Y%m%dT%H%M%SZ")
+#
+usage=" Usage : ${command} [--debug] -d dirin -good yyyymmdd_yyyymmdd -bad anything"
+#
+hostname=$(hostname)
+#
+# default
+debug=0
+#
+minargcount=0
+if [ ${#} -lt ${minargcount} ]
+then
+   echo "${command} : eee : not enought arguments"
+   echo "${usage}"
+   exit 1
+fi
+#
+while [ ${#} -gt 0 ]
+do
+   case ${1} in
+      -good)
+         goodend=${2}
+         shift
+      ;;
+      -bad)
+         badend=${2}
+         shift
+      ;;
+      -d)
+         dirin=${2}
+         shift
+      ;;
+      --debug)
+         debug=1
+      ;;
+      *)
+        # anything else
+        echo "${command} : eee : unknown option ${1}"
+        echo "${command} : eee : ${usage}"
+        exit 1
+      ;;
+   esac
+   # next flag
+   shift
+done
+#
+# check parameters
+if [ ! -d ${dirin} ]
+then
+   echo " eee : ${dirin} not found"
+   exit 1
+fi
+#
+# check for permission on dirin
+if [ ! -x ${dirin} ]
+then
+   echo " eee : ${dirin} not reachable"
+   exit 1
+fi
+#++ check good validity
+#
+# check for ${PROJECT_LOG} definition
+if [ "${PROJECT_LOG}" = "" ]
+then
+   echo "${command} : ${LINENO} : eee : \${PROJECT_LOG} not defined"
+   exit 1
+fi
+#
+# check for ${PROJECT_LOG} existence
+if [ ! -d ${PROJECT_LOG} ]
+then
+   echo "${command} : eee : ${PROJECT_LOG} not found"
+   exit 1
+fi
+#
+# check for permission access on PROJECT_LOG
+if [ ! -x ${PROJECT_LOG} ]
+then
+   echo "${command} : eee : ${PROJECT_LOG} not reachable"
+   exit 1
+fi
+#
+# check for write permission on PROJECT_LOG
+if [ ! -w ${PROJECT_LOG} ]
+then
+   echo "${command} : eee : ${PROJECT_LOG} not writable"
+   exit 1
+fi
+#
+log=${PROJECT_LOG}/$(basename ${0} .sh).log.${log_date}
+echo "[Context]" 1>> ${log}
+echo "command=$(basename ${0})" 1>>${log}
+echo "hostname=${hostname}" 1>> ${log}
+echo "runtime=${log_date}" 1>> ${log}
+echo "log=${log}" 1>> ${log}
+unset log_date
+#
+echo "" 1>> ${log}
+echo "[Parameters]" 1>> ${log}
+echo "dirin=${dirin}" 1>> ${log}
+echo "good=${goodend}" 1>> ${log}
+echo "bad=${badend}" 1>> ${log}
+echo "" 1>> ${log}
+#
+# build list files
+varlist="lhf lwr netflux q2m shf sst swr t2m tau taux tauy ws"
+period_list="daily monthly"
+list_filein=""
+for var in $varlist
+do
+     for period in ${period_list}
+     do
+         if [ "${period}" == "daily" ]
+         then
+            suffix=1d
+         else
+            suffix=1m
+         fi
+         filein=${dirin}/${period}/${var}_tropflux_${suffix}_${badend}.nc
+         if [ ! -f ${filein} ]
+         then
+             echo " eee : ${filein} not found" 1>> ${log}
+             exit 1
+         else
+             list_filein=${list_filein}" ${filein}"
+         fi
+     done
+     unset period
+done
+unset period_list
+unset var
+unset varlist
+#
+# rename all files
+for filein in ${list_filein}
+do
+    echo "iii : rename ${filein}" >> ${log} 2>&1
+    bfileout=$(basename ${filein} ${badend}.nc)"${goodend}.nc"
+    fileout=$(dirname ${filein})/${bfileout}
+    unset bfileout
+    mv ${filein} ${fileout} >> ${log} 2>&1
+    status=${?}
+    if [ ${status} -ne 0 ]
+    then
+        echo "eee : pb with mv" >> ${log} 2>&1
+        ncdump -h ${filein} >> ${log} 2>&1
+        exit 1
+    fi
+    unset status
+    unset fileout
+done
+unset filein
+#
+# cleanning
+#++
+#++ set
+# end
+exit 0
