1 |
\section{CAL: The calendar package |
\subsection{CAL: The calendar package |
2 |
\label{sectioncal}} |
\label{sectioncal}} |
3 |
\begin{rawhtml} |
\begin{rawhtml} |
4 |
<!-- CMIREDIR:sectioncal: --> |
<!-- CMIREDIR:sectioncal: --> |
17 |
to be able to resolve fractions of a second, and to have a time- |
to be able to resolve fractions of a second, and to have a time- |
18 |
step that is longer than one day. |
step that is longer than one day. |
19 |
|
|
20 |
\subsection{Basic assumptions for the calendar tool} |
\subsubsection{Basic assumptions for the calendar tool} |
21 |
|
|
22 |
It is assumed that the SMALLEST TIME INTERVAL to be resolved is |
It is assumed that the SMALLEST TIME INTERVAL to be resolved is |
23 |
ONE SECOND. |
ONE SECOND. |
29 |
Not each individual routine depends on these assumptions; there |
Not each individual routine depends on these assumptions; there |
30 |
are only a few places where they enter. |
are only a few places where they enter. |
31 |
|
|
32 |
\subsection{Format of calendar dates} |
\subsubsection{Format of calendar dates} |
33 |
|
|
34 |
In this calendar tool a complete date specification is defined |
In this calendar tool a complete date specification is defined |
35 |
as the following integer array: |
as the following integer array: |
62 |
c refdate(4) = 1 |
c refdate(4) = 1 |
63 |
\end{verbatim} |
\end{verbatim} |
64 |
|
|
65 |
\subsection{Calendar dates and time intervals} |
\subsubsection{Calendar dates and time intervals} |
66 |
|
|
67 |
Subtracting calendar dates yields time intervals. |
Subtracting calendar dates yields time intervals. |
68 |
Time intervals have the following format: |
Time intervals have the following format: |
80 |
calendar dates. Time intervals can be added to and be |
calendar dates. Time intervals can be added to and be |
81 |
subtracted from each other. |
subtracted from each other. |
82 |
|
|
83 |
\subsection{Using the calendar together with MITgcm} |
\subsubsection{Using the calendar together with MITgcm} |
84 |
|
|
85 |
Each routine has as an argument the thread number that it is |
Each routine has as an argument the thread number that it is |
86 |
belonging to, even if this number is not used in the routine |
belonging to, even if this number is not used in the routine |
128 |
than checkpoint 25 which do not have the global variable |
than checkpoint 25 which do not have the global variable |
129 |
*nEndIter*. |
*nEndIter*. |
130 |
|
|
131 |
\subsection{The individual calendars} |
\subsubsection{The individual calendars} |
132 |
|
|
133 |
\subsubsection{Simple model calendar} |
Simple model calendar: |
134 |
|
|
135 |
This calendar can be used by defining |
This calendar can be used by defining |
136 |
|
|
143 |
In this case a year is assumed to have 360 days. The |
In this case a year is assumed to have 360 days. The |
144 |
model year is divided into 12 months with 30 days each. |
model year is divided into 12 months with 30 days each. |
145 |
|
|
146 |
\subsubsection{Gregorian Calendar} |
Gregorian Calendar: |
147 |
|
|
148 |
This calendar can be used by defining |
This calendar can be used by defining |
149 |
|
|
153 |
|
|
154 |
in the calendar's data file "data.cal". |
in the calendar's data file "data.cal". |
155 |
|
|
156 |
\subsection{Short routine description} |
\subsubsection{Short routine description} |
157 |
|
|
158 |
{\footnotesize |
{\footnotesize |
159 |
\begin{verbatim} |
\begin{verbatim} |