# Path: atmos/utils.py
# def print_if(msg, condition, printfunc=None):
#     """ Print msg if condition is True"""
#     if condition:
#         if printfunc is not None:
#             printfunc(msg)
#         else:
#             print(msg)
# 
# def disptime(fmt=None):
#     now = datetime.now()
# 
#     if fmt == None:
#         fmt = '%02d/%02d/%02d %02d:%02d:%02d'
#     now = (fmt % (now.month, now.day, now.year, now.hour, now.minute,
#            now.second))
#     print(now)
#     return now
# 
# Path: atmos/constants.py



import numpy as np
import pandas as pd
import collections
import scipy.interpolate as interp
import xarray as xray
import time
import atmos.utils as utils
import atmos.xrhelper as xr
from mpl_toolkits import basemap
from xarray import Dataset
from atmos.utils import print_if, disptime
from atmos.constants import const as constants
                data = data_out
            data.load()
        return data

    pieces = []
    func_kw = utils.makelist(func_kw)
    paths = utils.makelist(paths)
    if len(func_kw) == 1:
        func_kw *= len(paths)
    for p, kw in zip(paths, func_kw):
        print_if(None, verbose, printfunc=disptime)
        print_if('Loading ' + p, verbose)
        attempt = 0
        while attempt < NMAX:
            try:
                piece = get_data(p, var_ids, subset_dict, func, func_args, kw)
                print_if('Appending data', verbose)
                pieces.append(piece)
                attempt = NMAX
            except RuntimeError as err:
                attempt += 1
                if attempt < NMAX:
                    print('Error reading file.  Attempting again in %d s' %
                          WAIT)
                    time.sleep(WAIT)
                else:
                    raise err

    print_if('Concatenating data', verbose)
    data = xray.concat(pieces, dim=concat_dim)

# Path: atmos/utils.py
# def print_if(msg, condition, printfunc=None):
#     """ Print msg if condition is True"""
#     if condition:
#         if printfunc is not None:
#             printfunc(msg)
#         else:
#             print(msg)
# 
# def disptime(fmt=None):
#     now = datetime.now()
# 
#     if fmt == None:
#         fmt = '%02d/%02d/%02d %02d:%02d:%02d'
#     now = (fmt % (now.month, now.day, now.year, now.hour, now.minute,
#            now.second))
#     print(now)
#     return now
# 
# Path: atmos/constants.py



# Path: atmos/data.py
import numpy as np
import pandas as pd
import collections
import scipy.interpolate as interp
import xarray as xray
import time
import atmos.utils as utils
import atmos.xrhelper as xr
from mpl_toolkits import basemap
from xarray import Dataset
from atmos.utils import print_if, disptime
from atmos.constants import const as constants

                data = data_out
            data.load()
        return data

    pieces = []
    func_kw = utils.makelist(func_kw)
    paths = utils.makelist(paths)
    if len(func_kw) == 1:
        func_kw *= len(paths)
    for p, kw in zip(paths, func_kw):
        print_if(None, verbose, printfunc=disptime)
        print_if('Loading ' + p, verbose)
        attempt = 0
        while attempt < NMAX:
            try:
                piece = get_data(p, var_ids, subset_dict, func, func_args, kw)
                print_if('Appending data', verbose)
                pieces.append(piece)
                attempt = NMAX
            except RuntimeError as err:
                attempt += 1
                if attempt < NMAX:
                    print('Error reading file.  Attempting again in %d s' %
                          WAIT)
                    time.sleep(WAIT)
                else:
                    raise err

    print_if('Concatenating data', verbose)
    data = xray.concat(pieces, dim=concat_dim)

    print_if(None, verbose, printfunc=disptime)