UTC or local time?
Posted: Wed Jul 23, 2025 11:58 am America/New_York
I am using python code to download ALOS backscatter. However, I am not sure the time I downloaded is UTC time or of local time. Here is my code:
gdf = gpd.GeoDataFrame(geometry=points, crs="EPSG:4326")
# Buffer the points by 500 meters
gdf_buffered = gdf.to_crs(epsg=3857).buffer(500).to_crs(epsg=4326)
# Search for ALOS data intersecting with the buffered points and within the specified time range
opts = {
'platform': asf.PLATFORM.ALOS,
# 'start': '2010-01-01T00:00:00Z',
# 'end': '2010-02-01T23:59:59Z'
'instrument': asf.INSTRUMENT.PALSAR,
'beamMode': ['FBD', 'PLR'],
'processingLevel': 'L2.2',
'start': '2006-01-01T00:00:00Z',
'end': '2011-12-31T23:59:59Z'
}
# Perform the search
results = []
for i in gdf_buffered.to_wkt():
results.append(asf.geo_search(intersectsWith=i, **opts))
# Download the results
# Create an ASF session use your username and password from https://urs.earthdata.nasa.gov/
session = asf.ASFSession().auth_with_creds('name', 'pwd')
download_path = './' + flux_list[0]+'/'
# download_path = './' + flux_list[0]+'/'
Path(download_path).mkdir(parents=True, exist_ok=True)
print(download_path)
dl_path = download_path
for i in tqdm(results):
for r in i:
with r.remotezip(session=session) as remotezip:
file_paths = [
file.filename
for file in remotezip.filelist
if file.filename.endswith(".tif")
]
folder = file_paths[0].split("-")[1]
out = os.path.join(dl_path, folder)
os.makedirs(out, exist_ok=True)
for file_path in file_paths:
remotezip.extract(file_path, path=out)
remotezip.extract("summary.txt", path=out)
And here is the .txt description:
...
Pds_UTM_ZoneNo="19"
Pds_PS_ReferenceLatitude="$"
Pds_PS_ReferenceLongitude="$"
Pds_PixelSpacing="12.5"
Pds_OrbitDataPrecision="Precision"
Pds_AttitudeDataPrecision="Standard"
Img_SceneCenterDateTime="20070829 03:38:53.881"
Img_SceneStartDateTime="20070829 03:38:49.522"
Img_SceneEndDateTime="20070829 03:38:58.240"
Img_ImageSceneCenterLatitude="-33.637"
Img_ImageSceneCenterLongitude="-66.372"
Img_ImageSceneLeftTopLatitude="-33.466"
Img_ImageSceneLeftTopLongitude="-66.825"
Img_ImageSceneRightTopLatitude="-33.290"
Img_ImageSceneRightTopLongitude="-66.095"
Img_ImageSceneLeftBottomLatitude="-33.985"
Img_ImageSceneLeftBottomLongitude="-66.653"
Img_ImageSceneRightBottomLatitude="-33.807"
Img_ImageSceneRightBottomLongitude="-65.918"
Img_FrameSceneCenterLatitude="-33.636"
Img_FrameSceneCenterLongitude="-66.365"
Img_FrameSceneLeftTopLatitude="-33.458"
Img_FrameSceneLeftTopLongitude="-66.830"
Img_FrameSceneRightTopLatitude="-33.281"
Img_FrameSceneRightTopLongitude="-66.080"
Img_FrameSceneLeftBottomLatitude="-33.990"
Img_FrameSceneLeftBottomLongitude="-66.653"
Img_FrameSceneRightBottomLatitude="-33.811"
Img_FrameSceneRightBottomLongitude="-65.899"
...
gdf = gpd.GeoDataFrame(geometry=points, crs="EPSG:4326")
# Buffer the points by 500 meters
gdf_buffered = gdf.to_crs(epsg=3857).buffer(500).to_crs(epsg=4326)
# Search for ALOS data intersecting with the buffered points and within the specified time range
opts = {
'platform': asf.PLATFORM.ALOS,
# 'start': '2010-01-01T00:00:00Z',
# 'end': '2010-02-01T23:59:59Z'
'instrument': asf.INSTRUMENT.PALSAR,
'beamMode': ['FBD', 'PLR'],
'processingLevel': 'L2.2',
'start': '2006-01-01T00:00:00Z',
'end': '2011-12-31T23:59:59Z'
}
# Perform the search
results = []
for i in gdf_buffered.to_wkt():
results.append(asf.geo_search(intersectsWith=i, **opts))
# Download the results
# Create an ASF session use your username and password from https://urs.earthdata.nasa.gov/
session = asf.ASFSession().auth_with_creds('name', 'pwd')
download_path = './' + flux_list[0]+'/'
# download_path = './' + flux_list[0]+'/'
Path(download_path).mkdir(parents=True, exist_ok=True)
print(download_path)
dl_path = download_path
for i in tqdm(results):
for r in i:
with r.remotezip(session=session) as remotezip:
file_paths = [
file.filename
for file in remotezip.filelist
if file.filename.endswith(".tif")
]
folder = file_paths[0].split("-")[1]
out = os.path.join(dl_path, folder)
os.makedirs(out, exist_ok=True)
for file_path in file_paths:
remotezip.extract(file_path, path=out)
remotezip.extract("summary.txt", path=out)
And here is the .txt description:
...
Pds_UTM_ZoneNo="19"
Pds_PS_ReferenceLatitude="$"
Pds_PS_ReferenceLongitude="$"
Pds_PixelSpacing="12.5"
Pds_OrbitDataPrecision="Precision"
Pds_AttitudeDataPrecision="Standard"
Img_SceneCenterDateTime="20070829 03:38:53.881"
Img_SceneStartDateTime="20070829 03:38:49.522"
Img_SceneEndDateTime="20070829 03:38:58.240"
Img_ImageSceneCenterLatitude="-33.637"
Img_ImageSceneCenterLongitude="-66.372"
Img_ImageSceneLeftTopLatitude="-33.466"
Img_ImageSceneLeftTopLongitude="-66.825"
Img_ImageSceneRightTopLatitude="-33.290"
Img_ImageSceneRightTopLongitude="-66.095"
Img_ImageSceneLeftBottomLatitude="-33.985"
Img_ImageSceneLeftBottomLongitude="-66.653"
Img_ImageSceneRightBottomLatitude="-33.807"
Img_ImageSceneRightBottomLongitude="-65.918"
Img_FrameSceneCenterLatitude="-33.636"
Img_FrameSceneCenterLongitude="-66.365"
Img_FrameSceneLeftTopLatitude="-33.458"
Img_FrameSceneLeftTopLongitude="-66.830"
Img_FrameSceneRightTopLatitude="-33.281"
Img_FrameSceneRightTopLongitude="-66.080"
Img_FrameSceneLeftBottomLatitude="-33.990"
Img_FrameSceneLeftBottomLongitude="-66.653"
Img_FrameSceneRightBottomLatitude="-33.811"
Img_FrameSceneRightBottomLongitude="-65.899"
...