13 & sec, caltype, zone, sclyear, sclmon, sclday, sclsec)
26 &
operator(==),
operator(>),
operator(<),
operator(>=),
operator(<=), &
27 &
operator(+),
operator(-),
operator(*),
operator(/),
mod,
modulo, &
29 use dc_trace,
only: beginsub, endsub
32 integer,
intent(out),
optional:: year
33 integer,
intent(out),
optional:: mon
34 integer,
intent(out),
optional:: day
35 integer,
intent(out),
optional:: hour
36 integer,
intent(out),
optional:: min
37 real(DP),
intent(out),
optional:: sec
38 integer,
intent(out),
optional:: caltype
39 character(*),
intent(out),
optional:: zone
49 if (
present(zone))
then
52 if (
present(caltype))
then
53 caltype = time % caltype
56 if (
present(hour))
then
60 if (
present(min))
then
64 if (
present(sec))
then
67 if (
present(sclsec))
then
73 if (
present(year)) year = 0
74 if (
present(sclyear)) sclyear = 0
75 if (
present(sclmon))
then
78 elseif (
present(mon))
then
82 if (
present(day)) day = iday
83 if (
present(sclday)) sclday = iday
90 if (time % caltype ==
cal_julian .or. time%day < 640196)
then
100 iyear = iyear +
int( iday / 36524 ) * 100
115 iday = iday * 10 + 922
116 month =
int( iday / 306 )
118 if (
present(sclyear))
then
121 elseif (
present(year))
then
127 if (
present(sclmon))
then
128 iday =
int(
mod(iday, 306) / 10 ) + 1
130 elseif (
present(mon))
then
131 iday =
int(
mod(iday, 306) / 10 ) + 1
134 iday =
int( iday / 10 ) + 1
137 if (
present(day)) day = iday
138 if (
present(sclday)) sclday = iday
146 & year, mon, day, hour, min, sec, nondim, &
147 & sclyear, sclmon, sclday, sclsec, sclnondim, err)
154 use dc_trace,
only: beginsub, endsub
160 &
operator(==),
operator(>),
operator(<),
operator(>=),
operator(<=), &
161 &
operator(+),
operator(-),
operator(*),
operator(/),
mod,
modulo, &
165 integer,
intent(out),
optional:: year
166 integer,
intent(out),
optional:: mon
167 integer,
intent(out),
optional:: day
168 integer,
intent(out),
optional:: hour
169 integer,
intent(out),
optional:: min
170 real(DP),
intent(out),
optional:: sec
171 real(DP),
intent(out),
optional:: nondim
177 logical,
intent(out),
optional :: err
180 character(*),
parameter :: subname =
'DCDiffTimeEval1'
184 if (
present(sclnondim) )
then
185 if ( .not. diff % nondim_flag )
then
189 sclnondim = diff % sec
190 elseif (
present(nondim) )
then
191 if ( .not. diff % nondim_flag )
then
197 if ( diff % nondim_flag )
then
205 if (
present(sclyear))
then
208 elseif (
present(year))
then
213 if (
present(sclmon))
then
215 elseif (
present(mon))
then
219 if (
present(sclday))
then
221 elseif (
present(day))
then
224 isec = isec + diff % day * diff % day_seconds
227 if (
present(hour))
then
231 if (
present(min))
then
236 if (
present(sec))
then
239 if (
present(sclsec))
then
262 call eval(time, sclday = day, sclsec = sec)
263 result = day + sec / time % day_seconds
277 &
operator(+),
operator(*),
int
283 call eval(diff, sclmon = mon, sclday = day, sclsec = sec)
298 &
operator(+),
operator(*),
int
304 call eval(time, sclday = day, sclsec = sec)
305 result = (day * time % day_seconds + sec) /
hour_seconds
320 &
operator(+),
operator(*),
int
326 call eval(diff, sclmon = mon, sclday = day, sclsec = sec)
342 &
operator(+),
operator(*),
int
348 call eval(time, sclday = day, sclsec = sec)
349 result = (day * time % day_seconds + sec) /
min_seconds
364 &
operator(+),
operator(*),
int
370 call eval(diff, sclmon = mon, sclday = day, sclsec = sec)
395 call eval(time, day = day, sec = sec)
417 if ( .not. diff % nondim_flag )
then
418 call eval(diff, mon = mon, day = day, sec = sec)
422 call eval(diff, nondim = result)
441 call eval(diff, nondim=nondim)
458 &
operator(+),
operator(*),
int
464 call eval(time, sclday = day, sclsec = sec)
465 result = day * time % day_seconds + sec
479 &
operator(==),
operator(+),
operator(*),
int
486 if ( .not. diff % nondim_flag )
then
487 call eval(diff, sclmon = mon, sclday = day, sclsec = sec)
488 if ( mon == zero_sec )
then
489 result = day * diff % day_seconds + sec
494 call eval(diff, sclnondim = sec)
526 character(*),
intent(in):: unit
527 integer,
intent(in),
optional:: unit_symbol
531 if (
present(unit_symbol) )
then
580 character(*),
intent(in):: unit
581 integer,
intent(in),
optional:: unit_symbol
585 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)
integer, parameter, public unit_symbol_err
integer, parameter, public unit_symbol_hour
integer, parameter, public unit_symbol_min
integer, parameter, public cal_noleap
real(dp), parameter, public cyclic_mdays
integer, parameter, public hour_seconds
integer, parameter, public four_years
integer, parameter, public cal_cyclic
real(dp), save, public day_seconds
integer, parameter, public unit_symbol_sec
integer, parameter, public unit_symbol_nondim
integer, parameter, public year_days
integer, parameter, public year_months
integer, parameter, public four_century
integer, parameter, public min_seconds
integer, parameter, public unit_symbol_day
integer, parameter, public cal_julian
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public dc_enodimtime
integer, parameter, public dc_noerr
integer, parameter, public dc_edimtime
subroutine, public dcscaledsecputline(sclsec, unit, indent)
Provides kind type parameter values.
integer, parameter, public token
Character length for word, token
integer, parameter, public dp
Double Precision Real number