简体   繁体   English

日气温偏热天数

[英]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 文件):

  • Merge monthly data to annual: cdo mergetime chelsa_daily_2001*.nc chelsa_annual_2001.nc将月度数据合并到年度: cdo mergetime chelsa_daily_2001*.nc chelsa_annual_2001.nc
  • Calculate hot days: 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.15
  • Sum number of days in a year: cdo 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.下面是结果,不幸的是不是我所期望的。 图像1 img2

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,结果仍然是浮点数。

qgis

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.

相关问题 如何从 Python 中的每小时数据 netcdf 文件中找到最高日温度? - How to find maximum daily temperature from hourly data netcdf file in Python? 如何使用 Python 从 netcdf 中的每日降雨量数据计算 2、3 和 5 天累积降雨量 - How to compute 2, 3 and 5-days accumulated rainfall from daily rainfall data in netcdf using Python 使用气候数据运营商 (CDO) 的每日数据得出的每月潮湿天数总和 - Monthly sum of wet days from daily data using Climate Data Operators (CDO) 从每日数据中查找每日和每月平均值 - Find the daily and monthly mean from daily data 从R中的.nc文件映射温度数据 - Mapping temperature data from an .nc file in R 在 R 中从两个以最大和最小温度为变量的 netcdf 创建以平均温度为变量的新 netcdf - Create new netcdf with mean temperature as variable from two netcdf with max and min temperature as variable in R 特定地理位置的 CMEMS.netcdf 文件中的温度和盐度 - Temperature and Salinty from CMEMS netcdf file for specific geographical location 仅从 4d NetCDF 文件中提取底部温度 - Extracting only bottom temperature from 4d NetCDF file 如何从每日 netcdf 计算每月数据 - How to calculate monthly data from a daily netcdf 如何从多个每日文件中获取运行或移动平均值 - How to take the running or moving average from multiple daily files
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM