CORSIKA add-on package IACT/ATMO:  Version 1.63 (November 2020)
atmo.h
Go to the documentation of this file.
1 /* ============================================================================
2 
3  Copyright (C) 2001, 2005, 2009, 2019 Konrad Bernloehr
4 
5  This file is part of the IACT/atmo package for CORSIKA.
6 
7  The IACT/atmo package is free software; you can redistribute it
8  and/or modify it under the terms of the GNU Lesser General Public
9  License as published by the Free Software Foundation; either
10  version 2.1 of the License, or (at your option) any later version.
11 
12  This package is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public License
18  along with this package. If not, see <http://www.gnu.org/licenses/>.
19 
20 ============================================================================ */
21 
22 /* ================================================================== */
32 /* ================================================================== */
33 
34 #ifndef ATMO_H__LOADED
35 
36 #define ATMO_H__LOADED 1
37 
38 #include "mc_atmprof.h"
39 
43 /* The CORSIKA version against which this software should match. */
44 /* If your CORSIKA is somewhat newer than 5.901 there is probably */
45 /* no reason to worry; incompatible changes should not happen */
46 /* all too often. */
47 #ifndef CORSIKA_VERSION
48 # define CORSIKA_VERSION 6900
49 #endif
50 
51 #ifndef VECTOR_SIZE
52 # define VECTOR_SIZE 4
53 #endif
54 
55 typedef double cors_dbl_t;
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60 
61 /* Function prototypes for functions implemented in this file */
62 
63 /* FORTRAN called functions (beware changes of parameter types !!) */
64 void atmset_(int *iatmo, double *obslev);
65 void atmnam_(const char *aname, double *obslev);
66 void atm_init(AtmProf *aprof);
67 double rhofx_(double *height);
68 double thickx_(double *height);
69 double refim1x_(double *height);
70 double refidx_(double *height);
71 double heighx_(double *thick);
72 void raybnd_(double *zem, cors_dbl_t *u, cors_dbl_t *v, double *w,
73  cors_dbl_t *dx, cors_dbl_t *dy, cors_dbl_t *dt);
74 void raybnd_vec_(double *zem, cors_dbl_t *u, cors_dbl_t *v, double *w,
75  cors_dbl_t *dx, cors_dbl_t *dy, cors_dbl_t *dt);
76 void atmfit_(int *nlp, double *hlay, double *aatm, double *batm, double *catm);
77 
78 /* FORTRAN functions called from C */
80 double rhof_(double *height);
82 double thick_(double *height);
84 double heigh_(double *thick);
86 /* double refim1_(double *height); */
87 /* double refid_(double *height); */
88 
89 #ifdef __cplusplus
90 }
91 #endif
92 
93 #endif
94 
double thickx_(double *height)
Atmospheric thickness [g/cm**2] as a function of altitude.
Definition: atmo.c:1283
double heighx_(double *thick)
Altitude [cm] as a function of atmospheric thickness [g/cm**2].
Definition: atmo.c:1403
double rhof_(double *height)
The CORSIKA built-in density lookup function.
Definition: fake_corsika.c:63
Atmospheric profile as stored in atmprof*.dat files - the actually used columns only.
Definition: mc_atmprof.h:49
void atm_init(AtmProf *aprof)
This variant is not usable from the FORTRAN code side, thus no underscore at the end of the function ...
Definition: atmo.c:1197
void raybnd_(double *zem, cors_dbl_t *u, cors_dbl_t *v, double *w, cors_dbl_t *dx, cors_dbl_t *dy, cors_dbl_t *dt)
Calculate the bending of light due to atmospheric refraction.
Definition: atmo.c:1502
void atmfit_(int *nlp, double *hlay, double *aatm, double *batm, double *catm)
Fit the tabulated density profile for CORSIKA EGS part.
Definition: atmo.c:2101
double refidx_(double *height)
Index of refraction as a function of altitude [cm].
Definition: atmo.c:1387
double cors_dbl_t
Type for CORSIKA numbers which are currently REAL*8.
Definition: iact.h:53
double rhofx_(double *height)
Density of the atmosphere as a function of altitude.
Definition: atmo.c:1235
double thick_(double *height)
The CORSIKA built-in function for vertical atmospheric thickness (overburden).
Definition: fake_corsika.c:67
A data structure shared between io_simtel.c and atmo.c - which is used by both sim_telarray and the C...
double refim1x_(double *height)
Index of refraction minus 1 as a function of altitude [cm].
Definition: atmo.c:1345
void atmnam_(const char *aname, double *obslev)
Instead of setting the atmospheric profile by number, it gets set by name, also indicated by setting ...
Definition: atmo.c:1148
double heigh_(double *thick)
The CORSIKA built-in function for the height as a function of overburden.
Definition: fake_corsika.c:71
void atmset_(int *iatmo, double *obslev)
Set number of atmospheric model profile to be used.
Definition: atmo.c:1115