Performing a Flythrough from the Command Line¶
This notebook tutorial shows how to perform a flythrough from the command line in a variety of methods. The main difference between the notebook and the command line syntaxes is that all of the arguments and default values must be specified in the call from the command line, while the the notebook calls are more flexible.
- Fly a real satellite trajectory through a dataset,
- Fly a sample trajectory through a dataset,
- Fly a two-line elements (TLEs) through a dataset,
- Fly a trajectory from a file through a dataset.
The ModelFlythrough option is not available from the command line. Note: You may run the notebook as is if you have the sample data files, but you must change the 'file_dir', 'output_name', and 'plot_output' variables the relevant blocks to have the correct file path. The sample data files can be obtained from https://ccmc.gsfc.nasa.gov/RoR_WWW/output_files/KAMODO_DEMO/GITM/jasoon_shim_071418_IT_1_subset/. Only the *.nc files need to be downloaded.
All coordinate conversions needed are automatically detected and handled in the background. These routines are designed for scalars. Proper treatment of vectors in this process is a capability currently under development by Ensemble's Kamodo-core.
# Get list of function calls possible and a list of supported models
!python ../../kamodo_ccmc/flythrough/SatelliteFlythrough.py
Possible call types (first argument): FakeFlight, RealFlight, TLEFlight, MyFlight Use the call type as the first input to get call syntax. Possible models are: ADELPHI: AMPERE-Derived ELectrodynamic Properties of the High-latitude Ionosphere https://doi.org/10.1029/2020SW002677 AMGeO: Assimilative Mapping of Geospace Observations https://doi.org/10.5281/zenodo.3564914 CTIPe: Coupled Thermosphere Ionosphere Plasmasphere Electrodynamics Model https://doi.org/10.1029/2007SW000364 DTM: The Drag Temperature Model https://doi.org/10.1051/swsc/2015001 GAMERA_GM: Grid Agnostic MHD for Extended Research Applications - Global Magnetosphere outputs https://doi.org/10.3847/1538-4365/ab3a4c (coming soon) GITM: Global Ionosphere Thermosphere Model https://doi.org/10.1016/j.jastp.2006.01.008 IRI: International Reference Ionosphere Model https://doi.org/10.5194/ars-16-1-2018 OpenGGCM_GM: The Open Geospace General Circulation Model - Global Magnetosphere outputs only https://doi.org/10.1023/A:1014228230714 SuperDARN_uni: SuperDARN uniform grid output https://doi.org/10.1029/2010JA016017 SuperDARN_equ: SuperDARN equal area grid output https://doi.org/10.1029/2010JA016017 SWMF_IE: Space Weather Modeling Framework - Ionosphere and Electrodynamics outputs https://doi.org/10.1029/2006SW000272 SWMF_GM: Space Weather Modeling Framework - Global Magnetosphere outputs https://doi.org/10.1029/2006SW000272 TIEGCM: Thermosphere Ionosphere Electrodynamics General Circulation Model https://doi.org/10.1029/2012GM001297 WACCMX: Whole Atmosphere Community Climate Model With Thermosphere and Ionosphere Extension https://doi.org/10.1002/2017MS001232 WAMIPE: The coupled Whole Atmosphere Model - Ionosphere Plasmasphere Model https://doi.org/10.1002/2015GL067312 and https://doi.org/10.1029/2022SW003193 Weimer: Weimer Ionosphere model https://doi.org/10.1029/2005JA011270
C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\spacepy\time.py:2367: UserWarning: Leapseconds may be out of date. Use spacepy.toolbox.update(leapsecs=True) warnings.warn('Leapseconds may be out of date.'
Variable searching syntax¶
# Get the list of possible variables for a given model
!python ../../kamodo_ccmc/flythrough/SatelliteFlythrough.py GITM
The GITM model accepts the standardized variable names listed below. ----------------------------------------------------------------------------------- B_east : '['zonal magnetic field (east)', 69, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'nT']' B_mag : '['magnitude of magnetic field', 71, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'nT']' B_north : '['meridional magnetic field (north)', 70, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'nT']' B_up : '['vertical magnetic field velocity (up)', 68, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'nT']' DivI_nalt : '['divergence of the neutral wind-driven currents integrated along the altitude', 51, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], '']' DivI_nfl : '['divergence of the neutral wind-driven currents integrated along the field-line', 50, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], '']' E_east : '['zonal electric field (east)', 65, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'V/m']' E_eavg : '['average electron energy', 45, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'J']' E_mag : '['magnitude of electric field', 67, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'V/m']' E_north : '['meridional electric field (north)', 66, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'V/m']' E_perpeast : '['dynamo electric field in the perpendicular to the magnetic field direction that is "eastward"', 61, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], '']' E_perpnorth : '['dynamo electric field in the perpendicular to the magnetic field direction that is "northward"', 62, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], '']' E_up : '['vertical electric field velocity (up)', 64, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'V/m']' GradP_east : '['zonal component of gradient of sum of ion and electron pressures (east)', 75, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'Pa/m']' GradP_north : '['meridional component of gradient of sum of ion and electron pressures (north)', 76, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'Pa/m']' GradP_up : '['vertical component of gradient of sum of ion and electron pressures (up)', 77, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'Pa/m']' N_e : '['electron number density', 44, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], '1/m**3']' NmF2 : '['Maximum electron number density in F2 layer', 89, 'GDZ', 'sph', ['time', 'lon', 'lat'], '']' Phi_EUV : '['EUV heat flux', 94, 'GDZ', 'sph', ['time', 'lon', 'lat'], 'W/m**2']' Phi_Joule : '['joule heat flux', 92, 'GDZ', 'sph', ['time', 'lon', 'lat'], 'W/m**2']' Phi_NOCooling : '['NO cooling flux', 95, 'GDZ', 'sph', ['time', 'lon', 'lat'], 'W/m**2']' Phi_eE : '['electron energy flux', 52, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'J/m**2']' Phi_heat : '['heat flux', 93, 'GDZ', 'sph', ['time', 'lon', 'lat'], 'W/m**2']' Q_EUV : '['EUV heating', 4, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'K per timestep']' Q_EUVabs : '['total absolute EUV', 80, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'K per timestep']' Q_Joule : '['joule heating', 82, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'K per timestep']' Q_NOcool : '['cooling rate of nitric oxide', 87, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'K per timestep']' Q_Ocool : '['cooling rate of atomic oxygen', 81, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'K per timestep']' Q_auroral : '['auroral heating', 83, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'K per timestep']' Q_bal : '['heat balance total', 12, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], '']' Q_chem : '['chemical heating rate', 79, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], '']' Q_cool : '['radiative cooling rate', 29, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], '']' Q_eff : '['heating efficiency', 11, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], '']' Q_photoe : '['heating due to the photoelectric effect', 84, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'K per timestep']' SLT : '['solar local time', 63, 'GDZ', 'sph', ['time', 'lon', 'lat'], 'hr']' SZA : '['solar zenith angle', 48, 'GDZ', 'sph', ['time', 'lon', 'lat'], 'radians']' TEC : '['vertical total electron content (height integrated from bottom to top boundary)', 91, 'GDZ', 'sph', ['time', 'lon', 'lat'], '10**16/m**2']' T_e : '['electron temperature', 46, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'K']' T_i : '['ion temperature', 47, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'K']' T_n : '['neutral temperature', 31, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'K']' V : '['electric potential', 57, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'V']' g : '['gravitational acceleration', 74, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'm/s**2']' hmF2 : '['Height of maximum electron number density in F2 layer', 90, 'GDZ', 'sph', ['time', 'lon', 'lat'], 'km']' j_R1 : '['region 1 electric current density', 60, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'A/m**2']' j_R2 : '['region 2 electric current density', 59, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'A/m**2']' k : '['total conduction', 3, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'W/m/K']' k_ed : '['eddy conduction', 85, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], '']' k_edadiab : '['adiabatic eddy conduction', 86, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], '']' k_mol : '['molecular conduction', 88, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], '']' lat_B : '['magnetic latitude', 72, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'deg']' lon_B : '['magnetic longitude', 73, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'deg']' mmr_Ar : '['mass mixing ratio of argon/neutrals', 0, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], '']' mmr_CH4 : '['mass mixing ratio of methane/neutrals', 2, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], '']' mmr_H2 : '['mass mixing ratio of molecular hydrogen/neutrals', 7, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], '']' mmr_HCN : '['mass mixing ratio of hydrogen cyanide/neutrals', 8, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], '']' mmr_N2 : '['mass mixing ratio of molecular nitrogen', 19, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], '']' nu_ion : '['ion neutral collision frequency', 78, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], '1/s']' rho_Ar : '['mass density of argon', 1, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_CO2 : '['mass density of carbon dioxide', 49, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_H : '['mass density of hydrogen', 5, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_He : '['mass density of helium', 9, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_Heplus : '['mass density of helium ion', 10, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_Hplus : '['mass density of hydrogen ion', 6, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_N2 : '['mass density of molecular nitrogen', 13, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_N2D : '['mass density of atomic nitrogen (2D state)', 16, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_N2P : '['mass density of atomic nitrogen (2P state)', 17, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_N2plus : '['mass density of molecular nitrogen ion', 14, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_N4S : '['mass density of atomic nitrogen (4S state)', 18, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_NO : '['mass density of nitric oxide', 20, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_NOplus : '['mass density of nitric oxide ion', 21, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_Nplus : '['mass density of atomic nitrogen ion', 15, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_O1D : '['mass density of atomic oxygen (1D state)', 23, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_O2 : '['mass density of molecular oxygen', 22, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_O2D : '['mass density of atomic oxygen (2D state)', 25, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], '1/m**3']' rho_O2plus : '['mass density of molecular oxygen ion', 24, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_O3P : '['mass density of atomic oxygen (3P state)', 27, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_Oplus2P : '['mass density of atomic oxygen ion (2P state)', 26, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_Oplus4S4P : '['mass density of atomic oxygen ion (4S or 4P state)', 28, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_n : '['neutral mass density', 30, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' s_Bfield : '['magnetic field arc line length', 53, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'm']' sigma_H : '['Hall conductivity', 58, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'S/m']' sigma_P : '['Pedersen conductivity', 54, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'S/m']' v_Heup : '['vertical velocity of helium (up)', 43, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'm/s']' v_N2up : '['vertical velocity of molecular nitrogen (up)', 38, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'm/s']' v_Nstate4Sup : '['vertical velocity of atomic nitrogen (4S state) (up)', 39, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'm/s']' v_Nup : '['vertical velocity of atomic nitrogen (up)', 40, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'm/s']' v_O2up : '['vertical velocity of molecular oxygen (up)', 41, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'm/s']' v_Ostate3Pup : '['vertical velocity of atomic (3P state) (up)', 42, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'm/s']' v_ieast : '['zonal ion wind velocity (east)', 32, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'm/s']' v_inorth : '['meridional ion wind velocity (north)', 33, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'm/s']' v_iup : '['vertical ion wind velocity (up)', 34, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'm/s']' v_neast : '['zonal neutral wind velocity (east)', 35, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'm/s']' v_nnorth : '['meridional neutral wind velocity (north)', 36, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'm/s']' v_nup : '['vertical neutral wind velocity (up)', 37, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'm/s']'
C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\spacepy\time.py:2367: UserWarning: Leapseconds may be out of date. Use spacepy.toolbox.update(leapsecs=True) warnings.warn('Leapseconds may be out of date.'
# Searching for temperature variables in CCMC Kamodo
!python ../../kamodo_ccmc/flythrough/SatelliteFlythrough.py temperature "" ""
ADELPHI: No temperature variables found. AMGeO: No temperature variables found. CTIPe: T_ilev1: ['temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'ilev1'], 'K'] T: ['temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] T_e: ['electron temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] T_i: ['ion temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] T_n_ilev: ['neutral temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'ilev'], 'K'] T_n: ['neutral temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] DTM: T_exo: ['Exospheric temperature', 'GDZ-sph', ['time', 'lon', 'lat'], 'K'] T: ['temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] GAMERA_GM: No temperature variables found. GITM: T_n: ['neutral temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] T_e: ['electron temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] T_i: ['ion temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] IRI: T_e: ['electron temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] T_i: ['ion temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] T_n: ['neutral temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] OpenGGCM_GM: No temperature variables found. SuperDARN_uni: No temperature variables found. SuperDARN_equ: No temperature variables found. SWMF_IE: No temperature variables found. SWMF_GM: No temperature variables found. TIEGCM: T_n_ilev: ['neutral temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'ilev'], 'K'] T_n: ['neutral temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] T_e_ilev: ['electron temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'ilev'], 'K'] T_e: ['electron temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] T_i_ilev: ['ion temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'ilev'], 'K'] T_i: ['ion temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] WACCMX: T_ilev: ['Temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'ilev'], 'K'] T: ['Temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] T_e_ilev: ['Electron Temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'ilev'], 'K'] T_e: ['Electron Temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] T_i_ilev: ['Ion Temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'ilev'], 'K'] T_i: ['Ion Temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] T_08_COS_ilev: ['Temperature 8hr. cos coeff.', 'GDZ-sph', ['time', 'lon', 'lat', 'ilev'], 'K'] T_08_COS: ['Temperature 8hr. cos coeff.', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] T_08_SIN_ilev: ['Temperature 8hr. sin coeff.', 'GDZ-sph', ['time', 'lon', 'lat', 'ilev'], 'K'] T_08_SIN: ['Temperature 8hr. sin coeff.', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] T_12_COS_ilev: ['Temperature 12hr. cos coeff.', 'GDZ-sph', ['time', 'lon', 'lat', 'ilev'], 'K'] T_12_COS: ['Temperature 12hr. cos coeff.', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] T_12_SIN_ilev: ['Temperature 12hr. sin coeff.', 'GDZ-sph', ['time', 'lon', 'lat', 'ilev'], 'K'] T_12_SIN: ['Temperature 12hr. sin coeff.', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] T_24_COS_ilev: ['Temperature 24hr. cos coeff.', 'GDZ-sph', ['time', 'lon', 'lat', 'ilev'], 'K'] T_24_COS: ['Temperature 24hr. cos coeff.', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] T_24_SIN_ilev: ['Temperature 24hr. sin coeff.', 'GDZ-sph', ['time', 'lon', 'lat', 'ilev'], 'K'] T_24_SIN: ['Temperature 24hr. sin coeff.', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] WAMIPE: T_n_ilev: ['neutral temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'ilev'], 'K'] T_n: ['neutral temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] T_i: ['Ion temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] T_e: ['Electron temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] Weimer: No temperature variables found.
C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\spacepy\time.py:2367: UserWarning: Leapseconds may be out of date. Use spacepy.toolbox.update(leapsecs=True) warnings.warn('Leapseconds may be out of date.'
# Searching for temperature variables in a model
!python ../../kamodo_ccmc/flythrough/SatelliteFlythrough.py temperature GITM ""
T_n: ['neutral temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] T_e: ['electron temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K'] T_i: ['ion temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K']
C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\spacepy\time.py:2367: UserWarning: Leapseconds may be out of date. Use spacepy.toolbox.update(leapsecs=True) warnings.warn('Leapseconds may be out of date.'
# Searching for all variables in a dataset
!python ../../kamodo_ccmc/flythrough/SatelliteFlythrough.py "" GITM D:/GITM/jasoon_shim_071418_IT_1_tenth_oneday/
The file directory contains the following standardized variable names: ----------------------------------------------------------------------------------- rho_N2 : '['mass density of molecular nitrogen', 13, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_N2plus : '['mass density of molecular nitrogen ion', 14, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_NO : '['mass density of nitric oxide', 20, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_NOplus : '['mass density of nitric oxide ion', 21, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_O2 : '['mass density of molecular oxygen', 22, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_O2plus : '['mass density of molecular oxygen ion', 24, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_O3P : '['mass density of atomic oxygen (3P state)', 27, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_Oplus4S4P : '['mass density of atomic oxygen ion (4S or 4P state)', 28, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' rho_n : '['neutral mass density', 30, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'kg/m**3']' T_n : '['neutral temperature', 31, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'K']' v_ieast : '['zonal ion wind velocity (east)', 32, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'm/s']' v_inorth : '['meridional ion wind velocity (north)', 33, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'm/s']' v_iup : '['vertical ion wind velocity (up)', 34, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'm/s']' v_neast : '['zonal neutral wind velocity (east)', 35, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'm/s']' v_nnorth : '['meridional neutral wind velocity (north)', 36, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'm/s']' v_nup : '['vertical neutral wind velocity (up)', 37, 'GDZ', 'sph', ['time', 'lon', 'lat', 'height'], 'm/s']' SZA : '['solar zenith angle', 48, 'GDZ', 'sph', ['time', 'lon', 'lat'], 'radians']' SLT : '['solar local time', 63, 'GDZ', 'sph', ['time', 'lon', 'lat'], 'hr']' TEC : '['vertical total electron content (height integrated from bottom to top boundary)', 91, 'GDZ', 'sph', ['time', 'lon', 'lat'], '10**16/m**2']'
C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\spacepy\time.py:2367: UserWarning: Leapseconds may be out of date. Use spacepy.toolbox.update(leapsecs=True) warnings.warn('Leapseconds may be out of date.'
# Searching for temperature variables in a dataset
!python ../../kamodo_ccmc/flythrough/SatelliteFlythrough.py temperature GITM D:/GITM/jasoon_shim_071418_IT_1_tenth_oneday/
T_n: ['neutral temperature', 'GDZ-sph', ['time', 'lon', 'lat', 'height'], 'K']
C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\spacepy\time.py:2367: UserWarning: Leapseconds may be out of date. Use spacepy.toolbox.update(leapsecs=True) warnings.warn('Leapseconds may be out of date.'
RealFlight¶
Fly a real satellite trajectory obtained from the SSCWeb through a dataset.
# Show documentation
!python ../../kamodo_ccmc/flythrough/SatelliteFlythrough.py RealFlight
Help on function RealFlight in module __main__: RealFlight(dataset, start, stop, model, file_dir, variable_list, coord_type='GEO', output_name='', plot_coord='GEO', verbose=False) Retrieves the trajectory for the satellite requested and then flies that trajectory through the model data requested. dataset: name of the satellite data set to pull trajectory from start: utc timestamp for start of desired time interval stop: utc timestamp for end of desired time interval model: 'CTIPe','IRI', ... file_dir: complete path to where model data files are stored variable_list: List of standardized variable names. See model variable output for details. Dimensions must be at least time + 2D spatial. coord_type: Pick from GEO, GSM, GSE, or SM for the satellite trajectory. output_name: complete path with filename (with the extension) for the file to write the results to. Plotting filenames are determined by output_name - extension + variable names + plot type (1D or 3D). Extensions must be one of 'nc' for netCDF4 files, 'csv' for comma separated data, or 'txt' for tab separated data files. plot_coord: one of 'GDZ', 'GEO', 'GSM', 'GSE', 'SM', 'GEI', 'MAG', etc. Indicates the coordinate system the plot will be generated in. Only plots in cartesian coordinates systems are supported, so 'SPH' and 'RLL' are not accepted. Default is 'GEO'. Astropy coordinates also allowed. verbose: Set to true to be overwhelmed with information. Returns a dictionary with keys: 'utc_time', 'c1', 'c2', 'c3', and 'net_idx' - utc_time is an array in UTC seconds since 1970-01-01 of the satellite timestamps with any occuring outside of the model data removed. - 'c1', 'c2', and 'c3' are arrays of the given coordinate values for each surviving timestamp. - 'net_idx' is the original index value of the surviving timestamps. This is kept for easier comparison with the original dataset. - additional keys are included for each variable and label an array of the values of the indicated variable for each time+spatial coordinate given. - The units of each array in the returned dictionary are printed to the screen. See kamodo_ccmc.flythrough.utils.ConvertCoord for info on the coordinate systems.
C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\spacepy\time.py:2367: UserWarning: Leapseconds may be out of date. Use spacepy.toolbox.update(leapsecs=True) warnings.warn('Leapseconds may be out of date.'
# Select input values
import datetime as dt
# Choose input values for RealFlight function call.
model = 'GITM' # Choose the model.
# Full file path to model output data.
file_dir = 'D:/GITM/jasoon_shim_071418_IT_1_tenth_oneday/'
start_utcts = dt.datetime(2015, 3, 17, 0).replace(tzinfo=dt.timezone.utc).timestamp()
end_utcts = dt.datetime(2015, 3, 17, 2).replace(tzinfo=dt.timezone.utc).timestamp()-1
variables = ['rho_n', 'TEC'] # one or more variable names to retrieve
dataset = 'cnofs'
# Use https://sscweb.gsfc.nasa.gov/ to find the satellite name and time range desired.
coord_type = 'GEO' # Desired coordinate system for retrieved trajectory.
print(start_utcts, end_utcts)
# Choose naming convention for output files
output_name = 'Files/RealFlightExampleCMD_GITM.txt'
plot_coord = 'GSE' # Coordinate system chosen for output plots
# See https://sscweb.gsfc.nasa.gov/users_guide/Appendix_C.shtml for a description of coordinate types
1426550400.0 1426557599.0
The flythrough commands will break if the output file requested already exists. This feature is included by design to prevent users from accidentally overwriting a previously created file, especially since some flythrough execution times may take a while depending on various factors. So, the next block removes the file if it already exists. Avoid executing the next block if this is not the desired behavior.
# Remove the previously created output file.
import os
if os.path.isfile(output_name):
os.remove(output_name)
print(output_name, 'file removed.')
else:
print(output_name, 'file not found.')
Files/RealFlightExampleCMD_GITM.txt file removed.
# Run RealFlight flythrough command. Note that variable values must be written out.
!python ../../kamodo_ccmc/flythrough/SatelliteFlythrough.py RealFlight cnofs 1426550400 1426557599 GITM D:/GITM/jasoon_shim_071418_IT_1_tenth_oneday/ [rho_n,TEC] GEO Files/RealFlightExampleCMD_GITM.txt SM
# results_real = SF.RealFlight(dataset, start_utcts, end_utcts, model, file_dir, variables,
# coord_type=coord_type, output_name=output_name, plot_coord=plot_coord)
# The numerous 'Time slice index' messages printed are generated by the lazy time interpolation,
# which only loads the time slices necessary to perform the flythrough execution requested.
# Open plots in separate internet browser window for interactivity. Nothing will open here.
dataset: cnofs, start: 1426550400, stop: 1426557599, model: GITM, file_dir: D:/GITM/jasoon_shim_071418_IT_1_tenth_oneday/, variable_list: ['rho_n', 'TEC'], coord_type: GEO, output_name: Files/RealFlightExampleCMD_GITM.txt, plot_coord: SM Attribute/Key names of return dictionary: dict_keys(['sat_time', 'c1', 'c2', 'c3']) Time slice index 0 added from file. Time slice index 1 added from file. Time slice index 2 added from file. Time slice index 3 added from file. Time slice index 4 added from file. Time slice index 5 added from file. Time slice index 6 added from file. Time slice index 7 added from file. Time slice index 8 added from file. Time slice index 9 added from file. Time slice index 10 added from file. Time slice index 11 added from file. Time slice index 12 added from file. Time slice index 13 added from file. Time slice index 0 added from file. Time slice index 1 added from file. Time slice index 2 added from file. Time slice index 3 added from file. Time slice index 4 added from file. Time slice index 5 added from file. Time slice index 6 added from file. Time slice index 7 added from file. Time slice index 8 added from file. Time slice index 9 added from file. Time slice index 10 added from file. Time slice index 11 added from file. Time slice index 12 added from file. Time slice index 13 added from file. {'rho_n': 'kg/m**3', 'TEC': '10**16/m**2', 'utc_time': 's', 'net_idx': '', 'c1': 'R_E', 'c2': 'R_E', 'c3': 'R_E'} Output saved in Files/RealFlightExampleCMD_GITM.txt. Generating interactive plots... -saving html div file: Files/RealFlightExampleCMD_GITM_rho_n_3D.html -saving html div file: Files/RealFlightExampleCMD_GITM_rho_n_1D.html -saving html div file: Files/RealFlightExampleCMD_GITM_TEC_3D.html -saving html div file: Files/RealFlightExampleCMD_GITM_TEC_1D.html
C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\spacepy\time.py:2367: UserWarning: Leapseconds may be out of date. Use spacepy.toolbox.update(leapsecs=True) warnings.warn('Leapseconds may be out of date.' C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\scipy\interpolate\interpolate.py:630: RuntimeWarning: divide by zero encountered in true_divide slope = (y_hi - y_lo) / (x_hi - x_lo)[:, None] C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\scipy\interpolate\interpolate.py:633: RuntimeWarning: invalid value encountered in multiply y_new = slope*(x_new - x_lo)[:, None] + y_lo
# Read in and functionalize the output.
from kamodo_ccmc.flythrough import SatelliteFlythrough as SF
kamodo_object_real = SF.O.Functionalize_SFResults(model, SF.O.SF_read('Files/RealFlightExampleCMD_GITM.txt'))
kamodo_object_real
C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\spacepy\time.py:2367: UserWarning: Leapseconds may be out of date. Use spacepy.toolbox.update(leapsecs=True) warnings.warn('Leapseconds may be out of date.'
FakeFlight¶
Fly a sample satellite trajectory through a dataset
# Show documentation
!python ../../kamodo_ccmc/flythrough/SatelliteFlythrough.py FakeFlight
Help on function FakeFlight in module __main__: FakeFlight(start_time, stop_time, model, file_dir, variable_list, max_lat=65.0, min_lat=-65.0, lon_perorbit=363.0, max_height=450.0, min_height=400.0, p=0.01, n=2.0, verbose=False, output_name='', plot_coord='GEO') Generates a sample trajectory and then flies that trajectory through the model data chosen. Parameters: start_time: utc timestamp in seconds for start stop_time: utc timestamp in seconds for stop model: CTIPe, IRI, .... file_dir: complete path to where model data is stored variable_list: list of standardized variable names desired. Integers allowed. Dimensions must be at least time + 2D spatial. max_lat: maximum latitude for sample trajectory, in degrees (default=65.) min_lat: minimum latitude for sample trajectory, in degrees (default=-65.) lon_perorbit: the degrees of longitude per about 90 minute orbit (set less than 360 for precession forward in longitude, set less than 360 for precession backwards) (default=363.) max_height: maximum starting height of orbit in km (default=450.) min_height: minimum starting height of orbit in km (default=400.) p: a rough precession variable, applied as an overall height decrease as a percentage of the min_height value: p = (default=0.01). n: the time cadence of the sample trajectory generated (default = 2 seconds) output_name: complete path with filename (with the extension) for the file to write the results to. Plotting filenames are determined by output_name - extension + variable names + plot type (1D or 3D). Extensions must be one of 'nc' for netCDF4 files, 'csv' for comma separated data, or 'txt' for tab separated data files. plot_coord: one of 'GDZ', 'GEO', 'GSM', 'GSE', 'SM', 'GEI', 'MAG', etc. Indicates the coordinate system the plot will be generated in. Only plots in cartesian coordinates systems are supported, so 'SPH' and 'RLL' are not accepted. Default is 'GEO'. Astropy coordinates also allowed. Returns a dictionary with keys: 'utc_time', 'c1', 'c2', 'c3', and 'net_idx' - utc_time is an array in UTC seconds since 1970-01-01 of the generated timestamps with any occuring outside of the model data removed. - 'c1', 'c2', and 'c3' are arrays of the given coordinate values for each surviving timestamp - 'net_idx' is the original index value of the surviving timestamps. This is kept for easier comparison with the original dataset. - additional keys are included for each variable and label an array of the values of the indicated variable for each time+spatial coordinate given - The units of each array in the returned dictionary are printed to the screen. See kamodo_ccmc.flythrough.utils.ConvertCoord for info on the coordinate systems.
C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\spacepy\time.py:2367: UserWarning: Leapseconds may be out of date. Use spacepy.toolbox.update(leapsecs=True) warnings.warn('Leapseconds may be out of date.'
# Run FakeFlight. Note the same variables defined above are used here, but no outputs are created.
!python ../../kamodo_ccmc/flythrough/SatelliteFlythrough.py FakeFlight 1426550400 1426557599 GITM D:/GITM/jasoon_shim_071418_IT_1_tenth_oneday/ [rho_n,TEC] 65 -65 363 400 300 0.01 20 "" ""
# results_fake = SF.FakeFlight(start_utcts, end_utcts, model, file_dir, variables, max_height=400, min_height=300, n=20)
start_time: 1426550400, stop_time: 1426557599, model: GITM, file_dir: D:/GITM/jasoon_shim_071418_IT_1_tenth_oneday/, variable_list: ['rho_n', 'TEC'], max_lat: 65.0, min_lat: -65.0, lon_perorbit: 363.0, max_height: 400.0, min_height 300.0, p: 0.01, n: 20.0, output_name: , plot_coord: Attribute/Key names of return dictionary: dict_keys(['sat_time', 'c1', 'c2', 'c3']) (c1,c2,c3) = (lon, lat, alt) in (deg,deg,km) in the GDZ, sph coordinate system. sat_time contains the utc timestamps. Time slice index 0 added from file. Time slice index 1 added from file. Time slice index 2 added from file. Time slice index 3 added from file. Time slice index 4 added from file. Time slice index 5 added from file. Time slice index 6 added from file. Time slice index 7 added from file. Time slice index 8 added from file. Time slice index 9 added from file. Time slice index 10 added from file. Time slice index 11 added from file. Time slice index 12 added from file. Time slice index 13 added from file. Time slice index 0 added from file. Time slice index 1 added from file. Time slice index 2 added from file. Time slice index 3 added from file. Time slice index 4 added from file. Time slice index 5 added from file. Time slice index 6 added from file. Time slice index 7 added from file. Time slice index 8 added from file. Time slice index 9 added from file. Time slice index 10 added from file. Time slice index 11 added from file. Time slice index 12 added from file. Time slice index 13 added from file. {'rho_n': 'kg/m**3', 'TEC': '10**16/m**2', 'utc_time': 's', 'net_idx': '', 'c1': 'deg', 'c2': 'deg', 'c3': 'km'}
C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\spacepy\time.py:2367: UserWarning: Leapseconds may be out of date. Use spacepy.toolbox.update(leapsecs=True) warnings.warn('Leapseconds may be out of date.' C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\scipy\interpolate\interpolate.py:630: RuntimeWarning: divide by zero encountered in true_divide slope = (y_hi - y_lo) / (x_hi - x_lo)[:, None] C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\scipy\interpolate\interpolate.py:633: RuntimeWarning: invalid value encountered in multiply y_new = slope*(x_new - x_lo)[:, None] + y_lo
TLEFlight¶
The TLEFlight function uses two-line elements to calculate a satellite trajectory using sgp4, and then flies that satellite trajectory through the chosen model data.
# Show documentation
!python ../../kamodo_ccmc/flythrough/SatelliteFlythrough.py TLEFlight
Help on function TLEFlight in module __main__: TLEFlight(tle_file, start, stop, time_cadence, model, file_dir, variable_list, output_name='', plot_coord='GEO', method='forward', verbose=False) Use sgp4 to calculate a satellite trajectory given TLEs, then fly the trajectory through the chosen model data. If the time cadence does not evenly divide into the range of timestamps given, then the ending time value will be extended so that the entire requested range will be covered. Parameters: tle_file: The file name, including complete file path, of a file containing two-line elements. It is assumed that the file has no header and no other content. start_utcts: The UTC timestamp corresponding to the desired start time. Should be an integer. stop_utcts: The UTC timestamp corresponding to the desired stop time. Should be an integer. time_cadence: The number of seconds desired between trajectory positions. Should be an integer. model: 'CTIPe','IRI', ... file_dir: complete path to where model data files are stored. variable_list: List of standardized variable names. See model variable output for details. Dimensions must be at least time + 2D spatial. coord_type: Pick from GEO, GSM, GSE, or SM for the satellite trajectory. output_name: complete path with filename (with the extension) for the file to write the results to. Plotting filenames are determined by output_name - extension + variable names + plot type (1D or 3D). Extensions must be one of 'nc' for netCDF4 files, 'csv' for comma separated data, or 'txt' for tab separated data files. plot_coord: Any of the coordinate systems in SpacePy or AstroPy. See the ConvertCoord function for more information on the choices of string values. method: 'forward' or 'nearest'. This keyword changes the propagation method for timestamps between TLEs, not for timestamps before the first TLE or after the last TLE. The 'forward' (default) method uses the previous TLE to propagate forward for all timestamps between the selected TLE and the next one, while the 'nearest' method finds the TLE nearest to the timestamp and propagates either forward or backward for the timestamp. verbose: Set to true to be overwhelmed with information. Returns a dictionary with keys: 'utc_time', 'c1', 'c2', 'c3', and 'net_idx' - utc_time is an array in UTC seconds since 1970-01-01 of the satellite timestamps with any occuring outside of the model data removed. - 'c1', 'c2', and 'c3' are arrays of the given coordinate values for each surviving timestamp - 'net_idx' is the original index value of the surviving timestamps. This is kept for easier comparison with the original dataset. - additional keys are included for each variable and label an array of the values of the indicated variable for each time+spatial coordinate given. - The units of each array in the returned dictionary are printed to the screen. See kamodo_ccmc.flythrough.utils.ConvertCoord for info on the coordinate systems.
C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\spacepy\time.py:2367: UserWarning: Leapseconds may be out of date. Use spacepy.toolbox.update(leapsecs=True) warnings.warn('Leapseconds may be out of date.'
# Run TLEFlight flythrough command. Note the same variables defined above are used here, but no outputs are created.
!python ../../kamodo_ccmc/flythrough/SatelliteFlythrough.py TLEFlight Files/GRACE1_TLEs.txt 1426550400 1426557599 60 GITM D:/GITM/jasoon_shim_071418_IT_1_tenth_oneday/ [rho_n,TEC] "" "" forward
# results_tle = SF.TLEFlight(tle_file, start_utcts, end_utcts, time_cadence, model, file_dir, variables)
tle_file: Files/GRACE1_TLEs.txt, start: 1426550400, stop: 1426557599, time_cadence: 60, model: GITM, file_dir: D:/GITM/jasoon_shim_071418_IT_1_tenth_oneday/, variable_list: ['rho_n', 'TEC'], output_name: , plot_coord: , method: forward Time slice index 0 added from file. Time slice index 1 added from file. Time slice index 2 added from file. Time slice index 3 added from file. Time slice index 4 added from file. Time slice index 5 added from file. Time slice index 6 added from file. Time slice index 7 added from file. Time slice index 8 added from file. Time slice index 9 added from file. Time slice index 10 added from file. Time slice index 11 added from file. Time slice index 12 added from file. Time slice index 13 added from file. Time slice index 14 added from file. Time slice index 0 added from file. Time slice index 1 added from file. Time slice index 2 added from file. Time slice index 3 added from file. Time slice index 4 added from file. Time slice index 5 added from file. Time slice index 6 added from file. Time slice index 7 added from file. Time slice index 8 added from file. Time slice index 9 added from file. Time slice index 10 added from file. Time slice index 11 added from file. Time slice index 12 added from file. Time slice index 13 added from file. Time slice index 14 added from file. {'rho_n': 'kg/m**3', 'TEC': '10**16/m**2', 'utc_time': 's', 'net_idx': '', 'c1': 'R_E', 'c2': 'R_E', 'c3': 'R_E'}
C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\spacepy\time.py:2367: UserWarning: Leapseconds may be out of date. Use spacepy.toolbox.update(leapsecs=True) warnings.warn('Leapseconds may be out of date.' C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\scipy\interpolate\interpolate.py:630: RuntimeWarning: divide by zero encountered in true_divide slope = (y_hi - y_lo) / (x_hi - x_lo)[:, None] C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\scipy\interpolate\interpolate.py:633: RuntimeWarning: invalid value encountered in multiply y_new = slope*(x_new - x_lo)[:, None] + y_lo
MyFlight¶
The MyFlight function flies a trajectory from a file through the chosen model data. The file must be formatted to match the csv/nc/txt file examples given. The easiest way to create this is to write out a given trajectory to a file using the SF.O.SF_write function demonstrated in the Trajectories section and use the output file from there.
# Show documentation
!python ../../kamodo_ccmc/flythrough/SatelliteFlythrough.py MyFlight
Help on function MyFlight in module __main__: MyFlight(traj_file, model, file_dir, variable_list, output_name='', plot_coord='GEO', verbose=False) Read in a trajectory from a file, then fly through the model data selected. traj_file: complete path and filename for file containing trajectory data. file_type: one of 'cdf4' for netCDF4 files, 'csv' for comma-separated files, or 'txt' for a tab-separated text file. Indicates the format of the input trajectory file. coord_sys: one of 'GDZ', 'GEO', 'GSM', 'GSE', 'SM', 'GEI', 'MAG', 'SPH', 'RLL' combined with '-sph' or '-car'. E.g. 'SM-car' or 'GDZ-sph'. Astropy coordinate systems also supported. model: 'CTIPe', 'IRI', ... file_dir: complete path to model data files variable_list: List of standardized variable names. See model variable output for details. Dimensions must be at least time + 2D spatial. output_name: complete path with filename (with the extension) for the file to write the results to. Plotting filenames are determined by output_name - extension + variable names + plot type (1D or 3D). Extensions must be one of 'nc' for netCDF4 files, 'csv' for comma separated data, or 'txt' for tab separated data files. plot_coord: one of 'GDZ', 'GEO', 'GSM', 'GSE', 'SM', 'GEI', 'MAG', etc. Indicates the coordinate system the plot will be generated in. Only plots in cartesian coordinates systems are supported, so 'SPH' and 'RLL' are not accepted. Default is 'GEO'. Astropy coordinates also allowed. verbose: Set to true to be overwhelmed with information. Returns a dictionary with keys: 'utc_time', 'c1', 'c2', 'c3', and 'net_idx' - utc_time is an array in UTC seconds since 1970-01-01 of the given timestamps with any occuring outside of the model data removed. - 'c1', 'c2', and 'c3' are arrays of the given coordinate values for each surviving timestamp. - 'net_idx' is the original index value of the surviving timestamps. This is kept for easier comparison with the original dataset. - additional keys are included for each variable and label an array of the values of the indicated variable for each time+spatial coordinate given. - The units of each array in the returned dictionary are printed to the screen. See kamodo_ccmc.flythrough.utils.ConvertCoord for info on the coordinate systems.
C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\spacepy\time.py:2367: UserWarning: Leapseconds may be out of date. Use spacepy.toolbox.update(leapsecs=True) warnings.warn('Leapseconds may be out of date.'
# Run MyFlight with user-supplied trajectory. Note the same variables defined above are used here, but no outputs are created.
!python ../../kamodo_ccmc/flythrough/SatelliteFlythrough.py MyFlight Files/RealFlightExample_GITM.txt GITM D:/GITM/jasoon_shim_071418_IT_1_tenth_oneday/ [rho_n,TEC] "" ""
# results_my = SF.MyFlight(traj_file, model, file_dir, variables)
traj_file: Files/RealFlightExample_GITM.txt, model: GITM, file_dir: D:/GITM/jasoon_shim_071418_IT_1_tenth_oneday/, variable_list: ['rho_n', 'TEC'], output_name: , plot_coord: Time slice index 0 added from file. Time slice index 1 added from file. Time slice index 2 added from file. Time slice index 3 added from file. Time slice index 4 added from file. Time slice index 5 added from file. Time slice index 6 added from file. Time slice index 7 added from file. Time slice index 8 added from file. Time slice index 9 added from file. Time slice index 10 added from file. Time slice index 11 added from file. Time slice index 12 added from file. Time slice index 13 added from file. Time slice index 0 added from file. Time slice index 1 added from file. Time slice index 2 added from file. Time slice index 3 added from file. Time slice index 4 added from file. Time slice index 5 added from file. Time slice index 6 added from file. Time slice index 7 added from file. Time slice index 8 added from file. Time slice index 9 added from file. Time slice index 10 added from file. Time slice index 11 added from file. Time slice index 12 added from file. Time slice index 13 added from file. {'rho_n': 'kg/m**3', 'TEC': '10**16/m**2', 'utc_time': 's', 'net_idx': '', 'c1': 'R_E', 'c2': 'R_E', 'c3': 'R_E'}
C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\spacepy\time.py:2367: UserWarning: Leapseconds may be out of date. Use spacepy.toolbox.update(leapsecs=True) warnings.warn('Leapseconds may be out of date.' C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\scipy\interpolate\interpolate.py:630: RuntimeWarning: divide by zero encountered in true_divide slope = (y_hi - y_lo) / (x_hi - x_lo)[:, None] C:\Users\rringuet\Anaconda3\envs\Kamodo_Jan2023\lib\site-packages\scipy\interpolate\interpolate.py:633: RuntimeWarning: invalid value encountered in multiply y_new = slope*(x_new - x_lo)[:, None] + y_lo