/[MITgcm]/manual/s_phys_pkgs/text/cal.tex
ViewVC logotype

Diff of /manual/s_phys_pkgs/text/cal.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1 by heimbach, Thu Jul 14 21:04:52 2005 UTC revision 1.5 by molod, Wed Jun 28 15:35:06 2006 UTC
# Line 1  Line 1 
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: -->
5  \end{rawhtml}  \end{rawhtml}
6    
7  \textit{Christian Eckert, MIT/EAPS, May-2000}  Authors: Christian Eckert and Patrick Heimbach
8    
9  This calendar tool was originally intended to enable the use of  This calendar tool was originally intended to enable the use of
10  absolute dates (Gregorian Calendar dates) in the ocean general  absolute dates (Gregorian Calendar dates) in MITgcm. There is,
11  circulation model MITgcmuv. There is, however, a fair amount of  however, a fair number of routines that can be used independently of
12  routines that can be used independently of the MITgcmuv. After  the main MITgcm executable. After some minor modifications the whole
13  some minor modifications the whole package can be used either  package can be used either as a stand-alone calendar or in connection
14  as a stand-alone calendar or in connection with any dynamical  with any dynamical model that needs calendar dates. Some
15  model that needs calendar dates. Some straightforward extensions  straightforward extensions are still pending e.g. the availability of
16  are still pending e.g. the availability of the Julian Calendar,  the Julian Calendar, to be able to resolve fractions of a second, and
17  to be able to resolve fractions of a second, and to have a time-  to have a time- step that is longer than one day.
 step that is longer than one day.  
18    
19  \subsection{Basic assumptions for the calendar tool}  \subsubsection{Basic assumptions for the calendar tool}
20    
21      It is assumed that the SMALLEST TIME INTERVAL to be resolved is      It is assumed that the SMALLEST TIME INTERVAL to be resolved is
22      ONE SECOND.      ONE SECOND.
# Line 29  step that is longer than one day. Line 28  step that is longer than one day.
28      Not each individual routine depends on these assumptions; there      Not each individual routine depends on these assumptions; there
29      are only a few places where they enter.      are only a few places where they enter.
30    
31  \subsection{Format of calendar dates}  \subsubsection{Format of calendar dates}
32    
33      In this calendar tool a complete date specification is defined      In this calendar tool a complete date specification is defined
34      as the following integer array:      as the following integer array:
# Line 62  c               refdate(3) =        1 Line 61  c               refdate(3) =        1
61  c               refdate(4) =        1  c               refdate(4) =        1
62  \end{verbatim}  \end{verbatim}
63    
64  \subsection{Calendar dates and time intervals}  \subsubsection{Calendar dates and time intervals}
65    
66      Subtracting calendar dates yields time intervals.      Subtracting calendar dates yields time intervals.
67      Time intervals have the following format:      Time intervals have the following format:
# Line 80  c           datediff(4) =     -1 Line 79  c           datediff(4) =     -1
79      calendar dates. Time intervals can be added to and be      calendar dates. Time intervals can be added to and be
80      subtracted from each other.      subtracted from each other.
81    
82  \subsection{Using the calendar together with MITgcm}  \subsubsection{Using the calendar together with MITgcm}
83    
84      Each routine has as an argument the thread number that it is      Each routine has as an argument the thread number that it is
85      belonging to, even if this number is not used in the routine      belonging to, even if this number is not used in the routine
# Line 128  c         #endif Line 127  c         #endif
127      than checkpoint 25 which do not have the global variable      than checkpoint 25 which do not have the global variable
128      *nEndIter*.      *nEndIter*.
129    
130  \subsection{The individual calendars}  \subsubsection{The individual calendars}
131    
132  \subsubsection{Simple model calendar}  Simple model calendar:
133    
134            This calendar can be used by defining            This calendar can be used by defining
135    
# Line 143  c                  TheCalendar='model' Line 142  c                  TheCalendar='model'
142            In this case a year is assumed to have 360 days. The            In this case a year is assumed to have 360 days. The
143            model year is divided into 12 months with 30 days each.            model year is divided into 12 months with 30 days each.
144    
145  \subsubsection{Gregorian Calendar}  Gregorian Calendar:
146    
147            This calendar can be used by defining            This calendar can be used by defining
148    
# Line 153  c                  TheCalendar='gregoria Line 152  c                  TheCalendar='gregoria
152    
153            in the calendar's data file "data.cal".            in the calendar's data file "data.cal".
154    
155  \subsection{Short routine description}  \subsubsection{Short routine description}
156    
157  {\footnotesize  {\footnotesize
158  \begin{verbatim}  \begin{verbatim}
159  c      o  cal_Init          - Initialise the calendar. This is the interface  c      o  cal_Init          - Initialise the calendar. This is the interface
160  c                             to the MITgcm.  c                             to MITgcm.
161  c  c
162  c      o  cal_Set           - Sets the calendar according to the user  c      o  cal_Set           - Sets the calendar according to the user
163  c                             specifications.  c                             specifications.
# Line 252  c      o  cal_PrintError    - Print erro Line 251  c      o  cal_PrintError    - Print erro
251  c                             raised by the calendar routines.  c                             raised by the calendar routines.
252  c  c
253  c      o  cal_PrintDate     - Print a date array in some format suitable for  c      o  cal_PrintDate     - Print a date array in some format suitable for
254  c                             the MITgcmuv's protocol output.  c                             MITgcm's protocol output.
255  c  c
256  c      o  cal_TimeStamp     - Given the time and the iteration number return  c      o  cal_TimeStamp     - Given the time and the iteration number return
257  c                             the date and print all the above numbers.  c                             the date and print all the above numbers.
# Line 261  c      o  cal_Summary       - List all t Line 260  c      o  cal_Summary       - List all t
260  \end{verbatim}  \end{verbatim}
261  }  }
262    
263    
264    \subsubsection{Experiments and tutorials that use cal}
265    \label{sec:pkg:cal:experiments}
266    
267    \begin{itemize}
268    \item{Global ocean experiment in global\_with\_exf verification directory. }
269    \item{Labrador Sea experiment in lab\_sea verification directory. }
270    \end{itemize}
271    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.22