Hi Adrian, I really like your videos. It makes my journey easier as a climate researcher. I have one query. I want to calculate mean and standard deviation of precipitation for each grid cell for historical 30 years. (I have 150 grids). I want to repeat the same procedure for projected 30 years. And then want to calculate the ratio of those two mean in each grid. How to do this in CDO? Any help will be appreciated. Thanks!
Are the two periods in separate files? If so very easy cdo timstd in.nc out.nc gives you the standard deviation. Do for both the past and future, then just use cdo div stdfuture.nc stdpast.nc ratio.nc this file ratio has your answer on how the temporal variations have changed. That said you might want to first aggregate to monthly or annual means. I've been swamped these months. Hope to get creating this summer though
Thank you very much for your incredible work. I would like to ask you if the above procedure can be followed when we use ERA5-Land archives for the variable of precipitation or we must select 23:00:00 hour, after we shift the whole archive by an hour. Thank you in advance.
I'm not so familiar with the land archive - I need to check on how the timestamps work, but if it is end of step times as per other products (which I suspect) then you would need to shift yes. Be careful to throw away that single hanging step though in the final series 🙂
If you have at least windows 10 it is very easy to install WSL with just one command. Then you have native Ubuntu in a terminal under windows and can install CDO and follow all the videos...
thank you for your video I have 6 hourly time steps data i want sum into one single time step the time step from 2200 UTC(day 1) to 0400 UTC (day 2) how can sum the 6 steps to single time step
No sir in a single file i have 6 hourly timesteps now i want make single time step i have used daymean but its not working it giving 2 different time bands sir
Well if you only have 6 steps you can simply time average the whole file using cdo timmean . If you had 10 pm to 4am but for many days, then you could get around it by fudging the timestamp. cdo shiftime,2hours would do that and allow you to then use daymean
Hi, I'm really battling how to end up with a timeseries of data from a single hindcast grid point from a larger NetCDF regional file. am I missing a simple route?
Hi. I have a video exactly on that topic "extracting a location..." Did you go through my playlist? The two videos to watch are that one and the one on regridding and interpolation... Let me know if they help!
I'm just editing my latest video on the topic of broadcasting and calculating anomalies right now. Hopefully it will be ready to upload next week! Watch this space
@@climateunboxed My problem is that I have monthly geopotential height from 1979 to 2020. I want to calculate the seasonal anomalies for JFM, OND, DJF in cdo
Hello. You need to use fldmean, please refer to my videos on extracting an area and the one on spatial statistics in the play list for details. Hope you enjoy the material, more on the way soon when i get some teaching and a grant call out of the way
Hi, I have monthly mean data, it has long,lat,temperature data from from surface to bottom (42 level). Now, Please clarify me how to calculate annual mean at each x,y and depth.
Hi... 1) how to avoid chunk in cdo. eg. I tried to merge two separate .nc file to one single file. but size of the file is 10x higher due to chunk. 2) How to make xy line plot from .nc file after the yearmean output? eg. I want make x=year, y=temperature for the entire domain.
Hello Adrian, I have a .nc file that contains data every 6 hour of precipitation, my interest is to add the daily precipitation. But for this I have to take into account the precipitation between 12 pm on one day and 12 pm on the other, so I cannot apply "daysum" of cdo. Any suggestion?
yes for this you can you cdo shifttime,-6hours to shift the timestamps before applying daymean. Or you can alternatively use timselmean,4 , which I really should have thought to include in this video, but maybe I'll make a separate short on that topic - I uploaded a more detailed reply to your stackoverflow posting by the way. cheers!
Dear Adrian I am using the following command cdo -setattribute,rain@units=kgm-2d-1 infile.nc outfile.nc to change the units of the rain variable in my NetCDF file from mm/day to kg m-2 d-1. Although both the units are equivalent, the R package I am using to calculate my climate indices requires rain in kg m-2 d-1. It is converting successfully but when I am using this file in my R package it is saying that kgm-2d-1 is not convertible to kg m-2 d-1 (i.e. with spaces). I can't use spaces in the cdo command otherwise it will not convert mm/day to kg m-2 d-1. What may be the possible solution? Please help.
well done for the initiative of finding that command. I usually use NCO for those kinds of operations. Hmmm, have you tried putting quote marks around the argument so you can include the spaces without cdo getting confused? "Argument" ?
@@climateunboxed You are seriously my lucky charm. Thanks a lot, professor. It worked with quotation marks. God bless you. Please make more videos on climate data. I will definitely share it with my colleagues. Your videos are so helpful. Much love and respect from India. Cheers.
@@arjunkaushik5075 i have a few presentations ready to record. Just that I've had a horrible cold the last two weeks... Not very conducive to clear videos 😉 Thank you so much for spreading the word.
@@climateunboxed Wishing you a speedy recovery. I have one more question to ask. Is it possible to get a NetCDF file for the mean temperature from the available min and max temperature NetCDF files?
@@arjunkaushik5075 you can only estimate it roughly by taking their average... cdo add min.nc max.nc junk.nc and then cdo divc,2 junk.nc tmean.nc you can pipe in one single command with cdo divc,2 -add min.nc max.nc tmean.nc. As i say though this is very approximate. You can use era5 to calculate what the errors repair be by comparing it to daymean of the hourly data
Hi Adrian,
I really like your videos. It makes my journey easier as a climate researcher. I have one query. I want to calculate mean and standard deviation of precipitation for each grid cell for historical 30 years. (I have 150 grids). I want to repeat the same procedure for projected 30 years. And then want to calculate the ratio of those two mean in each grid. How to do this in CDO? Any help will be appreciated. Thanks!
Are the two periods in separate files? If so very easy cdo timstd in.nc out.nc gives you the standard deviation. Do for both the past and future, then just use cdo div stdfuture.nc stdpast.nc ratio.nc this file ratio has your answer on how the temporal variations have changed. That said you might want to first aggregate to monthly or annual means. I've been swamped these months. Hope to get creating this summer though
Thank you very much for your incredible work. I would like to ask you if the above procedure can be followed when we use ERA5-Land archives for the variable of precipitation or we must select 23:00:00 hour, after we shift the whole archive by an hour. Thank you in advance.
I'm not so familiar with the land archive - I need to check on how the timestamps work, but if it is end of step times as per other products (which I suspect) then you would need to shift yes. Be careful to throw away that single hanging step though in the final series 🙂
Thank you sir, for posting these amazing videos. These are really useful.
Thank you for your kind words! More material on its way... :-)
Thank you soooooo much!! Very intresting and understandable vido!
is there any other videos that shows in windows platform
If you have at least windows 10 it is very easy to install WSL with just one command. Then you have native Ubuntu in a terminal under windows and can install CDO and follow all the videos...
thank you for your video
I have 6 hourly time steps data i want sum into one single time step the time step from 2200 UTC(day 1) to 0400 UTC (day 2)
how can sum the 6 steps to single time step
are these 6 steps in a longer file with many hourly steps?
No sir in a single file i have 6 hourly timesteps now i want make single time step i have used daymean but its not working it giving 2 different time bands sir
Well if you only have 6 steps you can simply time average the whole file using cdo timmean . If you had 10 pm to 4am but for many days, then you could get around it by fudging the timestamp. cdo shiftime,2hours would do that and allow you to then use daymean
@@climateunboxed thank you sir
but i want to add the 6 time steps
i am calculating precipitation data
Hi, I'm really battling how to end up with a timeseries of data from a single hindcast grid point from a larger NetCDF regional file. am I missing a simple route?
Hi. I have a video exactly on that topic "extracting a location..." Did you go through my playlist? The two videos to watch are that one and the one on regridding and interpolation... Let me know if they help!
@@climateunboxed just watching it and will give it a go. Thanks!
Really helpful videos Sir
Thank you very much :)
You are welcome
How to calculate the anomalies of seasonal climatologies of DJF, OND and JFM of geopotential
I'm just editing my latest video on the topic of broadcasting and calculating anomalies right now. Hopefully it will be ready to upload next week! Watch this space
@@climateunboxed My problem is that I have monthly geopotential height from 1979 to 2020. I want to calculate the seasonal anomalies for JFM, OND, DJF in cdo
hi sir , do we need to shift one hour backwards in almost every dataset ?. im currently working with cmip6 models. They all need this correction?
Only if you work with accumulated fields with the time stamp at the end of the window rather than the middle or start
How to calculate the average for the region? No time averaging
Hello. You need to use fldmean, please refer to my videos on extracting an area and the one on spatial statistics in the play list for details. Hope you enjoy the material, more on the way soon when i get some teaching and a grant call out of the way
Hi, I have monthly mean data, it has long,lat,temperature data from from surface to bottom (42 level). Now, Please clarify me how to calculate annual mean at each x,y and depth.
Hi... 1) how to avoid chunk in cdo. eg. I tried to merge two separate .nc file to one single file. but size of the file is 10x higher due to chunk.
2) How to make xy line plot from .nc file after the yearmean output? eg. I want make x=year, y=temperature for the entire domain.
Hello Adrian, I have a .nc file that contains data every 6 hour of precipitation, my interest is to add the daily precipitation. But for this I have to take into account the precipitation between 12 pm on one day and 12 pm on the other, so I cannot apply "daysum" of cdo. Any suggestion?
yes for this you can you cdo shifttime,-6hours to shift the timestamps before applying daymean. Or you can alternatively use timselmean,4 , which I really should have thought to include in this video, but maybe I'll make a separate short on that topic - I uploaded a more detailed reply to your stackoverflow posting by the way. cheers!
How can i learn CDO? is there any online courses available...??
this one is a good start ;-)
Dear Adrian
I am using the following command cdo -setattribute,rain@units=kgm-2d-1 infile.nc outfile.nc
to change the units of the rain variable in my NetCDF file from mm/day to kg m-2 d-1. Although both the units are equivalent, the R package I am using to calculate my climate indices requires rain in kg m-2 d-1. It is converting successfully but when I am using this file in my R package it is saying that kgm-2d-1 is not convertible to kg m-2 d-1 (i.e. with spaces). I can't use spaces in the cdo command otherwise it will not convert mm/day to kg m-2 d-1. What may be the possible solution?
Please help.
well done for the initiative of finding that command. I usually use NCO for those kinds of operations. Hmmm, have you tried putting quote marks around the argument so you can include the spaces without cdo getting confused? "Argument" ?
@@climateunboxed You are seriously my lucky charm. Thanks a lot, professor. It worked with quotation marks. God bless you. Please make more videos on climate data. I will definitely share it with my colleagues. Your videos are so helpful. Much love and respect from India.
Cheers.
@@arjunkaushik5075 i have a few presentations ready to record. Just that I've had a horrible cold the last two weeks... Not very conducive to clear videos 😉 Thank you so much for spreading the word.
@@climateunboxed Wishing you a speedy recovery. I have one more question to ask. Is it possible to get a NetCDF file for the mean temperature from the available min and max temperature NetCDF files?
@@arjunkaushik5075 you can only estimate it roughly by taking their average... cdo add min.nc max.nc junk.nc and then cdo divc,2 junk.nc tmean.nc you can pipe in one single command with cdo divc,2 -add min.nc max.nc tmean.nc. As i say though this is very approximate. You can use era5 to calculate what the errors repair be by comparing it to daymean of the hourly data
nice