Computes a weight and dates/indices for linearly interpolating between two dates.
time_manager_mod
fms_mod
call time_interp ( Time, weight )
call time_interp ( Time, weight, year1, year2 )
call time_interp ( Time, weight, year1, year2, month1, month2 )
call time_interp ( Time, weight, year1, year2, month1, month2, day1, day2 )
call time_interp ( Time, Timelist, weight, index1, index2 [, modtime] )
call time_interp ( Time, Time_beg, Time_end, Timelist, weight, index1, index2)
Time | The time at which the the weight is computed. [time_type] [time_type] [time_type] [time_type] [time_type] [time_type] |
Time_beg | For cyclical interpolation: Time_beg specifies the begining time of a cycle. [time_type] |
Time_end | For cyclical interpolation: Time_end specifies the ending time of a cycle. [time_type] |
Timelist | For cyclical interpolation: Timelist is an array of times between Time_beg and Time_end.
Must be monotonically increasing. [time_type, dimension(:)] [time_type, dimension(:)] |
modtime |
[integer] |
index1 | Timelist(index1) = The largest value of Timelist which is less than mod(Time,Time_end-Time_beg) |
index2 | Timelist(index2) = The smallest value of Timelist which is greater than mod(Time,Time_end-Time_beg) |
weight | weight = (mod(Time,Time_end-Time_beg) - Timelist(index1)) / (Timelist(index2) - Timelist(index1)) [real] [real] [real] [real] [real] [real] |
year1 |
[integer] [integer] [integer] |
year2 |
[integer] [integer] [integer] |
month1 |
[integer] [integer] |
month2 |
[integer] [integer] |
day1 |
[integer] |
day2 |
[integer] |
index1 |
[real] [real] |
index2 |
[real] [real] |
Time: Jan 01 00z weight = 0.0 Time: Jul 01 weight ~ 0.5 Time: Dec 31 23z weight ~ 1.0
seconds per minute = 60 minutes per hour = 60 hours per day = 24 months per year = 12