简体   繁体   English

netcdf - CDO monmean

[英]netcdf - CDO monmean

I have a netcdf file, with a daily time step, that I wish to convert to a monthly time step.我有一个 netcdf 文件,带有每日时间步长,我希望将其转换为每月时间步长。 The time is formatted as follow:时间格式如下:

    double time(time) ;
            time:standard_name = "time" ;
            time:long_name = "time" ;
            time:bounds = "time_bnds" ;
            time:units = "days since 2000-01-01" ;
            time:calendar = "standard" ;
            time:axis = "T" ;

When I convert to monmthly time step using the commmand:当我使用命令转换为每月时间步长时:

cdo monmean input.nc output.nc

Everything works fine except that the time output is strange:一切正常,只是时间输出很奇怪:

 time = "2000-01-16", "2000-02-15", "2000-03-16", "2000-04-15 12",
"2000-05-16", "2000-06-15 12", "2000-07-16", "2000-08-16",
"2000-09-15 12", "2000-10-16", "2000-11-15 12", "2000-12-16";

I wish to replace the day on the monthly value by the first day of the month and also remove those odd 12's who appear.我希望用该月的第一天替换月值上的日期,并删除出现的那些奇数 12。 The desired output:所需的输出:

 time = "2000-01-01", "2000-02-01", "2000-03-01", "2000-04-01",
"2000-05-01", "2000-06-01", "2000-07-01", "2000-08-01",
"2000-09-01", "2000-10-01", "2000-11-01", "2000-12-01";

Any hints is appreciate任何提示表示赞赏

cdo --timestat_date first monmean input.nc output.nc

对我有用,我希望它有帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM