与CDO的下天降水数据的总和

发布于 2025-02-10 01:46:56 字数 263 浏览 1 评论 0原文

我一直在使用Imerg卫星的降水数据,每30分钟。

前几天,我一直在建造12 UTC的降水量。

cdo shifttime,-12hours -daysum -shifttime,12hours in.nc4 out.nc4

但是我看到“ daysum”命令添加了每个值的2倍,请通过下载每日数据进行检查,我看到这些值完全是两倍。

有人知道如何解决此问题,因为似乎Daysum命令对我不起作用。

非常感谢!

I have been working with precipitation data from the IMERG satellite which is every 30 minutes.

I have been building the precipitation between 12 UTC one day and 12 UTC the other day.

cdo shifttime,-12hours -daysum -shifttime,12hours in.nc4 out.nc4

But I see that the "daysum" command adds 2 times each value, check this by downloading a daily data and I see that the values ​​are exactly double.

Does anyone know how to fix this since it seems that the daysum command is not working for me.

Thank you very much!

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

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

发布评论

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

评论(1

一抹苦笑 2025-02-17 01:46:56

我认为问题是30分钟数据的单位是mm/小时的,因此,如果总结数据,则不会获得mm/天,因为数据是每三十分钟,而是2*mm/天。取而代之的是,您下载的检查文件具有mm/天的单位(顺便说一句,做得好,以独立检查答案)。这就是为什么具有单位单位的自我描述的文件如此重要;-)

要获得MM/天的单位,您只需要除以2:

cdo -divc,2 -shifttime,-12hours -daysum -shifttime,12hours in.nc4 out.nc4

易于犯错,我自己我自己做了,尤其是在您已经习惯于处理天气预报输出的通量,这些输出通常总是在输出步骤中积累(即在这种情况下为30分钟)。

这就是为什么使用均值而不是总和而不是出于两个原因而不是总和更加混乱的原因。

  1. 如果您使用意味着您的单位始终与输入文件完全相同,则在这种情况下,在这种情况下,MM/HR。数据频率是什么都没关系,您无法弄错它。如果您喜欢mm/day之类的东西,则可以使用cdo mulc转换并更新元数据,但是在不犯错的情况下这样做更容易。
  2. 通过使用Mean,您还可以在CDO中控制如何处理丢失的数据,即使用MANEavg

I think the issue is that the units of the 30 minute data are mm/hour and so if you sum the data you will not get mm/day, since the data is every thirty minutes, but 2*mm/day. Instead the file you downloaded to check has units of mm/day (well done, by the way, for independently checking your answer). This is why self-describing files having units is so important ;-)

To get units of mm/day you simply need to divide by 2:

cdo -divc,2 -shifttime,-12hours -daysum -shifttime,12hours in.nc4 out.nc4

Easy error to make by the way, I've done it myself in the past, especially if you are used to dealing with fluxes from weather forecast output which are usually always accumulated over the output step time (i.e. that would be 30 minutes in this case).

This is why it is usually safer and less confusing to use mean instead of sum for two reasons.

  1. if you use mean you have always exactly the same units as the input file correctly, in this case mm/hr. It doesn't matter what the data frequency is, you can't get it wrong. If you prefer something like mm/day then you can convert using cdo mulc and update the metadata but it is easier to do this without making mistakes.
  2. by using mean you can also control in cdo how to handle missing data, i.e. using mean or avg.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文