UTC or local time?

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
xushanthutud
Posts: 2
Joined: Wed Jul 23, 2025 11:47 am America/New_York
Answers: 0

UTC or local time?

by xushanthutud » 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"
...

Filters:

ASF - bhauer
User Services
User Services
Posts: 27
Joined: Thu Dec 12, 2024 5:54 pm America/New_York
Answers: 0

Re: UTC or local time?

by ASF - bhauer » Wed Jul 23, 2025 12:22 pm America/New_York

The times are UTC, or "Zulu" time (indicated by the 'Z' at the end of the time value).
Bill Hauer
Alaska Satellite Facility DAAC
User Support Office
uso@asf.alaska.edu

xushanthutud
Posts: 2
Joined: Wed Jul 23, 2025 11:47 am America/New_York
Answers: 0

Re: UTC or local time?

by xushanthutud » Wed Jul 23, 2025 12:41 pm America/New_York

Thanks for your reply! So by "Z" you mean the Z from the arguments: "'start': '2006-01-01T00:00:00Z'," ?
But I haven't see the Z from the resulting dataset...I am using following codes:

from odc.stac import load
# %%
trust_crs_from_data=False

# loading this data could be done with the following options:
requested_bands = ["HH", "HV", "INC", "MASK"]
chunking = {"x": 512, "y": 512, "time": -1}


for i, point in enumerate(gdf.itertuples()):

print(f"Processing point {i}, {point}")

#if GEOKEYS
epsg = items[0].assets["HH"].extra_fields["proj:projjson"]["id"]["code"]

project1 = pyproj.Transformer.from_proj(
pyproj.Proj(init=f'epsg:4326'), # source coordinate system
pyproj.Proj(init='epsg:3857')) # destination coordinate system
project2 = pyproj.Transformer.from_proj(
pyproj.Proj(init='epsg:3857'), # source coordinate system
pyproj.Proj(init=f'epsg:{epsg}')) # destination coordinate system

# g1 is a shapley Polygon

point_buffer = transform(project2.transform, buffer(transform(project1.transform, point.geometry), 500))

geobox = GeoBox.from_bbox(point_buffer.bounds, crs=f"epsg:{epsg}", resolution=30)

dc = load(
items,
bands=requested_bands,
chunks=chunking,
geobox=geobox,
dtype="uint16",
resampling="bilinear",
groupby="solar_day",
)
dc.to_netcdf(download_path + f"alos_palsar_{i}.nc", mode="w")

ASF-EDL - bhauer
Posts: 53
Joined: Tue Dec 03, 2019 3:56 pm America/New_York
Answers: 0

Re: UTC or local time?

by ASF-EDL - bhauer » Wed Jul 23, 2025 3:16 pm America/New_York

The times are UTC for all ALOS products.
Bill Hauer
Alaska Satellite Facility DAAC
User Support Office
uso@asf.alaska.edu

Post Reply