Ignore:
Timestamp:
Feb 23, 2010, 1:40:10 PM (13 years ago)
Author:
habili
Message:

Fixed bug with logger

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/shallow_water/smf.py

    r7317 r7632  
    4949import numpy as num
    5050
    51 import anuga.utilities.log as log
     51import anuga.utilities.log as lg
    5252
    5353
     
    145145    #a few temporary print statements
    146146    if verbose is True:
    147         log.critical('\nThe slide ...')
    148         log.critical('\tLength: %s' % str(length))
    149         log.critical('\tDepth: %s' % str(depth))
    150         log.critical('\tSlope: %s' % str(slope))
    151         log.critical('\tWidth: %s' % str(width))
    152         log.critical('\tThickness: %s' % str(thickness))
    153         log.critical('\tx0: %s' % str(x0))
    154         log.critical('\ty0: %s' % str(y0))
    155         log.critical('\tAlpha: %s' % str(alpha))
    156         log.critical('\tAcceleration: %s' % str(a0))
    157         log.critical('\tTerminal velocity: %s' % str(ut))
    158         log.critical('\tChar time: %s' % str(t0))
    159         log.critical('\tChar distance: %s' % str(s0))
    160         log.critical('\nThe tsunami ...')
    161         log.critical('\tWavelength: %s' % str(w))
    162         log.critical('\t2D amplitude: %s' % str(a2D))
    163         log.critical('\t3D amplitude: %s' % str(a3D))
    164         log.critical('\tscale for eta(x,y): %s' % str(scale))
     147        lg.critical('\nThe slide ...')
     148        lg.critical('\tLength: %s' % str(length))
     149        lg.critical('\tDepth: %s' % str(depth))
     150        lg.critical('\tSlope: %s' % str(slope))
     151        lg.critical('\tWidth: %s' % str(width))
     152        lg.critical('\tThickness: %s' % str(thickness))
     153        lg.critical('\tx0: %s' % str(x0))
     154        lg.critical('\ty0: %s' % str(y0))
     155        lg.critical('\tAlpha: %s' % str(alpha))
     156        lg.critical('\tAcceleration: %s' % str(a0))
     157        lg.critical('\tTerminal velocity: %s' % str(ut))
     158        lg.critical('\tChar time: %s' % str(t0))
     159        lg.critical('\tChar distance: %s' % str(s0))
     160        lg.critical('\nThe tsunami ...')
     161        lg.critical('\tWavelength: %s' % str(w))
     162        lg.critical('\t2D amplitude: %s' % str(a2D))
     163        lg.critical('\t3D amplitude: %s' % str(a3D))
     164        lg.critical('\tscale for eta(x,y): %s' % str(scale))
    165165
    166166    #keep an eye on some of the assumptions built into the maths
     
    168168    if ((slope < 5) or (slope > 30)):
    169169        if verbose is True:
    170             log.critical('WARNING: slope out of range (5 - 30 degrees) %s'
     170            lg.critical('WARNING: slope out of range (5 - 30 degrees) %s'
    171171                         % str(slope))
    172172    if ((depth/length < 0.06) or (depth/length > 1.5)):
    173173        if verbose is True:
    174             log.critical('WARNING: d/b out of range (0.06 - 1.5) %s'
     174            lg.critical('WARNING: d/b out of range (0.06 - 1.5) %s'
    175175                         % str(depth/length))
    176176    if ((thickness/length < 0.008) or (thickness/length > 0.2)):
    177177        if verbose is True:
    178             log.critical('WARNING: T/b out of range (0.008 - 0.2) %s'
     178            lg.critical('WARNING: T/b out of range (0.008 - 0.2) %s'
    179179                         % str(thickness/length))
    180180    if ((gamma < 1.46) or (gamma > 2.93)):
    181181        if verbose is True:
    182             log.critical('WARNING: gamma out of range (1.46 - 2.93) %s'
     182            lg.critical('WARNING: gamma out of range (1.46 - 2.93) %s'
    183183                         % str(gamma))
    184184
     
    292292    #a few temporary print statements
    293293    if verbose is True:
    294         log.critical('\nThe slump ...')
    295         log.critical('\tLength: %s' % str(length))
    296         log.critical('\tDepth: %s' % str(depth))
    297         log.critical('\tSlope: %s' % str(slope))
    298         log.critical('\tWidth: %s' % str(width))
    299         log.critical('\tThickness: %s' % str(thickness))
    300         log.critical('\tRadius: %s' % str(radius))
    301         log.critical('\tDphi: %s' % str(dphi))
    302         log.critical('\tx0: %s' % str(x0))
    303         log.critical('\ty0: %s' % str(y0))
    304         log.critical('\tAlpha: %s' % str(alpha))
    305         log.critical('\tAcceleration: %s' % str(a0))
    306         log.critical('\tMaximum velocity: %s' % str(um))
    307         log.critical('\tChar time: %s' % str(t0))
    308         log.critical('\tChar distance: %s' % str(s0))
    309         log.critical('\nThe tsunami ...')
    310         log.critical('\tWavelength: %s' % str(w))
    311         log.critical('\t2D amplitude: %s' % str(a2D))
    312         log.critical('\t3D amplitude: %s' % str(a3D))
    313         log.critical('\tDelta x %s' % str(dx))
    314         log.critical('\tsmall %s' % str(zsmall))
    315         log.critical('\tKappa d  %s' % str(kappad))
    316         log.critical('\tscale for eta(x,y): %s' % str(scale))
     294        lg.critical('\nThe slump ...')
     295        lg.critical('\tLength: %s' % str(length))
     296        lg.critical('\tDepth: %s' % str(depth))
     297        lg.critical('\tSlope: %s' % str(slope))
     298        lg.critical('\tWidth: %s' % str(width))
     299        lg.critical('\tThickness: %s' % str(thickness))
     300        lg.critical('\tRadius: %s' % str(radius))
     301        lg.critical('\tDphi: %s' % str(dphi))
     302        lg.critical('\tx0: %s' % str(x0))
     303        lg.critical('\ty0: %s' % str(y0))
     304        lg.critical('\tAlpha: %s' % str(alpha))
     305        lg.critical('\tAcceleration: %s' % str(a0))
     306        lg.critical('\tMaximum velocity: %s' % str(um))
     307        lg.critical('\tChar time: %s' % str(t0))
     308        lg.critical('\tChar distance: %s' % str(s0))
     309        lg.critical('\nThe tsunami ...')
     310        lg.critical('\tWavelength: %s' % str(w))
     311        lg.critical('\t2D amplitude: %s' % str(a2D))
     312        lg.critical('\t3D amplitude: %s' % str(a3D))
     313        lg.critical('\tDelta x %s' % str(dx))
     314        lg.critical('\tsmall %s' % str(zsmall))
     315        lg.critical('\tKappa d  %s' % str(kappad))
     316        lg.critical('\tscale for eta(x,y): %s' % str(scale))
    317317
    318318    #keep an eye on some of the assumptions built into the maths
     
    320320    if ((slope < 10) or (slope > 30)):       
    321321        if verbose is True:
    322             log.critical('WARNING: slope out of range (10 - 30 degrees) %s'
     322            lg.critical('WARNING: slope out of range (10 - 30 degrees) %s'
    323323                         % str(slope))
    324324    if ((depth/length < 0.34) or (depth/length > 0.5)):     
    325325        if verbose is True:
    326             log.critical('WARNING: d/b out of range (0.34 - 0.5) %s'
     326            lg.critical('WARNING: d/b out of range (0.34 - 0.5) %s'
    327327                         % str(depth/length))
    328328    if ((thickness/length < 0.10) or (thickness/length > 0.15)):     
    329329        if verbose is True:
    330             log.critical('WARNING: T/b out of range (0.10 - 0.15) %s'
     330            lg.critical('WARNING: T/b out of range (0.10 - 0.15) %s'
    331331                         % str(thickness/length))
    332332    if ((radius/length < 1.0) or (radius/length > 2.0)):     
    333333        if verbose is True:
    334             log.critical('WARNING: R/b out of range (1 - 2) %s'
     334            lg.critical('WARNING: R/b out of range (1 - 2) %s'
    335335                         % str(radius/length))
    336336    if ((dphi < 0.10) or (dphi > 0.52)):     
    337337        if verbose is True:
    338             log.critical('WARNING: del_phi out of range (0.10 - 0.52) %s'
     338            lg.critical('WARNING: del_phi out of range (0.10 - 0.52) %s'
    339339                         % str(dphi))
    340340    if ((gamma < 1.46) or (gamma > 2.93)):     
    341341        if verbose is True:
    342             log.critical('WARNING: gamma out of range (1.46 - 2.93) %s'
     342            lg.critical('WARNING: gamma out of range (1.46 - 2.93) %s'
    343343                         % str(gamma))
    344344
Note: See TracChangeset for help on using the changeset viewer.