Merge operator file is not working properly.
Added by jyoti lodha about 6 years ago
Hi
When I am merging my data of same variable with same level , but my output is showing me with 40 timesteps. It is showing wrong values when I
seeing my data using : cdo info tt.nc
1 : Date Time Level Gridsize Miss : Minimum Mean Maximum : Parameter ID
1 : 1951-07-01 06:00:00 0 3540 2243 : -12.831 20.169 27.088 : -1
2 : 1951-07-01 06:00:00 0 3540 2243 : -24.518 18.213 27.121 : -1
3 : 1952-06-30 06:00:00 0 3540 2243 : -13.409 19.861 27.293 : -1
4 : 1952-06-30 06:00:00 0 3540 2243 : -23.780 18.528 26.954 : -1
5 : 1953-07-01 06:00:00 0 3540 2243 : -12.742 19.914 26.883 : -1
6 : 1953-07-01 06:00:00 0 3540 2243 : -23.512 18.521 26.896 : -1
7 : 1954-07-01 06:00:00 0 3540 2243 : -13.563 19.740 26.935 : -1
8 : 1954-07-01 06:00:00 0 3540 2243 : -23.656 18.121 26.665 : -1
9 : 1955-07-01 06:00:00 0 3540 2243 : -13.437 19.962 27.145 : -1
10 : 1955-07-01 06:00:00 0 3540 2243 : -23.867 18.405 26.541 : -1
11 : 1956-06-30 06:00:00 0 3540 2243 : -12.951 20.260 27.365 : -1
12 : 1956-06-30 06:00:00 0 3540 2243 : -22.085 18.504 26.902 : -1
13 : 1957-07-01 06:00:00 0 3540 2243 : -13.356 19.736 26.627 : -1
14 : 1957-07-01 06:00:00 0 3540 2243 : -22.664 19.114 27.610 : -1
15 : 1958-07-01 06:00:00 0 3540 2243 : -12.891 19.936 26.780 : -1
16 : 1958-07-01 06:00:00 0 3540 2243 : -23.014 18.364 26.788 : -1
17 : 1959-07-01 06:00:00 0 3540 2243 : -13.035 19.712 27.536 : -1
18 : 1959-07-01 06:00:00 0 3540 2243 : -22.311 18.150 26.392 : -1
19 : 1960-06-30 06:00:00 0 3540 2243 : -12.524 19.868 26.780 : -1
20 : 1960-06-30 06:00:00 0 3540 2243 : -22.736 18.437 26.938 : -1
21 : 1961-07-01 06:00:00 0 3540 2243 : -12.395 19.938 26.852 : -1
22 : 1961-07-01 06:00:00 0 3540 2243 : -22.870 18.441 26.660 : -1
23 : 1962-07-01 06:00:00 0 3540 2243 : -13.188 20.039 27.049 : -1
24 : 1962-07-01 06:00:00 0 3540 2243 : -22.826 18.522 26.306 : -1
25 : 1963-07-01 06:00:00 0 3540 2243 : -12.722 19.628 26.698 : -1
26 : 1963-07-01 06:00:00 0 3540 2243 : -24.686 18.152 26.953 : -1
27 : 1964-06-30 06:00:00 0 3540 2243 : -13.995 19.668 26.996 : -1
28 : 1964-06-30 06:00:00 0 3540 2243 : -22.837 18.513 26.605 : -1
29 : 1965-07-01 06:00:00 0 3540 2243 : -12.863 20.123 26.739 : -1
30 : 1965-07-01 06:00:00 0 3540 2243 : -23.602 18.114 26.554 : -1
31 : 1966-07-01 06:00:00 0 3540 2243 : -13.309 19.941 26.767 : -1
32 : 1966-07-01 06:00:00 0 3540 2243 : -23.227 18.058 26.636 : -1
33 : 1967-07-01 06:00:00 0 3540 2243 : -13.201 19.490 26.589 : -1
34 : 1967-07-01 06:00:00 0 3540 2243 : -22.641 18.592 26.622 : -1
35 : 1968-06-30 06:00:00 0 3540 2243 : -13.271 19.761 26.928 : -1
36 : 1968-06-30 06:00:00 0 3540 2243 : -24.340 18.087 26.845 : -1
37 : 1969-07-01 06:00:00 0 3540 2243 : -13.225 19.928 26.798 : -1
38 : 1969-07-01 06:00:00 0 3540 2243 : -23.116 18.132 26.586 : -1
39 : 1970-07-01 06:00:00 0 3540 2243 : -13.412 20.001 26.883 : -1
40 : 1970-07-01 06:00:00 0 3540 2243 : -23.376 18.626 26.878 : -1
cdo merge Ind_F_tas_WAS-44i_CCCma-CanESM2_historical_r1i1p1_IITM-RegCM4-4_v5_annual_1951_1970_degC.nc Ind_F_tas_WAS-44i_CNRM-CERFACS-CNRM-CM5_historical_r1i1p1_SMHI-RCA4_v2_annual_1951-1970_degC.nc tt.nc
cdo merge (Warning): Duplicate entry of parameter tas in Ind_F_tas_WAS-44i_CNRM-CERFACS-CNRM-CM5_historical_r1i1p1_SMHI-RCA4_v2_annual_1951-1970_degC.nc!
cdo merge: Processed 141600 values from 2 variables over 40 timesteps ( 0.01s )
Where is the issue? As I am not able to find any duplicate entry in my data. Thanks
Waiting for a positive reply.
Replies (6)
RE: Merge operator file is not working properly. - Added by Karin Meier-Fleischer about 6 years ago
Hi Jyoti,
first, the files you uploaded are not the files you used above.
What would you expect when merging files with same time steps and same variable names. You'll get one entry for each file and cdo info shows you each entry which has the same time stamp.
cdo merge Ind_F_tas_WAS-44i_MIROC-MIROC5_historical_r1i1p1_SMHI-RCA4_v2_annual_1951-1970_degC.nc \ Ind_F_tas_WAS-44i_MOHC-HadGEM2-ES_historical_r1i1p1_SMHI-RCA4_v2_annual_1951-1970_degC.nc \ Ind_F_tas_WAS-44i_NCC-NorESM1-M_historical_r1i1p1_SMHI-RCA4_v2_annual_1951-1970_degC.nc \ Ind_F_tas_WAS-44i_NOAA-GFDL-GFDL-ESM2M_historical_r1i1p1_IITM-RegCM4-4_v5_annual_1951-1970_degC.nc tt.nc
ncdump -h tt.nc netcdf tt { dimensions: time = UNLIMITED ; // (20 currently) lon = 59 ; lat = 60 ; sfc = 4 ; variables: double time(time) ; time:standard_name = "time" ; time:long_name = "time" ; time:units = "days since 1970-01-01 00:00:00" ; time:calendar = "standard" ; time:axis = "T" ; double lon(lon) ; lon:standard_name = "longitude" ; lon:long_name = "lon" ; lon:units = "degrees_east" ; lon:axis = "X" ; double lat(lat) ; lat:standard_name = "latitude" ; lat:long_name = "lat" ; lat:units = "degrees_north" ; lat:axis = "Y" ; double sfc(sfc) ; sfc:long_name = "surface" ; sfc:axis = "Z" ; float tas(time, sfc, lat, lon) ; tas:long_name = "Near-surface mean temperature" ; tas:units = "?C" ; tas:_FillValue = -3.4e+38f ; tas:missing_value = -3.4e+38f ; ...
cdo infov tt.nc -1 : Date Time Level Gridsize Miss : Minimum Mean Maximum : Parameter name 1 : 1951-07-01 06:00:00 0 3540 2243 : -21.068 20.200 27.523 : tas 2 : 1951-07-01 06:00:00 0 3540 2243 : -21.728 19.979 28.120 : tas 3 : 1951-07-01 06:00:00 0 3540 2243 : -21.388 19.675 26.671 : tas 4 : 1951-07-01 06:00:00 0 3540 2243 : -15.773 18.488 26.334 : tas 5 : 1952-06-30 06:00:00 0 3540 2243 : -22.388 21.006 28.255 : tas 6 : 1952-06-30 06:00:00 0 3540 2243 : -20.444 20.092 27.842 : tas 7 : 1952-06-30 06:00:00 0 3540 2243 : -22.260 19.228 26.658 : tas 8 : 1952-06-30 06:00:00 0 3540 2243 : -16.368 18.730 27.555 : tas 9 : 1953-07-01 06:00:00 0 3540 2243 : -20.078 20.310 26.957 : tas 10 : 1953-07-01 06:00:00 0 3540 2243 : -21.441 20.503 28.553 : tas 11 : 1953-07-01 06:00:00 0 3540 2243 : -22.824 19.099 26.249 : tas 12 : 1953-07-01 06:00:00 0 3540 2243 : -16.072 18.260 26.819 : tas 13 : 1954-07-01 06:00:00 0 3540 2243 : -20.610 19.456 26.819 : tas 14 : 1954-07-01 06:00:00 0 3540 2243 : -21.556 20.315 28.088 : tas 15 : 1954-07-01 06:00:00 0 3540 2243 : -22.776 19.479 26.415 : tas 16 : 1954-07-01 06:00:00 0 3540 2243 : -15.928 18.412 26.513 : tas 17 : 1955-07-01 06:00:00 0 3540 2243 : -22.368 19.980 27.471 : tas 18 : 1955-07-01 06:00:00 0 3540 2243 : -21.815 19.941 28.315 : tas 19 : 1955-07-01 06:00:00 0 3540 2243 : -22.497 19.710 26.628 : tas 20 : 1955-07-01 06:00:00 0 3540 2243 : -15.565 18.378 25.957 : tas 21 : 1956-06-30 06:00:00 0 3540 2243 : -21.336 20.485 28.081 : tas 22 : 1956-06-30 06:00:00 0 3540 2243 : -22.826 19.722 27.417 : tas 23 : 1956-06-30 06:00:00 0 3540 2243 : -22.962 19.752 26.892 : tas 24 : 1956-06-30 06:00:00 0 3540 2243 : -16.016 18.436 26.353 : tas ...-Karin
RE: Merge operator file is not working properly. - Added by jyoti lodha about 6 years ago
Hi
Thanks for the reply. But I need the average of all the files on the same grid and on the same timesteps(as all the timesteps are same in files), so I used the merge command and merged all the files which I attached. So find me a way how to merge time to a single file with same timesteps.
Thanks.
RE: Merge operator file is not working properly. - Added by kunal bali about 6 years ago
If I understood correctly then why don't you try this
cdo ensmean file01.nc file02.nc file03.nc file04.nc output.nc
-Kunal Bali
RE: Merge operator file is not working properly. - Added by jyoti lodha about 6 years ago
Hi
Thanks ,Its works fine.
RE: Merge operator file is not working properly. - Added by Karin Meier-Fleischer about 6 years ago
Kunal is right. I didn't get it yesterday, sorry.
RE: Merge operator file is not working properly. - Added by Branden Mccllumn over 5 years ago
Mine one is also not working properly and that’s why I’m here to seek some guidance. I can gladly say that I got the best https://youressayreviews.com/is-edubirdie-legit/ article to solve my problem because when I checked your blog’s comment section I got massive solutions to my problem. So thank you very much Jyoti Lodha for sharing this blog.