🛰️航天仿真算法库 SpaceAST
0.0.1
载入中...
搜索中...
未找到
nrlmsise-00.h
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
#pragma once
19
20
21
22
/* ------------------------------------------------------------------- */
23
/* ------------------------------- INPUT ----------------------------- */
24
/* ------------------------------------------------------------------- */
25
26
struct
nrlmsise_flags
{
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
70
struct
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
85
86
struct
nrlmsise_input
{
87
int
year;
/* year, currently ignored */
88
int
doy;
/* day of year */
89
double
sec;
/* seconds in day (UT) */
90
double
alt;
/* altitude in kilometers */
91
double
g_lat;
/* geodetic latitude */
92
double
g_long;
/* geodetic longitude */
93
double
lst;
/* local apparent solar time (hours), see note below */
94
double
f107A;
/* 81 day average of F10.7 flux (centered on doy) */
95
double
f107;
/* daily F10.7 flux for previous day */
96
double
ap;
/* magnetic index(daily) */
97
struct
ap_array
*ap_a;
/* see above */
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
126
struct
nrlmsise_output
{
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
#ifdef __cplusplus
171
extern
"C"
{
172
#endif
173
/* GTD7 */
174
/* Neutral Atmosphere Empircial Model from the surface to lower
175
* exosphere.
176
*/
177
void
gtd7 (
struct
nrlmsise_input
*input, \
178
struct
nrlmsise_flags
*flags, \
179
struct
nrlmsise_output
*output);
180
181
182
/* GTD7D */
183
/* This subroutine provides Effective Total Mass Density for output
184
* d[5] which includes contributions from "anomalous oxygen" which can
185
* affect satellite drag above 500 km. See the section "output" for
186
* additional details.
187
*/
188
void
gtd7d(
struct
nrlmsise_input
*input, \
189
struct
nrlmsise_flags
*flags, \
190
struct
nrlmsise_output
*output);
191
192
193
/* GTS7 */
194
/* Thermospheric portion of NRLMSISE-00
195
*/
196
void
gts7 (
struct
nrlmsise_input
*input, \
197
struct
nrlmsise_flags
*flags, \
198
struct
nrlmsise_output
*output);
199
200
201
/* GHP7 */
202
/* To specify outputs at a pressure level (press) rather than at
203
* an altitude.
204
*/
205
void
ghp7 (
struct
nrlmsise_input
*input, \
206
struct
nrlmsise_flags
*flags, \
207
struct
nrlmsise_output
*output, \
208
double
press);
209
210
#ifdef __cplusplus
211
}
212
#endif
213
214
/* ------------------------------------------------------------------- */
215
/* ----------------------- COMPILATION TWEAKS ------------------------ */
216
/* ------------------------------------------------------------------- */
217
218
/* "inlining" of functions */
219
/* Some compilers (e.g. gcc) allow the inlining of functions into the
220
* calling routine. This means a lot of overhead can be removed, and
221
* the execution of the program runs much faster. However, the filesize
222
* and thus the loading time is increased.
223
*/
224
225
#define INLINE
226
227
#ifdef INLINE
228
#define __inline_double static inline double
229
#else
230
#define __inline_double double
231
#endif
ap_array
定义
nrlmsise-00.h:70
nrlmsise_flags
定义
nrlmsise-00.h:26
nrlmsise_input
定义
nrlmsise-00.h:86
nrlmsise_output
定义
nrlmsise-00.h:126
src
AstWeather
Atmosphere
nrlmsise-00
nrlmsise-00.h
制作者
1.12.0