Earth Engine 推出了
非商业配额层级,以保护共享计算资源并确保为所有人提供可靠的性能。非商业项目默认使用 Community
层级,但您可以随时更改项目的层级。
Google 会使用 AI 技术将内容翻译成您偏好的语言。AI 翻译可能包含错误。
ee.Image.loadZarrV2Array
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
将 Zarr v2 数组加载为图片。数组属性 (.zattrs) 必须包含“_ARRAY_DIMENSIONS”字段,该字段是每个维度的名称列表(例如 ['time', 'y', 'x'])。必须至少有两个维度,最后两个维度分别代表 Y 和 X(例如 ['lat', 'lon'])。支持的压缩编解码器包括“blosc”“gzip”“lz4”“zlib”和“zstd”。支持的 blosc 元压缩编解码器包括“lz4”“lz4hc”“zlib”和“zstd”(不支持“blosclz”)。
| 用法 | 返回 |
|---|
ee.Image.loadZarrV2Array(uri, proj, starts, ends) | 映像 |
| 参数 | 类型 | 详细信息 |
|---|
uri | 字符串 | 要加载的 .zarray 文件的 Cloud Storage URI。数组目录的父级目录中必须存在 .zmetadata 文件(例如,对于“gs://b/o/.zarray”,必须存在“gs://b/.zmetadata”)。存储桶元数据必须可访问(需要“Storage Legacy Bucket Reader”等角色提供的“storage.buckets.get”权限,请参阅 https://cloud.google.com/storage/docs/access-control/iam-roles),并且存储桶必须位于美国多区域、包含 US-CENTRAL1 的双区域或 US-CENTRAL1 区域。 |
proj | 投影 | 数组的投影。 |
starts | 列表,默认值:null | 沿每个非空间维度开始切片的索引(含边界值)。如果为 null,则对于所有非空间维度,切片将从索引 0 开始。如果指定,此列表的长度必须等于非空间维度的数量(总维度数 - 2)。列表中的单个元素可以为 null,该维度的默认值为 0。负索引从维度的末尾开始计数(例如,-1 是最后一个元素)。 |
ends | 列表,默认值:null | 沿每个非空间维度停止切片的索引(不含)。如果为 null,切片将延伸到每个对应非空间维度的末尾(即默认为维度的长度)。如果指定,此列表的长度必须等于非空间维度的数量(总维度数 - 2)。列表中的单个元素可以为 null,默认值也是该维度的长度。负索引从维度的末尾开始计数(例如,-1 是最后一个元素)。 |
示例
代码编辑器 (JavaScript)
var timeStart = 1000000;
var timeEnd = 1000010;
// Load a 2m temperature Zarr v2 array.
var temperature = ee.Image.loadZarrV2Array({
uri: 'gs://gcp-public-data-arco-era5/ar/' +
'full_37-1h-0p25deg-chunk-1.zarr-v3/2m_temperature/.zarray',
proj: 'EPSG:4326',
starts: [timeStart],
ends: [timeEnd]
});
print(temperature);
Map.addLayer(temperature, {min: 220, max: 350}, '2m Temperature');
Python 设置
如需了解 Python API 和如何使用
geemap 进行交互式开发,请访问
Python 环境页面。
import ee
import geemap.core as geemap
Colab (Python)
time_start = 1000000
time_end = 1000010
# Load a 2m temperature Zarr v2 array.
temperature = ee.Image.loadZarrV2Array(
uri=(
'gs://gcp-public-data-arco-era5/ar/'
'full_37-1h-0p25deg-chunk-1.zarr-v3/2m_temperature/.zarray'
),
proj='EPSG:4326',
starts=[time_start],
ends=[time_end],
)
display(temperature)
m.add_layer(temperature, {'min': 220, 'max': 350}, '2m Temperature')
m
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2026-10-21。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2026-10-21。"],[],[]]