Skip to content

Commit

Permalink
using own logger in SixHourMax.py
Browse files Browse the repository at this point in the history
  • Loading branch information
heikoklein committed Oct 12, 2023
1 parent 58976db commit 5ca082f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions utils/SnapPy/Snappy/EEMEP/SixHourMax.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def flightlevel_in_pressure(flightlevel):
p = 1013.25 * math.pow(1-(0.0065*h)/288.15,5.255) # international formula
return p

logger = logging.getLogger('SixHourMax')

class SixHourMax:
"""Calculate the 6h max VAAC output from 3D eemep-hourly mean output
Expand Down Expand Up @@ -141,7 +143,7 @@ def _snap_add_total_ash_column(self) -> None:
exampleVar = var
data += var[:]
if exampleVar:
logging.info(f"adding COLUMN_ASH_kmax to snap-model")
logger.info(f"adding COLUMN_ASH_kmax to snap-model")
columnName = 'COLUMN_ASH_kmax' # name in emep-model
if not columnName in self.nc.variables:
self.nc.createVariable(columnName,'f4',exampleVar.dimensions, zlib=True)
Expand All @@ -155,7 +157,7 @@ def _snap_add_total_ash_column(self) -> None:

def __init__(self, nc):
'''Initialize with Dataset nc'''
logging.info("Adding 6hour max to nc-file")
logger.info("Adding 6hour max to nc-file")
self.nc = nc
self._detect_model()

Expand Down

0 comments on commit 5ca082f

Please sign in to comment.