JURASSIC
Functions
hydrostatic.c File Reference

Recalculate pressure based on hydrostatic equilibrium. More...

#include "jurassic.h"

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Detailed Description

Recalculate pressure based on hydrostatic equilibrium.

Definition in file hydrostatic.c.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 27 of file hydrostatic.c.

29 {
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}
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
#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
Here is the call graph for this function: