Index: trunk/src/TropFlux_19890101_20091231.pro
===================================================================
--- trunk/src/TropFlux_19890101_20091231.pro	(revision 5)
+++ trunk/src/TropFlux_19890101_20091231.pro	(revision 6)
@@ -1,11 +1,51 @@
-;------------------------------------------------------------
+;+
+;
+; .. _TropFlux_19890101_20091231.pro:
+;
+; ==============================
+; TropFlux_19890101_20091231.pro
+; ==============================
+;
+; This program computes net heat flux components on the 1° oaflux grid.
+;
+; all input variables are corrected for mean bias and variability.
+;
+; gustiness correction is applied for wind speed based on cronin's climatological
+; gustiness values.
+;
+; SEE ALSO
+; ========
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;  IDL> tropflux_19890101_20091231
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
+;
 pro TropFlux_19890101_20091231
 @common
 ;------------------------------------------------------------
 ;
-; This program computes net heat flux components on the
-; 1° oaflux grid
-; all input variables are corrected for mean bias and variability
-; gustiness correction is applied for wind speed based on cronin's climatological gustiness values
 
 da1=19880101 & da2=20101231
@@ -27,8 +67,8 @@
 initncdf, file_sst
 
-ws=read_ncdf('ws',da1,da2,file=file_wind,/nostr) 
+ws=read_ncdf('ws',da1,da2,file=file_wind,/nostr)
 wg=read_ncdf('wg',da1-1,da2,file=file_wg,/nostr)
 tt=time & jpt=n_elements(time)
-sst=read_ncdf('sst',da1,da2,file=file_sst,/nostr) 
+sst=read_ncdf('sst',da1,da2,file=file_sst,/nostr)
 sst=reform(sst-273.15)
 swd=read_ncdf('swr',da1,da2,file=file_sw,/nostr)
@@ -142,6 +182,4 @@
 @ncdf_quickwrite
 
-;------------------------------------------------------------
 return
 end
-;------------------------------------------------------------
Index: trunk/src/TropFlux_NRT_ncdf.pro
===================================================================
--- trunk/src/TropFlux_NRT_ncdf.pro	(revision 5)
+++ trunk/src/TropFlux_NRT_ncdf.pro	(revision 6)
@@ -1,2 +1,39 @@
+;+
+;
+; .. _TropFlux_NRT_ncdf_v50.pro:
+;
+; =========================
+; TropFlux_NRT_ncdf_v50.pro
+; =========================
+;
+; SEE ALSO
+; ========
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;  IDL> tropFlux_nrt_ncdf_v50
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
 pro TropFlux_NRT_ncdf_v50
 @common
@@ -55,4 +92,2 @@
 
 end
-
-
Index: trunk/src/TropFlux_swr_BLND_19890101_20091231.pro
===================================================================
--- trunk/src/TropFlux_swr_BLND_19890101_20091231.pro	(revision 5)
+++ trunk/src/TropFlux_swr_BLND_19890101_20091231.pro	(revision 6)
@@ -1,2 +1,41 @@
+;+
+;
+; .. _TropFlux_swr_BLND_19890101_20091231.pro:
+;
+; =======================================
+; TropFlux_swr_BLND_19890101_20091231.pro
+; =======================================
+;
+;
+; SEE ALSO
+; ========
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;  IDL> tropflux_swr_blnd_19890101_20091231
+;
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
 pro TropFlux_swr_BLND_19890101_20091231
 @common
@@ -53,3 +92,2 @@
 
 end
-
Index: trunk/src/TropFlux_swr_DT_19890101_20071231.pro
===================================================================
--- trunk/src/TropFlux_swr_DT_19890101_20071231.pro	(revision 5)
+++ trunk/src/TropFlux_swr_DT_19890101_20071231.pro	(revision 6)
@@ -1,2 +1,40 @@
+;+
+;
+; .. _TropFlux_swr_DT_19890101_20071231.pro:
+;
+; =====================================
+; TropFlux_swr_DT_19890101_20071231.pro
+; =====================================
+;
+;
+; SEE ALSO
+; ========
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;  IDL> tropflux_swr_dt_19890101_20071231
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
 pro TropFlux_swr_DT_19890101_20071231
 @common
@@ -56,6 +94,2 @@
 
 end
-
-
-
-
Index: trunk/src/TropFlux_swr_NRT_19890101_20091231.pro
===================================================================
--- trunk/src/TropFlux_swr_NRT_19890101_20091231.pro	(revision 5)
+++ trunk/src/TropFlux_swr_NRT_19890101_20091231.pro	(revision 6)
@@ -1,2 +1,40 @@
+;+
+;
+; .. _TropFlux_swr_NRT_19890101_20091231.pro
+;
+; ======================================
+; TropFlux_swr_NRT_19890101_20091231.pro
+; ======================================
+;
+;
+; SEE ALSO
+; ========
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;  IDL> tropflux_swr_nrt_19890101_20091231
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
 pro TropFlux_swr_NRT_19890101_20091231
 @common
@@ -85,6 +123,2 @@
 
 end
-
-
-
-
Index: trunk/src/cor30a.pro
===================================================================
--- trunk/src/cor30a.pro	(revision 5)
+++ trunk/src/cor30a.pro	(revision 6)
@@ -1,51 +1,87 @@
-;----------------------------------------------------------------------------------------------
+;+
+;
+; ======
+; cor30a
+; ======
+;
+; .. function: result=cor30a(u,us,ts,t,Qs,Q,Rs,Rl,rain,zi,P,zu,zt,zq,lat,jcool,jwave,twave,hwave)
+;
+;
+; COARE v3 algorithm to compute fluxes
+;
+; version with shortened iteration  modified Rt and Rq
+;
+; uses wave information wave period in s and wave ht in m
+; no wave, standard coare 2.6 charnock:  jwave=0
+;
+; Oost et al.  zo=50/2/pi L (u*/c)^4.5 if jwave=1
+;
+; taylor and yelland  zo=1200 h*(L/h)^4.5 jwave=2
+;
+;     :param u: wind speed (m/s)  at height zu (m)
+;     :param us: surface current speed in the wind direction (m/s)
+;     :param ts: bulk water temperature (C) if jcool=1, interface water T if jcool=0
+;     :param t: bulk air temperature (C), height zt
+;     :param Qs: bulk water spec hum (g/kg) if jcool=1, ...
+;     :param Q: bulk air spec hum (g/kg), height zq
+;     :param Rs: downward solar flux (W/m^2)    (modified because of cool skin)
+;     :param Rl: downard IR flux (W/m^2)        (modified because of cool skin)
+;     :param rain: rain rate (mm/hr)
+;     :param zi: PBL depth (m)
+;     :param P: Atmos surface pressure (mb)
+;     :param zu: wind speed measurement height (m)
+;     :param zt: air T measurement height (m)
+;     :param zq: air q measurement height (m)
+;     :param lat: latitude (deg, N=+)
+;     :param jcool: implement cool calculation skin switch, 0=no, 1=yes
+;     :param jwave: implement wave dependent roughness model
+;     :param twave: wave period (s)
+;     :param hwave: wave height (m)
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;                  u  us  ts  ta   qs   qa   Qsw IRd   r  pbl  Ps   zu   zt  zq lat
+;
+;    IDL> x=cor30a(5.5,0,28.7,27.2,24.2,18.5,141.,419.,0.,600.,1010.,15.,15.,15.,0.,1,1,5.,1.)
+;
+; Result with these sample values with Matlab code::
+;
+;      8.64830      101.640    0.0352910  2.17780e-05  0.000115000  0.000115000
+;     -29.5800     0.175430   -0.0423670 -0.000205610     0.250950  0.000351300
+;  0.000969740      0.00000  8.11390e-05  0.000997340   0.00121410   0.00121400
+;  0.000941350   0.00107910   0.00107910     0.780060
+;
+; Result obtained with this idl routine::
+;
+;      8.64829      101.640    0.0352913  2.17780e-05  0.000115000  0.000115000
+;     -29.5802     0.175432   -0.0423667 -0.000205610     0.250948  0.000351304
+;  0.000969737      0.00000  8.11394e-05  0.000997343   0.00121407   0.00121400
+;  0.000941351   0.00107908   0.00107908     0.780056
+;
+; Maximum error on any parameter: .002 %    validated!
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
 function cor30a, u,us,ts,t,Qs,Q,Rs,Rl,rain,zi,P,zu,zt,zq,lat,jcool,jwave,twave,hwave
-; 
-; COARE v3 algorithm to compute fluxes
-;	version with shortened iteration  modified Rt and Rq
-;	uses wave information wave period in s and wave ht in m
-;	no wave, standard coare 2.6 charnock:  jwave=0 
-;	Oost et al.  zo=50/2/pi L (u*/c)^4.5 if jwave=1
-;	taylor and yelland  zo=1200 h*(L/h)^4.5 jwave=2
-;
-; u         ;wind speed (m/s)  at height zu (m)
-; us        ;surface current speed in the wind direction (m/s)
-; ts        ;bulk water temperature (C) if jcool=1, interface water T if jcool=0
-; t         ;bulk air temperature (C), height zt
-; Qs        ;bulk water spec hum (g/kg) if jcool=1, ...
-; Q         ;bulk air spec hum (g/kg), height zq
-; Rs        ;downward solar flux (W/m^2)    (modified because of cool skin)
-; Rl        ;downard IR flux (W/m^2)        (modified because of cool skin)
-; rain      ;rain rate (mm/hr)
-; zi        ;PBL depth (m)
-; P         ;Atmos surface pressure (mb)
-; zu        ;wind speed measurement height (m)
-; zt        ;air T measurement height (m)
-; zq        ;air q measurement height (m)
-; lat       ;latitude (deg, N=+)
-; jcool     ;implement cool calculation skin switch, 0=no, 1=yes
-; jwave     ;implement wave dependent roughness model
-; twave     ;wave period (s)
-; hwave     ;wave height (m)
-;
-;Example of values:
-;         u  us  ts  ta   qs   qa   Qsw IRd   r  pbl  Ps   zu   zt  zq lat    
-;x=cor30a(5.5,0,28.7,27.2,24.2,18.5,141.,419.,0.,600.,1010.,15.,15.,15.,0.,1,1,5.,1.) ;sample data stream
-;
-;Result with these sample values with Matlab code:
-;     8.64830      101.640    0.0352910  2.17780e-05  0.000115000  0.000115000 
-;    -29.5800     0.175430   -0.0423670 -0.000205610     0.250950  0.000351300
-; 0.000969740      0.00000  8.11390e-05  0.000997340   0.00121410   0.00121400 
-; 0.000941350   0.00107910   0.00107910     0.780060
-;
-;Result obtained with this idl routine:
-;     8.64829      101.640    0.0352913  2.17780e-05  0.000115000  0.000115000 
-;    -29.5802     0.175432   -0.0423667 -0.000205610     0.250948  0.000351304
-; 0.000969737      0.00000  8.11394e-05  0.000997343   0.00121407   0.00121400
-; 0.000941351   0.00107908   0.00107908     0.780056
-;
-; Maximum error on any parameter: .002 %    validated!
-;
-;----------------------------------------------------------------------------------------------
 
 Qs=Qs/1000.
@@ -54,116 +90,116 @@
 ;***********   set constants *************
 pi=!pi
-Beta=1.2 
-von=0.4 
-fdg=1.00 
-tdk=273.16 
-;grav=grv(lat) 
+Beta=1.2
+von=0.4
+fdg=1.00
+tdk=273.16
+;grav=grv(lat)
 grav=9.8
 ;*************  air constants ************
-Rgas=287.1 
-LLe=(2.501-.00237*ts)*1e6 
-cpa=1004.67 
-cpv=cpa*(1+0.84*Q) 
-rhoa=P*100/(Rgas*(t+tdk)*(1+0.61*Q)) 
-visa=1.326e-5*(1+6.542e-3*t+8.301e-6*t*t-4.84e-9*t*t*t) 
+Rgas=287.1
+LLe=(2.501-.00237*ts)*1e6
+cpa=1004.67
+cpv=cpa*(1+0.84*Q)
+rhoa=P*100/(Rgas*(t+tdk)*(1+0.61*Q))
+visa=1.326e-5*(1+6.542e-3*t+8.301e-6*t*t-4.84e-9*t*t*t)
 ;************  cool skin constants  *******
-Al=2.1e-5*(ts+3.2)^0.79 
-be=0.026 
-cpw=4000 
-rhow=1022 
-visw=1e-6 
-tcw=0.6 
-bigc=16*grav*cpw*(rhow*visw)^3/(tcw*tcw*rhoa*rhoa) 
-wetc=0.622*LLe*Qs/(Rgas*(ts+tdk)^2) 
-     
+Al=2.1e-5*(ts+3.2)^0.79
+be=0.026
+cpw=4000
+rhow=1022
+visw=1e-6
+tcw=0.6
+bigc=16*grav*cpw*(rhow*visw)^3/(tcw*tcw*rhoa*rhoa)
+wetc=0.622*LLe*Qs/(Rgas*(ts+tdk)^2)
+
 ;***************   wave parameters  *********
-lwave=grav/2/pi*twave^2 
-cwave=grav/2/pi*twave 
-     
+lwave=grav/2/pi*twave^2
+cwave=grav/2/pi*twave
+
 ;**************  compute aux stuff *******
-Rns=Rs*.945 
-Rnl=0.97*(5.67e-8*(ts-0.3*jcool+tdk)^4-Rl) 
+Rns=Rs*.945
+Rnl=0.97*(5.67e-8*(ts-0.3*jcool+tdk)^4-Rl)
 
 
 
 ;***************   Begin bulk loop *******
-     
+
 ;***************  first guess ************
-du=u-us 
-dt=ts-t-.0098*zt 
-dq=Qs-Q 
-ta=t+tdk 
-ug=0.5 
-dter=0.3  
-dqer=wetc*dter 
-ut=sqrt(du*du+ug*ug) 
-u10=ut*alog(10./1e-4)/alog(zu/1e-4) 
-usr=.035*u10 
-zo10=0.011*usr*usr/grav+0.11*visa/usr 
-Cd10=(von/alog(10./zo10))^2 
-Ch10=0.00115 
-Ct10=Ch10/sqrt(Cd10) 
-zot10=10/exp(von/Ct10) 
-Cd=(von/alog(zu/zo10))^2 
-Ct=von/alog(zt/zot10) 
-CC=von*Ct/Cd 
-Ribcu=-zu/zi/.004/Beta^3 
-Ribu=-grav*zu/ta*((dt-dter*jcool)+.61*ta*dq)/ut^2 
-nits=3 
+du=u-us
+dt=ts-t-.0098*zt
+dq=Qs-Q
+ta=t+tdk
+ug=0.5
+dter=0.3
+dqer=wetc*dter
+ut=sqrt(du*du+ug*ug)
+u10=ut*alog(10./1e-4)/alog(zu/1e-4)
+usr=.035*u10
+zo10=0.011*usr*usr/grav+0.11*visa/usr
+Cd10=(von/alog(10./zo10))^2
+Ch10=0.00115
+Ct10=Ch10/sqrt(Cd10)
+zot10=10/exp(von/Ct10)
+Cd=(von/alog(zu/zo10))^2
+Ct=von/alog(zt/zot10)
+CC=von*Ct/Cd
+Ribcu=-zu/zi/.004/Beta^3
+Ribu=-grav*zu/ta*((dt-dter*jcool)+.61*ta*dq)/ut^2
+nits=3
 ;;if (Ribu le 0.) then begin
-;;  zetu=CC*Ribu/(1+Ribu/Ribcu) 
+;;  zetu=CC*Ribu/(1+Ribu/Ribcu)
 ;;endif else begin
-;;  zetu=CC*Ribu*(1+27./9*Ribu/CC) 
-;;endelse 
+;;  zetu=CC*Ribu*(1+27./9*Ribu/CC)
+;;endelse
 sw=(Ribu le 0.)
 zetu=sw*(CC*Ribu/(1+Ribu/Ribcu))+(1-sw)*(CC*Ribu*(1+27./9*Ribu/CC))
 ;;
-L10=zu/zetu 
-;;if (zetu gt 50 ) then nits=1 
-usr=ut*von/(alog(zu/zo10)-psiu(zu/L10)) 
-tsr=-(dt-dter*jcool)*von*fdg/(alog(zt/zot10)-psit(zt/L10)) 
-qsr=-(dq-wetc*dter*jcool)*von*fdg/(alog(zq/zot10)-psit(zq/L10)) 
-
-tkt=.001 
-	
-;;charn=0.011 
-;;if (ut gt 10.) then charn=0.011+(ut-10)/(18.-10)*(0.018-0.011) 
-;;if (ut gt 18.) then charn=0.018 
+L10=zu/zetu
+;;if (zetu gt 50 ) then nits=1
+usr=ut*von/(alog(zu/zo10)-psiu(zu/L10))
+tsr=-(dt-dter*jcool)*von*fdg/(alog(zt/zot10)-psit(zt/L10))
+qsr=-(dq-wetc*dter*jcool)*von*fdg/(alog(zq/zot10)-psit(zq/L10))
+
+tkt=.001
+
+;;charn=0.011
+;;if (ut gt 10.) then charn=0.011+(ut-10)/(18.-10)*(0.018-0.011)
+;;if (ut gt 18.) then charn=0.018
 charn=(((0.011+(ut-10)/(18.-10)*(0.018-0.011)) > .011) < .018)
 ;;
-   
+
 ;***************  bulk loop ************
 for i=1,nits do begin
-  zet=von*grav*zu/ta*(tsr*(1+0.61*Q)+.61*ta*qsr)/(usr*usr)/(1+0.61*Q) 
+  zet=von*grav*zu/ta*(tsr*(1+0.61*Q)+.61*ta*qsr)/(usr*usr)/(1+0.61*Q)
   case jwave of
-    0: zo=charn*usr*usr/grav+0.11*visa/usr 
+    0: zo=charn*usr*usr/grav+0.11*visa/usr
     1: zo=50./2/pi*lwave*(usr/cwave)^4.5+0.11*visa/usr ;Oost et al
     2: zo=1200*hwave*(hwave/lwave)^4.5+0.11*visa/usr  ;Taylor and Yelland
   endcase
-  rr=zo*usr/visa 
-  L=zu/zet 
-;;zoq=min([1.15e-4,5.5e-5/rr^.6]) 
+  rr=zo*usr/visa
+  L=zu/zet
+;;zoq=min([1.15e-4,5.5e-5/rr^.6])
   zoq=(5.5e-5/rr^.6 < 1.15e-4)
 ;;
-  zot=zoq 
-  usr=ut*von/(alog(zu/zo)-psiu(zu/L)) 
-  tsr=-(dt-dter*jcool)*von*fdg/(alog(zt/zot)-psit(zt/L)) 
-  qsr=-(dq-wetc*dter*jcool)*von*fdg/(alog(zq/zoq)-psit(zq/L)) 
-  Bf=-grav/ta*usr*(tsr+.61*ta*qsr) 
+  zot=zoq
+  usr=ut*von/(alog(zu/zo)-psiu(zu/L))
+  tsr=-(dt-dter*jcool)*von*fdg/(alog(zt/zot)-psit(zt/L))
+  qsr=-(dq-wetc*dter*jcool)*von*fdg/(alog(zq/zoq)-psit(zq/L))
+  Bf=-grav/ta*usr*(tsr+.61*ta*qsr)
 ;;if (Bf gt 0) then begin
-;;  ug=Beta*(Bf*zi)^.333 
+;;  ug=Beta*(Bf*zi)^.333
 ;;endif else begin
-;;  ug=.2 
-;;endelse 
+;;  ug=.2
+;;endelse
   sw=(Bf gt 0)
   ug=sw*(Beta*(Bf*zi)^.333)+(1-sw)*.2
 ;;
-  ut=sqrt(du*du+ug*ug) 
-  Rnl=0.97*(5.67e-8*(ts-dter*jcool+tdk)^4-Rl) 
-  hsb=-rhoa*cpa*usr*tsr 
-  hlb=-rhoa*LLe*usr*qsr 
-  qout=Rnl+hsb+hlb 
+  ut=sqrt(du*du+ug*ug)
+  Rnl=0.97*(5.67e-8*(ts-dter*jcool+tdk)^4-Rl)
+  hsb=-rhoa*cpa*usr*tsr
+  hlb=-rhoa*LLe*usr*qsr
+  qout=Rnl+hsb+hlb
   dels=Rns*(.065+11*tkt-6.6e-5/tkt*(1-exp(-tkt/8.0e-4)))  	; Eq.16 Shortwave
-  qcol=qout-dels 
+  qcol=qout-dels
   alq=Al*qcol+be*hlb*cpw/LLe 					; Eq. 7 Buoy flux water
 
@@ -172,17 +208,17 @@
 ;;    tkt=xlamx*visw/(sqrt(rhoa/rhow)*usr) 			;Eq.11 Sub. thk
 ;;  endif else begin
-;;    xlamx=6.0 
+;;    xlamx=6.0
 ;;;;  tkt=min([.01,xlamx*visw/(sqrt(rhoa/rhow)*usr)]) 		;Eq.11 Sub. thk
 ;;    tkt=(xlamx*visw/(sqrt(rhoa/rhow)*usr) < .01)
 ;;;;
-;;  endelse 
+;;  endelse
   sw=(alq gt 0)
   xlamx=sw*(6./(1+(bigc*alq/usr^4)^.75)^.333)+(1-sw)*6.0
   tkt=sw*(xlamx*visw/(sqrt(rhoa/rhow)*usr))+(1-sw)*(xlamx*visw/(sqrt(rhoa/rhow)*usr) < .01)
 ;;
-     
+
   dter=qcol*tkt/tcw ;  Eq.12 Cool skin
-  dqer=wetc*dter 
-     
+  dqer=wetc*dter
+
 endfor      ;bulk iter loop
 
@@ -204,18 +240,18 @@
 ;;****************   Webb et al. correection  ************
 ;wbar=1.61*hlb/LLe/(1+1.61*Q)/rhoa+hsb/rhoa/cpa/ta 	;formulation in hlb already includes webb
-;hl_webb=rhoa*wbar*Q*LLe 
+;hl_webb=rhoa*wbar*Q*LLe
 ;;**************   compute transfer coeffs relative to ut @meas. ht **********
 ;;Cd=tau/rhoa/ut/max([.1,du])
-;Cd=tau/rhoa/ut/(du > .1) 
+;Cd=tau/rhoa/ut/(du > .1)
 ;;;
-Ch=-usr*tsr/ut/(dt-dter*jcool) 
-Ce=-usr*qsr/(dq-dqer*jcool)/ut 
+Ch=-usr*tsr/ut/(dt-dter*jcool)
+Ce=-usr*qsr/(dq-dqer*jcool)/ut
 ;;************  10-m neutral coeff realtive to ut ********
-;Cdn_10=von*von/alog(10./zo)/alog(10./zo) 
-;Chn_10=von*von*fdg/alog(10./zo)/alog(10./zot) 
-;Cen_10=von*von*fdg/alog(10./zo)/alog(10./zoq) 
-
-y=[[Rns],[-1.*Rnl],[-1.*hlb],[-1.*hsb],[-1.*RF],[tau],[Ch],[Ce]]   
-;;y=[hsb,hlb,tau,zo,zot,zoq,L,usr,tsr,qsr,dter,dqer,tkt,RF,wbar,Cd,Ch,Ce,Cdn_10,Chn_10,Cen_10,ug ] 
+;Cdn_10=von*von/alog(10./zo)/alog(10./zo)
+;Chn_10=von*von*fdg/alog(10./zo)/alog(10./zot)
+;Cen_10=von*von*fdg/alog(10./zo)/alog(10./zoq)
+
+y=[[Rns],[-1.*Rnl],[-1.*hlb],[-1.*hsb],[-1.*RF],[tau],[Ch],[Ce]]
+;;y=[hsb,hlb,tau,zo,zot,zoq,L,usr,tsr,qsr,dter,dqer,tkt,RF,wbar,Cd,Ch,Ce,Cdn_10,Chn_10,Cen_10,ug ]
 ;   1   2   3   4  5   6  7  8   9  10   11   12  13  14  15  16 17 18    19      20    21  22
 ;       hsb=                    sensible heat flux (w/m^2)
@@ -246,4 +282,2 @@
 
 end
-;----------------------------------------------------------------------------------------------
-
Index: trunk/src/cronin_gustiness_ncdf.pro
===================================================================
--- trunk/src/cronin_gustiness_ncdf.pro	(revision 5)
+++ trunk/src/cronin_gustiness_ncdf.pro	(revision 6)
@@ -1,2 +1,39 @@
+;+
+;
+; .. _cronin_gustiness_ncdf.pro:
+;
+; =========================
+; cronin_gustiness_ncdf.pro
+; =========================
+;
+; SEE ALSO
+; ========
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;  IDL> cronin_gustiness_ncdf
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
 pro cronin_gustiness_ncdf
 @common
@@ -46,7 +83,4 @@
 @ncdf_quickwrite
 
-;------------------------------------------------------------
 return
 end
-
-
Index: trunk/src/d2m_to_q2m_erai.pro
===================================================================
--- trunk/src/d2m_to_q2m_erai.pro	(revision 5)
+++ trunk/src/d2m_to_q2m_erai.pro	(revision 6)
@@ -1,5 +1,41 @@
+;+
+;
+; .. _d2m_to_q2m_erai.pro:
+;
+; ===================
+; d2m_to_q2m_erai.pro
+; ===================
+;
+; SEE ALSO
+; ========
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;  IDL> d2m_to_q2m_erai
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
 pro d2m_to_q2m_erai
 @common
-;----------------------------------------------------------------------
 ;; reading erai dew point temperature
 d1=19881001 & d2=20101231
@@ -25,5 +61,5 @@
 ;----------------------------------------------------------------------
 ;; conversion of relative humidity to sp. humidity
-;; Ref.1 -  Gill, Appendix 4, 
+;; Ref.1 -  Gill, Appendix 4,
 ;; Ref.2 - http://efdl.cims.nyu.edu/project_aomip/forcing_data/atmosphere/humidity.html
 
@@ -62,4 +98,3 @@
 @ncdf_quickwrite
 return
-;----------------------------------------------------------------------
 end
Index: trunk/src/dew_temp_airt_rel_humidity_jv.pro
===================================================================
--- trunk/src/dew_temp_airt_rel_humidity_jv.pro	(revision 5)
+++ trunk/src/dew_temp_airt_rel_humidity_jv.pro	(revision 6)
@@ -1,2 +1,46 @@
+;+
+;
+; =============================
+; dew_temp_airt_rel_humidity_jv
+; =============================
+;
+; .. function: result=dew_temp_airt_rel_humidity_jv(t, td)
+;
+;     :param t: air temperature in degC
+;     :param td: dew point temperature in degC
+;
+;
+; SEE ALSO
+; ========
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;    IDL> t=+todo+
+;    IDL> td=+todo+
+;    IDL> result=dew_temp_airt_rel_humidity_jv(t, td)
+;
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
 function dew_temp_airt_rel_humidity_jv, t,td
 ;----------------------------------------------------------------------
@@ -19,4 +63,3 @@
 return, rh
 
-;----------------------------------------------------------------------
 end
Index: trunk/src/interp_erai_dewt_1989_2009.pro
===================================================================
--- trunk/src/interp_erai_dewt_1989_2009.pro	(revision 5)
+++ trunk/src/interp_erai_dewt_1989_2009.pro	(revision 6)
@@ -1,2 +1,40 @@
+;+
+;
+; .. _interp_erai_dewt_1989_2009.pro:
+;
+; ==============================
+; interp_erai_dewt_1989_2009.pro
+; ==============================
+;
+;
+; SEE ALSO
+; ========
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;  IDL> interp_erai_dewt_1989_2009
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
 pro interp_erai_dewt_1989_2009
 @common
Index: trunk/src/interp_erai_lwr_1989_2009.pro
===================================================================
--- trunk/src/interp_erai_lwr_1989_2009.pro	(revision 5)
+++ trunk/src/interp_erai_lwr_1989_2009.pro	(revision 6)
@@ -1,2 +1,40 @@
+;+
+;
+; .. interp_erai_lwr_1989_2009.pro:
+;
+; =============================
+; interp_erai_lwr_1989_2009.pro
+; =============================
+;
+;
+; SEE ALSO
+; ========
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;  IDL> interp_erai_lwr_1989_2009
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
 pro interp_erai_lwr_1989_2009
 @common
@@ -75,7 +113,4 @@
 @ncdf_quickwrite
 
-;------------------------------------------------------------
 return
 end
-
-
Index: trunk/src/interp_erai_sst_1989_2009.pro
===================================================================
--- trunk/src/interp_erai_sst_1989_2009.pro	(revision 5)
+++ trunk/src/interp_erai_sst_1989_2009.pro	(revision 6)
@@ -1,2 +1,40 @@
+;+
+;
+; .. _interp_erai_sst_1989_2009.pro:
+;
+; =============================
+; interp_erai_sst_1989_2009.pro
+; =============================
+;
+; SEE ALSO
+; ========
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;  IDL> interp_erai_sst_1989_2009
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;
+;   * creation
+;
+;-
 pro interp_erai_sst_1989_2009
 @common
Index: trunk/src/interp_erai_t2m_1989_2009.pro
===================================================================
--- trunk/src/interp_erai_t2m_1989_2009.pro	(revision 5)
+++ trunk/src/interp_erai_t2m_1989_2009.pro	(revision 6)
@@ -1,2 +1,41 @@
+;+
+;
+; .. interp_erai_t2m_1989_2009.pro:
+;
+; =============================
+; interp_erai_t2m_1989_2009.pro
+; =============================
+;
+;
+; SEE ALSO
+; ========
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;  IDL> interp_erai_t2m_1989_2009
+;
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
 pro interp_erai_t2m_1989_2009
 @common
Index: trunk/src/interp_erai_ws_1989_2009.pro
===================================================================
--- trunk/src/interp_erai_ws_1989_2009.pro	(revision 5)
+++ trunk/src/interp_erai_ws_1989_2009.pro	(revision 6)
@@ -1,2 +1,39 @@
+;+
+;
+; .. _interp_erai_ws_1989_2009.pro:
+;
+; ============================
+; interp_erai_ws_1989_2009.pro
+; ============================
+; SEE ALSO
+; ========
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;  IDL> interp_erai_ws_1989_2009
+;
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
 pro interp_erai_ws_1989_2009
 @common
@@ -83,7 +120,4 @@
 @ncdf_quickwrite
 
-;------------------------------------------------------------
 return
 end
-
-
Index: trunk/src/interp_olr_30n30s_1989_2009.pro
===================================================================
--- trunk/src/interp_olr_30n30s_1989_2009.pro	(revision 5)
+++ trunk/src/interp_olr_30n30s_1989_2009.pro	(revision 6)
@@ -1,2 +1,40 @@
+;+
+;
+; .. _interp_olr_30n30s_1989_2009.pro:
+;
+; ===============================
+; interp_olr_30n30s_1989_2009.pro
+; ===============================
+;
+;
+; SEE ALSO
+; ========
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;  IDL> interp_olr_30n30s_1989_2009
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
 pro interp_olr_30n30s_1989_2009
 @common
@@ -12,6 +50,6 @@
 olrin=read_ncdf("olr",19881231, 20091231, file=filein,/nostr)
 
-mskin=glamt*0.+1. 
- 
+mskin=glamt*0.+1.
+
 timein=time & jptin=jpt
 
Index: trunk/src/lwr_correction_ncdf.pro
===================================================================
--- trunk/src/lwr_correction_ncdf.pro	(revision 5)
+++ trunk/src/lwr_correction_ncdf.pro	(revision 6)
@@ -1,2 +1,40 @@
+;+
+;
+; .. _lwr_correction_ncdf.pro:
+;
+; =======================
+; lwr_correction_ncdf.pro
+; =======================
+;
+; SEE ALSO
+; ========
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;  IDL> lwr_correction_ncdf
+;
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
 pro lwr_correction_ncdf
 @common
@@ -67,4 +105,2 @@
 
 end
-
-
Index: trunk/src/q2m_correction_ncdf.pro
===================================================================
--- trunk/src/q2m_correction_ncdf.pro	(revision 5)
+++ trunk/src/q2m_correction_ncdf.pro	(revision 6)
@@ -1,2 +1,39 @@
+;+
+;
+; .. _q2m_correction_ncdf.pro:
+;
+; =======================
+; q2m_correction_ncdf.pro
+; =======================
+;
+; SEE ALSO
+; ========
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;  IDL> q2m_correction_ncdf
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
 pro q2m_correction_ncdf
 @common
@@ -66,4 +103,2 @@
 
 end
-
-
Index: trunk/src/rh_to_spechum.pro
===================================================================
--- trunk/src/rh_to_spechum.pro	(revision 5)
+++ trunk/src/rh_to_spechum.pro	(revision 6)
@@ -1,15 +1,54 @@
+;+
+;
+; =============
+; rh_to_spechum
+; =============
+;
+; .. function: result=rh_to_spechum(rh,ta,P)
+;
+;     :param rh: in %
+;     :param ta: air temperature in degC
+;     :param P : pressure in hPa
+;
+;     :returns: Air specific humidity (g/kg)
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;  IDL> rh=+todo+
+;  IDL> ta=+todo+
+;  IDL> P=+todo+
+;  IDL> result=rh_to_spechum(rh,ta,P)
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
 function rh_to_spechum, rh,ta,P
-;----------------------------------------------------------------------
-; rh: in %
-; ta: air temperature in degC
-; P : pressure in hPa
-;----------------------------------------------------------------------
 
 rhf=rh/100.
 qw=qsat(ta,P)/1000.
-q=(rhf*qw)/(1.-qw*(1-rhf))*1e3    ; Air specific humidity (g/kg)
+
+; Air specific humidity (g/kg)
+q=(rhf*qw)/(1.-qw*(1-rhf))*1e3
 
 return, q
 
-;----------------------------------------------------------------------
 end
Index: trunk/src/sst_correction_ncdf.pro
===================================================================
--- trunk/src/sst_correction_ncdf.pro	(revision 5)
+++ trunk/src/sst_correction_ncdf.pro	(revision 6)
@@ -1,2 +1,40 @@
+;+
+;
+; .. sst_correction_ncdf.pro:
+;
+; =======================
+; sst_correction_ncdf.pro
+; =======================
+;
+;
+; SEE ALSO
+; ========
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;  IDL> sst_correction_ncdf
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
 pro sst_correction_ncdf
 @common
Index: trunk/src/t2m_correction_ncdf.pro
===================================================================
--- trunk/src/t2m_correction_ncdf.pro	(revision 5)
+++ trunk/src/t2m_correction_ncdf.pro	(revision 6)
@@ -1,2 +1,39 @@
+;+
+;
+; .. _t2m_correction_ncdf.pro:
+;
+; =======================
+; t2m_correction_ncdf.pro
+; =======================
+;
+; SEE ALSO
+; ========
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;  IDL> t2m_correction_ncdf
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
 pro t2m_correction_ncdf
 @common
@@ -74,4 +111,2 @@
 
 end
-
-
Index: trunk/src/time_axe_modif_TropFlux.pro
===================================================================
--- trunk/src/time_axe_modif_TropFlux.pro	(revision 5)
+++ trunk/src/time_axe_modif_TropFlux.pro	(revision 6)
@@ -1,2 +1,39 @@
+;+
+;
+; .. _time_axe_modif_TropFlux.pro:
+;
+; ===========================
+; time_axe_modif_TropFlux.pro
+; ===========================
+;
+; SEE ALSO
+; ========
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;  IDL> time_axe_modif_tropflux
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
 pro time_axe_modif_TropFlux
 
@@ -26,5 +63,5 @@
 ncdf_control, cdfid ,/REDEF ; put in define mode
 ;
-; reading attributs of time  
+; reading attributs of time
 ;
 varid=ncdf_varid(cdfid,'time')
Index: trunk/src/ws_correction_ncdf.pro
===================================================================
--- trunk/src/ws_correction_ncdf.pro	(revision 5)
+++ trunk/src/ws_correction_ncdf.pro	(revision 6)
@@ -1,2 +1,40 @@
+;+
+;
+; .. _ws_correction_ncdf.pro:
+;
+; ======================
+; ws_correction_ncdf.pro
+; ======================
+;
+;
+; SEE ALSO
+; ========
+;
+; EXAMPLES
+; ========
+;
+; ::
+;
+;  IDL> ws_correction_ncdf
+;
+; TODO
+; ====
+;
+; hard coded directory - usage of ${TROPFLUX_ID}
+;
+; coding rules
+;
+; EVOLUTIONS
+; ==========
+;
+; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * minimal header
+;
+; - pbk 2008
+;
+;   * creation
+;
+;-
 pro ws_correction_ncdf
 @common
@@ -70,4 +108,2 @@
 
 end
-
-
