auromat.mapping.netcdf module

class auromat.mapping.netcdf.NetCDFMappingProvider(cdfPaths, maxTimeOffset=3)[source]

Bases: auromat.mapping.mapping.BaseMappingProvider

Parameters:maxTimeOffset – in seconds
contains(date)[source]

Return True if there is a mapping for the given date within +-maxTimeOffset.

Parameters:date (datetime) –
Return type:bool
get(date)[source]

Returns the mapping which is closest to the given date within +-maxTimeOffset.

Parameters:date (datetime) –
Return type:BaseMapping or MappingCollection
Raises ValueError:
 when no mapping exists for the given date
getById(identifier)[source]

Returns the mapping with the given identifier.

Parameters:identifier (string) –
Return type:BaseMapping or MappingCollection
Raises ValueError:
 when no mapping with the given identifier exists
getSequence(dateBegin=None, dateEnd=None)[source]

Returns a generator of mappings ordered by date for the given date range. If dateBegin and dateEnd are None, then all available mappings are returned.

Parameters:
  • dateBegin (datetime) –
  • dateEnd (datetime) – inclusive
Return type:

list of BaseMapping or MappingCollection objects

range

The dates of the first and last available mappings.

Return type:datetime tuple (from, to)