Return True if the input argument is an iterable. Args: wrfin (:class:`netCDF4.Dataset`, :class:`Nio.NioFile`, or an \ iterable): WRF-ARW NetCDF data as a :class:`netCDF4.Dataset`, :class:`Nio.NioFile` or an iterable sequence of the aforementioned ty
(wrfin)
| 120 | |
| 121 | |
| 122 | def is_multi_file(wrfin): |
| 123 | """Return True if the input argument is an iterable. |
| 124 | |
| 125 | Args: |
| 126 | |
| 127 | wrfin (:class:`netCDF4.Dataset`, :class:`Nio.NioFile`, or an \ |
| 128 | iterable): WRF-ARW NetCDF |
| 129 | data as a :class:`netCDF4.Dataset`, :class:`Nio.NioFile` |
| 130 | or an iterable sequence of the aforementioned types. |
| 131 | |
| 132 | Returns: |
| 133 | |
| 134 | :obj:`bool`: True if the input is an iterable. False if the input |
| 135 | is a single NetCDF file object. |
| 136 | |
| 137 | """ |
| 138 | if isinstance(wrfin, Dataset): |
| 139 | is_iterable = False |
| 140 | elif isinstance(wrfin, Iterable): |
| 141 | is_iterable = True |
| 142 | else: |
| 143 | is_iterable = False |
| 144 | |
| 145 | return (is_iterable and not isstr(wrfin)) |
| 146 | |
| 147 | |
| 148 | def has_time_coord(wrfnc): |