from monthly to daily?
Added by Bic bary almost 8 years ago
I have a nc file (monthly) with a unit of g/mon (g per month) that I want to convert to g/day: divide by the number of days in the month, so anything from 28 to 31.
Is it possible thru CDO?
Thanks
Simon
Replies (1)
RE: from monthly to daily? - Added by Karin Meier-Fleischer almost 8 years ago
Hi Simon,
if you want to divide your monthly data by the number of days for each month and change the units attribute of the variable, do
cdo -setattribute,variable@units="g/day" -divdpm <infile> <outfile>
In the setattribute part you have to change 'variable' to the name of your variable.
See also docu about setattribute
[[https://code.zmaw.de/projects/cdo/embedded/index.html#x1-1960002.6.1]]
and divdpm
[[https://code.zmaw.de/projects/cdo/embedded/index.html#x1-3250002.7.10]]
-Karin