Codync
免费开源的 1:1 Grok Bot 与 Muse 替代方案。可在 iPhone、Mac 或 Linux 桌面上将 Claude 代码、Codex、Cursor 以及 40 多个编码代理作为持久机器人使用。支持群组聊天、线程、应用。
AI 翻译
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗Write GDAL multidimensional VRT from xarray Datasets and STAC catalogues. Pure Python: no GDAL needed to write.
Documentation: https://hypertidy.github.io/xvrt/
A multidimensional VRT is a small XML file that describes a collection of files as one n-dimensional dataset: which file supplies which slab of which array, plus dimensions, coordinates, CRS, units and packing. It holds no data. Any reader of GDAL's multidimensional API opens the whole collection as a single cube and reads only the files a request touches.
pip install xvrt
pip install "xvrt[stac]" # adds pyarrow and pyproj for from_stac()
Reading the result needs GDAL 3.x with multidimensional support (for example GDAL's Python bindings from conda-forge).
Open files the way you normally would, then describe the result:
import glob
import xarray as xr
from xvrt import write_mdim_vrt
paths = sorted(glob.glob("oisst-avhrr-v02r01.*.nc")) # one day per file
ds = xr.open_mfdataset(paths, combine="nested", concat_dim="time")
write_mdim_vrt(ds, paths, "oisst.vrt", composition="concat", concat_dim="time")
The same works over HTTP. Ten monthly files of one variable from a THREDDS
server (URLs become /vsicurl/ sources):
PREFIX = "https://thredds.nci.org.au/thredds/fileServer/gb6/BRAN/BRAN2020/daily"
months = [f"2010_{m:02d}" for m in range(1, 11)]
paths = [f"{PREFIX}/ocean_temp_{ym}.nc" for ym in months]
ds = xr.open_mfdataset(paths, engine="h5netcdf")
write_mdim_vrt(ds[["temp"]], paths, "bran.vrt",
composition="concat", concat_dim="Time")
from_stac() builds the VRT from catalogue fields alone (grid, CRS, item
datetimes, per-asset band storage) without opening a file:
from xvrt import from_stac
from_stac("https://data.source.coop/ausantarctic/ghrsst-mur-v2/ghrsst-mur-v2.parquet",
"mur.vrt", block_size=[1, 512, 512])
For the GHRSST MUR collection that is five arrays over 8913 days in a few seconds.
concat (files already have the dimension) and stack
(one file per position of a new dimension), with explicit positions and
gaps..encoding, so GDAL decodes the stored bytes exactly as xarray did.<SourceBand> and
<SourceTranspose>.<SourceSlab>), so a read
opens only the files it needs.<SRS> with the data-axis-to-SRS-axis mapping computed from the
WKT axis order.gdal mdim info oisst.vrt
from osgeo import gdal
ds = gdal.OpenEx("oisst.vrt", gdal.OF_MULTIDIM_RASTER)
sst = ds.GetRootGroup().OpenMDArray("sst").GetUnscaled()
or with an xarray backend for GDAL, such as
gdalxarray:
xr.open_dataset("oisst.vrt", engine="gdalxarray").
pip install -e ".[test]"
pytest tests/
tests/test_gdal_roundtrip.py reads every written VRT back through GDAL and
validates it against GDAL's schema (schema/gdalvrt.xsd); it is skipped when
osgeo.gdal is not importable. With conda-forge:
micromamba create -n xvrt -c conda-forge python gdal libgdal-netcdf xarray netcdf4 h5netcdf dask lxml pyarrow pyproj pytest
The design notes are in mdim-vrt-writer-plan.md; the documentation site source is in docs/.
MIT