64 & sec, caltype, zone, sclyear, sclmon, sclday, sclsec)
72 &
operator(==),
operator(>),
operator(<),
operator(>=),
operator(<=), &
73 &
operator(+),
operator(-),
operator(*),
operator(/),
mod,
modulo, &
78 integer,
intent(out),
optional:: year
79 integer,
intent(out),
optional:: mon
80 integer,
intent(out),
optional:: day
81 integer,
intent(out),
optional:: hour
82 integer,
intent(out),
optional:: min
83 real(DP),
intent(out),
optional:: sec
84 integer,
intent(out),
optional:: caltype
85 character(*),
intent(out),
optional:: zone
95 if (
present(zone))
then
98 if (
present(caltype))
then
99 caltype = time % caltype
102 if (
present(hour))
then
106 if (
present(min))
then
110 if (
present(sec))
then
113 if (
present(sclsec))
then
119 if (
present(year)) year = 0
120 if (
present(sclyear)) sclyear = 0
121 if (
present(sclmon))
then
124 elseif (
present(mon))
then
128 if (
present(day)) day = iday
129 if (
present(sclday)) sclday = iday
139 elseif (time%day < 640196)
then
149 iyear = iyear +
int( iday / 36524 ) * 100
164 iday = iday * 10 + 922
165 month =
int( iday / 306 )
167 if (
present(sclyear))
then
170 elseif (
present(year))
then
176 if (
present(sclmon))
then
177 iday =
int(
mod(iday, 306) / 10 ) + 1
179 elseif (
present(mon))
then
180 iday =
int(
mod(iday, 306) / 10 ) + 1
183 iday =
int( iday / 10 ) + 1
186 if (
present(day)) day = iday
187 if (
present(sclday)) sclday = iday
238 & year, mon, day, hour, min, sec, nondim, &
239 & sclyear, sclmon, sclday, sclsec, sclnondim, err)
247 &
operator(==),
operator(>),
operator(<),
operator(>=),
operator(<=), &
248 &
operator(+),
operator(-),
operator(*),
operator(/),
mod,
modulo, &
252 integer,
intent(out),
optional:: year
253 integer,
intent(out),
optional:: mon
254 integer,
intent(out),
optional:: day
255 integer,
intent(out),
optional:: hour
256 integer,
intent(out),
optional:: min
257 real(DP),
intent(out),
optional:: sec
258 real(DP),
intent(out),
optional:: nondim
264 logical,
intent(out),
optional :: err
267 character(*),
parameter :: subname =
'DCDiffTimeEval1'
271 if (
present(sclnondim) )
then
272 if ( .not. diff % nondim_flag )
then
276 sclnondim = diff % sec
277 elseif (
present(nondim) )
then
278 if ( .not. diff % nondim_flag )
then
284 if ( diff % nondim_flag )
then
292 if (
present(sclyear))
then
295 elseif (
present(year))
then
300 if (
present(sclmon))
then
302 elseif (
present(mon))
then
306 if (
present(sclday))
then
308 elseif (
present(day))
then
311 isec = isec + diff % day * diff % day_seconds
314 if (
present(hour))
then
318 if (
present(min))
then
323 if (
present(sec))
then
326 if (
present(sclsec))
then
364 call eval(time, sclday = day, sclsec = sec)
365 result = day + sec / time % day_seconds
396 &
operator(+),
operator(*),
int
402 call eval(diff, sclmon = mon, sclday = day, sclsec = sec)
431 &
operator(+),
operator(*),
int
437 call eval(time, sclday = day, sclsec = sec)
438 result = (day * time % day_seconds + sec) /
hour_seconds
469 &
operator(+),
operator(*),
int
475 call eval(diff, sclmon = mon, sclday = day, sclsec = sec)
505 &
operator(+),
operator(*),
int
511 call eval(time, sclday = day, sclsec = sec)
512 result = (day * time % day_seconds + sec) /
min_seconds
543 &
operator(+),
operator(*),
int
549 call eval(diff, sclmon = mon, sclday = day, sclsec = sec)
591 call eval(time, day = day, sec = sec)
628 if ( .not. diff % nondim_flag )
then
629 call eval(diff, mon = mon, day = day, sec = sec)
633 call eval(diff, nondim = result)
667 call eval(diff, nondim=nondim)
700 &
operator(+),
operator(*),
int
706 call eval(time, sclday = day, sclsec = sec)
707 result = day * time % day_seconds + sec
735 &
operator(==),
operator(+),
operator(*),
int
742 if ( .not. diff % nondim_flag )
then
743 call eval(diff, sclmon = mon, sclday = day, sclsec = sec)
744 if ( mon == zero_sec )
then
745 result = day * diff % day_seconds + sec
750 call eval(diff, sclnondim = sec)
816 character(*),
intent(in):: unit
817 integer,
intent(in),
optional:: unit_symbol
821 if (
present(unit_symbol) )
then
907 character(*),
intent(in):: unit
908 integer,
intent(in),
optional:: unit_symbol
912 if (
present(unit_symbol) )
then
subroutine dcdifftimeeval1(diff, year, mon, day, hour, min, sec, nondim, sclyear, sclmon, sclday, sclsec, sclnondim, err)
type(dc_scaled_sec) function dcdifftimeevalsclsec(diff)
real(dp) function dcdifftimeevalbyunit(diff, unit, unit_symbol)
real(dp) function dcdatetimeevalhour(time)
subroutine dcdatetimeeval1(time, year, mon, day, hour, min, sec, caltype, zone, sclyear, sclmon, sclday, sclsec)
real(dp) function dcdatetimeevalsec(time)
real(dp) function dcdifftimeevalnondim(diff)
real(dp) function dcdatetimeevalday(time)
real(dp) function dcdatetimeevalbyunit(time, unit, unit_symbol)
real(dp) function dcdifftimeevalhour(diff)
real(dp) function dcdifftimeevalmin(diff)
real(dp) function dcdatetimeevalmin(time)
type(dc_scaled_sec) function dcdatetimeevalsclsec(time)
real(dp) function dcdifftimeevalday(diff)
real(dp) function dcdifftimeevalsec(diff)
Interface declarations for procedures provided from dc_date.
Derived types and parameters for date and time.
integer, parameter, public unit_symbol_err
Symbol for invalid unit
integer, parameter, public unit_symbol_hour
Symbol for hour unit
integer, parameter, public unit_symbol_min
Symbol for minute unit
integer, parameter, public cal_noleap
Calendar without leap years (365 days per year)
real(dp), parameter, public cyclic_mdays
Days per month for cyclic calendar (also used for DC_DIFFTIME)
integer, parameter, public hour_seconds
Seconds per hour
integer, parameter, public four_years
Days in 4 years (including leap year)
integer, parameter, public cal_cyclic
Cyclic calendar (30.6 days per month)
real(dp), save, public day_seconds
Seconds per day (variable, default is Earth day)
integer, parameter, public unit_symbol_sec
Symbol for second unit
integer, parameter, public unit_symbol_nondim
Symbol for nondimensional unit
integer, parameter, public year_days
Days per year (non-leap year)
integer, parameter, public year_months
Months per year
integer, parameter, public four_century
Days in 400 years
integer, parameter, public min_seconds
Seconds per minute
integer, parameter, public unit_symbol_day
Symbol for day unit
integer, parameter, public cal_julian
Julian calendar
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public dc_noerr
Error storage variables
integer, parameter, public dc_enodimtime
integer, parameter, public dc_edimtime
Scaled seconds module for precise time operations.
subroutine, public dcscaledsecputline(sclsec, unit, indent)
subroutine, public beginsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca, version)
subroutine, public endsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca)
Provides kind type parameter values.
integer, parameter, public dp
Double Precision Real number