JURASSIC
hydrostatic.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-2021 Forschungszentrum Juelich GmbH
18*/
19
25#include "jurassic.h"
26
27int main(
28 int argc,
29 char *argv[]) {
30
31 static atm_t atm;
32 static ctl_t ctl;
33
34 /* Check arguments... */
35 if (argc < 4)
36 ERRMSG("Give parameters: <ctl> <atm_in> <atm_hyd>");
37
38 /* Read control parameters... */
39 read_ctl(argc, argv, &ctl);
40
41 /* Check reference height... */
42 if (ctl.hydz < 0)
43 ERRMSG("Set HYDZ>=0!");
44
45 /* Read atmospheric data... */
46 read_atm(NULL, argv[2], &ctl, &atm);
47
48 /* Build atmosphere based on hydrostatic equilibrium... */
49 hydrostatic(&ctl, &atm);
50
51 /* Write atmospheric data... */
52 write_atm(NULL, argv[3], &ctl, &atm);
53
54 return EXIT_SUCCESS;
55}
int main(int argc, char *argv[])
Definition: hydrostatic.c:27
void write_atm(const char *dirname, const char *filename, const ctl_t *ctl, const atm_t *atm)
Write atmospheric data.
Definition: jurassic.c:5339
void read_ctl(int argc, char *argv[], ctl_t *ctl)
Read forward model control parameters.
Definition: jurassic.c:4550
void read_atm(const char *dirname, const char *filename, const ctl_t *ctl, atm_t *atm)
Read atmospheric data.
Definition: jurassic.c:4445
void hydrostatic(const ctl_t *ctl, atm_t *atm)
Set hydrostatic equilibrium.
Definition: jurassic.c:3520
JURASSIC library declarations.
#define ERRMSG(...)
Print error message and quit program.
Definition: jurassic.h:237
Atmospheric data.
Definition: jurassic.h:488
Forward model control parameters.
Definition: jurassic.h:541
double hydz
Reference height for hydrostatic pressure profile (-999 to skip) [km].
Definition: jurassic.h:586