mpas_analysis.shared.io.namelist_streams_interface.StreamsFile.readpath¶
- StreamsFile.readpath(streamName, startDate=None, endDate=None, calendar=None)[source]¶
Given the name of a stream and optionally start and end dates and a calendar type, returns a list of files that match the file template in the stream.
- Parameters
streamName (string) – The name of a stream that produced the files
startDate (string or datetime.datetime, optional) –
String or datetime.datetime objects identifying the beginning and end dates to be found.
Note: a buffer of one output interval is subtracted from startDate and added to endDate because the file date might be the first or last date contained in the file (or anything in between).
endDate (string or datetime.datetime, optional) –
String or datetime.datetime objects identifying the beginning and end dates to be found.
Note: a buffer of one output interval is subtracted from startDate and added to endDate because the file date might be the first or last date contained in the file (or anything in between).
calendar ({'gregorian', 'gregorian_noleap'}, optional) – The name of one of the calendars supported by MPAS cores, and is required if startDate and/or endDate are supplied
- Returns
fileList (list) – A list of file names produced by the stream that fall between the startDate and endDate (if supplied)
- Raises
ValueError – If no files from the stream are found.