Question about setreftime & ensmean operator
Added by Sam Z over 1 year ago
This is my first time posting my question, I am sorry if there is a post-convention or style that I need to follow. In general, I just have some questions about the two operators that I mentioned in the title.
For the setreftime operator, is this the operator to do the calendar conversion? Or does it simply change the calendar information in the metadata?
As for the ensmean operator, can it recognize the difference in the calendar from input datasets? And what happens if I merge multiple datasets with different calendars, what is the output dataset calendar?
Background: I am trying to take the average of multiple datasets from different models (and datasets have different calendars), I am not sure if the ensmean is able to recognize the difference in the calendar when calculating the daily stat.
-Sam
Replies (2)
RE: Question about setreftime & ensmean operator - Added by Karin Meier-Fleischer over 1 year ago
Hi Sam,
the meta data and the time values will be changed.
Example: change the reference time from "days since 1900-1-1" to "days since 1980-1-1"
ncdump -v time infile.nc | grep "time = "
Result:
time = 30315, 30346, 30374, 30405, 30435, 30466, 30496, 30527, 30558, 30588, 30619, 30649 ;
Change the reference time
cdo -setreftime,1980-01-01,00:00:00 infile.nc outfile.nc
Show time values
ncdump -v time outfile.nc | grep "time = "
Result:
time = 1096, 1127, 1155, 1186, 1216, 1247, 1277, 1308, 1339, 1369, 1400, 1430 ;
RE: Question about setreftime & ensmean operator - Added by Sam Z over 1 year ago
Thank you for the explanation and example, Karin. It is good to know an easier way to do a double check!