summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2004-12-27 12:00:00 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2017-09-24 10:34:23 +0200
commit66ceaa9690c3276b5fab2b9b98372ae1a0cf201a (patch)
tree5e1ee0e0c51ba261c4d3f6a8428691eede421bcf
parent3c78ada4256564ae7446fc8928a5d2eae03789ff (diff)
downloadnrlmsise-00-66ceaa9690c3276b5fab2b9b98372ae1a0cf201a.tar.gz
Bugfix against memory corruption
Noted by Donald F. Linton. Also update e-mail address. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
-rw-r--r--DOCUMENTATION59
-rw-r--r--nrlmsise-00.c8
-rw-r--r--nrlmsise-00.h4
-rw-r--r--nrlmsise-00_data.c4
-rw-r--r--nrlmsise-00_test.c4
5 files changed, 43 insertions, 36 deletions
diff --git a/DOCUMENTATION b/DOCUMENTATION
index 3128320..0f7e8de 100644
--- a/DOCUMENTATION
+++ b/DOCUMENTATION
@@ -24,7 +24,7 @@ Table of Contents
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Please inform the
-maintainer of the C release (Dominik Brodowski - devel@brodo.de) of
+maintainer of the C release (Dominik Brodowski - mail@brodo.de) of
any patches and bug-fixes you implement for NRLMSISE-00 so that this C
package can be updated with these improvements.
@@ -76,7 +76,7 @@ This release is based on the Official Beta Release 2.0
When "INLINE" is not externally defined the source code should be
clean, plain ANSI which any C compiler should be able to work with. If
you find any problems, please report them to the maintainer Dominik
-Brodowski at devel@brodo.de. Thank you!
+Brodowski at mail@brodo.de. Thank you!
4.1 Files
@@ -121,6 +121,12 @@ the in- and output, and the differences between the various functions.
20020302 - first release
+20040322 - fix gtd7d output if sw->flags[0] is set
+ (noted by Dr. Vasiliy Yurasov)
+
+20041227 - bugfix against memory corruption
+ (Donald F. Linton)
+
7. TESTING OUTPUT
@@ -129,25 +135,26 @@ the in- and output, and the differences between the various functions.
nrlmsise-test should generate the following output:
-6.665177E+05 1.138806E+08 1.998211E+07 3.964051E+05 3.557465E+03 4.074402E-15 3.475312E+04 4.095913E+06 2.667273E+04 1.250540E+03 1.241416E+03
-3.407293E+06 1.586333E+08 1.391117E+07 3.214942E+05 1.559618E+03 5.001593E-15 4.854208E+04 4.380967E+06 6.956682E+03 1.166754E+03 1.161710E+03
+6.665177E+05 1.138806E+08 1.998211E+07 4.022764E+05 3.557465E+03 4.074714E-15 3.475312E+04 4.095913E+06 2.667273E+04 1.250540E+03 1.241416E+03
+
+3.407293E+06 1.586333E+08 1.391117E+07 3.262560E+05 1.559618E+03 5.001846E-15 4.854208E+04 4.380967E+06 6.956682E+03 1.166754E+03 1.161710E+03
-1.123767E+05 6.934130E+04 4.247105E+01 1.303616E-01 2.618848E-05 2.756772E-18 2.016750E+04 5.741256E+03 2.374394E+04 1.239892E+03 1.239891E+03
+1.123767E+05 6.934130E+04 4.247105E+01 1.322750E-01 2.618848E-05 2.756772E-18 2.016750E+04 5.741256E+03 2.374394E+04 1.239892E+03 1.239891E+03
-7.078194E+07 1.946309E+11 6.115826E+12 1.183637E+12 6.023212E+10 3.563077E-10 1.059880E+07 2.615737E+05 2.819879E-42 1.027318E+03 2.068878E+02
+5.411554E+07 1.918893E+11 6.115826E+12 1.225201E+12 6.023212E+10 3.584426E-10 1.059880E+07 2.615737E+05 2.819879E-42 1.027318E+03 2.068878E+02
-1.851122E+06 1.476555E+08 1.579356E+07 2.595354E+05 1.588781E+03 4.809426E-15 5.816167E+04 5.478984E+06 1.264446E+03 1.212396E+03 1.208135E+03
+1.851122E+06 1.476555E+08 1.579356E+07 2.633795E+05 1.588781E+03 4.809630E-15 5.816167E+04 5.478984E+06 1.264446E+03 1.212396E+03 1.208135E+03
-8.673095E+05 1.278862E+08 1.822577E+07 2.879564E+05 2.402962E+03 4.355639E-15 3.686389E+04 3.897276E+06 2.667273E+04 1.220146E+03 1.212712E+03
+8.673095E+05 1.278862E+08 1.822577E+07 2.922214E+05 2.402962E+03 4.355866E-15 3.686389E+04 3.897276E+06 2.667273E+04 1.220146E+03 1.212712E+03
-5.776251E+05 6.979139E+07 1.236814E+07 2.456484E+05 1.405739E+03 2.470458E-15 5.291986E+04 1.069814E+06 2.667273E+04 1.116385E+03 1.112999E+03
+5.776251E+05 6.979139E+07 1.236814E+07 2.492868E+05 1.405739E+03 2.470651E-15 5.291986E+04 1.069814E+06 2.667273E+04 1.116385E+03 1.112999E+03
-3.740304E+05 4.782720E+07 5.240380E+06 1.711538E+05 5.501649E+02 1.571632E-15 8.896776E+04 1.979741E+06 9.121815E+03 1.031247E+03 1.024848E+03
+3.740304E+05 4.782720E+07 5.240380E+06 1.759875E+05 5.501649E+02 1.571889E-15 8.896776E+04 1.979741E+06 9.121815E+03 1.031247E+03 1.024848E+03
-6.748339E+05 1.245315E+08 2.369010E+07 4.839898E+05 4.578781E+03 4.564039E-15 3.244595E+04 5.370833E+06 2.667273E+04 1.306052E+03 1.293374E+03
+6.748339E+05 1.245315E+08 2.369010E+07 4.911583E+05 4.578781E+03 4.564420E-15 3.244595E+04 5.370833E+06 2.667273E+04 1.306052E+03 1.293374E+03
-5.528601E+05 1.198041E+08 3.495798E+07 9.203305E+05 1.096255E+04 4.973819E-15 2.686428E+04 4.889974E+06 2.805445E+04 1.361868E+03 1.347389E+03
+5.528601E+05 1.198041E+08 3.495798E+07 9.339618E+05 1.096255E+04 4.974543E-15 2.686428E+04 4.889974E+06 2.805445E+04 1.361868E+03 1.347389E+03
1.375488E+14 0.000000E+00 2.049687E+19 5.498695E+18 2.451733E+17 1.261066E-03 0.000000E+00 0.000000E+00 0.000000E+00 1.027318E+03 2.814648E+02
@@ -157,11 +164,11 @@ nrlmsise-test should generate the following output:
1.412184E+11 0.000000E+00 2.104370E+16 5.645392E+15 2.517142E+14 1.294709E-06 0.000000E+00 0.000000E+00 0.000000E+00 1.027318E+03 2.795551E+02
-1.261027E+10 0.000000E+00 1.874533E+15 4.809049E+14 2.239685E+13 1.141612E-07 0.000000E+00 0.000000E+00 0.000000E+00 1.027318E+03 2.190732E+02
+1.254884E+10 0.000000E+00 1.874533E+15 4.923051E+14 2.239685E+13 1.147668E-07 0.000000E+00 0.000000E+00 0.000000E+00 1.027318E+03 2.190732E+02
-5.196477E+05 1.274494E+08 4.850450E+07 1.695722E+06 2.354487E+04 5.880606E-15 2.500078E+04 6.279210E+06 2.667273E+04 1.426412E+03 1.408608E+03
+5.196477E+05 1.274494E+08 4.850450E+07 1.720838E+06 2.354487E+04 5.881940E-15 2.500078E+04 6.279210E+06 2.667273E+04 1.426412E+03 1.408608E+03
-5.673929E+07 1.259077E+11 4.929562E+12 1.021646E+12 4.993465E+10 2.900560E-10 8.831229E+06 2.252516E+05 2.415246E-42 1.027318E+03 1.934071E+02
+4.260860E+07 1.241342E+11 4.929562E+12 1.048407E+12 4.993465E+10 2.914304E-10 8.831229E+06 2.252516E+05 2.415246E-42 1.027318E+03 1.934071E+02
DAY 172 81 172 172 172
@@ -176,15 +183,15 @@ F107 150 150 150 150 150
TINF 1250.54 1166.75 1239.89 1027.32 1212.40
TG 1241.42 1161.71 1239.89 206.89 1208.14
-HE 6.665e+05 3.407e+06 1.124e+05 7.078e+07 1.851e+06
-O 1.139e+08 1.586e+08 6.934e+04 1.946e+11 1.477e+08
+HE 6.665e+05 3.407e+06 1.124e+05 5.412e+07 1.851e+06
+O 1.139e+08 1.586e+08 6.934e+04 1.919e+11 1.477e+08
N2 1.998e+07 1.391e+07 4.247e+01 6.116e+12 1.579e+07
-O2 3.964e+05 3.215e+05 1.304e-01 1.184e+12 2.595e+05
+O2 4.023e+05 3.263e+05 1.323e-01 1.225e+12 2.634e+05
AR 3.557e+03 1.560e+03 2.619e-05 6.023e+10 1.589e+03
H 3.475e+04 4.854e+04 2.017e+04 1.060e+07 5.816e+04
N 4.096e+06 4.381e+06 5.741e+03 2.616e+05 5.479e+06
ANM 0 2.667e+04 6.957e+03 2.374e+04 2.820e-42 1.264e+03
-RHO 4.074e-15 5.002e-15 2.757e-18 3.563e-10 4.809e-15
+RHO 4.075e-15 5.002e-15 2.757e-18 3.584e-10 4.810e-15
DAY 172 172 172 172 172
@@ -202,12 +209,12 @@ TG 1212.71 1113.00 1024.85 1293.37 1347.39
HE 8.673e+05 5.776e+05 3.740e+05 6.748e+05 5.529e+05
O 1.279e+08 6.979e+07 4.783e+07 1.245e+08 1.198e+08
N2 1.823e+07 1.237e+07 5.240e+06 2.369e+07 3.496e+07
-O2 2.880e+05 2.456e+05 1.712e+05 4.840e+05 9.203e+05
+O2 2.922e+05 2.493e+05 1.760e+05 4.912e+05 9.340e+05
AR 2.403e+03 1.406e+03 5.502e+02 4.579e+03 1.096e+04
H 3.686e+04 5.292e+04 8.897e+04 3.245e+04 2.686e+04
N 3.897e+06 1.070e+06 1.980e+06 5.371e+06 4.890e+06
ANM 0 2.667e+04 2.667e+04 9.122e+03 2.667e+04 2.805e+04
-RHO 4.356e-15 2.470e-15 1.572e-15 4.564e-15 4.974e-15
+RHO 4.356e-15 2.471e-15 1.572e-15 4.564e-15 4.975e-15
DAY 172 172 172 172 172
@@ -222,20 +229,20 @@ F107 150 150 150 150 150
TINF 1027.32 1027.32 1027.32 1027.32 1027.32
TG 281.46 227.42 237.44 279.56 219.07
-HE 1.375e+14 4.427e+13 2.128e+12 1.412e+11 1.261e+10
+HE 1.375e+14 4.427e+13 2.128e+12 1.412e+11 1.255e+10
O 0.000e+00 0.000e+00 0.000e+00 0.000e+00 0.000e+00
N2 2.050e+19 6.598e+18 3.171e+17 2.104e+16 1.875e+15
-O2 5.499e+18 1.770e+18 8.506e+16 5.645e+15 4.809e+14
+O2 5.499e+18 1.770e+18 8.506e+16 5.645e+15 4.923e+14
AR 2.452e+17 7.892e+16 3.793e+15 2.517e+14 2.240e+13
H 0.000e+00 0.000e+00 0.000e+00 0.000e+00 0.000e+00
N 0.000e+00 0.000e+00 0.000e+00 0.000e+00 0.000e+00
ANM 0 0.000e+00 0.000e+00 0.000e+00 0.000e+00 0.000e+00
-RHO 1.261e-03 4.059e-04 1.951e-05 1.295e-06 1.142e-07
+RHO 1.261e-03 4.059e-04 1.951e-05 1.295e-06 1.148e-07
Note: These values equal those of the official FORTRAN package with
one notable exception: the FORTRAN version reports for "anomalous
-oxygen" in test-runs 4 and 17 exactly 0.000E-00, while my C compiler
+oxygen" in test-run 4 exactly 0.000E-00, while my C compiler
generates code which calculates 2.820e-42. When only 16-bit wide
double variables are used, this value reduces to 0.000E-00 as well.
@@ -243,6 +250,6 @@ double variables are used, this value reduces to 0.000E-00 as well.
========================================================
-Tuebingen, Germany, on May 2nd, 2002
+Tuebingen, Germany, on December 27nd, 2004
Dominik Brodowski
diff --git a/nrlmsise-00.c b/nrlmsise-00.c
index af48e19..3eb3bfa 100644
--- a/nrlmsise-00.c
+++ b/nrlmsise-00.c
@@ -3,15 +3,15 @@
/* -------------------------------------------------------------------- */
/* This file is part of the NRLMSISE-00 C source code package - release
- * 20020503
+ * 20041227
*
* The NRLMSISE-00 model was developed by Mike Picone, Alan Hedin, and
- * Doug Drob. They also wrote a NRLMSISE-00 distribution package in
+ * Doug Drob. They also wrote a NRLMSISE-00 distribution package in
* FORTRAN which is available at
* http://uap-www.nrl.navy.mil/models_web/msis/msis_home.htm
*
* Dominik Brodowski implemented and maintains this C version. You can
- * reach him at devel@brodo.de. See the file "DOCUMENTATION" for details,
+ * reach him at mail@brodo.de. See the file "DOCUMENTATION" for details,
* and check http://www.brodo.de/english/pub/nrlmsise/index.html for
* updated releases of this package.
*/
@@ -46,7 +46,7 @@ static double dm04, dm16, dm28, dm32, dm40, dm01, dm14;
/* MESO7 */
static double meso_tn1[5];
static double meso_tn2[4];
-static double meso_tn3[3];
+static double meso_tn3[5];
static double meso_tgn1[2];
static double meso_tgn2[2];
static double meso_tgn3[2];
diff --git a/nrlmsise-00.h b/nrlmsise-00.h
index bd75fe6..c68e0d6 100644
--- a/nrlmsise-00.h
+++ b/nrlmsise-00.h
@@ -3,7 +3,7 @@
/* -------------------------------------------------------------------- */
/* This file is part of the NRLMSISE-00 C source code package - release
- * 20020503
+ * 20041227
*
* The NRLMSISE-00 model was developed by Mike Picone, Alan Hedin, and
* Doug Drob. They also wrote a NRLMSISE-00 distribution package in
@@ -11,7 +11,7 @@
* http://uap-www.nrl.navy.mil/models_web/msis/msis_home.htm
*
* Dominik Brodowski implemented and maintains this C version. You can
- * reach him at devel@brodo.de. See the file "DOCUMENTATION" for details,
+ * reach him at mail@brodo.de. See the file "DOCUMENTATION" for details,
* and check http://www.brodo.de/english/pub/nrlmsise/index.html for
* updated releases of this package.
*/
diff --git a/nrlmsise-00_data.c b/nrlmsise-00_data.c
index 6943992..0175e6c 100644
--- a/nrlmsise-00_data.c
+++ b/nrlmsise-00_data.c
@@ -3,7 +3,7 @@
/* -------------------------------------------------------------------- */
/* This file is part of the NRLMSISE-00 C source code package - release
- * 20020503
+ * 20041227
*
* The NRLMSISE-00 model was developed by Mike Picone, Alan Hedin, and
* Doug Drob. They also wrote a NRLMSISE-00 distribution package in
@@ -11,7 +11,7 @@
* http://uap-www.nrl.navy.mil/models_web/msis/msis_home.htm
*
* Dominik Brodowski implemented and maintains this C version. You can
- * reach him at devel@brodo.de. See the file "DOCUMENTATION" for details,
+ * reach him at mail@brodo.de. See the file "DOCUMENTATION" for details,
* and check http://www.brodo.de/english/pub/nrlmsise/index.html for
* updated releases of this package.
*/
diff --git a/nrlmsise-00_test.c b/nrlmsise-00_test.c
index 36c9487..9a8bcc7 100644
--- a/nrlmsise-00_test.c
+++ b/nrlmsise-00_test.c
@@ -3,7 +3,7 @@
/* -------------------------------------------------------------------- */
/* This file is part of the NRLMSISE-00 C source code package - release
- * 20020503
+ * 20041227
*
* The NRLMSISE-00 model was developed by Mike Picone, Alan Hedin, and
* Doug Drob. They also wrote a NRLMSISE-00 distribution package in
@@ -11,7 +11,7 @@
* http://uap-www.nrl.navy.mil/models_web/msis/msis_home.htm
*
* Dominik Brodowski implemented and maintains this C version. You can
- * reach him at devel@brodo.de. See the file "DOCUMENTATION" for details,
+ * reach him at mail@brodo.de. See the file "DOCUMENTATION" for details,
* and check http://www.brodo.de/english/pub/nrlmsise/index.html for
* updated releases of this package.
*/