1201 double zn1[5] = {120.0, 110.0, 100.0, 90.0, 72.5};
1208 double db01, db04, db14, db16, db28, db32, db40;
1210 double zh28, zh04, zh16, zh32, zh40, zh01, zh14;
1211 double zhm28, zhm04, zhm16, zhm32, zhm40, zhm01, zhm14;
1213 double b28, b04, b16, b32, b40, b01, b14;
1215 double g28, g4, g16, g32, g40, g1, g14;
1217 double zc04, zc16, zc32, zc40, zc01, zc14;
1218 double hc04, hc16, hc32, hc40, hc01, hc14;
1219 double hcc16, hcc32, hcc01, hcc14;
1220 double zcc16, zcc32, zcc01, zcc14;
1221 double rc16, rc32, rc01, rc14;
1223 double g16h, db16h, tho, zsht, zmho, zsho;
1224 double dgtr=1.74533E-2;
1225 double dr=1.72142E-2;
1226 double alpha[9]={-0.38, 0.0, 0.0, 0.0, 0.17, 0.0, -0.38, 0.0, 0.0};
1227 double altl[8]={200.0, 300.0, 160.0, 250.0, 240.0, 450.0, 320.0, 450.0};
1229 double hc216, hcc232;
1236 if (input->
alt>zn1[0])
1237 tinf =
ptm[0]*
pt[0] * \
1240 tinf =
ptm[0]*
pt[0];
1244 if (input->
alt>zn1[4])
1245 g0 =
ptm[3]*
ps[0] * \
1249 tlb =
ptm[1] * (1.0 + flags->
sw[17]*
globe7(
pd[3],input,flags))*
pd[3][0];
1250 s = g0 / (tinf - tlb);
1254 if (input->
alt<300.0) {
1273 g28=flags->
sw[21]*
globe7(
pd[2], input, flags);
1276 zhf=
pdl[1][24]*(1.0+flags->
sw[5]*
pdl[0][24]*sin(dgtr*input->
g_lat)*cos(dr*(input->
doy-pt[13])));
1285 db28 =
pdm[2][0]*exp(g28)*
pd[2][0];
1287 output->
d[2]=
densu(z,db28,tinf,tlb,28.0,alpha[2],&output->
t[1],
ptm[5],s,mn1,zn1,
meso_tn1,
meso_tgn1);
1291 zhm28=
pdm[2][3]*
pdl[1][5];
1294 b28=
densu(zh28,db28,tinf,tlb,xmd,(alpha[2]-1.0),&tz,
ptm[5],s,mn1, zn1,
meso_tn1,
meso_tgn1);
1295 if ((flags->
sw[15])&&(z<=altl[2])) {
1297 dm28=
densu(z,b28,tinf,tlb,xmm,alpha[2],&tz,
ptm[5],s,mn1,zn1,
meso_tn1,
meso_tgn1);
1299 output->
d[2]=
dnet(output->
d[2],
dm28,zhm28,xmm,28.0);
1306 g4 = flags->
sw[21]*
globe7(pd[0], input, flags);
1308 db04 =
pdm[0][0]*exp(g4)*pd[0][0];
1310 output->
d[0]=
densu(z,db04,tinf,tlb, 4.,alpha[0],&output->
t[1],
ptm[5],s,mn1,zn1,
meso_tn1,
meso_tgn1);
1312 if ((flags->
sw[15]) && (z<altl[0])) {
1316 b04=
densu(zh04,db04,tinf,tlb,4.-xmm,alpha[0]-1.,&output->
t[1],
ptm[5],s,mn1,zn1,
meso_tn1,
meso_tgn1);
1318 dm04=
densu(z,b04,tinf,tlb,xmm,0.,&output->
t[1],
ptm[5],s,mn1,zn1,
meso_tn1,
meso_tgn1);
1321 output->
d[0]=
dnet(output->
d[0],
dm04,zhm04,xmm,4.);
1323 rl=log(b28*
pdm[0][1]/b04);
1324 zc04=
pdm[0][4]*pdl[1][0];
1325 hc04=
pdm[0][5]*pdl[1][1];
1327 output->
d[0]=output->
d[0]*
ccor(z,rl,hc04,zc04);
1334 g16= flags->
sw[21]*
globe7(pd[1],input,flags);
1336 db16 =
pdm[1][0]*exp(g16)*pd[1][0];
1338 output->
d[1]=
densu(z,db16,tinf,tlb, 16.,alpha[1],&output->
t[1],
ptm[5],s,mn1, zn1,
meso_tn1,
meso_tgn1);
1340 if ((flags->
sw[15]) && (z<=altl[1])) {
1344 b16=
densu(zh16,db16,tinf,tlb,16.0-xmm,(alpha[1]-1.0), &output->
t[1],
ptm[5],s,mn1,zn1,
meso_tn1,
meso_tgn1);
1346 dm16=
densu(z,b16,tinf,tlb,xmm,0.,&output->
t[1],
ptm[5],s,mn1,zn1,
meso_tn1,
meso_tgn1);
1349 output->
d[1]=
dnet(output->
d[1],
dm16,zhm16,xmm,16.);
1350 rl=
pdm[1][1]*pdl[1][16]*(1.0+flags->
sw[1]*pdl[0][23]*(input->
f107A-150.0));
1351 hc16=
pdm[1][5]*pdl[1][3];
1352 zc16=
pdm[1][4]*pdl[1][2];
1353 hc216=
pdm[1][5]*pdl[1][4];
1354 output->
d[1]=output->
d[1]*
ccor2(z,rl,hc16,zc16,hc216);
1356 hcc16=
pdm[1][7]*pdl[1][13];
1357 zcc16=
pdm[1][6]*pdl[1][12];
1358 rc16=
pdm[1][3]*pdl[1][14];
1360 output->
d[1]=output->
d[1]*
ccor(z,rc16,hcc16,zcc16);
1367 g32= flags->
sw[21]*
globe7(pd[4], input, flags);
1369 db32 =
pdm[3][0]*exp(g32)*pd[4][0];
1371 output->
d[3]=
densu(z,db32,tinf,tlb, 32.,alpha[3],&output->
t[1],
ptm[5],s,mn1, zn1,
meso_tn1,
meso_tgn1);
1373 if (flags->
sw[15]) {
1378 b32=
densu(zh32,db32,tinf,tlb,32.-xmm,alpha[3]-1., &output->
t[1],
ptm[5],s,mn1,zn1,
meso_tn1,
meso_tgn1);
1380 dm32=
densu(z,b32,tinf,tlb,xmm,0.,&output->
t[1],
ptm[5],s,mn1,zn1,
meso_tn1,
meso_tgn1);
1383 output->
d[3]=
dnet(output->
d[3],
dm32,zhm32,xmm,32.);
1385 rl=log(b28*
pdm[3][1]/b32);
1386 hc32=
pdm[3][5]*pdl[1][7];
1387 zc32=
pdm[3][4]*pdl[1][6];
1388 output->
d[3]=output->
d[3]*
ccor(z,rl,hc32,zc32);
1391 hcc32=
pdm[3][7]*pdl[1][22];
1392 hcc232=
pdm[3][7]*pdl[0][22];
1393 zcc32=
pdm[3][6]*pdl[1][21];
1394 rc32=
pdm[3][3]*pdl[1][23]*(1.+flags->
sw[1]*pdl[0][23]*(input->
f107A-150.));
1396 output->
d[3]=output->
d[3]*
ccor2(z,rc32,hcc32,zcc32,hcc232);
1403 g40= flags->
sw[20]*
globe7(pd[5],input,flags);
1405 db40 =
pdm[4][0]*exp(g40)*pd[5][0];
1407 output->
d[4]=
densu(z,db40,tinf,tlb, 40.,alpha[4],&output->
t[1],
ptm[5],s,mn1,zn1,
meso_tn1,
meso_tgn1);
1409 if ((flags->
sw[15]) && (z<=altl[4])) {
1413 b40=
densu(zh40,db40,tinf,tlb,40.-xmm,alpha[4]-1.,&output->
t[1],
ptm[5],s,mn1,zn1,
meso_tn1,
meso_tgn1);
1415 dm40=
densu(z,b40,tinf,tlb,xmm,0.,&output->
t[1],
ptm[5],s,mn1,zn1,
meso_tn1,
meso_tgn1);
1418 output->
d[4]=
dnet(output->
d[4],
dm40,zhm40,xmm,40.);
1420 rl=log(b28*
pdm[4][1]/b40);
1421 hc40=
pdm[4][5]*pdl[1][9];
1422 zc40=
pdm[4][4]*pdl[1][8];
1424 output->
d[4]=output->
d[4]*
ccor(z,rl,hc40,zc40);
1431 g1 = flags->
sw[21]*
globe7(pd[6], input, flags);
1433 db01 =
pdm[5][0]*exp(g1)*pd[6][0];
1435 output->
d[6]=
densu(z,db01,tinf,tlb,1.,alpha[6],&output->
t[1],
ptm[5],s,mn1,zn1,
meso_tn1,
meso_tgn1);
1437 if ((flags->
sw[15]) && (z<=altl[6])) {
1441 b01=
densu(zh01,db01,tinf,tlb,1.-xmm,alpha[6]-1., &output->
t[1],
ptm[5],s,mn1,zn1,
meso_tn1,
meso_tgn1);
1443 dm01=
densu(z,b01,tinf,tlb,xmm,0.,&output->
t[1],
ptm[5],s,mn1,zn1,
meso_tn1,
meso_tgn1);
1446 output->
d[6]=
dnet(output->
d[6],
dm01,zhm01,xmm,1.);
1448 rl=log(b28*
pdm[5][1]*sqrt(pdl[1][17]*pdl[1][17])/b01);
1449 hc01=
pdm[5][5]*pdl[1][11];
1450 zc01=
pdm[5][4]*pdl[1][10];
1451 output->
d[6]=output->
d[6]*
ccor(z,rl,hc01,zc01);
1453 hcc01=
pdm[5][7]*pdl[1][19];
1454 zcc01=
pdm[5][6]*pdl[1][18];
1455 rc01=
pdm[5][3]*pdl[1][20];
1457 output->
d[6]=output->
d[6]*
ccor(z,rc01,hcc01,zcc01);
1464 g14 = flags->
sw[21]*
globe7(pd[7],input,flags);
1466 db14 =
pdm[6][0]*exp(g14)*pd[7][0];
1468 output->
d[7]=
densu(z,db14,tinf,tlb,14.,alpha[7],&output->
t[1],
ptm[5],s,mn1,zn1,
meso_tn1,
meso_tgn1);
1470 if ((flags->
sw[15]) && (z<=altl[7])) {
1474 b14=
densu(zh14,db14,tinf,tlb,14.-xmm,alpha[7]-1., &output->
t[1],
ptm[5],s,mn1,zn1,
meso_tn1,
meso_tgn1);
1476 dm14=
densu(z,b14,tinf,tlb,xmm,0.,&output->
t[1],
ptm[5],s,mn1,zn1,
meso_tn1,
meso_tgn1);
1479 output->
d[7]=
dnet(output->
d[7],
dm14,zhm14,xmm,14.);
1481 rl=log(b28*
pdm[6][1]*sqrt(pdl[0][2]*pdl[0][2])/b14);
1482 hc14=
pdm[6][5]*pdl[0][1];
1483 zc14=
pdm[6][4]*pdl[0][0];
1484 output->
d[7]=output->
d[7]*
ccor(z,rl,hc14,zc14);
1486 hcc14=
pdm[6][7]*pdl[0][4];
1487 zcc14=
pdm[6][6]*pdl[0][3];
1488 rc14=
pdm[6][3]*pdl[0][5];
1490 output->
d[7]=output->
d[7]*
ccor(z,rc14,hcc14,zcc14);
1496 g16h = flags->
sw[21]*
globe7(pd[8],input,flags);
1497 db16h =
pdm[7][0]*exp(g16h)*pd[8][0];
1498 tho =
pdm[7][9]*pdl[0][6];
1499 dd=
densu(z,db16h,tho,tho,16.,alpha[8],&output->
t[1],
ptm[5],s,mn1, zn1,
meso_tn1,
meso_tgn1);
1502 zsho=
scalh(zmho,16.0,tho);
1503 output->
d[8]=dd*exp(-zsht/zsho*(exp(-(z-zmho)/zsht)-1.));
1507 output->
d[5] = 1.66E-24*(4.0*output->
d[0]+16.0*output->
d[1]+28.0*output->
d[2]+32.0*output->
d[3]+40.0*output->
d[4]+ output->
d[6]+14.0*output->
d[7]);
1513 z = sqrt(input->
alt*input->
alt);
1517 output->
d[i]=output->
d[i]*1.0E6;
1518 output->
d[5]=output->
d[5]/1000;
static double dm40
Definition: nrlmsise-00.cpp:73
double d[9]
Definition: nrlmsise-00.h:173
double pdm[8][10]
Definition: nrlmsise-00_data.cpp:421
double pd[9][150]
Definition: nrlmsise-00_data.cpp:88
int i
Definition: rw_test.cpp:37
static double dm16
Definition: nrlmsise-00.cpp:73
static double meso_tgn1[2]
Definition: nrlmsise-00.cpp:79
double scalh(double alt, double xm, double temp)
Definition: nrlmsise-00.cpp:204
double glob7s(double *p, struct nrlmsise_input *input, struct nrlmsise_flags *flags)
Definition: nrlmsise-00.cpp:868
double ptl[4][100]
Definition: nrlmsise-00_data.cpp:440
double pma[10][100]
Definition: nrlmsise-00_data.cpp:527
double t[2]
Definition: nrlmsise-00.h:174
double ps[150]
Definition: nrlmsise-00_data.cpp:370
static double dm28
Definition: nrlmsise-00.cpp:73
double ptm[10]
Definition: nrlmsise-00_data.cpp:417
static double dm32
Definition: nrlmsise-00.cpp:73
double globe7(double *p, struct nrlmsise_input *input, struct nrlmsise_flags *flags)
Definition: nrlmsise-00.cpp:629
static double meso_tn1[5]
Definition: nrlmsise-00.cpp:76
double ccor2(double alt, double r, double h1, double zh, double h2)
Definition: nrlmsise-00.cpp:175
__inline_double g0(double a, double *p)
Definition: nrlmsise-00.cpp:613
double ccor(double alt, double r, double h1, double zh)
Definition: nrlmsise-00.cpp:150
double dnet(double dd, double dm, double zhm, double xmm, double xm)
Definition: nrlmsise-00.cpp:218
static double dm04
Definition: nrlmsise-00.cpp:73
double pt[150]
Definition: nrlmsise-00_data.cpp:55
double sw[24]
Definition: nrlmsise-00.h:74
double densu(double alt, double dlb, double tinf, double tlb, double xm, double alpha, double *tz, double zlb, double s2, int mn1, double *zn1, double *tn1, double *tgn1)
Definition: nrlmsise-00.cpp:503
static double dm14
Definition: nrlmsise-00.cpp:73
static double dd
Definition: nrlmsise-00.cpp:70
static double dm01
Definition: nrlmsise-00.cpp:73
double pdl[2][25]
Definition: nrlmsise-00_data.cpp:404