@@ -213,6 +213,19 def checkForRealPath(path, year, doy, set, ext): | |||||
213 |
|
213 | |||
214 | return fullfilename, filename |
|
214 | return fullfilename, filename | |
215 |
|
215 | |||
|
216 | def isDoyFolder(folder): | |||
|
217 | ||||
|
218 | try: | |||
|
219 | year = int(folder[1:5]) | |||
|
220 | except: | |||
|
221 | return 0 | |||
|
222 | ||||
|
223 | try: | |||
|
224 | doy = int(folder[5:8]) | |||
|
225 | except: | |||
|
226 | return 0 | |||
|
227 | return 1 | |||
|
228 | ||||
216 | class JRODataIO: |
|
229 | class JRODataIO: | |
217 |
|
230 | |||
218 | c = 3E8 |
|
231 | c = 3E8 | |
@@ -339,8 +352,12 class JRODataReader(JRODataIO, ProcessingUnit): | |||||
339 | else: |
|
352 | else: | |
340 | dirList = [] |
|
353 | dirList = [] | |
341 | for thisPath in os.listdir(path): |
|
354 | for thisPath in os.listdir(path): | |
342 | if os.path.isdir(os.path.join(path,thisPath)): |
|
355 | if not os.path.isdir(os.path.join(path,thisPath)): | |
343 |
|
|
356 | continue | |
|
357 | if not isDoyFolder(thisPath): | |||
|
358 | continue | |||
|
359 | ||||
|
360 | dirList.append(thisPath) | |||
344 |
|
361 | |||
345 | if not(dirList): |
|
362 | if not(dirList): | |
346 | return None, None |
|
363 | return None, None |
General Comments 0
You need to be logged in to leave comments.
Login now