Skip to content

AWS Data Requests

This section provides code examples on how to access data from the AWS S3 provided by the Registry of Open Data on AWS.

Notes

  • When new time slices are available from sources data providers they are automatically made available within Zarr Dataset. This means the data values can change like POWER's other service endpoints for more information review the data availability at POWER Dashboard.
  • To support Near Real Time (NRT) data distribution the Zarr's time dimension extends to 2024/12/31 for hourly and daily temporal levels.

Remotely Connect via Python

This is an overview of the process to remotely connect to a POWER Zarr formatted Analysis Ready Dataset (ARD) via Python.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
'''
*Version: 1.0 Published: 2022/05/31* Source: [NASA POWER](https://power.larc.nasa.gov/)
POWER Remotely Connect to a POWER Zarr via Python
This is an overview of the process to remotely connect to a POWER Zarr formatted Analysis Ready Dataset (ARD) via Python.
'''

import fsspec

import xarray as xr

filepath = 'https://power-analysis-ready-datastore.s3.amazonaws.com/power_901_monthly_radiation_utc.zarr'
filepath_mapped = fsspec.get_mapper(filepath)
ds = xr.open_zarr(store=filepath_mapped, consolidated=True)
ds

Download/Sync Zarr Dataset

This is an overview of the process to use the AWS CLI download a POWER Zarr formatted Analysis Ready Dataset (ARD).

Recommendation

  • We recommend using the aws s3 sync command to ensure any changes are copied to you local copy of the Zarr. Please periodically run the command to sync any changes!
1
aws s3 sync s3://power-analysis-ready-datastore/power_901_monthly_radiation_utc.zarr/ <your-local-path>\power_901_monthly_radiation_utc.zarr\