Skip to content

Commit

Permalink
cmip26: log tmpdir
Browse files Browse the repository at this point in the history
  • Loading branch information
raehik committed Mar 16, 2023
1 parent f9979f3 commit 6f22e36
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmip26.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,14 @@
import logging
import tempfile



# logging config
# obtain logging config from LOGGING_LEVEL environment variable
# e.g. `LOGGING_LEVEL=20 python cmip26.py ...`
# common numeric values: https://docs.python.org/3/library/logging.html#levels
logging_level = os.environ.get('LOGGING_LEVEL')
if logging_level is not None:
logging.basicConfig(level=int(logging_level))
logger = logging.getLogger(__name__)


# Script parameters
CATALOG_URL = 'https://raw.githubusercontent.com/pangeo-data/pangeo-datastore\
/master/intake-catalogs/master.yaml'
Expand All @@ -41,6 +40,7 @@
experiment within a specific run.'

data_location = tempfile.mkdtemp()
logger.info(f"working dir: {data_location}")

# Parse the command-line parameters
parser = argparse.ArgumentParser(description=DESCRIPTION)
Expand Down

0 comments on commit 6f22e36

Please sign in to comment.