Computes a weight and dates/indices for linearly interpolating between two dates.
time_manager_mod
fms_mod
1. call time_interp ( Time, weight )
2. call time_interp ( Time, weight, year1, year2 )
3. call time_interp ( Time, weight, year1, year2, month1, month2 )
4. call time_interp ( Time, weight, year1, year2, month1, month2, day1, day2 )
5. call time_interp ( Time, Timelist, weight, index1, index2 [, modtime] )
6. call time_interp ( Time, Time_beg, Time_end, Timelist, weight, index1, index2 [,correct_leap_year_inconsistency])
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) |
correct_leap_year_inconsistency | Turns on a kluge for an inconsistency which may occur in a special case.
When the modulo time period (i.e. Time_end - Time_beg) is a whole number of years
and is not a multiple of 4, and the calendar in use has leap years, then it is
likely that the interpolation will involve mapping a common year onto a leap year.
In this case it is often desirable, but not absolutely necessary, to use data for
Feb 28 of the leap year when it is mapped onto a common year.
To turn this on, set correct_leap_year_inconsistency=.true. [logical, optional] |
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