AIRS Code Collection
src
time2jsec.c
Go to the documentation of this file.
1
/*
2
This file is part of JURASSIC.
3
4
JURASSIC is free software: you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation, either version 3 of the License, or
7
(at your option) any later version.
8
9
JURASSIC is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
13
14
You should have received a copy of the GNU General Public License
15
along with JURASSIC. If not, see <http://www.gnu.org/licenses/>.
16
17
Copyright (C) 2003-2025 Forschungszentrum Juelich GmbH
18
*/
19
25
#include "jurassic.h"
26
27
int
main
(
28
int
argc,
29
char
*argv[]) {
30
31
double
jsec;
32
33
/* Check arguments... */
34
if
(argc < 8)
35
ERRMSG(
"Give parameters: <year> <mon> <day> <hour> <min> <sec> <remain>"
);
36
37
/* Read arguments... */
38
const
int
year = atoi(argv[1]);
39
const
int
mon = atoi(argv[2]);
40
const
int
day = atoi(argv[3]);
41
const
int
hour = atoi(argv[4]);
42
const
int
min = atoi(argv[5]);
43
const
int
sec = atoi(argv[6]);
44
const
double
remain = atof(argv[7]);
45
46
/* Convert... */
47
time2jsec(year, mon, day, hour, min, sec, remain, &jsec);
48
printf(
"%.2f\n"
, jsec);
49
50
return
EXIT_SUCCESS;
51
}
main
int main(int argc, char *argv[])
Definition:
time2jsec.c:27
Generated on Tue Jul 15 2025 10:49:39 for AIRS Code Collection by
1.9.4