source: branches/SmoothFiles/libIGCM_date/IGCM_date_Test.ksh @ 1579

Last change on this file since 1579 was 5, checked in by mmaipsl, 16 years ago

MM: correct Date, Author and Revision svn properties.

  • Property licence set to
    The following licence information concerns ONLY the libIGCM tools
    ==================================================================

    Copyright © Centre National de la Recherche Scientifique CNRS
    Commissariat à l'Énergie Atomique CEA

    libIGCM : Library for Portable Models Computation of IGCM Group.

    IGCM Group is the french IPSL Global Climate Model Group.

    This library is a set of shell scripts and functions whose purpose is
    the management of the initialization, the launch, the transfer of
    output files, the post-processing and the monitoring of datas produce
    by any numerical program on any plateforme.

    This software is governed by the CeCILL license under French law and
    abiding by the rules of distribution of free software. You can use,
    modify and/ or redistribute the software under the terms of the CeCILL
    license as circulated by CEA, CNRS and INRIA at the following URL
    "http://www.cecill.info".

    As a counterpart to the access to the source code and rights to copy,
    modify and redistribute granted by the license, users are provided only
    with a limited warranty and the software's author, the holder of the
    economic rights, and the successive licensors have only limited
    liability.

    In this respect, the user's attention is drawn to the risks associated
    with loading, using, modifying and/or developing or reproducing the
    software by the user in light of its specific status of free software,
    that may mean that it is complicated to manipulate, and that also
    therefore means that it is reserved for developers and experienced
    professionals having in-depth computer knowledge. Users are therefore
    encouraged to load and test the software's suitability as regards their
    requirements in conditions enabling the security of their systems and/or
    data to be ensured and, more generally, to use and operate it in the
    same conditions as regards security.

    The fact that you are presently reading this means that you have had
    knowledge of the CeCILL license and that you accept its terms.
  • Property svn:keywords set to Date Author Revision
File size: 3.5 KB
Line 
1#!/bin/ksh
2
3#**************************************************************
4# Author: Sebastien Denvil
5# Contact: Sebastien.Denvil@ipsl.jussieu.fr
6# $Date$
7# $Author$
8# $Revision$
9# IPSL (2006)
10#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC
11# History:
12# Modification:
13#
14#**************************************************************
15
16# This script is used to generate a reference file with command :
17# IGCM_date_Test.ksh > IGCM_date_Test.ref 2>&1
18# The reference file produced is used by the function IGCM_date_Check
19# to verify that the libIGCM_date produce the same results
20
21#=================================================
22libIGCM=`dirname $0`/..
23. ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh
24. ${libIGCM}/libIGCM_date/libIGCM_date.ksh
25
26if [ X${config_UserChoices_CalendarType} = X ] ; then
27    config_UserChoices_CalendarType="leap"
28fi
29
30echo "#=================================#"
31echo "IGCM_date_DaysInYear test"
32echo "#=================================#"
33
34echo ""
35echo "#"
36echo "IGCM_date_DaysInYears 1998"
37echo "#"
38IGCM_date_DaysInYear 1998
39
40echo ""
41echo "#"
42echo "IGCM_date_DaysInYears 2000"
43echo "#"
44IGCM_date_DaysInYear 2000
45
46echo "#=================================#"
47echo "IGCM_date_DaysInMonth test"
48echo "#=================================#"
49
50echo ""
51echo "#"
52echo "IGCM_date_DaysInMonth 1998 02"
53echo "#"
54IGCM_date_DaysInMonth 1998 02
55
56echo ""
57echo "#"
58echo "IGCM_date_DaysInMonth 20000206"
59echo "#"
60IGCM_date_DaysInMonth 20000206
61
62echo "#==========================================#"
63echo "IGCM_date_ConvertGregorianDateToJulian test"
64echo "#==========================================#"
65
66echo ""
67echo "#"
68echo "IGCM_date_ConvertGregorianDateToJulian 19980312"
69echo "#"
70IGCM_date_ConvertGregorianDateToJulian 19980312
71
72echo ""
73echo "#"
74echo "IGCM_date_ConvertGregorianDateToJulian 19980830"
75echo "#"
76IGCM_date_ConvertGregorianDateToJulian 19980830
77
78echo "#==========================================#"
79echo "IGCM_date_ConvertJulianDateToGregorian test"
80echo "#==========================================#"
81
82echo ""
83echo "#"
84echo "IGCM_date_ConvertJulianDateToGregorian 1998326"
85echo "#"
86IGCM_date_ConvertJulianDateToGregorian 1998326
87
88echo ""
89echo "#"
90echo "IGCM_date_ConvertJulianDateToGregorian 2000298"
91echo "#"
92IGCM_date_ConvertJulianDateToGregorian 2000298
93
94echo "#==================================#"
95echo "IGCM_date_AddDaysToJulianDate test"
96echo "#==================================#"
97
98echo ""
99echo "#"
100echo "IGCM_date_AddDaysToJulianDate 1998312 14"
101echo "#"
102IGCM_date_AddDaysToJulianDate 1998312 14
103
104echo ""
105echo "#"
106echo "IGCM_date_AddDaysToJulianDate 2000312 -14"
107echo "#"
108IGCM_date_AddDaysToJulianDate 2000312 -14
109
110echo "#====================================#"
111echo "IGCM_date_AddDaysToGregorianDate test"
112echo "#====================================#"
113
114echo ""
115echo "#"
116echo "IGCM_date_AddDaysToGregorianDate 19980312 44"
117echo "#"
118IGCM_date_AddDaysToGregorianDate 19980312 44
119
120echo ""
121echo "#"
122echo "IGCM_date_AddDaysToGregorianDate 20000228 -44"
123echo "#"
124IGCM_date_AddDaysToGregorianDate 20000228 -44
125
126echo "#====================================#"
127echo "IGCM_date_DaysBetweenJulianDate test"
128echo "#====================================#"
129
130echo ""
131echo "#"
132echo "IGCM_date_DaysBetweenJulianDate 1860001 1865365"
133echo "#"
134IGCM_date_DaysBetweenJulianDate 1860001 1865365
135
136echo "#======================================#"
137echo "IGCM_date_DaysBetweenGregorianDate test"
138echo "#======================================#"
139
140echo ""
141echo "#"
142echo "IGCM_date_DaysBetweenGregorianDate 18801231 18750101"
143echo "#"
144IGCM_date_DaysBetweenGregorianDate 18801231 18750101
Note: See TracBrowser for help on using the repository browser.