Index: source/python/mods/disaggregation.py
===================================================================
--- source/python/mods/disaggregation.py	(revision 708c6674550abec09bd249f6654698bdeaed17d0)
+++ source/python/mods/disaggregation.py	(revision 0e2f93e769a4276db0016147409dffbb1482dfa9)
@@ -210,5 +210,5 @@
 
     # time step
-    dt=1.0
+    dt = 1.0
 
     ############### Non-negative Geometric Mean Based Algorithm ###############
@@ -217,5 +217,5 @@
     # the value at t=0 of the interpolation algorithm coincides with the
     # first data value according to the persistence hypothesis
-    f=[g[0]]
+    f = [g[0]]
 
     # compute two first sub-grid intervals without monotonicity check
@@ -223,5 +223,5 @@
     # points and interpolate the corresponding data values
     # except for the last interval due to boundary conditions
-    for i in range(0,2):
+    for i in range(0, 2):
 
         # as a requirement:
@@ -229,6 +229,6 @@
         # interval in f has to be zero to such that f[i+1]=f[i+2]=f[i+3]=0
         # according to Eq. (6)
-        if g[i]==0.:
-            f.extend([0.,0.,0.])
+        if g[i] == 0.:
+            f.extend([0., 0., 0.])
 
         # otherwise the sub-grid values are calculated and added to the list
@@ -245,9 +245,9 @@
             # the function value at the first sub-grid point (fi1) is determined
             # according to the equal area condition with Eq. (19)
-            fi1=3./2.*g[i]-5./12.*fip1-1./12.*fi
+            fi1 = 3./2.*g[i]-5./12.*fip1-1./12.*fi
 
             # the function value at the second sub-grid point (fi2) is determined
             # according Eq. (18)
-            fi2=fi1+1./3.*(fip1-fi)
+            fi2 = fi1+1./3.*(fip1-fi)
 
             # add next interval of interpolated (sub-)grid values
@@ -260,5 +260,5 @@
     # points and interpolate the corresponding data values
     # except for the last interval due to boundary conditions
-    for i in range(2,len(g)-1):
+    for i in range(2, len(g)-1):
 
         # as a requirement:
@@ -266,10 +266,10 @@
         # interval in f has to be zero to such that f[i+1]=f[i+2]=f[i+3]=0
         # according to Eq. (6)
-        if g[i]==0.:
+        if g[i] == 0.:
             # apply monotonicity filter for interval before
             # check if there is "M" or "W" shape
-            if     np.sign(f[-5]-f[-6]) * np.sign(f[-4]-f[-5])==-1 \
-               and np.sign(f[-4]-f[-5]) * np.sign(f[-3]-f[-4])==-1 \
-               and np.sign(f[-3]-f[-4]) * np.sign(f[-2]-f[-3])==-1:
+            if     np.sign(f[-5]-f[-6]) * np.sign(f[-4]-f[-5]) == -1 \
+               and np.sign(f[-4]-f[-5]) * np.sign(f[-3]-f[-4]) == -1 \
+               and np.sign(f[-3]-f[-4]) * np.sign(f[-2]-f[-3]) == -1:
 
                 # the monotonicity filter corrects the value at (fim1) by
@@ -283,9 +283,9 @@
                 # interval boundaries (fi) and (fip2) remains unchanged
                 # see Eq. (18) and (19)
-                f[-4]=fmon
-                f[-6]=3./2.*g[i-2]-5./12.*fmon-1./12.*f[-7]
-                f[-5]=f[-6]+(fmon-f[-7])/3.
-                f[-3]=3./2.*g[i-1]-5./12.*f[-1]-1./12.*fmon
-                f[-2]=f[-3]+(f[-1]-fmon)/3.
+                f[-4] = fmon
+                f[-6] = 3./2.*g[i-2]-5./12.*fmon-1./12.*f[-7]
+                f[-5] = f[-6]+(fmon-f[-7])/3.
+                f[-3] = 3./2.*g[i-1]-5./12.*f[-1]-1./12.*fmon
+                f[-2] = f[-3]+(f[-1]-fmon)/3.
 
             f.extend([0.,0.,0.])
@@ -300,19 +300,19 @@
             # geometric mean, restricted such that non-negativity is guaranteed
             # according to Eq. (25)
-            fip1=min( 3.*g[i] , 3.*g[i+1] , np.sqrt(g[i+1]*g[i]) )
+            fip1 = min( 3.*g[i] , 3.*g[i+1] , np.sqrt(g[i+1]*g[i]) )
 
             # the function value at the first sub-grid point (fi1) is determined
             # according to the equal area condition with Eq. (19)
-            fi1=3./2.*g[i]-5./12.*fip1-1./12.*fi
+            fi1 = 3./2.*g[i]-5./12.*fip1-1./12.*fi
 
             # the function value at the second sub-grid point (fi2) is determined
             # according Eq. (18)
-            fi2=fi1+1./3.*(fip1-fi)
+            fi2 = fi1+1./3.*(fip1-fi)
 
             # apply monotonicity filter for interval before
             # check if there is "M" or "W" shape
-            if     np.sign(f[-5]-f[-6]) * np.sign(f[-4]-f[-5])==-1 \
-               and np.sign(f[-4]-f[-5]) * np.sign(f[-3]-f[-4])==-1 \
-               and np.sign(f[-3]-f[-4]) * np.sign(f[-2]-f[-3])==-1:
+            if     np.sign(f[-5]-f[-6]) * np.sign(f[-4]-f[-5]) == -1 \
+               and np.sign(f[-4]-f[-5]) * np.sign(f[-3]-f[-4]) == -1 \
+               and np.sign(f[-3]-f[-4]) * np.sign(f[-2]-f[-3]) == -1:
 
                 # the monotonicity filter corrects the value at (fim1) by
@@ -326,9 +326,9 @@
                 # interval boundaries (fi) and (fip2) remains unchanged
                 # see Eq. (18) and (19)
-                f[-4]=fmon
-                f[-6]=3./2.*g[i-2]-5./12.*fmon-1./12.*f[-7]
-                f[-5]=f[-6]+(fmon-f[-7])/3.
-                f[-3]=3./2.*g[i-1]-5./12.*f[-1]-1./12.*fmon
-                f[-2]=f[-3]+(f[-1]-fmon)/3.
+                f[-4] = fmon
+                f[-6] = 3./2.*g[i-2]-5./12.*fmon-1./12.*f[-7]
+                f[-5] = f[-6]+(fmon-f[-7])/3.
+                f[-3] = 3./2.*g[i-1]-5./12.*f[-1]-1./12.*fmon
+                f[-2] = f[-3]+(f[-1]-fmon)/3.
 
             # add next interval of interpolated (sub-)grid values
@@ -343,10 +343,10 @@
     # interval in f has to be zero to such that f[i+1]=f[i+2]=f[i+3]=0
     # according to Eq. (6)
-    if g[-1]==0.:
+    if g[-1] == 0.:
         # apply monotonicity filter for interval before
         # check if there is "M" or "W" shape
-        if     np.sign(f[-5]-f[-6]) * np.sign(f[-4]-f[-5])==-1 \
-           and np.sign(f[-4]-f[-5]) * np.sign(f[-3]-f[-4])==-1 \
-           and np.sign(f[-3]-f[-4]) * np.sign(f[-2]-f[-3])==-1:
+        if     np.sign(f[-5]-f[-6]) * np.sign(f[-4]-f[-5]) == -1 \
+           and np.sign(f[-4]-f[-5]) * np.sign(f[-3]-f[-4]) == -1 \
+           and np.sign(f[-3]-f[-4]) * np.sign(f[-2]-f[-3]) == -1:
 
             # the monotonicity filter corrects the value at (fim1) by
@@ -360,9 +360,9 @@
             # interval boundaries (fi) and (fip2) remains unchanged
             # see Eq. (18) and (19)
-            f[-4]=fmon
-            f[-6]=3./2.*g[-3]-5./12.*fmon-1./12.*f[-7]
-            f[-5]=f[-6]+(fmon-f[-7])/3.
-            f[-3]=3./2.*g[-2]-5./12.*f[-1]-1./12.*fmon
-            f[-2]=f[-3]+(f[-1]-fmon)/3.
+            f[-4] = fmon
+            f[-6] = 3./2.*g[-3]-5./12.*fmon-1./12.*f[-7]
+            f[-5] = f[-6]+(fmon-f[-7])/3.
+            f[-3] = 3./2.*g[-2]-5./12.*f[-1]-1./12.*fmon
+            f[-2] = f[-3]+(f[-1]-fmon)/3.
 
         f.extend([0.,0.,0.])
@@ -385,7 +385,7 @@
         # apply monotonicity filter for interval before
         # check if there is "M" or "W" shape
-        if     np.sign(f[-5]-f[-6]) * np.sign(f[-4]-f[-5])==-1 \
-           and np.sign(f[-4]-f[-5]) * np.sign(f[-3]-f[-4])==-1 \
-           and np.sign(f[-3]-f[-4]) * np.sign(f[-2]-f[-3])==-1:
+        if     np.sign(f[-5]-f[-6]) * np.sign(f[-4]-f[-5]) == -1 \
+           and np.sign(f[-4]-f[-5]) * np.sign(f[-3]-f[-4]) == -1 \
+           and np.sign(f[-3]-f[-4]) * np.sign(f[-2]-f[-3]) == -1:
 
             # the monotonicity filter corrects the value at (fim1) by
@@ -399,9 +399,9 @@
             # interval boundaries (fi) and (fip2) remains unchanged
             # see Eq. (18) and (19)
-            f[-4]=fmon
-            f[-6]=3./2.*g[-3]-5./12.*fmon-1./12.*f[-7]
-            f[-5]=f[-6]+(fmon-f[-7])/3.
-            f[-3]=3./2.*g[-2]-5./12.*f[-1]-1./12.*fmon
-            f[-2]=f[-3]+(f[-1]-fmon)/3.
+            f[-4] = fmon
+            f[-6] = 3./2.*g[-3]-5./12.*fmon-1./12.*f[-7]
+            f[-5] = f[-6]+(fmon-f[-7])/3.
+            f[-3] = 3./2.*g[-2]-5./12.*f[-1]-1./12.*fmon
+            f[-2] = f[-3]+(f[-1]-fmon)/3.
 
         # add next interval of interpolated (sub-)grid values
