space-physics / msise00

NRL MSISE-00 atmospheric model-- in Python and Matlab
https://ccmc.gsfc.nasa.gov/pub/modelweb/atmospheric/msis/
MIT License
47 stars 22 forks source link

The calculated result from the msise00 python package is inconsistent with the result from CCMC #8

Closed lcx366 closed 3 years ago

lcx366 commented 5 years ago

Using the msise00 python package to calculate the atmospheric parameters:

>>> atmos = msise00.run(time=datetime(2018, 5, 17, 21), altkm=300, glat=55, glon=120)
>>> atmos
<xarray.Dataset>
Dimensions:     (alt_km: 1, lat: 1, lon: 1, time: 1)
Coordinates:
  * time        (time) datetime64[ns] 2018-05-17T21:00:00
  * alt_km      (alt_km) int64 300
  * lat         (lat) int64 55
  * lon         (lon) int64 120
Data variables:
    He          (time, alt_km, lat, lon) float64 1.016e+12
    O           (time, alt_km, lat, lon) float64 8.301e+13
    N2          (time, alt_km, lat, lon) float64 9.549e+12
    O2          (time, alt_km, lat, lon) float64 3.267e+11
    Ar          (time, alt_km, lat, lon) float64 4.355e+08
    Total       (time, alt_km, lat, lon) float64 2.688e-12
    H           (time, alt_km, lat, lon) float64 5.642e+11
    N           (time, alt_km, lat, lon) float64 6.157e+11
    AnomalousO  (time, alt_km, lat, lon) float64 1.883e+07
    Tn          (time, alt_km, lat, lon) float64 606.1
    Texo        (time, alt_km, lat, lon) float64 606.5
Attributes:
    species:  ['He', 'O', 'N2', 'O2', 'Ar', 'Total', 'H', 'N', 'AnomalousO']
    f107s:    34.64768518518518
    f107:     76.9
    Ap:       0

and calculate the atmospheric parameters with the same location and time by the VITMO ModelWeb Browser from CCMG:

Input parameters 
year= 2018, month= 5, day= 17, hour=21.00, 
Time_type = Universal
Coordinate_type = Geographic
latitude= 55.00, longitude= 120.00, height= 300.00
Prof. parameters: start= 1.00 stop= 12.00 step= 2.00 
Optional parametes: F10.7(daily) =not specified; F10.7(3-month avg) =not specified; ap(daily) = not specified 

   Selected parameters are:
1 Year
2 Month
3 Day
4 Hour of day
5 Height, km
6 Latitude, deg.
7 Longitude, deg. 
8 N2, cm-3
9 O2, cm-3
10 Mass_density, g/cm-3
11 Temperature_neutral, K
12 Temperature_exospheric, K
13 F10_7_daily
14 F10_7_3_month_avg
15 ap_daily

   1  2  3     4      5      6      7          8          9        10     11    12      13     14     15
2018  1 17 21.00  300.0   55.0  120.0  3.357E+06  1.108E+05 3.623E-15  538.1   538   68.8   69.0    0.9 
2018  3 17 21.00  300.0   55.0  120.0  2.953E+07  1.250E+06 8.175E-15  725.1   727   67.9   69.4   13.5 
2018  5 17 21.00  300.0   55.0  120.0  4.874E+07  1.622E+06 8.153E-15  794.1   800   71.5   72.6    9.5 
2018  7 17 21.00  300.0   55.0  120.0  3.666E+07  1.246E+06 5.994E-15  755.2   758   74.3   72.4    6.6 
2018  9 17 21.00  300.0   55.0  120.0  3.162E+07  1.129E+06 7.594E-15  728.7   731   69.8   69.6   10.8 
2018 11 17 21.00  300.0   55.0  120.0  6.221E+06  1.787E+05 5.249E-15  576.2   576   69.5   68.1    0.9 

It shows the results from the msise00 python package is very different from those of CCMC. For instance, Total Mass_density: 2.688e-12 vs 8.153E-15, Temperature_exospheric: 606.5 vs 800, and Ap: 0 vs 9.5.

scivision commented 5 years ago

That is puzzling to me as well at first glance--we use the MSIS Fortran code right from CCMC, just updated July 2019 from them. It's possible that CCMC is setting some options differently.

lcx366 commented 5 years ago

I suppose the inconsistency of the results is probably caused by the different assignment for space weather index between the msise00 python package and CCMC.

jwday commented 4 years ago

I just installed msise00 and ran the exact same comparison to CCMC via the web tool (https://ccmc.gsfc.nasa.gov/modelweb/models/nrlmsise00.php). Using your inputs, my msise00 results are identical to yours, which in turn vary identically to what you posted re. CCMC.

I'm assuming both use UTC time and coordinates are Geographic (vs. Geomagnetic), and units are in g/cm^-3.

Did you ever figure out what was going on?

lcx366 commented 4 years ago

I didn't check the msise00 code for any problems. Instead, I rewrote a package (nrlmsise00) in pure python and it downloads and updates the latest space weather data from https://www.celestrak.com/SpaceData/SW-All.txt. The calculated results are consistent with the fortran source code, C, matlab and CCMC results, but the package has not been published. Maybe I should announce it for reference in recent days.

jwday commented 4 years ago

Just curious if there's been any update on this. @lcx366, I downloaded and ran your atmos script and the results are similar, but not exactly identical, to those from CCMC. Curious if that's just because the weather data from celestrak is different than that from CCMC (but why would that be?).

scivision commented 3 years ago

This was fixed in v1.10.0, I believe CCMC results are now matched to the text precision