Hello folks,
I have data collected in every 3 hours. But, I would like to expand this to 1 hour interval by equally dividing with next row.
For example, I want to keep the first value 1987-01-01-00z 2.0, but following all record should be re-written as follow.
1987-01-01-03z 5.0 becomes 1.66667 after dividing by 3, then two new records 1987-01-01-01z 1.66667 and 1987-01-01-02z 1.66667 should be inserted, and continue...
Also, all precision should be same.
Thanks in advance.
I almost got it.
but, the result after 1987-01-01-21Z using your script is not what I want (look at the hour increment).
These are:
1987-01-01-21Z 94.1887
1987-01-02-01Z 0.00000
1987-01-02-02Z 0.00000
1987-01-02-03Z 0.00000
1987-01-02-04Z 0.66667
1987-01-02-05Z 0.66667
1987-01-02-06Z 0.66667
I almost got it.
but, the result after 1987-01-01-21Z using your script is not what I want (look at the hour increment).
These are:
1987-01-01-21Z 94.1887
1987-01-02-01Z 0.00000
1987-01-02-02Z 0.00000
1987-01-02-03Z 0.00000
1987-01-02-04Z 0.66667
1987-01-02-05Z 0.66667
1987-01-02-06Z 0.66667
Thanks summer_cherry;
It is very closer, but I am not able to get the right answer using your script, either. Two time steps are missing in the output.
1987-01-01-22Z and 1987-01-01-23Z.
I think the script should have special care of midnight (00Z) in order to make 22Z and 23Z by subtracting 2 and 1, respectively.
For example,
2 hour time lag of 1987-02-01-00Z should be 1987-01-01-22Z, and
1 hour time lag of 1987-02-01-00Z should be 1987-01-01-23Z.
It should be a challenge for you to figure it out yourself with the given answers.
Anyhow, I think I understand the problem.
I'm not able to test it out at this moment but try this: