MPTRAC
Functions
tnat.c File Reference

Calculate PSC temperatures. More...

#include "mptrac.h"

Go to the source code of this file.

Functions

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

Detailed Description

Calculate PSC temperatures.

Definition in file tnat.c.

Function Documentation

◆ main()

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

Definition at line 27 of file tnat.c.

29 {
30
31 /* Check arguments... */
32 if (argc < 3)
33 ERRMSG("Give parameters: <p> <h2o> <hno3>");
34
35 /* Get varibles... */
36 double p = atof(argv[1]);
37 double h2o = atof(argv[2]);
38 double hno3 = atof(argv[3]);
39
40 /* Write output... */
41 printf(" p= %g hPa\n", p);
42 printf(" q_H2O= %g ppv\n", h2o);
43 printf("q_HNO3= %g ppv\n", hno3);
44 printf(" T_dew= %g K\n", TDEW(p, h2o));
45 printf(" T_ice= %g K\n", TICE(p, h2o));
46 printf(" T_NAT= %g K\n", nat_temperature(p, h2o, hno3));
47
48 return EXIT_SUCCESS;
49}
double nat_temperature(const double p, const double h2o, const double hno3)
Calculates the nitric acid trihydrate (NAT) temperature.
Definition: mptrac.c:4191
#define ERRMSG(...)
Print an error message with contextual information and terminate the program.
Definition: mptrac.h:1901
#define TICE(p, h2o)
Calculate frost point temperature (WMO, 2018).
Definition: mptrac.h:1605
#define TDEW(p, h2o)
Calculate dew point temperature.
Definition: mptrac.h:1580
Here is the call graph for this function: