WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
nrlmsise-00.h
Go to the documentation of this file.
1/* -------------------------------------------------------------------- */
2/* --------- N R L M S I S E - 0 0 M O D E L 2 0 0 1 ---------- */
3/* -------------------------------------------------------------------- */
4
5/* This file is part of the NRLMSISE-00 C source code package - release
6 * 20041227
7 *
8 * The NRLMSISE-00 model was developed by Mike Picone, Alan Hedin, and
9 * Doug Drob. They also wrote a NRLMSISE-00 distribution package in
10 * FORTRAN which is available at
11 * http://uap-www.nrl.navy.mil/models_web/msis/msis_home.htm
12 *
13 * Dominik Brodowski implemented and maintains this C version. You can
14 * reach him at mail@brodo.de. See the file "DOCUMENTATION" for details,
15 * and check http://www.brodo.de/english/pub/nrlmsise/index.html for
16 * updated releases of this package.
17 */
18
19#ifndef MSIS_NRLMSISE_00_H
20#define MSIS_NRLMSISE_00_H
21
22/* ------------------------------------------------------------------- */
23/* ------------------------------- INPUT ----------------------------- */
24/* ------------------------------------------------------------------- */
25
27 int switches[24];
28 double sw[24];
29 double swc[24];
30};
31/*
32 * Switches: to turn on and off particular variations use these switches.
33 * 0 is off, 1 is on, and 2 is main effects off but cross terms on.
34 *
35 * Standard values are 0 for switch 0 and 1 for switches 1 to 23. The
36 * array "switches" needs to be set accordingly by the calling program.
37 * The arrays sw and swc are set internally.
38 *
39 * switches[i]:
40 * i - explanation
41 * -----------------
42 * 0 - output in meters and kilograms instead of centimeters and grams
43 * 1 - F10.7 effect on mean
44 * 2 - time independent
45 * 3 - symmetrical annual
46 * 4 - symmetrical semiannual
47 * 5 - asymmetrical annual
48 * 6 - asymmetrical semiannual
49 * 7 - diurnal
50 * 8 - semidiurnal
51 * 9 - daily ap [when this is set to -1 (!) the pointer
52 * ap_a in struct nrlmsise_input must
53 * point to a struct ap_array]
54 * 10 - all UT/long effects
55 * 11 - longitudinal
56 * 12 - UT and mixed UT/long
57 * 13 - mixed AP/UT/LONG
58 * 14 - terdiurnal
59 * 15 - departures from diffusive equilibrium
60 * 16 - all TINF var
61 * 17 - all TLB var
62 * 18 - all TN1 var
63 * 19 - all S var
64 * 20 - all TN2 var
65 * 21 - all NLB var
66 * 22 - all TN3 var
67 * 23 - turbo scale height var
68 */
69
70struct ap_array {
71 double a[7];
72};
73/* Array containing the following magnetic values:
74 * 0 : daily AP
75 * 1 : 3 hr AP index for current time
76 * 2 : 3 hr AP index for 3 hrs before current time
77 * 3 : 3 hr AP index for 6 hrs before current time
78 * 4 : 3 hr AP index for 9 hrs before current time
79 * 5 : Average of eight 3 hr AP indicies from 12 to 33 hrs
80 * prior to current time
81 * 6 : Average of eight 3 hr AP indicies from 36 to 57 hrs
82 * prior to current time
83 */
84
86 int year; /* year, currently ignored */
87 int doy; /* day of year */
88 double sec; /* seconds in day (UT) */
89 double alt; /* altitude in kilometers */
90 double g_lat; /* geodetic latitude */
91 double g_long; /* geodetic longitude */
92 double lst; /* local apparent solar time (hours), see note below */
93 double f107A; /* 81 day average of F10.7 flux (centered on doy) */
94 double f107; /* daily F10.7 flux for previous day */
95 double ap; /* magnetic index(daily) */
96 struct ap_array *ap_a; /* see above */
97};
98
99/*
100 * NOTES ON INPUT VARIABLES:
101 * UT, Local Time, and Longitude are used independently in the
102 * model and are not of equal importance for every situation.
103 * For the most physically realistic calculation these three
104 * variables should be consistent (lst=sec/3600 + g_long/15).
105 * The Equation of Time departures from the above formula
106 * for apparent local time can be included if available but
107 * are of minor importance.
108 *
109 * f107 and f107A values used to generate the model correspond
110 * to the 10.7 cm radio flux at the actual distance of the Earth
111 * from the Sun rather than the radio flux at 1 AU. The following
112 * site provides both classes of values:
113 * ftp://ftp.ngdc.noaa.gov/STP/SOLAR_DATA/SOLAR_RADIO/FLUX/
114 *
115 * f107, f107A, and ap effects are neither large nor well
116 * established below 80 km and these parameters should be set to
117 * 150., 150., and 4. respectively.
118 */
119
120
121
122/* ------------------------------------------------------------------- */
123/* ------------------------------ OUTPUT ----------------------------- */
124/* ------------------------------------------------------------------- */
125
127 double d[9]; /* densities */
128 double t[2]; /* temperatures */
129};
130/*
131 * OUTPUT VARIABLES:
132 * d[0] - HE NUMBER DENSITY(CM-3)
133 * d[1] - O NUMBER DENSITY(CM-3)
134 * d[2] - N2 NUMBER DENSITY(CM-3)
135 * d[3] - O2 NUMBER DENSITY(CM-3)
136 * d[4] - AR NUMBER DENSITY(CM-3)
137 * d[5] - TOTAL MASS DENSITY(GM/CM3) [includes d[8] in td7d]
138 * d[6] - H NUMBER DENSITY(CM-3)
139 * d[7] - N NUMBER DENSITY(CM-3)
140 * d[8] - Anomalous oxygen NUMBER DENSITY(CM-3)
141 * t[0] - EXOSPHERIC TEMPERATURE
142 * t[1] - TEMPERATURE AT ALT
143 *
144 *
145 * O, H, and N are set to zero below 72.5 km
146 *
147 * t[0], Exospheric temperature, is set to global average for
148 * altitudes below 120 km. The 120 km gradient is left at global
149 * average value for altitudes below 72 km.
150 *
151 * d[5], TOTAL MASS DENSITY, is NOT the same for subroutines GTD7
152 * and GTD7D
153 *
154 * SUBROUTINE GTD7 -- d[5] is the sum of the mass densities of the
155 * species labeled by indices 0-4 and 6-7 in output variable d.
156 * This includes He, O, N2, O2, Ar, H, and N but does NOT include
157 * anomalous oxygen (species index 8).
158 *
159 * SUBROUTINE GTD7D -- d[5] is the "effective total mass density
160 * for drag" and is the sum of the mass densities of all species
161 * in this model, INCLUDING anomalous oxygen.
162 */
163
164
165
166/* ------------------------------------------------------------------- */
167/* --------------------------- PROTOTYPES ---------------------------- */
168/* ------------------------------------------------------------------- */
169
170/* GTD7 */
171/* Neutral Atmosphere Empircial Model from the surface to lower
172 * exosphere.
173 */
174void gtd7 (struct nrlmsise_input *input, \
175 struct nrlmsise_flags *flags, \
176 struct nrlmsise_output *output);
177
178
179/* GTD7D */
180/* This subroutine provides Effective Total Mass Density for output
181 * d[5] which includes contributions from "anomalous oxygen" which can
182 * affect satellite drag above 500 km. See the section "output" for
183 * additional details.
184 */
185void gtd7d(struct nrlmsise_input *input, \
186 struct nrlmsise_flags *flags, \
187 struct nrlmsise_output *output);
188
189
190/* GTS7 */
191/* Thermospheric portion of NRLMSISE-00
192 */
193void gts7 (struct nrlmsise_input *input, \
194 struct nrlmsise_flags *flags, \
195 struct nrlmsise_output *output);
196
197
198/* GHP7 */
199/* To specify outputs at a pressure level (press) rather than at
200 * an altitude.
201 */
202void ghp7 (struct nrlmsise_input *input, \
203 struct nrlmsise_flags *flags, \
204 struct nrlmsise_output *output, \
205 double press);
206
207
208
209/* ------------------------------------------------------------------- */
210/* ----------------------- COMPILATION TWEAKS ------------------------ */
211/* ------------------------------------------------------------------- */
212
213/* "inlining" of functions */
214/* Some compilers (e.g. gcc) allow the inlining of functions into the
215 * calling routine. This means a lot of overhead can be removed, and
216 * the execution of the program runs much faster. However, the filesize
217 * and thus the loading time is increased.
218 */
219#ifdef INLINE
220#define __inline_double static inline double
221#else
222#define __inline_double double
223#endif
224
225#endif
void gtd7(struct nrlmsise_input *input, struct nrlmsise_flags *flags, struct nrlmsise_output *output)
Definition nrlmsise-00.cpp:901
void ghp7(struct nrlmsise_input *input, struct nrlmsise_flags *flags, struct nrlmsise_output *output, double press)
Definition nrlmsise-00.cpp:1040
void gts7(struct nrlmsise_input *input, struct nrlmsise_flags *flags, struct nrlmsise_output *output)
Definition nrlmsise-00.cpp:1122
void gtd7d(struct nrlmsise_input *input, struct nrlmsise_flags *flags, struct nrlmsise_output *output)
Definition nrlmsise-00.cpp:1027
Definition nrlmsise-00.h:70
double a[7]
Definition nrlmsise-00.h:71
Definition nrlmsise-00.h:26
int switches[24]
Definition nrlmsise-00.h:27
double swc[24]
Definition nrlmsise-00.h:29
double sw[24]
Definition nrlmsise-00.h:28
Definition nrlmsise-00.h:85
double f107A
Definition nrlmsise-00.h:93
struct ap_array * ap_a
Definition nrlmsise-00.h:96
double alt
Definition nrlmsise-00.h:89
int year
Definition nrlmsise-00.h:86
double ap
Definition nrlmsise-00.h:95
double sec
Definition nrlmsise-00.h:88
double g_long
Definition nrlmsise-00.h:91
int doy
Definition nrlmsise-00.h:87
double f107
Definition nrlmsise-00.h:94
double lst
Definition nrlmsise-00.h:92
double g_lat
Definition nrlmsise-00.h:90
Definition nrlmsise-00.h:126
double d[9]
Definition nrlmsise-00.h:127
double t[2]
Definition nrlmsise-00.h:128