Skip to content

Commit fa69745

Browse files
committed
Update documentation to CF-1.13
1 parent 19319ab commit fa69745

15 files changed

Lines changed: 64 additions & 57 deletions

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Description: Support for all calendars as specified in the Climate and Forecast
1111
Climate Change (IPCC). This package specifically allows the user to work
1212
with any of the CF-compliant calendars (many of which are not compliant with
1313
POSIXt). The CF time coordinate is formally defined in the CF Metadata
14-
Conventions document available at <https://cfconventions.org/Data/cf-conventions/cf-conventions-1.12/cf-conventions.html#time-coordinate>.
14+
Conventions document available at <https://cfconventions.org/Data/cf-conventions/cf-conventions-1.13/cf-conventions.html#time-coordinate>.
1515
License: MIT + file LICENSE
1616
Encoding: UTF-8
1717
Roxygen: list(markdown = TRUE)

NEWS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# CFtime (development version)
2+
3+
Maintenance release
4+
5+
* Support for CF-1.13.
6+
* Documentation updated.
7+
18
# CFtime 1.7.2
29

310
Maintenance release

R/CFCalendar.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ NULL
2424
#' \item [`360_day`][CFCalendar360], all years have 360 days, divided over 12 months of 30 days.
2525
#' }
2626
#' @references
27-
#' https://cfconventions.org/Data/cf-conventions/cf-conventions-1.12/cf-conventions.html#calendar
27+
#' https://cfconventions.org/Data/cf-conventions/cf-conventions-1.13/cf-conventions.html#calendar
2828
#' @docType class
2929
CFCalendar <- R6::R6Class("CFCalendar",
3030
private = list(

R/CFClimatology.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#'
1111
#' @export
1212
#' @references
13-
#' https://cfconventions.org/Data/cf-conventions/cf-conventions-1.12/cf-conventions.html#climatological-statistics
13+
#' https://cfconventions.org/Data/cf-conventions/cf-conventions-1.13/cf-conventions.html#climatological-statistics
1414
#' @docType class
1515
CFClimatology <- R6::R6Class("CFClimatology",
1616
inherit = CFTime,

R/CFtime-package.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
#' Climate Change (IPCC). This package specifically allows the user to work
99
#' with any of the CF-compliant calendars (many of which are not compliant with
1010
#' POSIXt). The CF time coordinate is formally defined in the
11-
#' [CF Metadata Conventions document](https://cfconventions.org/Data/cf-conventions/cf-conventions-1.12/cf-conventions.html#time-coordinate).
11+
#' [CF Metadata Conventions document](https://cfconventions.org/Data/cf-conventions/cf-conventions-1.13/cf-conventions.html#time-coordinate).
1212
#'
1313
#' This package also supports the creation of a "time" dimension, using class
14-
#' `CFClimatology`, for climatological statistics as defined [here](https://cfconventions.org/Data/cf-conventions/cf-conventions-1.12/cf-conventions.html#climatological-statistics).
14+
#' `CFClimatology`, for climatological statistics as defined [here](https://cfconventions.org/Data/cf-conventions/cf-conventions-1.13/cf-conventions.html#climatological-statistics).
1515
#'
1616
#' The package can create a [CFTime] or [CFClimatology] instance from scratch or, more commonly, it
1717
#' can use the dimension attributes and dimension variable values from a netCDF

R/CFtime.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#'
1717
#' @export
1818
#' @references
19-
#' https://cfconventions.org/Data/cf-conventions/cf-conventions-1.12/cf-conventions.html#time-coordinate
19+
#' https://cfconventions.org/Data/cf-conventions/cf-conventions-1.13/cf-conventions.html#time-coordinate
2020
#' @docType class
2121
CFTime <- R6::R6Class("CFTime",
2222
private = list(

README.Rmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ knitr::opts_chunk$set(
2121

2222
<!-- badges: end -->
2323

24-
CFtime is an R package that supports working with [CF Metadata Conventions](http://cfconventions.org) time coordinates, specifically geared to time-referencing data sets of climate projections such as those produced under the [World Climate Research Programme](https://www.wcrp-climate.org) and re-analysis data such as ERA5 from the European Centre for Medium-range Weather Forecasts (ECMWF).
24+
CFtime is an R package that supports working with [CF Metadata Conventions](https://cfconventions.org) time coordinates, specifically geared to time-referencing data sets of climate projections such as those produced under the [World Climate Research Programme](https://www.wcrp-climate.org) and re-analysis data such as ERA5 from the European Centre for Medium-range Weather Forecasts (ECMWF).
2525

2626
The data sets include in their metadata an epoch, or origin, a point in time from which other points in time are calculated. This epoch takes the form of `days since 1949-12-01`, with each data collection (Coupled Model Intercomparison Project (CMIP) generation, model, etc) having its own epoch. The data itself has a temporal dimension if a coordinate variable in the netCDF file has an attribute `units` with a string value describing an epoch. The coordinate variable, say "time", has data values such as 43289, which are offsets from the epoch in units of the epoch string ("days" in this case). To convert this offset to a date, using a specific calendar, is what this package does. Given that the calendars supported by the CF Metadata Conventions are not compatible with `POSIXt`, this conversion is not trivial because the standard R date-time operations do not give correct results. That it is important to account for these differences is easily demonstrated:
2727

@@ -39,10 +39,10 @@ That's a difference of nearly 21 months! (And yes, 30 February is a valid date o
3939

4040
All defined calendars of the CF Metadata Conventions are supported:
4141

42-
- `standard` or `gregorian`: This calendar is valid for the Common Era only; it starts at 0001-01-01 00:00:00, i.e. 1 January of year 1. Time periods prior to the introduction of the Gregorian calendar (1582-10-15) use the `julian` calendar that was in common use then. The 10-day gap between the Julian and Gregorian calendars is observed, so dates in the range 5 to 14 October 1582 are invalid.
42+
- `standard` (or the deprecated `gregorian`): This calendar is valid for the Common Era only; it starts at `0001-01-01T00:00:00`, i.e. 1 January of year 1. Time periods prior to the introduction of the Gregorian calendar (`1582-10-15`) use the `julian` calendar that was in common use then. The 10-day gap between the Julian and Gregorian calendars is observed, so dates in the range 5 to 14 October 1582 are invalid.
4343
- `proleptic_gregorian`: This calendar uses the Gregorian calendar for periods prior to the introduction of that calendar as well, and it extends to periods before the Common Era, e.g. year 0 and negative years.
44-
- `tai`: International Atomic Time, a global standard for linear time based on multiple atomic clocks: it counts seconds since its start at 1958-01-01 00:00:00. For presentation it uses the Gregorian calendar. Timestamps prior to its start are not allowed.
45-
- `utc`: Coordinated Universal Time, the standard for civil timekeeping all over the world. It is based on International Atomic Time but it uses occasional leap seconds to remain synchronous with Earth's rotation around the Sun; at the end of 2024 it is 37 seconds behind `tai`. It uses the Gregorian calendar with a start at 1972-01-01 00:00:00; earlier timestamps are not allowed. Future timestamps are also not allowed because the insertion of leap seconds is unpredictable. Most computer clocks synchronize against UTC but calculations of periods do not consider leap seconds.
44+
- `tai`: International Atomic Time, a global standard for linear time based on multiple atomic clocks: it counts seconds since its start at `1958-01-01T00:00:00`. For presentation it uses the Gregorian calendar. Timestamps prior to its start are not allowed.
45+
- `utc`: Coordinated Universal Time, the standard for civil timekeeping all over the world. It is based on International Atomic Time but it uses occasional leap seconds to remain synchronous with Earth's rotation around the Sun; at the end of 2025 it is 37 seconds behind `tai`. It uses the Gregorian calendar with a start at `1972-01-01T00:00:00`; earlier timestamps are not allowed. Future timestamps are also not allowed because the insertion of leap seconds is unpredictable. Most computer clocks synchronize against UTC but calculations of periods do not consider leap seconds (but `CFtime` does).
4646
- `julian`: The `julian` calendar has a leap year every four years, including centennial years. Otherwise it is the same as the `standard` calendar.
4747
- `365_day` or `noleap`: This is a "model time" calendar in which no leap years occur. Year 0 exists, as well as years prior to that.
4848
- `366_day` or `all_leap`: This is a "model time" calendar in which all years are leap years. Year 0 exists, as well as years prior to that.

README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ commit](https://img.shields.io/github/last-commit/R-CF/CFtime)](https://github.c
2323
<!-- badges: end -->
2424

2525
CFtime is an R package that supports working with [CF Metadata
26-
Conventions](http://cfconventions.org) time coordinates, specifically
26+
Conventions](https://cfconventions.org) time coordinates, specifically
2727
geared to time-referencing data sets of climate projections such as
2828
those produced under the [World Climate Research
2929
Programme](https://www.wcrp-climate.org) and re-analysis data such as
@@ -62,29 +62,31 @@ valid date on a `360_day` calendar.)
6262

6363
All defined calendars of the CF Metadata Conventions are supported:
6464

65-
- `standard` or `gregorian`: This calendar is valid for the Common Era
66-
only; it starts at 0001-01-01 00:00:00, i.e. 1 January of year 1. Time
67-
periods prior to the introduction of the Gregorian calendar
68-
(1582-10-15) use the `julian` calendar that was in common use then.
69-
The 10-day gap between the Julian and Gregorian calendars is observed,
70-
so dates in the range 5 to 14 October 1582 are invalid.
65+
- `standard` (or the deprecated `gregorian`): This calendar is valid for
66+
the Common Era only; it starts at `0001-01-01T00:00:00`, i.e. 1
67+
January of year 1. Time periods prior to the introduction of the
68+
Gregorian calendar (`1582-10-15`) use the `julian` calendar that was
69+
in common use then. The 10-day gap between the Julian and Gregorian
70+
calendars is observed, so dates in the range 5 to 14 October 1582 are
71+
invalid.
7172
- `proleptic_gregorian`: This calendar uses the Gregorian calendar for
7273
periods prior to the introduction of that calendar as well, and it
7374
extends to periods before the Common Era, e.g. year 0 and negative
7475
years.
7576
- `tai`: International Atomic Time, a global standard for linear time
7677
based on multiple atomic clocks: it counts seconds since its start at
77-
1958-01-01 00:00:00. For presentation it uses the Gregorian calendar.
78-
Timestamps prior to its start are not allowed.
78+
`1958-01-01T00:00:00`. For presentation it uses the Gregorian
79+
calendar. Timestamps prior to its start are not allowed.
7980
- `utc`: Coordinated Universal Time, the standard for civil timekeeping
8081
all over the world. It is based on International Atomic Time but it
8182
uses occasional leap seconds to remain synchronous with Earth’s
82-
rotation around the Sun; at the end of 2024 it is 37 seconds behind
83-
`tai`. It uses the Gregorian calendar with a start at 1972-01-01
84-
00:00:00; earlier timestamps are not allowed. Future timestamps are
85-
also not allowed because the insertion of leap seconds is
86-
unpredictable. Most computer clocks synchronize against UTC but
87-
calculations of periods do not consider leap seconds.
83+
rotation around the Sun; at the end of 2025 it is 37 seconds behind
84+
`tai`. It uses the Gregorian calendar with a start at
85+
`1972-01-01T00:00:00`; earlier timestamps are not allowed. Future
86+
timestamps are also not allowed because the insertion of leap seconds
87+
is unpredictable. Most computer clocks synchronize against UTC but
88+
calculations of periods do not consider leap seconds (but `CFtime`
89+
does).
8890
- `julian`: The `julian` calendar has a leap year every four years,
8991
including centennial years. Otherwise it is the same as the `standard`
9092
calendar.

man/CFCalendar.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/CFClimatology.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)