Skip to content

Pysat seasons demo 1 #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions pysatTutorials/ICON_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
"# Slicing and dicing mini-examples\n",
"print('Subset of data')\n",
"print(ivm[0:5, 'Ion_Density'])\n",
"print('')\n",
"date1 = dt.datetime(2020, 1, 1)\n",
"date2 = dt.datetime(2020, 1, 1, 1, 30, 30)\n",
"print(ivm[date1:date2, 'Ion_Density'])\n",
Expand Down Expand Up @@ -526,7 +527,7 @@
"\n",
"# Zonal wind plot, red line\n",
"mighti_vw_red['Zonal_Wind'].transpose().plot(cbar_kwargs={'label': 'Zonal Wind (m/s)'})\n",
"plt.title('MIGHTI Zonal Wind')\n",
"plt.title('MIGHTI Zonal Wind - Red Line')\n",
"\n",
"# Use pysat's stored metadata to get units\n",
"ylabel = ''.join(['Altitude (', mighti_vw_red.meta['Altitude', 'units'], ')'])\n",
Expand All @@ -535,19 +536,19 @@
"# Meridional wind plot, red line\n",
"plt.figure()\n",
"mighti_vw_red['Meridional_Wind'].transpose().plot(cbar_kwargs={'label': 'Meridional Wind (m/s)'})\n",
"plt.title('MIGHTI Meridional Wind')\n",
"plt.title('MIGHTI Meridional Wind - Red Line')\n",
"plt.ylabel(ylabel)\n",
"\n",
"# Zonal wind plot, green line\n",
"plt.figure()\n",
"mighti_vw_green['Zonal_Wind'].transpose().plot(cbar_kwargs={'label': 'Zonal Wind (m/s)'})\n",
"plt.title('MIGHTI Zonal Wind')\n",
"plt.title('MIGHTI Zonal Wind - Green Line')\n",
"plt.ylabel(ylabel)\n",
"\n",
"# Meridional wind plot, green line\n",
"plt.figure()\n",
"mighti_vw_green['Meridional_Wind'].transpose().plot(cbar_kwargs={'label': 'Meridional Wind (m/s)'})\n",
"plt.title('MIGHTI Meridional Wind')\n",
"plt.title('MIGHTI Meridional Wind - Green Line')\n",
"plt.ylabel(ylabel)"
]
},
Expand Down Expand Up @@ -703,10 +704,10 @@
" first_loop = False\n",
" \n",
" # Enable support for plotting local_time on x-axis\n",
" slt = (\"Epoch\", lmighti['average_local_time'].data)\n",
" slt = (\"time\", lmighti['average_local_time'].data)\n",
"\n",
" # Enable support for plotting tangent altitude on y axis\n",
" alt = ((\"Epoch\", \"Alt\"), lmighti['Tangent_Altitude'].data)\n",
" alt = ((\"time\", \"Alt\"), lmighti['Tangent_Altitude'].data)\n",
"\n",
" # Apply coordinates\n",
" a = lmighti['Temperature'].assign_coords(average_local_time=slt,\n",
Expand Down Expand Up @@ -927,10 +928,10 @@
" # Enable support for profile altitude on y axis\n",
" alt_data = lfuv['O_Plus_Profile_Altitude'].mean(axis=2, skipna=True)\n",
" alt_data = alt_data.where(np.isfinite(alt_data), alt_data.max())\n",
" alt = ((\"Epoch\", \"Altitude\"), alt_data.data)\n",
" alt = ((\"time\", \"Altitude\"), alt_data.data)\n",
"\n",
" # Enable support for plotting local time on x axis\n",
" slt = (\"Epoch\", lfuv['maximum_local_time'].data)\n",
" slt = (\"time\", lfuv['maximum_local_time'].data)\n",
" # Apply coordinates\n",
" var = var.assign_coords(maximum_local_time=slt, alt=alt)\n",
" # Sort things out\n",
Expand Down Expand Up @@ -1047,12 +1048,12 @@
" a = leuv['Oplus']\n",
"\n",
" # Enable support for plotting local time on x axis\n",
" slt = (\"Epoch\", euv['Local_Solar_Time'].data)\n",
" slt = (\"time\", euv['Local_Solar_Time'].data)\n",
"\n",
" # Enable support for profile altitude on y axis\n",
" alt_data = leuv['Altitude']\n",
" alt_data = alt_data.where(np.isfinite(alt_data), alt_data.max())\n",
" alt = ((\"Epoch\", \"Alt\"), alt_data.data)\n",
" alt = ((\"time\", \"Alt\"), alt_data.data)\n",
"\n",
" # Apply coordinates\n",
" a = a.assign_coords(Local_Solar_Time=slt, Altitude=alt)\n",
Expand Down
248 changes: 248 additions & 0 deletions pysatTutorials/pysatSeasons-demo.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ matplotlib
pysat >= 3.0.0
pysatMadrigal
pysatNASA
pysatSeasons
pysatSpaceWeather
scipy