-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
1,000 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Set the OS, Python version and other tools you might need | ||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.12" | ||
# You can also specify other tool versions: | ||
# nodejs: "19" | ||
# rust: "1.64" | ||
# golang: "1.19" | ||
|
||
# Build documentation in the "docs/" directory with Sphinx | ||
sphinx: | ||
configuration: docs/conf.py | ||
|
||
# Optionally build your docs in additional formats such as PDF and ePub | ||
# formats: | ||
# - epub | ||
|
||
# Optional but recommended, declare the Python requirements required | ||
# to build your documentation | ||
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html | ||
python: | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
earthkit.time.calendar - Calendar-related utilities | ||
=================================================== | ||
|
||
.. automodule:: earthkit.time.calendar | ||
:members: | ||
:undoc-members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
earthkit.time.climatology - Generate dates to compute model climates | ||
==================================================================== | ||
|
||
.. automodule:: earthkit.time.climatology | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
API Reference | ||
============= | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
|
||
sequence | ||
climatology | ||
calendar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
earthkit.time.sequence - Manipulate sequence of dates | ||
===================================================== | ||
|
||
.. module:: earthkit.time.sequence | ||
|
||
Sequence API | ||
------------ | ||
|
||
Sequences are described by subclasses of :class:`Sequence`. | ||
|
||
.. autoclass:: Sequence | ||
:members: | ||
|
||
|
||
Built-in Sequences | ||
------------------ | ||
|
||
.. autoclass:: DailySequence | ||
|
||
.. autoclass:: WeeklySequence | ||
|
||
.. autoclass:: MonthlySequence | ||
|
||
.. autoclass:: YearlySequence | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
```{include} ../CHANGELOG.md | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
earthkit-climdates - Compute model climate dates | ||
================================================ | ||
|
||
.. program:: earthkit-climdates | ||
|
||
The :program:`earthkit-climdates` can be invoked with various actions documented | ||
here, as follows:: | ||
|
||
earthkit-climdates <action> [args...] | ||
|
||
.. option:: -h, --help | ||
|
||
Print a help message and exit. Can be used as ``earthkit-climdates --help`` | ||
as well as for actions, e.g. ``earthkit-climdates range --help``. | ||
|
||
|
||
.. _cli_mclim_range: | ||
|
||
``range`` - Compute climatological date ranges | ||
---------------------------------------------- | ||
|
||
Compute climatological date ranges, one day per year in a given range:: | ||
|
||
earthkit-climdates range [--sep <sep>] (--from-date <start> | --from-year <start>) (--to-date <end> | --to-year <end>) <date> | ||
|
||
The list is printed using the given separator, as documented in :ref:`cli_sep`. | ||
|
||
.. option:: --from-date <start> | ||
|
||
Return dates starting from this one | ||
|
||
.. option:: --from-year <start> | ||
|
||
Return dates starting from this year | ||
|
||
.. option:: --to-date <end> | ||
|
||
Return dates up to this one | ||
|
||
.. option:: --to-year <end> | ||
|
||
Return dates up to this year | ||
|
||
.. option:: date | ||
|
||
The date to use as a reference (YYYYMMDD) | ||
|
||
|
||
``mclim`` - Compute sets of dates for model climatologies | ||
--------------------------------------------------------- | ||
|
||
This combines a climatological range (see :ref:`cli_mclim_range`) and a | ||
recurring source (e.g. twice a week). | ||
|
||
Usage:: | ||
|
||
earthkit-climdates mclim <sequence> [--sep <sep>] (--from-date <start> | --from-year <start>) (--to-date <end> | --to-year <end>) --before <num> --after <num> <date> | ||
|
||
The sequence is described as documented in :ref:`cli_seq`. The list is printed | ||
using the given separator, as documented in :ref:`cli_sep`. | ||
|
||
.. option:: --from-date <start> | ||
|
||
Return dates starting from this one | ||
|
||
.. option:: --from-year <start> | ||
|
||
Return dates starting from this year | ||
|
||
.. option:: --to-date <end> | ||
|
||
Return dates up to this one | ||
|
||
.. option:: --to-year <end> | ||
|
||
Return dates up to this year | ||
|
||
.. option:: --before <num> | ||
|
||
Pick up all inputs starting from *num* days before the chosen date | ||
|
||
.. option:: --after <num> | ||
|
||
Pick up all inputs up to *num* days after the chosen date | ||
|
||
.. option:: date | ||
|
||
The date to use as a reference (YYYYMMDD) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
earthkit-date - Manipulate dates | ||
================================ | ||
|
||
.. program:: earthkit-date | ||
|
||
The :program:`earthkit-date` can be invoked with various actions documented | ||
here, as follows:: | ||
|
||
earthkit-date <action> [args...] | ||
|
||
.. option:: -h, --help | ||
|
||
Print a help message and exit. Can be used as ``earthkit-date --help`` as well as | ||
for actions, e.g. ``earthkit-date shift --help``. | ||
|
||
|
||
``shift`` - shift a date | ||
------------------------ | ||
|
||
Shift a date by the given number of days:: | ||
|
||
earthkit-date shift <date> <days> | ||
|
||
.. option:: date | ||
|
||
Reference date | ||
|
||
.. option:: days | ||
|
||
Number of days (can be negative) | ||
|
||
|
||
``diff`` - subtract two dates | ||
----------------------------- | ||
|
||
Subtract date2 from date1, returning the number of days:: | ||
|
||
earthkit-date diff <date1> <date2> | ||
|
||
.. option:: date1 | ||
|
||
First date (+) | ||
|
||
.. option:: date2 | ||
|
||
Second date (-) |
Oops, something went wrong.