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.
- 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.
- by using mean you can also control in cdo how to handle missing data, i.e. using
mean
or avg
.