source: tags/libIGCM_v2.1/libIGCM_date/IGCM_date_Test.ksh

Last change on this file was 931, checked in by sdipsl, 11 years ago

Bugfix with IGCM_sys_Get|GetBuffer? instrumentation
Avoid collision with testing functions

  • 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#=================================================
20cd /tmp
21
22libIGCM=`dirname $0`/..
23typeset TaskType=checking
24. ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh
25. ${libIGCM}/libIGCM_date/libIGCM_date.ksh
26
27if [ X${config_UserChoices_CalendarType} = X ] ; then
28    config_UserChoices_CalendarType="leap"
29fi
30
31echo "#=================================#"
32echo "IGCM_date_DaysInYear test"
33echo "#=================================#"
34
35echo ""
36echo "#"
37echo "IGCM_date_DaysInYears 1998"
38echo "#"
39IGCM_date_DaysInYear 1998
40
41echo ""
42echo "#"
43echo "IGCM_date_DaysInYears 2000"
44echo "#"
45IGCM_date_DaysInYear 2000
46
47echo "#=================================#"
48echo "IGCM_date_DaysInMonth test"
49echo "#=================================#"
50
51echo ""
52echo "#"
53echo "IGCM_date_DaysInMonth 1998 02"
54echo "#"
55IGCM_date_DaysInMonth 1998 02
56
57echo ""
58echo "#"
59echo "IGCM_date_DaysInMonth 20000206"
60echo "#"
61IGCM_date_DaysInMonth 20000206
62
63echo "#==========================================#"
64echo "IGCM_date_ConvertGregorianDateToJulian test"
65echo "#==========================================#"
66
67echo ""
68echo "#"
69echo "IGCM_date_ConvertGregorianDateToJulian 19980312"
70echo "#"
71IGCM_date_ConvertGregorianDateToJulian 19980312
72
73echo ""
74echo "#"
75echo "IGCM_date_ConvertGregorianDateToJulian 19980830"
76echo "#"
77IGCM_date_ConvertGregorianDateToJulian 19980830
78
79echo "#==========================================#"
80echo "IGCM_date_ConvertJulianDateToGregorian test"
81echo "#==========================================#"
82
83echo ""
84echo "#"
85echo "IGCM_date_ConvertJulianDateToGregorian 1998326"
86echo "#"
87IGCM_date_ConvertJulianDateToGregorian 1998326
88
89echo ""
90echo "#"
91echo "IGCM_date_ConvertJulianDateToGregorian 2000298"
92echo "#"
93IGCM_date_ConvertJulianDateToGregorian 2000298
94
95echo "#==================================#"
96echo "IGCM_date_AddDaysToJulianDate test"
97echo "#==================================#"
98
99echo ""
100echo "#"
101echo "IGCM_date_AddDaysToJulianDate 1998312 14"
102echo "#"
103IGCM_date_AddDaysToJulianDate 1998312 14
104
105echo ""
106echo "#"
107echo "IGCM_date_AddDaysToJulianDate 2000312 -14"
108echo "#"
109IGCM_date_AddDaysToJulianDate 2000312 -14
110
111echo "#====================================#"
112echo "IGCM_date_AddDaysToGregorianDate test"
113echo "#====================================#"
114
115echo ""
116echo "#"
117echo "IGCM_date_AddDaysToGregorianDate 19980312 44"
118echo "#"
119IGCM_date_AddDaysToGregorianDate 19980312 44
120
121echo ""
122echo "#"
123echo "IGCM_date_AddDaysToGregorianDate 20000228 -44"
124echo "#"
125IGCM_date_AddDaysToGregorianDate 20000228 -44
126
127echo "#====================================#"
128echo "IGCM_date_DaysBetweenJulianDate test"
129echo "#====================================#"
130
131echo ""
132echo "#"
133echo "IGCM_date_DaysBetweenJulianDate 1860001 1865365"
134echo "#"
135IGCM_date_DaysBetweenJulianDate 1860001 1865365
136
137echo "#======================================#"
138echo "IGCM_date_DaysBetweenGregorianDate test"
139echo "#======================================#"
140
141echo ""
142echo "#"
143echo "IGCM_date_DaysBetweenGregorianDate 18801231 18750101"
144echo "#"
145IGCM_date_DaysBetweenGregorianDate 18801231 18750101
Note: See TracBrowser for help on using the repository browser.