Index: trunk/SRC/Computation/bsf.pro
===================================================================
--- trunk/SRC/Computation/bsf.pro	(revision 461)
+++ trunk/SRC/Computation/bsf.pro	(revision 462)
@@ -23,4 +23,8 @@
 ; @keyword REFVALUE {type=scalar} {default=0.}
 ; the bsf value that we want to speficy at the position defined by refpoint
+;
+; @keyword TRANSPORT {type=scalar: 0 or 1} {default=0.}
+; activate to specify that z3d is not a zonal current but a zonal
+; transport (e2u*e3u*un)
 ;
 ; @returns {type=2D xy array}
@@ -59,5 +63,5 @@
 ;-
 ;
-FUNCTION bsf, z3d, NOSTRUCTURE = nostructure, REFPOINT = refpoint, REFVALUE = refvalue
+FUNCTION bsf, z3d, NOSTRUCTURE = nostructure, REFPOINT = refpoint, REFVALUE = refvalue, TRANSPORT = transport
 ;
   compile_opt idl2, strictarrsubs
@@ -81,10 +85,9 @@
   un = fitintobox(temporary(un))
 ;
-  e23 = e3u_3d(/e2)
-;
-; mask the array
-  un = temporary(umsk) * temporary(un)
+; current -> transport
+  IF NOT keyword_set(transport) THEN un = temporary(un) * e3u_3d(/e2)
+  utr = temporary(umsk) * temporary(un)
 ; compute the bsf
-  bsf = 1.e-6 * total(total(temporary(un) * temporary(e23), 3), 2, /cumulative)
+  bsf = 1.e-6 * total(total(temporary(utr), 3), 2, /cumulative)
 ; set bsf to 0 in the largest continent... no done...
   IF keyword_set(refpoint) THEN BEGIN
Index: trunk/SRC/Computation/msf.pro
===================================================================
--- trunk/SRC/Computation/msf.pro	(revision 461)
+++ trunk/SRC/Computation/msf.pro	(revision 462)
@@ -28,4 +28,8 @@
 ; Set this keyword to a named variable in which msf will return the 2d
 ; array (yz) should be used by pltz to do plot the land/sea mask(see example)
+;
+; @keyword TRANSPORT {type=scalar: 0 or 1} {default=0.}
+; activate to specify that z3d is not a zonal current but a zonal
+; transport (e1v*e3v*vn)
 ;
 ; @returns {type=2D yz array}
@@ -65,5 +69,5 @@
 ;-
 ;
-FUNCTION msf, z3d, mask2d, INDEXBOXZOOM = indexboxzoom, MASKOUT = maskout, NOSTRUCTURE = nostructure
+FUNCTION msf, z3d, mask2d, INDEXBOXZOOM = indexboxzoom, MASKOUT = maskout, NOSTRUCTURE = nostructure, TRANSPORT = transport
 ;
   compile_opt idl2, strictarrsubs
@@ -95,8 +99,8 @@
   IF keyword_set(key_partialstep) AND total(msk[*, ny-1, *]) NE 0 THEN flagdata = 1
 ;
-  e13 = e3v_3d(/e1) 
+; current -> transport
+  IF NOT keyword_set(transport) THEN vn = temporary(vn) * e3v_3d(/e1) 
+  vtr = temporary(vn) * msk
 ;
-; mask the array
-  vn = temporary(vn) * msk
   IF arg_present(maskout) THEN BEGIN
     msk = total(temporary(msk), 1)
@@ -108,7 +112,7 @@
 ;  
 ; defaut computation:
-;  msf = 1.e-6 * total(total(temporary(e13) * temporary(vn), 1), 2, /cumulative)
+;  msf = 1.e-6 * total(total(temporary(vtr), 1), 2, /cumulative)
 ; but we force the computation from bottom to up.
-  msf = total(temporary(vn) * temporary(e13), 1) ; -> yz array
+  msf = total(temporary(vtr), 1) ; -> yz array
   msf = reverse(temporary(msf), 2)
   msf = 1.e-6 * total(temporary(msf), 2, /cumulative)
Index: trunk/SRC/ToBeReviewed/LECTURE/read_ncdf.pro
===================================================================
--- trunk/SRC/ToBeReviewed/LECTURE/read_ncdf.pro	(revision 461)
+++ trunk/SRC/ToBeReviewed/LECTURE/read_ncdf.pro	(revision 462)
@@ -189,6 +189,10 @@
       firsttps = long(beginning[0])
       IF n_elements(ending) NE 0 THEN lasttps = long(ending[0]) ELSE lasttps = firsttps
-      jpt = lasttps-firsttps+1
-      IF NOT keyword_set(callitself) then time = julday(1, 1, 1) + lindgen(jpt)
+      IF NOT keyword_set(callitself) then BEGIN 
+        time = ncdf_gettime(filename, cdfid, caller = 'read_ncdf', err = err, _extra = ex)
+        jpt = lasttps-firsttps+1
+        IF time[0] LT 0 then time = julday(1, 1, 1) + lindgen(jpt) $
+        ELSE time = time[firsttps:lasttps]
+      ENDIF ELSE jpt = lasttps-firsttps+1
     END
     keyword_set(parent):BEGIN
@@ -204,5 +208,5 @@
       jpt = lasttps-firsttps+1
     END
-    keyword_set(allrecords):BEGIN
+    keyword_set(allrecords) OR n_elements(beginning) EQ 0:BEGIN
       time = ncdf_gettime(filename, cdfid, caller = 'read_ncdf', err = err, _extra = ex)
       IF time[0] LT 0 then BEGIN 
