You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fields in `CFTime` and `CFClimatology` classes have been made private, corresponding active fields added.
7
7
*`CFClimatology` instances can now be extended with the `+` operator.
8
8
* When extending a `CFTime` or `CFClimatology` instance with another such instance using the `+` operator, bounds are preserved if both instances have bounds set.
9
+
* Added method `CFTime$doy()` to calculate the day-of-year from offsets or supplied dates, using the calendar of the instance.
9
10
* Documentation updated.
10
11
11
12
# CFtime 1.7.2
@@ -46,17 +47,11 @@ Maintenance release
46
47
47
48
# CFtime 1.6.0
48
49
49
-
* New class `CFClimatology` to manage climatological statistics. Method
50
-
`CFTime$factor()` with an `era` argument will now have a `CFClimatology`
51
-
instance attached to the attribute "CFTime" of its return value.
52
-
* New class `CFCalendarNone` for a calendar with no annual cycle. Such a
53
-
calendar represents a single instant in time, which may be useful for
54
-
experiments on a fixed moment during the year.
50
+
* New class `CFClimatology` to manage climatological statistics. Method `CFTime$factor()` with an `era` argument will now have a `CFClimatology` instance attached to the attribute "CFTime" of its return value.
51
+
* New class `CFCalendarNone` for a calendar with no annual cycle. Such a calendar represents a single instant in time, which may be useful for experiments on a fixed moment during the year.
55
52
*`str()` for `CFTime` and `CFClimatology` gives compact information.
56
-
* Fixed new `CFTime` instance for factor with a "day" or "dekad" period where
57
-
the last factor level is not at the end of the year.
58
-
*`CFTime$new()` with a single character string offset will generate only the
59
-
single corresponding offset.
53
+
* Fixed new `CFTime` instance for factor with a "day" or "dekad" period where the last factor level is not at the end of the year.
54
+
*`CFTime$new()` with a single character string offset will generate only the single corresponding offset.
60
55
* Test coverage near-complete.
61
56
* Fixed inconsistent documentation for functions.
62
57
* Minor code fixes.
@@ -70,128 +65,62 @@ single corresponding offset.
70
65
71
66
# CFtime 1.5.0
72
67
73
-
* Code is updated to align with the CF 1.12 release. Specifically, calendars
74
-
`utc` and `tai` are added.
75
-
*`standard` calendar now uses mixed Gregorian/Julian calendar as defined in the
76
-
CF Metadata Conventions. `proleptic_gregorian` is now a separate calendar with
77
-
its own code base.
68
+
* Code is updated to align with the CF 1.12 release. Specifically, calendars `utc` and `tai` are added.
69
+
*`standard` calendar now uses mixed Gregorian/Julian calendar as defined in the CF Metadata Conventions. `proleptic_gregorian` is now a separate calendar with its own code base.
78
70
* Negative offsets from a calendar origin are allowed.
79
-
* Code is refactored to R6. R6 class CFTime replaces S4 class CFtime (note the
80
-
difference in case). S4 class CFdatum has been replaced by hierarchy of
81
-
R6 CFCalendar classes, with various non-exported functions converted into
82
-
methods of CFCalendar. The code is now much cleaner and easier to extend, such
83
-
as with the two new calendars `utc` and `tai`.
84
-
* ISO8601 timestamps can use a comma "," as decimal mark to separate a
85
-
fractional part from a time element, in addition to the dot ".".
86
-
* Do not drop degenerate dimension on bounds when only 1 offset is included in
87
-
subsetting.
71
+
* Code is refactored to R6. R6 class CFTime replaces S4 class CFtime (note the difference in case). S4 class CFdatum has been replaced by hierarchy of R6 CFCalendar classes, with various non-exported functions converted into methods of CFCalendar. The code is now much cleaner and easier to extend, such as with the two new calendars `utc` and `tai`.
72
+
* ISO8601 timestamps can use a comma "," as decimal mark to separate a fractional part from a time element, in addition to the dot ".".
73
+
* Do not drop degenerate dimension on bounds when only 1 offset is included in subsetting.
88
74
89
75
# CFtime 1.4.1
90
76
91
-
* Method `slab()` has an additional argument `rightmost.closed` to indicate if
92
-
the upper extreme value should be included in the result.
93
-
* Fixed bounds information on CFtime instances returned from methods `indexOf()`
94
-
and `slab()`.
77
+
* Method `slab()` has an additional argument `rightmost.closed` to indicate if the upper extreme value should be included in the result.
78
+
* Fixed bounds information on CFtime instances returned from methods `indexOf()` and `slab()`.
95
79
* Several minor code improvements.
96
80
97
81
# CFtime 1.4.0
98
82
99
-
* Bounds that define intervals around offsets can be associated with a CFtime
100
-
instance and retrieved as raw offset values or as formatted timestamps.
101
-
* Methods that subset a CF time series (e.g. `CFfactor()`, `cut()`, `slab()`)
102
-
now have an attribute "CFtime" (among possible others) that describes the "time"
103
-
dimension of the analysis result applying the subset. In other words, if CFtime
104
-
instance 'Acf' describes the temporal dimension of data set 'A' and a factor 'Af'
105
-
is generated from 'Acf', then `Bcf <- attr(Af, "CFtime")` describes the temporal
106
-
dimension of the result of, say, `B <- apply(A, 1:2, tapply, Af, FUN)`.
107
-
* New `indexOf()` method added that returns the indices of supplied timestamps
108
-
in a CFtime instance, optionally with a fractional part. This can be used to
109
-
extract specific time steps, or to interpolate between time steps using the
110
-
fractional part, from the time dimension of the data set associated with the
111
-
CFtime instance. A vector of indices (e.g. referring to slices of the data set)
112
-
can also be supplied, in which case valid indices are returned, with the new
113
-
CFtime instance.
114
-
* New `cut()` method added to generate a factor, similar to `cut.POSIXt()` but with
115
-
some differences in the arguments.
83
+
* Bounds that define intervals around offsets can be associated with a CFtime instance and retrieved as raw offset values or as formatted timestamps.
84
+
* Methods that subset a CF time series (e.g. `CFfactor()`, `cut()`, `slab()`) now have an attribute "CFtime" (among possible others) that describes the "time" dimension of the analysis result applying the subset. In other words, if CFtime instance 'Acf' describes the temporal dimension of data set 'A' and a factor 'Af' is generated from 'Acf', then `Bcf <- attr(Af, "CFtime")` describes the temporal dimension of the result of, say, `B <- apply(A, 1:2, tapply, Af, FUN)`.
85
+
* New `indexOf()` method added that returns the indices of supplied timestamps in a CFtime instance, optionally with a fractional part. This can be used to extract specific time steps, or to interpolate between time steps using the fractional part, from the time dimension of the data set associated with the CFtime instance. A vector of indices (e.g. referring to slices of the data set) can also be supplied, in which case valid indices are returned, with the new CFtime instance.
86
+
* New `cut()` method added to generate a factor, similar to `cut.POSIXt()` but with some differences in the arguments.
116
87
*`CFfactor()` now supports a period "quarter", for calendar quarters.
117
-
*`format()` method added that generates a character vector of timestamps for the
118
-
offsets in a CFtime instance. The format is specified using the flags used in
119
-
`strptime()`, with some limitations. In particular, locale-specific formatting is
120
-
limited to month names and no weekday information can be generated. The `range()`
121
-
method has a new "format" parameter to support the same functionality and timestamps
122
-
can also be generated for the extremes of the bounds, if set.
123
-
*`as_character()` and `length()` methods added that return a vector of timestamps
124
-
or the number of offsets in a CFtime instance, respectively.
125
-
* Several functions have been renamed (most notably `CFtimestamp()` to
126
-
`as_timestamp()`, `CFcomplete()` to `is_complete()`, `CFrange()` to the standard
127
-
generic method `range()`, and `CFsubset()` to `slab()`) to be more consistent
128
-
with the R universe. The original functions are now flagged as being deprecated.
129
-
Some datum functions (deep down where regular mortals do not dwell) have been
130
-
deleted.
88
+
*`format()` method added that generates a character vector of timestamps for the offsets in a CFtime instance. The format is specified using the flags used in `strptime()`, with some limitations. In particular, locale-specific formatting is limited to month names and no weekday information can be generated. The `range()` method has a new "format" parameter to support the same functionality and timestamps can also be generated for the extremes of the bounds, if set.
89
+
*`as_character()` and `length()` methods added that return a vector of timestamps or the number of offsets in a CFtime instance, respectively.
90
+
* Several functions have been renamed (most notably `CFtimestamp()` to `as_timestamp()`, `CFcomplete()` to `is_complete()`, `CFrange()` to the standard generic method `range()`, and `CFsubset()` to `slab()`) to be more consistent with the R universe. The original functions are now flagged as being deprecated. Some datum functions (deep down where regular mortals do not dwell) have been deleted.
131
91
* Time zone designator "UTC" accepted when parsing timestamps to offsets.
132
92
* Minor code fixes, see GitHub commits.
133
93
* Documentation updated, with description of new functions.
134
94
135
95
# CFtime 1.3.0
136
96
137
-
* Two CFtime instances can be added if they have compatible calendars and units.
138
-
The earlier origin is preserved in the result and offsets from the later instance
139
-
are incremented by the appropriate amount. As before, in the result offsets are
140
-
in the order of the specified CFtime instances.
141
-
* A new function CFsubset() can be used to retrieve a logical vector that indicates
142
-
which time steps in a CFtime instance fall between two timestamps. This is useful
143
-
to slice data during reading from file or analysis.
144
-
* Time zone information is managed at the level of the datum. If a vector of character
145
-
timestamps is parsed and found to have different time zones, a warning is generated.
97
+
* Two CFtime instances can be added if they have compatible calendars and units. The earlier origin is preserved in the result and offsets from the later instance are incremented by the appropriate amount. As before, in the result offsets are in the order of the specified CFtime instances.
98
+
* A new function CFsubset() can be used to retrieve a logical vector that indicates which time steps in a CFtime instance fall between two timestamps. This is useful to slice data during reading from file or analysis.
99
+
* Time zone information is managed at the level of the datum. If a vector of character timestamps is parsed and found to have different time zones, a warning is generated.
146
100
* Much reduced memory footprint.
147
101
* Minor code fixes, see GitHub commits.
148
102
* Codecov.io test coverage monitoring added.
149
103
* Documentation updated, with description of new functions.
150
104
151
105
# CFtime 1.2.0
152
106
153
-
* Datum units "years" and "months" added. While these units are discouraged by
154
-
the CF Metadata Conventions due to their problematic definition, there are quite
155
-
a few data sets out there that use these units nonetheless. For this reason,
156
-
reading existing files with such datum units is supported (converting offsets to
157
-
time elements is easy) but parsing timestamps is not (calculating offsets from
158
-
time elements is possible but tedious and slow). Should there be a definite need,
159
-
open an issue on GitHub and make a *very good* case why this functionality is
160
-
required.
161
-
* CFresolution() returns the average separation between elements in a time series,
162
-
in units of the datum.
163
-
* CFcomplete() indicates if the time series is complete, meaning that there are
164
-
no gaps in the time series. This also works for time series with a somewhat
165
-
variable length such as monthly data with a "days" datum unit. This works for
166
-
all but the most exotic time dimension constructions.
167
-
* CFtimestamp() produces a timestamp for all midnight values if the datum unit is
168
-
"hours", "minutes" or "seconds". The "time" format has been removed. For "standard",
169
-
"gregorian" and "proleptic_gregorian" calendars output can be generated as POSIXct
170
-
by specifying the new argument `asPOSIX = TRUE` -- defaults to `FALSE`, the
171
-
previous behaviour so the API is not broken.
107
+
* Datum units "years" and "months" added. While these units are discouraged by the CF Metadata Conventions due to their problematic definition, there are quite a few data sets out there that use these units nonetheless. For this reason, reading existing files with such datum units is supported (converting offsets to time elements is easy) but parsing timestamps is not (calculating offsets from time elements is possible but tedious and slow). Should there be a definite need, open an issue on GitHub and make a *very good* case why this functionality is required.
108
+
* CFresolution() returns the average separation between elements in a time series, in units of the datum.
109
+
* CFcomplete() indicates if the time series is complete, meaning that there are no gaps in the time series. This also works for time series with a somewhat variable length such as monthly data with a "days" datum unit. This works for all but the most exotic time dimension constructions.
110
+
* CFtimestamp() produces a timestamp for all midnight values if the datum unit is "hours", "minutes" or "seconds". The "time" format has been removed. For "standard", "gregorian" and "proleptic_gregorian" calendars output can be generated as POSIXct by specifying the new argument `asPOSIX = TRUE` -- defaults to `FALSE`, the previous behaviour so the API is not broken.
172
111
* Minor documentation updates.
173
112
* Assorted minor code fixes, see GitHub commits.
174
113
175
114
# CFtime 1.1.0
176
115
177
-
* CFtime() can now also be invoked with a vector of character timestamps as offsets, or
178
-
with a single timestamp to create a complete time series from the datum to the
179
-
indicated timestamp.
116
+
* CFtime() can now also be invoked with a vector of character timestamps as offsets, or with a single timestamp to create a complete time series from the datum to the indicated timestamp.
180
117
* CFtimestamp() can now automatically select the best format for the time series.
181
-
* New CFfactor_units() and CFfactor_coverage() functions. CFfactor_units() will
182
-
tell you how many time units compose every level of a factor. CFfactor_coverage()
183
-
computes the actual or relative number of time units in the factor levels from the
184
-
time series in a CFtime instance with which the factor was created. This will
185
-
enable you to assess the completeness of your time series (and perhaps filter out
186
-
factor levels below a certain coverage threshold) and it can be useful in computing
187
-
absolute values from average values, as is often useful when computing anomalies.
118
+
* New CFfactor_units() and CFfactor_coverage() functions. CFfactor_units() will tell you how many time units compose every level of a factor. CFfactor_coverage() computes the actual or relative number of time units in the factor levels from the time series in a CFtime instance with which the factor was created. This will enable you to assess the completeness of your time series (and perhaps filter out factor levels below a certain coverage threshold) and it can be useful in computing absolute values from average values, as is often useful when computing anomalies.
188
119
* Global constants are now defined in a package environment, CFt.
189
120
* Documentation expanded, updated and fixed.
190
121
* Assorted minor code fixes, see GitHub commits.
191
122
192
123
# CFtime 1.0.0
193
124
194
-
* This version supports all CF Metadata Conventions calendars for use with climate
195
-
projection data.
196
-
* You can create timestamps from the offsets in the files and create factors that
197
-
greatly simplify working with climate change data.
125
+
* This version supports all CF Metadata Conventions calendars for use with climate projection data.
126
+
* You can create timestamps from the offsets in the files and create factors that greatly simplify working with climate change data.
0 commit comments