【发布时间】:2021-03-12 08:03:54
【问题描述】:
我正在使用 CRU ts_4.04 数据学习 netCDF 和 CDO。我想计算伦敦的月平均降水量和年降水量总和。我写道:
#!/usr/bin/bash
lon=-0.11
lat=51.49
PREFNAME="/myHD/CRU4.04/pre/cru_ts4.04.1901.2019.pre.dat.nc"
OUTFNAME="outfile-"
echo "1970-2000 monthly average and annual sum of precipitations in London"
cdo remapnn,lon=$lon/lat=$lat $PREFNAME $OUTFNAME"place.nc"
cdo selvar,pre $OUTFNAME"place.nc" $OUTFNAME"var.nc"
cdo selyear,1970/2000 $OUTFNAME"var.nc" $OUTFNAME"years.nc"
cdo ymonmean $OUTFNAME"years.nc" $OUTFNAME"yearsmean.nc"
cdo timcumsum $OUTFNAME"yearsmean.nc" $OUTFNAME"yearsum.nc"
cdo info $OUTFNAME"yearsum.nc"
cdo info $OUTFNAME"yearsmean.nc"
exit
我明白了:
MyPC:~/workbench01$ ./gotit2.sh
1970-2000 monthly average and annual sum of precipitations in London
cdo remapnn: Nearest neighbor weights from lonlat (720x360) to lonlat (1x1) grid, with source mask (67420)
cdo remapnn: Processed 2 variables over 1428 timesteps [2.64s 60MB].
cdo selname: Processed 2 variables over 1428 timesteps [0.01s 52MB].
cdo selyear: Processed 1 variable over 1428 timesteps [0.00s 51MB].
cdo ymonmean: Processed 1 variable over 372 timesteps [0.00s 51MB].
cdo timcumsum: Processed 1 variable over 12 timesteps [0.00s 51MB].
-1 : Date Time Level Gridsize Miss : Minimum Mean Maximum : Parameter ID
1 : 2000-01-16 00:00:00 0 1 0 : 81.229 : -1
2 : 2000-02-15 00:00:00 0 1 0 : 132.26 : -1
3 : 2000-03-16 00:00:00 0 1 0 : 189.70 : -1
4 : 2000-04-16 00:00:00 0 1 0 : 244.82 : -1
5 : 2000-05-16 00:00:00 0 1 0 : 298.52 : -1
6 : 2000-06-16 00:00:00 0 1 0 : 356.92 : -1
7 : 2000-07-16 00:00:00 0 1 0 : 402.39 : -1
8 : 2000-08-16 00:00:00 0 1 0 : 456.03 : -1
9 : 2000-09-16 00:00:00 0 1 0 : 527.19 : -1
10 : 2000-10-16 00:00:00 0 1 0 : 605.04 : -1
11 : 2000-11-16 00:00:00 0 1 0 : 682.58 : -1
12 : 2000-12-16 00:00:00 0 1 0 : 762.59 : -1
cdo info: Processed 1 variable over 12 timesteps [0.00s 50MB].
-1 : Date Time Level Gridsize Miss : Minimum Mean Maximum : Parameter ID
1 : 2000-01-16 00:00:00 0 1 0 : 81.229 : -1
2 : 2000-02-15 00:00:00 0 1 0 : 51.032 : -1
3 : 2000-03-16 00:00:00 0 1 0 : 57.439 : -1
4 : 2000-04-16 00:00:00 0 1 0 : 55.116 : -1
5 : 2000-05-16 00:00:00 0 1 0 : 53.700 : -1
6 : 2000-06-16 00:00:00 0 1 0 : 58.400 : -1
7 : 2000-07-16 00:00:00 0 1 0 : 45.471 : -1
8 : 2000-08-16 00:00:00 0 1 0 : 53.642 : -1
9 : 2000-09-16 00:00:00 0 1 0 : 71.161 : -1
10 : 2000-10-16 00:00:00 0 1 0 : 77.845 : -1
11 : 2000-11-16 00:00:00 0 1 0 : 77.545 : -1
12 : 2000-12-16 00:00:00 0 1 0 : 80.006 : -1
cdo info: Processed 1 variable over 12 timesteps [0.00s 51MB].
看起来非常好,但它们与https://climatecharts.net/ 中显示的结果不同,伦敦在 1970-2000 年间使用 CRU ts4.04。
我的问题是:我是在计算月平均降水量和年降水量总和吗?
感谢您的帮助。
【问题讨论】:
标签: netcdf cdo-climate