I am learning netCDF and CDO with a CRU ts_4.04 data. I want to calculate the monthly average and annual sum of precipitation in London. I wrote:
#!/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
I get:
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].
It looks very well, but they aren't the same results as shown in https://climatecharts.net/ for London between 1970-2000 years with CRU ts4.04.
My question is: Am I calculating the monthly average and the yearly sum of precipitations?.
Thank you for any help.