# Liste bereinigen:
for a in range(listSize):
    for item in srcList:
        _remove = False
        if not item.startswith('A' + _year +str(_doy)) or not item.find('.L1A_LAC'):
            _remove=True

        if item.endswith('L1A_LAC') or item.endswith('L1A_LAC.bz2'):
            _remove = False
        else:
            _remove=True

        if _remove:
            srcList.remove(item)

exit_on_empty_list(srcList)
srcList.sort()

# Now processing can start...

if not exists(modisGEOPath):
    makedirs(modisGEOPath)

modisL1Bscript = seadasScriptsDir + 'modis_L1B.py'
print(exists(modisL1Bscript))

def process_modisL1B(l1a_productPath):
    GEO_productPath = l1a_productPath.replace('L1A_LAC', 'GEO')
    L1B_productpath = l1a_productPath.replace('L1A_LAC', 'L1B_LAC')
    HKM_productPath = l1a_productPath.replace('L1A_LAC', 'L1B_HKM')
    QKM_productPath = l1a_productPath.replace('L1A_LAC', 'L1B_QKM')
modisL3_TSMPath  = ensureTrailingSlash(ensureTrailingSlash(modisL3_TSMBasePath  + _year) + _month)

print(modisL2_TSMPath, modisL3_TSMPath)

for _path in [modisL3_TSMPath]:
    if not exists(_path):
        print("Making directory: ", _path, " ...")
        makedirs(_path)

try:
    srcList = listdir(modisL2_TSMPath)
except OSError:
    print("Cannot open ", modisL2_TSMPath+ "! Now exiting...")
    exit(1)
else:
    listSize = exit_on_empty_list(srcList)
    print(listSize)

# Liste bereinigen:
for a in range(listSize):
    for item in srcList:
        if not item.startswith('A' + _year + DOY) or not item.endswith('.L2_TSM.dim'):
            srcList.remove(item)

listSize = exit_on_empty_list(srcList)
srcList.sort()

# outputProductPath = modisL3_TSMPath + 'cb_' + _site + '_' + back_date + '_eo_bc_lat_lon.dim'
outputProductPath = modisL3_TSMPath + _site + '_' + back_date + '_eo_bc_lat_lon.dim'

l3binningScript = beamBinDir + 'binning.command'
Esempio n. 3
0
    for item in srcList:
        _remove_from_list = False
        if not item.startswith('A' + _year + str(_doy)) or not item.endswith(
                '.L1B_LAC.x.hdf'):
            _remove_from_list = True

        if item.endswith('.L1B_LAC.x.hdf') or item.endswith(
                '.L1B_LAC.x.hdf.bz2'):
            _remove_from_list = False
        else:
            _remove_from_list = True

        if _remove_from_list:
            srcList.remove(item)

exit_on_empty_list(srcList)
srcList.sort()
print(srcList)

# Now processing can start...

modisBrowseBinary = seadasBinDir + 'l1brsgen'
print(exists(modisBrowseBinary))

# $OCSSW_BIN/l1brsgen
# ifile=/FastBuffer/temp/A2009220125000.L1B_LAC.x.hdf
# ofile=/FastBuffer/temp/A2009220125000.ppm
# geofile=/FastBuffer/temp/A2009220125000.GEO.x.hdf
# outmode=2 atmocor=1 subsamp=2 sline=1 eline=-999 spixl=1 epixl=-999