What do you mean "shifted"?
time_new(0)=time_old(3)?
Are you willing to lose the first three timesteps?
You could just hyperslab them out of everything with, e.g.,
ncks -d time,3,, in.nc out.nc
Or use ncap2 for more precise per-variable control, or to copy values of time from later to earlier indices.
cz
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello again,
I have climate forcings for my model but the time dimensions are shifted.
Is there a easy way to loop through the files and simply shift time dimenions by e.g. -3 ?
Cheers.
What do you mean "shifted"?
time_new(0)=time_old(3)?
Are you willing to lose the first three timesteps?
You could just hyperslab them out of everything with, e.g.,
Or use ncap2 for more precise per-variable control, or to copy values of time from later to earlier indices.
cz
I just overwrote the old time dimension with my new ones, probably there would have been a different solution but for me it this was simplest.