Skip to content

Commit

Permalink
Save.
Browse files Browse the repository at this point in the history
  • Loading branch information
dwfncar committed Jul 14, 2024
1 parent c621b5a commit 6b1cf0b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion melodies_monet/util/time_interval_subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def subset_OMPS_l2(file_path,timeinterval):
def subset_MODIS_l2(file_path,timeinterval):
'''Dependent on filenaming convention
MOD04_L2.AYYYYDDD.HHMM.collection.timestamp.hdf
MYD04_L2.AYYYYDDD.HHMM.collection.timestamp.hdf
'''
import pandas as pd
from glob import glob
Expand All @@ -47,7 +48,7 @@ def subset_MODIS_l2(file_path,timeinterval):
subset_interval = pd.date_range(start=timeinterval[0],end=timeinterval[-1],freq='h',inclusive='left')

for i in subset_interval:
fst = fnmatch.filter(all_files,'M?D04_L2.A{}*.hdf'.format(i.strftime('%Y%j.%H')))
fst = fnmatch.filter(all_files,'*M?D04_L2.A{}*.hdf'.format(i.strftime('%Y%j.%H')))
fst.sort()
for j in fst:
interval_files.append(j)
Expand Down

0 comments on commit 6b1cf0b

Please sign in to comment.