Changeset 0f89116 in flex_extract.git for Source/Python/Mods/disaggregation.py
- Timestamp:
- Dec 19, 2019, 8:07:12 PM (4 years ago)
- Branches:
- master, ctbto, dev
- Children:
- a73c0f6
- Parents:
- 0d99607
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Source/Python/Mods/disaggregation.py
r44174de r0f89116 247 247 # geometric mean, restricted such that non-negativity is guaranteed 248 248 # according to Eq. (25) 249 fip1 =min( 3.*g[i] , 3.*g[i+1] , np.sqrt(g[i+1]*g[i]))249 fip1 = min(3. * g[i], 3. * g[i + 1], np.sqrt(g[i + 1] * g[i])) 250 250 251 251 # the function value at the first sub-grid point (fi1) is determined … … 281 281 # the monotonicity filter corrects the value at (fim1) by 282 282 # substituting (fim1) with (fmon), see Eq. (27), (28) and (29) 283 fmon = min(3. *g[i-2], \284 3. *g[i-1], \285 np.sqrt(max(0, (18./13.*g[i-2] - 5./13.*f[-7]) *286 (18./13.*g[i-1] - 5./13.*f[-1]))))283 fmon = min(3. * g[i - 2], 284 3. * g[i - 1], 285 np.sqrt(max(0, (18. / 13. * g[i - 2] - 5. / 13. * f[-7]) * 286 (18. / 13. * g[i - 1] - 5. / 13. * f[-1])))) 287 287 288 288 # recomputation of the sub-grid interval values while the … … 295 295 f[-2] = f[-3]+(f[-1]-fmon)/3. 296 296 297 f.extend([0., 0.,0.])297 f.extend([0., 0., 0.]) 298 298 299 299 # otherwise the sub-grid values are calculated and added to the list … … 306 306 # geometric mean, restricted such that non-negativity is guaranteed 307 307 # according to Eq. (25) 308 fip1 = min( 3.*g[i] , 3.*g[i+1] , np.sqrt(g[i+1]*g[i]))308 fip1 = min(3. * g[i], 3. * g[i + 1], np.sqrt(g[i + 1] * g[i])) 309 309 310 310 # the function value at the first sub-grid point (fi1) is determined … … 324 324 # the monotonicity filter corrects the value at (fim1) by 325 325 # substituting (fim1) with fmon, see Eq. (27), (28) and (29) 326 fmon = min(3. *g[i-2], \327 3. *g[i-1], \328 np.sqrt(max(0, (18./13.*g[i-2] - 5./13.*f[-7]) *329 (18./13.*g[i-1] - 5./13.*f[-1]))))326 fmon = min(3. * g[i - 2], 327 3. * g[i - 1], 328 np.sqrt(max(0, (18. / 13. * g[i - 2] - 5. / 13. * f[-7]) * 329 (18. / 13. * g[i - 1] - 5. / 13. * f[-1])))) 330 330 331 331 # recomputation of the sub-grid interval values while the … … 358 358 # the monotonicity filter corrects the value at (fim1) by 359 359 # substituting (fim1) with (fmon), see Eq. (27), (28) and (29) 360 fmon = min(3. *g[-3], \361 3. *g[-2], \362 np.sqrt(max(0, (18./13.*g[-3] - 5./13.*f[-7]) *363 (18./13.*g[-2] - 5./13.*f[-1]))))360 fmon = min(3. * g[-3], 361 3. * g[-2], 362 np.sqrt(max(0, (18. / 13. * g[-3] - 5. / 13. * f[-7]) * 363 (18. / 13. * g[-2] - 5. / 13. * f[-1])))) 364 364 365 365 # recomputation of the sub-grid interval values while the … … 372 372 f[-2] = f[-3]+(f[-1]-fmon)/3. 373 373 374 f.extend([0., 0.,0.])374 f.extend([0., 0., 0.]) 375 375 376 376 # otherwise the sub-grid values are calculated and added to the list … … 397 397 # the monotonicity filter corrects the value at (fim1) by 398 398 # substituting (fim1) with (fmon), see Eq. (27), (28) and (29) 399 fmon = min(3. *g[-3], \400 3. *g[-2], \401 np.sqrt(max(0, (18./13.*g[-3] - 5./13.*f[-7]) *402 (18./13.*g[-2] - 5./13.*f[-1]))))399 fmon = min(3. * g[-3], 400 3. * g[-2], 401 np.sqrt(max(0, (18. / 13. * g[-3] - 5. / 13. * f[-7]) * 402 (18. / 13. * g[-2] - 5. / 13. * f[-1])))) 403 403 404 404 # recomputation of the sub-grid interval values while the
Note: See TracChangeset
for help on using the changeset viewer.