source: trunk/libIGCM/libIGCM_date/IGCM_date_Test.ksh @ 1516

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