Index: trunk/src/d2m_to_q2m_erai.pro
===================================================================
--- trunk/src/d2m_to_q2m_erai.pro	(revision 165)
+++ trunk/src/d2m_to_q2m_erai.pro	(revision 166)
@@ -13,5 +13,5 @@
 ; ++
 ; has been produced by
-; :ref:`interp_erai_dewt_1989_2009.pro`.
+; :func:`interp_erai_dewt`.
 ;
 ; :file:`${PROJECT_OD}/erai_t2m_19890101_20091231_oafluxgrid.nc`
@@ -74,5 +74,5 @@
 ; :ref:`project_profile.sh`
 ;
-; :ref:`interp_erai_dewt_1989_2009.pro`
+; :func:`interp_erai_dewt`
 ; :func:`interp_erai_msl`
 ; :func:`interp_erai_t2m`
Index: trunk/src/interp_erai_dewt.pro
===================================================================
--- trunk/src/interp_erai_dewt.pro	(revision 166)
+++ trunk/src/interp_erai_dewt.pro	(revision 166)
@@ -0,0 +1,337 @@
+;+
+;
+; ====================
+; interp_erai_dewt.pro
+; ====================
+;
+; .. function:: interp_erai_dewt(yyyymmddb,yyyymmdde)
+;
+; DESCRIPTION
+; ===========
+;
+; Interpolation of d2 from ERA-I grid to OAFLUX grid
+;
+; :file:`${PROJECT_ID}/20c3m_erai_d2_TROP_1989_2009.nc`
+; containing
+; d2 from ERA-I
+; has been produced by
+; :ref:`compute_erai_daily_region_2d.sh`.
+;
+; :file:`${PROJECT_ID}/mask_oaflux_30N30S.nc`
+; containing OAFLUX grid
+; has been produced by
+; :func:`oaflux_mask_30n30s`.
+;
+; Interpolated d2
+; is written in
+; :file:`${PROJECT_OD}/erai_d2m_{yyyymmdd}_{yyyymmdd}_oafluxgrid.nc`
+; if this file not already exists.
+;
+; This output file
+; :file:`${PROJECT_OD}/erai_d2m_{yyyymmdd}_{yyyymmdd}_oafluxgrid.nc`
+; must be processed after by
+; :ref:`d2m_to_q2m_erai.pro`.
+;
+; .. only:: man
+;
+;    Figure is visible on PDF and HTML documents only.
+;
+; .. only:: html or latex
+;
+;     .. graphviz::
+;
+;        digraph interp_erai_dewt {
+;
+;           file_in [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/20c3m_erai_d2_TROP_1989_2009.nc"];
+;           mask [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/mask_oaflux_30N30S.nc"];
+;           file_out [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/erai_d2m_{yyyymmdd}_{yyyymmdd}_oafluxgrid.nc"];
+;
+;           interp_erai_dewt [shape=box,
+;           fontname=Courier,
+;           color=blue,
+;           URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/interp_erai_dewt.pro",
+;           label="${PROJECT}/src/interp_erai_dewt.pro"];
+;
+;           {file_in mask} -> {interp_erai_dewt} -> {file_out}
+;
+;        }
+;
+; SEE ALSO
+; ========
+;
+; :ref:`interpolate_data`
+;
+; Used by :ref:`tropflux.sh`
+;
+; :ref:`project_profile.sh`
+;
+; :func:`report <saxo:report>`
+; :func:`isadirectory <saxo:isadirectory>`
+; :func:`isafile <saxo:isafile>`
+; :func:`initncdf <saxo:initncdf>`
+; :func:`read_ncdf <saxo:read_ncdf>`
+; :func:`domdef <saxo:domdef>`
+; :func:`call_interp2d <saxo:call_interp2d>`
+; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>`
+;
+; :ref:`d2m_to_q2m_erai.pro`
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;  IDL> .compile file_interp
+;  IDL> yyyymmddb = 19890101
+;  IDL> yyyymmdde = 20091231
+;  IDL> result = interp_erai_dewt(yyyymmddb, yyymmdde)
+;  IDL> print, result
+;
+; TIPS
+; ====
+;
+; To see some values of variable ::
+;
+;   $ ncks -v d2m -d time,0,1 -d latitude,0,1 -d longitude,0,1 \
+;     $PROJECT_ID/erai_d2m_19890101_20091231_oafluxgrid.nc
+;
+; TODO
+; ====
+;
+; check OUTMASK_IND and SET_OUTMSKVAL added to call_interp2d call
+;
+; use real output of :ref:`compute_erai_daily_region_2d.sh`.
+;
+; why 19880101,20100930 as dates in read_ncdf.
+; now (20120319) should be yyyymmddb and yyymmdde
+;
+; check [yyyymmddb,yyyymmdde] validity
+;
+; check if [yyyymmddb,yyyymmdde] is included in ERA-I file
+;
+; what happen if yyyymmdde > 20091231 : need to read an other ERA-I file
+;
+; add an example with only one month (ie 200001)
+;
+; coding rules
+;
+; check time values
+;
+; KNOWN ISSUES
+; ============
+;
+; test of existence of fullfilename_msk not very efficient because
+; MUST_EXIST keyword of :func:`isafile <saxo:isafile>` not yet implemented
+;
+; EVOLUTIONS
+; ==========
+;
+; $Id$
+;
+; $URL: svn+ssh://pinsard@forge.ipsl.jussieu.fr/ipsl/forge/projets/tropflux/svn/trunk/src/interp_erai_dewt.pro $
+;
+; - fplod 20120319
+;
+;   * taking project_overwite into account
+;   * try to add compile_opt seems to be incompatible with ncdf_quickwrite
+;   * pro -> function
+;
+; - pinsard 2011-08-23T09:09:16Z loholt1.ipsl.polytechnique.fr (Linux)
+;
+;   * retry on loholt1 with idl8 and idl6
+;
+; - fplod 20110808T094156Z cratos (Linux)
+;
+;   * add OUTMASK_IND and SET_OUTMSKVAL to call_interp2d call
+;
+; - pinsard 2011-07-05T07:33:36Z loholt1.ipsl.polytechnique.fr (Linux)
+;
+;   * usage of $PROJECT_ID and $PROJECT_OD
+;
+; - fplod 20101217T140745Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coded directory for mask_oaflux_30N30S.nc
+;
+; - fplod 20101215T093710Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * add graph in header
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
+function interp_erai_dewt $
+         , yyyymmddb $
+	 , yyyymmdde
+;
+;++compile_opt idl2, strictarrsubs, logical_predicate
+;
+@cm_4cal
+@cm_4data
+@cm_4mesh
+@cm_4data
+@cm_project
+;
+; Return to caller if errors
+ON_ERROR, 2
+;
+result = -1
+;
+usage = 'result = interp_erai_t2m(yyyymmddb, yyyymmdde)
+nparam = N_PARAMS()
+IF (nparam NE 2) THEN BEGIN
+   ras = report(['Incorrect number of arguments.' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, result
+ENDIF
+;
+; check for input directory
+;
+; test if ${PROJECT_ID} defined
+CASE project_id_env OF
+    ''  :  BEGIN
+     msg = 'eee : ${PROJECT_ID} is not defined'
+     ras = report(msg)
+     return, result
+           END
+ ELSE: BEGIN
+     msg = 'iii : ${PROJECT_ID} is ' + project_id_env
+     ras = report(msg)
+       END
+ENDCASE
+;
+iodirin = isadirectory(project_id_env)
+;
+; existence and protection of ${PROJECT_ID}
+IF (FILE_TEST(iodirin, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN
+   msg = 'eee : the directory' + iodirin  + ' is not accessible.'
+   ras = report(msg)
+   return, result
+ENDIF
+;
+; build mask filename
+filename_msk='mask_oaflux_30N30S.nc'
+;
+; check if this file exists
+msg='iii : looking for ' + filename_msk
+ras = report(msg)
+fullfilename_msk = isafile(iodirin + filename_msk, NEW=0, /MUST_EXIST)
+IF fullfilename_msk[0] EQ '' THEN BEGIN
+   msg = 'eee : the file ' + fullfilename_msk + ' was not found.'
+   ras = report(msg)
+   return, result
+ENDIF
+;
+; build data filename
+filename='20c3m_erai_d2_TROP_1989_2009.nc'
+;
+; check if this file exists
+msg='iii : looking for ' + filename
+ras = report(msg)
+fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST)
+IF fullfilename[0] EQ '' THEN BEGIN
+   msg = 'eee : the file ' + fullfilename + ' was not found.'
+   ras = report(msg)
+   return, result
+ENDIF
+;
+; test if ${PROJECT_OD} defined
+CASE project_od_env OF
+  '' : BEGIN
+         msg = 'eee : ${PROJECT_OD} is not defined'
+         ras = report(msg)
+       return, result
+       END
+  ELSE: BEGIN
+          msg = 'iii : ${PROJECT_OD} is ' + project_od_env
+          ras = report(msg)
+        END
+ ENDCASE
+;
+; check if output data will be possible
+iodirout = isadirectory(project_od_env)
+;
+; existence and protection
+IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN
+    msg = 'eee : the directory' + iodirout  + ' was not found.'
+    ras = report(msg)
+    return, result
+ENDIF
+;
+; build output filename
+filename_out = 'erai_d2m_' + string(yyyymmddb,format='(I8.8)') + '_' + string(yyyymmdde,format='(I8.8)') + '_oafluxgrid.nc'
+fullfilename_out = iodirout + filename_out
+; in order to avoid unexpected overwritten
+IF ((FILE_TEST(fullfilename_out) EQ 1)  AND (project_overwrite EQ 0)) THEN BEGIN
+   msg = 'eee : the file ' + fullfilename_out  + ' already exists.'
+   ras = report(msg)
+   return, result
+ENDIF
+;
+initncdf, fullfilename
+domdef
+latin=reform(gphit[0,*])
+lonin=reform(glamt[*,0])
+print, 'lat grid ',min(latin),max(latin),latin[1]-latin[0]
+print, 'lon grid ',min(lonin),max(lonin),lonin[1]-lonin[0]
+d2min=read_ncdf("d2",19881201,20101231,file=fullfilename,/nostr)
+;
+jptin=jpt
+tab=d2min[*,*,0]
+mskin=glamt*0.+1.
+;
+initncdf, fullfilename_msk
+domdef
+latout=reform(gphit[0,*])
+lonout=reform(glamt[*,0])
+print, 'lat grid ',min(latout),max(latout),latout[1]-latout[0]
+print, 'lon grid ',min(lonout),max(lonout),lonout[1]-lonout[0]
+mskout=read_ncdf("msk", file=fullfilename_msk,/nostr)
+;
+help, d2min,lonin,latin,mskin,lonout,latout,mskout
+;
+d2mout=fltarr(jpi,jpj,jptin)
+for jt=0,jptin-1 do begin
+  ; ++ print, 'Interpolation jt=',jt,' / ',jptin-1
+  tab=reform(d2min[*,*,jt])
+  d2mout[*,*,jt]=call_interp2d(tab,lonin,latin,mskin $
+      , lonout,latout,method='bilinear' $
+      , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout)
+  d2mout[*,*,jt]=d2mout[*,*,jt]*mskout+(1.-mskout)*1.e20
+endfor
+;
+initncdf, fullfilename_msk
+;
+time=timegen(7670, start=julday(1,1,1989,0), units='days')
+jpt=n_elements(time)
+cda0=string(jul2date(time[0]),format='(i8.8)')
+cda1=string(jul2date(time[jpt-1]),format='(i8.8)')
+time=time-julday(1,1,1950,00,00)
+;
+lat=latout
+lon=lonout
+ncfile='!' + fullfilename_out
+lon_attr={units:'degrees_east',long_name:'Longitude'}
+lat_attr={units:'degrees_north',long_name:'Latitude'}
+time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:'1950-JAN-01 00:00:00'}
+globattr={source:'Data are from ECMWF ERA-Interim reanalysis', timerange:cda0+' - '+cda1}
+d2m_attr={units:'degK',missing_value:1e20,long_name:'Dew Point Temperature at 2m',short_name:'d2m',axis:'TYX'}
+;
+ncfields = 'd2m[longitude,latitude,time]=d2mout:d2m_attr; ' $
+                      + 'longitude[]=lon:lon_attr; ' $
+                      + 'latitude[]=lat:lat_attr; ' $
+                      + 'time[*time]=time:time_attr ' $
+                      + ' @ globattr'
+;
+@ncdf_quickwrite
+;
+result = 0
+return, result
+;
+end
Index: trunk/src/interp_erai_dewt_1989_2009.pro
===================================================================
--- trunk/src/interp_erai_dewt_1989_2009.pro	(revision 165)
+++ 	(revision )
@@ -1,292 +1,0 @@
-;+
-;
-; .. _interp_erai_dewt_1989_2009.pro:
-;
-; ==============================
-; interp_erai_dewt_1989_2009.pro
-; ==============================
-;
-; DESCRIPTION
-; ===========
-;
-; Interpolation of d2 from ERA-I grid to OAFLUX grid
-;
-; :file:`${PROJECT_ID}/20c3m_erai_d2_TROP_1989_2009.nc`
-; containing
-; d2 from ERA-I
-; has been produced by
-; :ref:`compute_erai_daily_region_2d.sh`.
-;
-; :file:`${PROJECT_ID}/mask_oaflux_30N30S.nc`
-; containing OAFLUX grid
-; has been produced by
-; :func:`oaflux_mask_30n30s.pro`.
-;
-; Interpolated d2
-; is written in
-; :file:`${PROJECT_OD}/erai_d2m_19890101_20091231_oafluxgrid.nc`
-; if this file not already exists.
-;
-; This output file
-; :file:`${PROJECT_OD}/erai_d2m_19890101_20091231_oafluxgrid.nc`
-; must be processed after by
-; :ref:`d2m_to_q2m_erai.pro`.
-;
-; .. only:: man
-;
-;    Figure is visible on PDF and HTML documents only.
-;
-; .. only:: html or latex
-;
-;     .. graphviz::
-;
-;        digraph interp_erai_dewt_1989_2009 {
-;
-;           file_in [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/20c3m_erai_d2_TROP_1989_2009.nc"];
-;           mask [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/mask_oaflux_30N30S.nc"];
-;           file_out [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/erai_d2m_19890101_20091231_oafluxgrid.nc"];
-;
-;           interp_erai_dewt_1989_2009 [shape=box,
-;           fontname=Courier,
-;           color=blue,
-;           URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/interp_erai_dewt_1989_2009.pro",
-;           label="${PROJECT}/src/interp_erai_dewt_1989_2009.pro"];
-;
-;           {file_in mask} -> {interp_erai_dewt_1989_2009} -> {file_out}
-;
-;        }
-;
-; SEE ALSO
-; ========
-;
-; :ref:`interpolate_data`
-;
-; :ref:`project_profile.sh`
-;
-; :func:`report <saxo:report>`
-; :func:`isadirectory <saxo:isadirectory>`
-; :func:`isafile <saxo:isafile>`
-; :func:`initncdf <saxo:initncdf>`
-; :func:`read_ncdf <saxo:read_ncdf>`
-; :func:`domdef <saxo:domdef>`
-; :func:`call_interp2d <saxo:call_interp2d>`
-; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>`
-;
-; :ref:`d2m_to_q2m_erai.pro`
-;
-; EXAMPLES
-; ========
-;
-; ::
-;
-;  IDL> .compile file_interp
-;  IDL> interp_erai_dewt_1989_2009
-;
-; TIPS
-; ====
-;
-; To see some values of variable ::
-;
-;   $ ncks -v d2m -d time,0,1 -d latitude,0,1 -d longitude,0,1 \
-;     $PROJECT_ID/erai_d2m_19890101_200 1231_oafluxgrid.nc
-;
-; TODO
-; ====
-;
-; check OUTMASK_IND and SET_OUTMSKVAL added to call_interp2d call
-;
-; use real output of :ref:`compute_erai_daily_region_2d.sh`.
-;
-; coding rules
-;
-; KNOWN ISSUES
-; ============
-;
-; test of existence of fullfilename_msk not very efficient because
-; MUST_EXIST keyword of :func:`isafile <saxo:isafile>` not yet implemented
-;
-; EVOLUTIONS
-; ==========
-;
-; $Id$
-;
-; $URL: svn+ssh://pinsard@forge.ipsl.jussieu.fr/ipsl/forge/projets/tropflux/svn/trunk/src/interp_erai_dewt_1989_2009.pro $
-;
-; - pinsard 2011-08-23T09:09:16Z loholt1.ipsl.polytechnique.fr (Linux)
-;
-;   * retry on loholt1 with idl8 and idl6
-;
-; - fplod 20110808T094156Z cratos (Linux)
-;
-;   * add OUTMASK_IND and SET_OUTMSKVAL to call_interp2d call
-;
-; - pinsard 2011-07-05T07:33:36Z loholt1.ipsl.polytechnique.fr (Linux)
-;
-;   * usage of $PROJECT_ID and $PROJECT_OD
-;
-; - fplod 20101217T140745Z aedon.locean-ipsl.upmc.fr (Darwin)
-;
-;   * remove hard coded directory for mask_oaflux_30N30S.nc
-;
-; - fplod 20101215T093710Z aedon.locean-ipsl.upmc.fr (Darwin)
-;
-;   * add graph in header
-;
-; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
-;
-;   * minimal header
-;
-; - pbk 2008
-;
-;   * creation
-;
-;-
-pro interp_erai_dewt_1989_2009
-;
-@cm_4cal
-@cm_4data
-@cm_4mesh
-@cm_4data
-@cm_project
-;
-; check for input directory
-;
-; test if ${PROJECT_ID} defined
-CASE project_id_env OF
-    ''  :  BEGIN
-     msg = 'eee : ${PROJECT_ID} is not defined'
-     ras = report(msg)
-     STOP
-           END
- ELSE: BEGIN
-     msg = 'iii : ${PROJECT_ID} is ' + project_id_env
-     ras = report(msg)
-       END
-ENDCASE
-;
-iodirin = isadirectory(project_id_env)
-;
-; existence and protection of ${PROJECT_ID}
-IF (FILE_TEST(iodirin, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN
-   msg = 'eee : the directory' + iodirin  + ' is not accessible.'
-   ras = report(msg)
-   STOP
-ENDIF
-;
-; build mask filename
-filename_msk='mask_oaflux_30N30S.nc'
-;
-; check if this file exists
-msg='iii : looking for ' + filename_msk
-ras = report(msg)
-fullfilename_msk = isafile(iodirin + filename_msk, NEW=0, /MUST_EXIST)
-IF fullfilename_msk[0] EQ '' THEN BEGIN
-   msg = 'eee : the file ' + fullfilename_msk + ' was not found.'
-   ras = report(msg)
-   STOP
-ENDIF
-;
-; build data filename
-filename='20c3m_erai_d2_TROP_1989_2009.nc'
-;
-; check if this file exists
-msg='iii : looking for ' + filename
-ras = report(msg)
-fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST)
-IF fullfilename[0] EQ '' THEN BEGIN
-   msg = 'eee : the file ' + fullfilename + ' was not found.'
-   ras = report(msg)
-   STOP
-ENDIF
-;
-; test if ${PROJECT_OD} defined
-CASE project_od_env OF
-  '' : BEGIN
-         msg = 'eee : ${PROJECT_OD} is not defined'
-         ras = report(msg)
-       STOP
-       END
-  ELSE: BEGIN
-          msg = 'iii : ${PROJECT_OD} is ' + project_od_env
-          ras = report(msg)
-        END
- ENDCASE
-;
-; check if output data will be possible
-iodirout = isadirectory(project_od_env)
-;
-; existence and protection
-IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN
-    msg = 'eee : the directory' + iodirout  + ' was not found.'
-    ras = report(msg)
-    STOP
-ENDIF
-;
-; build output filename
-filename_out = 'erai_d2m_19890101_20091231_oafluxgrid.nc'
-fullfilename_out = iodirout + filename_out
-; in order to avoid unexpected overwritten
-IF (FILE_TEST(fullfilename_out) EQ 1) THEN BEGIN
-   msg = 'eee : the file ' + fullfilename_out  + ' already exists.'
-   ras = report(msg)
-   STOP
-ENDIF
-;
-initncdf, fullfilename
-domdef
-latin=reform(gphit(0,*))
-lonin=reform(glamt(*,0))
-print, 'lat grid ',min(latin),max(latin),latin(1)-latin(0)
-print, 'lon grid ',min(lonin),max(lonin),lonin(1)-lonin(0)
-d2min=read_ncdf("d2",19881201,20101231,file=fullfilename,/nostr)
-;
-jptin=jpt
-tab=d2min(*,*,0)
-mskin=glamt*0.+1.
-;
-initncdf, fullfilename_msk
-domdef
-latout=reform(gphit(0,*))
-lonout=reform(glamt(*,0))
-print, 'lat grid ',min(latout),max(latout),latout(1)-latout(0)
-print, 'lon grid ',min(lonout),max(lonout),lonout(1)-lonout(0)
-mskout=read_ncdf("msk", file=fullfilename_msk,/nostr)
-;
-help, d2min,lonin,latin,mskin,lonout,latout,mskout
-;
-d2mout=fltarr(jpi,jpj,jptin)
-for jt=0,jptin-1 do begin
-  ; ++ print, 'Interpolation jt=',jt,' / ',jptin-1
-  tab=reform(d2min(*,*,jt))
-  d2mout(*,*,jt)=call_interp2d(tab,lonin,latin,mskin $
-      , lonout,latout,method='bilinear' $
-      , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout)
-  d2mout(*,*,jt)=d2mout(*,*,jt)*mskout+(1.-mskout)*1.e20
-endfor
-;
-initncdf, fullfilename_msk
-;
-time=timegen(7670, start=julday(1,1,1989,0), units='days')
-jpt=n_elements(time)
-cda0=string(jul2date(time(0)),format='(i8.8)')
-cda1=string(jul2date(time(jpt-1)),format='(i8.8)')
-time=time-julday(1,1,1950,00,00)
-;
-lat=latout
-lon=lonout
-ncfile='!' + fullfilename_out
-lon_attr={units:'degrees_east',long_name:'Longitude'}
-lat_attr={units:'degrees_north',long_name:'Latitude'}
-time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:'1950-JAN-01 00:00:00'}
-globattr={source:'Data are from ECMWF ERA-Interim reanalysis', timerange:cda0+' - '+cda1}
-d2m_attr={units:'degK',missing_value:1e20,long_name:'Dew Point Temperature at 2m',short_name:'d2m',axis:'TYX'}
-;
-ncfields = 'd2m[longitude,latitude,time]=d2mout:d2m_attr; ' $
-                      + 'longitude[]=lon:lon_attr; ' $
-                      + 'latitude[]=lat:lat_attr; ' $
-                      + 'time[*time]=time:time_attr ' $
-                      + ' @ globattr'
-;
-@ncdf_quickwrite
-;
-end
Index: trunk/src/interp_erai_msl.pro
===================================================================
--- trunk/src/interp_erai_msl.pro	(revision 165)
+++ trunk/src/interp_erai_msl.pro	(revision 166)
@@ -324,3 +324,6 @@
 @ncdf_quickwrite
 ;
+result = 0
+return, result
+;
 end
Index: trunk/src/interp_erai_t2m.pro
===================================================================
--- trunk/src/interp_erai_t2m.pro	(revision 165)
+++ trunk/src/interp_erai_t2m.pro	(revision 166)
@@ -97,5 +97,5 @@
 ; ====
 ;
-; scientific validation (starnge look of data with ncview now)
+; scientific validation (strange look of data with ncview now)
 ;
 ; check [yyyymmddb,yyyymmdde] validity
@@ -105,5 +105,5 @@
 ; what happen if yyyymmdde > 20091231 : need to read an other ERA-I file
 ;
-; add an example with only one month (ie 200912)
+; add an example with only one month (ie 200001)
 ;
 ; make it work : pb on loholt1 idl8
Index: trunk/src/oaflux_mask_30n30s.pro
===================================================================
--- trunk/src/oaflux_mask_30n30s.pro	(revision 165)
+++ trunk/src/oaflux_mask_30n30s.pro	(revision 166)
@@ -63,5 +63,5 @@
 ; Following program use :func:`oaflux_mask_30n30s` output:
 ; :ref:`TropFlux_19890101_20091231.pro`,
-; :ref:`interp_erai_dewt_1989_2009.pro`,
+; :func:`interp_erai_dewt`,
 ; :ref:`interp_erai_lwr_1989_2009.pro`,
 ; :ref:`interp_erai_sst_1989_2009.pro`,
@@ -220,7 +220,7 @@
 
 @ncdf_quickwrite
-
+;
 result = 0
-
 return, result
+;
 END
Index: trunk/src/tropflux.sh
===================================================================
--- trunk/src/tropflux.sh	(revision 165)
+++ trunk/src/tropflux.sh	(revision 166)
@@ -90,5 +90,5 @@
 # Use :
 # :func:`oaflux_mask_30n30s`, :func:`interp_erai_t2m`, 
-# :func:`interp_erai_msl`, etc.
+# :func:`interp_erai_msl`, :func:`interp_erai_dewt`, etc.
 #
 # Next step : +validation ++ comparison
@@ -116,4 +116,5 @@
 #   * add project_overwrite usage
 #   * handling error of inter_erai_msl (now function)
+#   * handling error of inter_erai_dewt (now function)
 #
 # - pinsard 20120306
@@ -296,5 +297,10 @@
    exit
 ENDIF
-;interp_erai_dewt_1989_2009
+result = interp_erai_dewt(${yyyymmddb}, ${yyyymmdde})
+IF result < 0 THEN BEGIN
+   msg = 'eee : pb after interp_erai_dewt' + string(result)
+   err = report(msg)
+   exit
+ENDIF
 ;interp_erai_lwr_1989_2009
 result = interp_erai_msl(${yyyymmddb}, ${yyyymmdde})
