CORSIKA add-on package IACT/ATMO:  Version 1.63 (November 2020)
mc_atmprof.h
Go to the documentation of this file.
1 /* ============================================================================
2 
3  Copyright (C) 2019 Konrad Bernloehr
4 
5  This file is part of the eventio/hessio library and other packages.
6 
7  The eventio/hessio library is free software; you can redistribute it and/or
8  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 library 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 library. If not, see <http://www.gnu.org/licenses/>.
19 
20 ============================================================================ */
21 
37 /* ========================================================= */
38 
39 #ifndef HAVE_MC_ATMPROF
40 
41 # define HAVE_MC_ATMPROF 1
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
50 {
51  int atmprof_id;
53  double obslev;
54  unsigned n_alt;
55  double *alt_km;
56  double *rho;
57  double *thick;
58  double *refidx_m1;
60  double hlay[6];
61  double aatm[5];
62  double batm[5];
63  double catm[5];
64  double datm[5];
65  double thickl[6];
66  double htoa;
67 };
68 typedef struct atmospheric_profile AtmProf;
69 
70 /* Make the common profile available */
72 /* Set the common profile from a separate copy. */
73 void set_common_atmprof(AtmProf *atmprof);
74 void show_atmprof (AtmProf *atmprof);
75 
76 void atmegs_(int *nlay, double *hlay, double *aatm,
77  double *batm, double *catm, double *datm, double *htoa);
78 void atmegs_default(void);
79 
88 double rhofc (double *height);
89 double thickc (double *height);
90 double refidc (double *height);
91 double refim1c (double *height);
92 double heighc (double *thick);
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 #endif
99 
double hlay[6]
Layer bounderies a.s.l.
Definition: mc_atmprof.h:60
double * rho
Density [g/cm^3] at each level.
Definition: mc_atmprof.h:56
Atmospheric profile as stored in atmprof*.dat files - the actually used columns only.
Definition: mc_atmprof.h:49
double * refidx_m1
Index of refraction minus one (n-1) at given level.
Definition: mc_atmprof.h:58
double datm[5]
Inverse of catm values (if non-zero)
Definition: mc_atmprof.h:64
double thickl[6]
Atmospheric thickness at given hlay heights.
Definition: mc_atmprof.h:65
unsigned n_alt
Number of altitude levels.
Definition: mc_atmprof.h:54
double catm[5]
See ATMC CORSIKA inputs card.
Definition: mc_atmprof.h:63
void set_common_atmprof(AtmProf *atmprof)
Set the common profile from a separate copy.
Definition: mc_atmprof.c:58
double * thick
Vertical column density from space to given level [g/cm^2].
Definition: mc_atmprof.h:57
double obslev
Observation level [cm], a.s.l., as used in CORSIKA.
Definition: mc_atmprof.h:53
double batm[5]
See ATMB CORSIKA inputs card.
Definition: mc_atmprof.h:62
double * alt_km
Altitude a.s.l.
Definition: mc_atmprof.h:55
double rhofc(double *height)
C-called functions equivalent to the CORSIKA-built-in functions to evaluate the 5-layer parametrizati...
Definition: mc_atmprof.c:239
void atmegs_(int *nlay, double *hlay, double *aatm, double *batm, double *catm, double *datm, double *htoa)
Fill the 5-layer parameters into the common atmospheric profile structure for keeping track of that t...
Definition: mc_atmprof.c:178
int atmprof_id
Profile ID number ('atmprof<i>.dat') or 99.
Definition: mc_atmprof.h:51
int have_lay5_param
Is 1 if the 5-layer CORSIKA built-in parametrization is known, 0 if not.
Definition: mc_atmprof.h:59
double htoa
Height (a.s.l.) at top of atmosphere [cm].
Definition: mc_atmprof.h:66
void show_atmprof(AtmProf *atmprof)
Show a readable version of the tabulated atmospheric profile (basically like in the original tables,...
Definition: mc_atmprof.c:133
AtmProf * get_common_atmprof(void)
Make this copy of the atmospheric profile available elsewhere.
Definition: mc_atmprof.c:48
char * atmprof_fname
Original name of atmospheric profile loaded.
Definition: mc_atmprof.h:52
double aatm[5]
See ATMA CORSIKA inputs card.
Definition: mc_atmprof.h:61