MCPcopy Create free account
hub / github.com/NCAR/wrf-python / has_time_coord

Function has_time_coord

src/wrf/util.py:148–165  ·  view source on GitHub ↗

Return True if the input file or sequence contains the time coordinate variable. The time coordinate is named 'XTIME'. Args: wrfnc (:class:`netCDF4.Dataset` or :class:`Nio.NioFile`): A single NetCDF file object. Returns: :obj:`bool`: True if the netcd

(wrfnc)

Source from the content-addressed store, hash-verified

146
147
148def has_time_coord(wrfnc):
149 """Return True if the input file or sequence contains the time
150 coordinate variable.
151
152 The time coordinate is named 'XTIME'.
153
154 Args:
155
156 wrfnc (:class:`netCDF4.Dataset` or :class:`Nio.NioFile`): A single
157 NetCDF file object.
158
159 Returns:
160
161 :obj:`bool`: True if the netcdf file contains the time coordinate
162 variable, False otherwise.
163
164 """
165 return "XTIME" in wrfnc.variables
166
167
168def is_mapping(wrfin):

Callers 1

_get_coord_namesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected