[英]Number of hot days from daily temperature
I am following this answer to calculate number of hot days in a year (temperature exceeding 35degC) from daily tmax data.我正在按照这个答案从每日 tmax 数据计算一年中的炎热天数(温度超过 35 摄氏度)。
I am using tmax from CHELSA from 2000-2016, and I have crop it based on my bounding-box requirement.我从 2000 年到 2016 年使用CHELSA的 tmax,并根据我的边界框要求对其进行了裁剪。
Here are the steps I have done (example using 2001 data - 1 month 1 nc file):以下是我完成的步骤(使用 2001 年数据的示例 - 1 个月 1 nc 文件):
cdo mergetime chelsa_daily_2001*.nc chelsa_annual_2001.nc
将月度数据合并到年度: cdo mergetime chelsa_daily_2001*.nc chelsa_annual_2001.nc
cdo gec,308.15 chelsa_annual_2001.nc chelsa_hotdays_2001.nc
The Chelsa's temperature is in Kelvin, so threshold for hot days is 308.15计算热天: cdo gec,308.15 chelsa_annual_2001.nc chelsa_hotdays_2001.nc
切尔西的温度是开尔文,所以热天的阈值是 308.15cdo yearsum chelsa_hotdays_2001.nc chelsa_hotdays_yearsum_2001.nc
一年中的总天数: cdo yearsum chelsa_hotdays_2001.nc chelsa_hotdays_yearsum_2001.nc
And below is the result and unfortunately not what I expected.下面是结果,不幸的是不是我所期望的。
Why the number of days is not in integer?为什么天数不在 integer 中? Did I missed something in the script?我错过了脚本中的某些内容吗?
UPDATE (following response from Adrian)更新(根据阿德里安的回应)
I have installed ncview via homebrew but unfortunately can't open.我已经通过自制软件安装了 ncview,但不幸的是无法打开。 Got following error:出现以下错误:
Note: could not open file /Users/xxx/.ncviewrc for reading
Error: Can't open display:
I try to open the nc output using QGIS, and the result still in float.我尝试使用 QGIS 打开 nc output,结果仍然是浮点数。
I strongly suspect panoply is performing some kind of spatial interpolation on the data on import.我强烈怀疑 panoply 正在对导入的数据执行某种空间插值。
Please take a look at the raw field directly using ncdump
like this请像这样直接使用ncdump
查看原始字段
ncdump chelsa_hotdays_yearsum_2001.nc | less
(I pipe to less so you can stroll down through the data). (我的 pipe 要少一些,所以你可以慢慢浏览数据)。 Or alternatively you can open the file in ncview
and move the cursor over the data and you will see the field values displayed in the dialog box.或者,您可以在ncview
中打开文件并将 cursor 移动到数据上,您将看到对话框中显示的字段值。
ncview chelsa_hotdays_yearsum_2001.nc
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.