JouleCai / geospacelab

A python-based library to collect, manage, and visualize geospace data (e.g. OMNI, geomagnetic indices, EISCAT, DMSP, SWARM, TEC, AMPERE, etc.).
BSD 3-Clause "New" or "Revised" License
30 stars 6 forks source link

Getting DMSP satellite orbit number #12

Closed ksd3 closed 6 months ago

ksd3 commented 6 months ago

I would like to recreate the figure here in the examples (Swarm and DMSP) for different dates. I seem to keep running into a 'The data source cannot be docked' error regardless of the orbit number. Specifically, for the date 2016-05-08 it looks like the DMSP orbits should be 33805,6,7, but changing the variables as in the example as follows:

dmsp_dn = datetime.datetime.strptime('20160508' + '120000', '%Y%m%d%H%M%S')
dmsp_sat_id = 'f18'
dmsp_orbit_id='33805'
swarm_dn = datetime.datetime.strptime('20160508' + '130000', '%Y%m%d%H%M%S')
swarm_sat_id = 'A'
visual_dmsp_swarm(dmsp_dn, dmsp_sat_id, str(i), swarm_dn, swarm_sat_id, pole='N')

Is there a way to get DMSP orbit numbers? Or am I approaching this incorrectly?

JouleCai commented 6 months ago

You may check the overpassing time and orbit number via the DMSP SSUSI webpage: https://ssusi.jhuapl.edu/gallery_AUR

For your case, the closest overpassing time of F18 at the northern pole is 12:33 UT and the orbit number is '33801'. At the time 1200 UT, the satellite was in the southern hemisphere and it may not be plotted correctly even if the orbit number is correct. The same issue is for Swarm too. For the moment, to make an automatic check for the overpass time at the northern pole and the associated orbit number is not implemented. You should find the input values manually.

JouleCai commented 6 months ago

In addition, please update to the latest version (= v0.8.9). A bug for the Swarm TII data was found and the issue is fixed. In the example code there is a change for setting the overpass time of Swarm (lines 46-52 in here).

I tried the code below and it works:

  dmsp_dn = datetime.datetime.strptime('20160508' + '123600', '%Y%m%d%H%M%S')
  dmsp_sat_id = 'f18'
  dmsp_orbit_id = '33801'

  swarm_dn = datetime.datetime.strptime('20160508' + '130000', '%Y%m%d%H%M%S')
  swarm_sat_id = 'A'

  visual_dmsp_swarm(dmsp_dn, dmsp_sat_id, dmsp_orbit_id, swarm_dn, swarm_sat_id, pole='N')
ksd3 commented 6 months ago

Thank you, this works!