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
Copy file name to clipboardExpand all lines: vignettes/Conformance.Rmd
+23-86Lines changed: 23 additions & 86 deletions
Original file line number
Diff line number
Diff line change
@@ -14,95 +14,45 @@ knitr::opts_chunk$set(
14
14
)
15
15
```
16
16
17
-
`CFtime` is based on version 1.12 of the CF Metadata Conventions. The text for
18
-
the *time coordinate* in the conventions may be consulted [here](https://cfconventions.org/Data/cf-conventions/cf-conventions-1.12/cf-conventions.html#time-coordinate).
17
+
`CFtime` is based on version 1.12 of the CF Metadata Conventions. The text for the *time coordinate* in the conventions may be consulted [here](https://cfconventions.org/Data/cf-conventions/cf-conventions-1.12/cf-conventions.html#time-coordinate).
19
18
20
-
> The *time coordinate* is one of four coordinate types that receive "special
21
-
treatment" in the conventions. The other three are longitude, latitude and the
22
-
vertical. If you require convention-compliant support for any of these three
23
-
other coordinate types, please consider using package [`ncdfCF`](https://cran.r-project.org/package=ncdfCF)
24
-
which supports all three coordinate types and links with `CFtime` for support of
25
-
the time coordinate.
19
+
> The *time coordinate* is one of four coordinate types that receive "special treatment" in the conventions. The other three are longitude, latitude and the vertical. If you require convention-compliant support for any of these three other coordinate types, please consider using package [`ncdfCF`](https://cran.r-project.org/package=ncdfCF) which supports all three coordinate types and links with `CFtime` for support of the time coordinate.
26
20
27
-
This document sets out how the `CFtime` package conforms to the CF Metadata
28
-
Conventions, by section of the conventions. This information is mostly useful
29
-
for developers and expert users.
21
+
This document sets out how the `CFtime` package conforms to the CF Metadata Conventions, by section of the conventions. This information is mostly useful for developers and expert users.
30
22
31
-
If you have issues reading a netCDF file that is due to conformance of package
32
-
`CFtime` with the CF Metadata Conventions, please [open an issue on GitHub](https://github.com/pvanlaake/CFtime/issues).
23
+
If you have issues reading a netCDF file that is due to conformance of package `CFtime` with the CF Metadata Conventions, please [open an issue on GitHub](https://github.com/pvanlaake/CFtime/issues).
33
24
34
-
Please note that there are many netCDF files out there that are not claiming
35
-
adherence to the CF Metadata Conventions but whose time coordinate can still be
36
-
successfully handled by `CFtime`: the `netCDF` library itself provides the basic
37
-
plumbing.
25
+
Please note that there are many netCDF files out there that are not claimingadherence to the CF Metadata Conventions but whose time coordinate can still be successfully handled by `CFtime`: the `netCDF` library itself provides the basic plumbing.
38
26
39
27
## 4.4. Time Coordinate
40
28
41
-
A `CFTime` object is constructed from information that is contained in the
42
-
`units` and `calendar` attributes for a time coordinate read out of a netCDF
43
-
file. The package does not actually access the netCDF file, it only uses the
44
-
information that was read out of the file by e.g. `ncdfCF`. Consequently, the
45
-
`CFtime` package can also construct a `CFTime` object from suitable character
46
-
strings.
29
+
A `CFTime` object is constructed from information that is contained in the `units` and `calendar` attributes for a time coordinate read out of a netCDF file. The package does not actually access the netCDF file, it only uses the information that was read out of the file by e.g. `ncdfCF`. Consequently, the `CFtime` package can also construct a `CFTime` object from suitable character strings.
47
30
48
-
This package is agnostic to the orientation of the axes in any data variable
49
-
that references the time coordinate. Consequently, the `standard_name` and
50
-
`axis` attributes are not considered by this package (but the `ncdfCF` package
51
-
handles both). Identification of a time coordinate is done by the `units`
52
-
attribute, alone.
31
+
This package is agnostic to the orientation of the axes in any data variable that references the time coordinate. Consequently, the `standard_name` and `axis` attributes are not considered by this package (but the `ncdfCF` package handles both). Identification of a time coordinate is done by the `units` attribute, alone.
53
32
54
33
## 4.4.1. Time Coordinate Units
55
34
56
-
The `CFtime` package fully supports the units `"second"`, `"minute"`, `"hour"`
57
-
and `"day"`, including abbreviated and/or plural forms. Unit `"second"` is the
58
-
SI second, a `"minute"` equals 60 seconds, an `"hour"` equals 3,600 seconds,
59
-
and a `"day"` equals 86,400 seconds. This is exactly as expected, but refer to
60
-
the `utc` calendar, below, for peculiarities of that calendar.
35
+
The `CFtime` package fully supports the units `"second"`, `"minute"`, `"hour"` and `"day"`, including abbreviated and/or plural forms. Unit `"second"` is (nominally) the SI second, a `"minute"` equals 60 seconds, an `"hour"` equals 3,600 seconds, and a `"day"` equals 86,400 seconds. This is exactly as expected, but refer to the `utc` calendar, below, for peculiarities of that calendar.
61
36
62
-
The `units``"month"` and `"year"` are accepted on input but not using their
63
-
definition in UDUNITS. Instead, `"year"` is a calendar year, so either 360, 365
64
-
or 366 days depending on its value and the calendar. A `"month"` is similarly a
65
-
calendar month. Use of either of these time units is discouraged by the CF
66
-
Metadata Conventions.
37
+
The `units``"month"` and `"year"` are accepted on input but not using their definition in UDUNITS. Instead, `"year"` is a calendar year, so either 360, 365 or 366 days depending on its value and the calendar. A `"month"` is similarly a calendar month. Use of either of these time units is discouraged by the CF Metadata Conventions.
67
38
68
39
Other UDUNITS time units are not supported by this package.
69
40
70
-
All variants of the glue word `"since"` are accepted, being `"after"`, `"from"`,
71
-
`"ref"` and `"per"`.
41
+
All variants of the glue word `"since"` are accepted, being `"after"`, `"from"`, `"ref"` and `"per"`.
72
42
73
-
The *"reference datetime string"* should be formatted using the UDUNITS broken
74
-
timestamp format or following [ISO8601](https://en.wikipedia.org/wiki/ISO_8601)
75
-
rules, but noting that datetimes valid in specific calendars other than
76
-
Gregorian (such as `2023-02-30` in the `360_day` calendar) are acceptable as
77
-
well. The UDUNITS "packed" format is not supported.
43
+
The *"reference datetime string"* should be formatted using the UDUNITS broken timestamp format or following [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) rules, but noting that datetimes valid in specific calendars other than Gregorian (such as `2023-02-30` in the `360_day` calendar) are acceptable as well. The UDUNITS "packed" format is not supported.
78
44
79
-
Timezone information can only use `00`, `15`, `30` and `45` to indicate minutes;
80
-
other minute offsets have never been used anywhere. A time zone value of `"UTC"`
81
-
is accepted, as an extension to the conventions. Even though the conventions
82
-
don't indicate it, the `tai` and `utc` calendars can carry no time zone
83
-
indication as that does not exist for either of these calendars.
45
+
Timezone information can only use `00`, `15`, `30` and `45` to indicate minutes; other minute offsets have never been used anywhere. A time zone value of `"UTC"` is accepted, as an extension to the conventions. Even though the conventions don't indicate it, the `tai` and `utc` calendars can carry no time zone indication as that does not exist for either of these calendars.
84
46
85
47
## 4.4.2. Calendar
86
48
87
-
If a `calendar` attribute is not given, `"standard"` is assumed, being the
88
-
default calendar as per the conventions.
89
-
90
-
*`standard` (or the deprecated `gregorian`): Fully conformant, but leap seconds
91
-
are never considered (see below). The combination of a *reference datetime* and
92
-
other *datetimes* spanning the gap between 1582-10-05 and 1582-10-15, in either
93
-
direction, is supported.
94
-
*`proleptic_gregorian`: Fully conformant, but leap seconds are never considered
95
-
(see below).
96
-
*`julian`: Fully conformant, but, despite the suggestion in the conventions,
97
-
leap seconds do not exist in this calendar and are thus never considered.
98
-
*`utc`: Fully conformant. Leap seconds are always accounted so when a leap
This also extends to minutes `23:59:00 ... 23:59:60 ... 00:00:59 ... 00:01:59`,
102
-
always adding 60 seconds. Likewise for `hours` and `days`. Units `"year"` and
103
-
`"month"` are not allowed, and neither is any time zone indication.
104
-
*`tai`: Fully conformant. Units `"year"` and `"month"` are not allowed, and
105
-
neither is any time zone indication.
49
+
If a `calendar` attribute is not given, `"standard"` is assumed, being the default calendar as per the conventions.
50
+
51
+
*`standard` (or the deprecated `gregorian`): Fully conformant, but leap seconds are never considered (see below). The combination of a *reference datetime* and other *datetimes* spanning the gap between 1582-10-05 and 1582-10-15, in either direction, is supported.
52
+
*`proleptic_gregorian`: Fully conformant, but leap seconds are never considered (see below).
53
+
*`julian`: Fully conformant, but, despite the suggestion in the conventions, leap seconds do not exist in this calendar and are thus never considered.
54
+
*`utc`: Fully conformant but with an origin of 1972-01-01T00:00:00 (earlier datetimes not allowed). Leap seconds are always accounted so when a leap second is included, UTC time progresses like `23:59:58 ... 23:59:59 ... 23:59:60 ... 00:00:00 ... 00:00:01`. This also extends to minutes `23:59:00 ... 23:59:60 ... 00:00:59 ... 00:01:59`, always adding 60 seconds. Likewise for `hours` and `days`. Units `"year"` and `"month"` are not allowed, and neither is any time zone indication.
55
+
*`tai`: Fully conformant. Units `"year"` and `"month"` are not allowed, and neither is any time zone indication.
106
56
*`no_leap` / `365_day`: Fully conformant.
107
57
*`all_leap` / `366_day`: Fully conformant.
108
58
*`360_day`: Fully conformant.
@@ -112,17 +62,9 @@ neither is any time zone indication.
112
62
113
63
The `utc` calendar fully supports leap seconds.
114
64
115
-
The `julian` calendar has no concept of leap seconds so these are never
116
-
possible or considered. Using a leap second in a `julian` calendar is an error.
65
+
The `julian` calendar has no concept of leap seconds so these are never possible or considered. Using a leap second in a `julian` calendar is an error.
117
66
118
-
In the `standard` and `proleptic_gregorian` calendars only the variant without
119
-
leap seconds is considered. The `units_metadata` attribute is not considered, so
120
-
assumed to be `"leap seconds: unknown"`. The assumption here is that if second
121
-
accuracy for a data producer is essential, then the entire tool chain from
122
-
observation equipment, to processing, to file recording will have to be of
123
-
known characteristics with regards to UTC time and leap seconds and thus the
124
-
`utc` calendar would be used, rather than `standard` or `proleptic_gregorian`
125
-
with a caveat communicated through the `units_metdata` attribute.
67
+
In the `standard` and `proleptic_gregorian` calendars only the variant without leap seconds is considered. The `units_metadata` attribute is not considered, so assumed to be `"leap seconds: unknown"`. The assumption here is that if second accuracy for a data producer is essential, then the entire tool chain from observation equipment, to processing, to file recording will have to be of known characteristics with regards to UTC time and leap seconds and thus the `utc` calendar would be used, rather than `standard` or `proleptic_gregorian` with a caveat communicated through the `units_metdata` attribute.
126
68
127
69
## 4.4.4. Time Coordinates with no Annual Cycle
128
70
@@ -134,11 +76,6 @@ Not implemented.
134
76
135
77
## 7.4. Climatological statistics
136
78
137
-
The time coordinate with climatological bounds is fully supported, with the
138
-
exception of using year 0 in the `standard` and `julian` calendars to flag
139
-
climatological data (which is a deprecated practice as per the CF Metadata
140
-
Conventions).
79
+
The time coordinate with climatological bounds is fully supported, with the exception of using year 0 in the `standard` and `julian` calendars to flag climatological data (which is a deprecated practice as per the CF Metadata Conventions).
141
80
142
-
This package is agnostic to the underlying statistical operation that produced
143
-
the *climatological time* so the `cell_methods` attribute is not inspected nor
144
-
interpreted.
81
+
This package is agnostic to the underlying statistical operation that produced the *climatological time* so the `cell_methods` attribute is not inspected nor interpreted.
0 commit comments