@@ -213,6 +213,19 def checkForRealPath(path, year, doy, set, ext): | |||
|
213 | 213 | |
|
214 | 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 | 229 | class JRODataIO: |
|
217 | 230 | |
|
218 | 231 | c = 3E8 |
@@ -339,8 +352,12 class JRODataReader(JRODataIO, ProcessingUnit): | |||
|
339 | 352 | else: |
|
340 | 353 | dirList = [] |
|
341 | 354 | for thisPath in os.listdir(path): |
|
342 | if os.path.isdir(os.path.join(path,thisPath)): | |
|
343 |
|
|
|
355 | if not os.path.isdir(os.path.join(path,thisPath)): | |
|
356 | continue | |
|
357 | if not isDoyFolder(thisPath): | |
|
358 | continue | |
|
359 | ||
|
360 | dirList.append(thisPath) | |
|
344 | 361 | |
|
345 | 362 | if not(dirList): |
|
346 | 363 | return None, None |
General Comments 0
You need to be logged in to leave comments.
Login now