如何删除“多余”的内容与 CDO(气候数据运营商)的维度?

发布于 2025-01-15 13:44:31 字数 545 浏览 5 评论 0原文

ERA5 气候数据集通常定义为 [lat, lon, time] 矩阵。除了最近的数据外,它添加了 exp_ver 变量,指示数据是临时数据(最近数据,截至目前最多 3 个月,编码为“05”)还是旧数据(稳定版本,编码为“05”)如“01”),因此仅针对最近的数据定义矩阵 [lat, lon, time, exp_ver]。

exp_ver变量只有两个值:“01”(旧数据)和“05”(最近数据),如果“01”中有数据,那么对应的时间“05”字段就有缺失值,反之亦然。我正在寻找将“01”和“05”合并到一个独特的[纬度,经度,时间]矩阵中(因此,删除exp_ver变量),但我不知道如何执行此过程。这可能是一个选项:

A. 使用 cdo splitlevel 拆分文件,获取“01”和“05”exp_ver 单独的文件。

B. 从两个文件中删除缺失值段,或仅选择包含数据的段(我不知道如何执行此操作!)

C. 从两个文件中删除冗余变量“exp_ver”(使用 cdo reduce_dim )

对此有什么帮助吗?先感谢您!

迭戈

The ERA5 climate dataset is, in general, defined as a [lat, lon, time] matrix. Except for recent data, where it adds the exp_ver variable that indicate if the data is provisory (recent data, up to 3 months until the present, coded as "05") or old (stable version, coded as "01"), so the matrix are defined [lat, lon, time, exp_ver] only for recent data.

The exp_ver variable only has two values: "01" (old data) and "05" (recent data), and if there is data in "01" so the corresponding time has missing values in the "05" field, and viceversa. I'm looking for merge both "01" and "05" in a unique [lat, lon, time] matrix (so, remove the exp_ver variable), but I dont' know how to conduct this procedure. This is maybe an option:

A. Split the file with cdo splitlevel obtaining the "01" and "05" exp_ver separate files.

B. Remove the missing values segment, or only select the segment with data, from both files (I don't know how to to this!)

C. Remove the redundant variable "exp_ver" from both files (with cdo reduce_dim)

Any help with this? Thank you in advance!

Diego

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

茶花眉 2025-01-22 13:44:31

您可以使用 ncwa 来平均并删除第二步中的维度,然后使用合并时间吗?

cdo splitlevel # as you were suggesting

ncwa -a exp_ver v1.nc v1rd.nc
ncwa -a exp_ver v5.nc v5rd.nc 

cdo mergetime v1rd.nc v5rd.nc out.nc

或者想想如果直接对原始文件使用ncwa会怎样?它是该维度的平均值。我不记得缺失+值是如何处理的。

ncwa -a exp_ver era5.nc out.nc

也请查看此链接,它可能是相关的NCWA (NCO) 能否理解missing_value

(电话初步回复,明天修改)

Can you use ncwa to average over and remove the dimension in step two and then use merge time?

cdo splitlevel # as you were suggesting

ncwa -a exp_ver v1.nc v1rd.nc
ncwa -a exp_ver v5.nc v5rd.nc 

cdo mergetime v1rd.nc v5rd.nc out.nc

Or thinking about it what if you use ncwa directly on the original file? It averages over that dimension. I don't recall how missing+value is handled though.

ncwa -a exp_ver era5.nc out.nc

Check out this link too which could be relevant Can ncwa (NCO) understand missing_value

( Preliminary answer posted from phone, will revise tomorrow)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文