Skip to content
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

Pysat seasons demo 1 #9

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Pysat seasons demo 1 #9

wants to merge 10 commits into from

Conversation

rstoneback
Copy link
Contributor

Demonstration of pysatSeasons seasonal averaging. Uses ICON IVM to generate an average temperature and density distribution for 'equatorial-ish' ionosphere. I have a custom function for adding log density. I don't do any spatial restrictions on the data.

@rstoneback
Copy link
Contributor Author

@jklenzing
Copy link
Member

jklenzing commented May 18, 2022

Block 2 of code registers all instruments. This pops up the warning from GOLD. perhaps there should be a comment explaining that this comes from preliminary GOLD support?
Just saw this already exists in the comments

@jklenzing
Copy link
Member

jklenzing commented May 18, 2022

Add newline after printing "subset of data" for readability of output

# Slicing and dicing mini-examples
print('Subset of data')
print(ivm[0:5, 'Ion_Density'])
print('')
date1 = dt.datetime(2020, 1, 1)
date2 = dt.datetime(2020, 1, 1, 1, 30, 30)
print(ivm[date1:date2, 'Ion_Density'])
print('')

@jklenzing
Copy link
Member


AttributeError Traceback (most recent call last)
/tmp/ipykernel_61/2148985827.py in
54 livm.data.plot(x='Magnetic_Local_Time', y='Log_Ion_Density',
55 xlim=(0,24), xticks=[],
---> 56 ax=axs[0], legend=False)
57 axs[0].set_title('ICON IVM Log Ion Density')
58 axs[0].set_ylabel('Log Ion Density (N/cc)')

AttributeError: 'AxesSubplot' object has no attribute 'rowNum'

@jklenzing
Copy link
Member

MIGHTI wind plots should have "red line" and "green line" in titles for clarity

@jklenzing
Copy link
Member

MIHTI Temperature block:

ValueError                                Traceback (most recent call last)
/tmp/ipykernel_61/110224154.py in <module>
     54     # Make plot
     55     a.transpose().plot(ax=axs[i], x='average_local_time', y='Tangent_Altitude',
---> 56                        cbar_kwargs={'label': 'Temperature (K)'})
     57     axs[i].set_xlim((0, 24))
     58     axs[i].set_xticks([])

ValueError: operands could not be broadcast together with remapped shapes [original->remapped]: (247,) and requested shape (247,18)

@jklenzing
Copy link
Member

When the colorbar plots start, I'd suggest having at least one with specified max and min for the colorbar range, since this is an intro python tutorial

@rstoneback
Copy link
Contributor Author

rstoneback commented May 18, 2022

I get a 30 minute runtime (on Binder) for the ICON seasonal analysis. A bit long.... :(

@jklenzing
Copy link
Member

I've just been poking buttons on binder

@rstoneback
Copy link
Contributor Author

I get a 30 minute runtime (on Binder) for the ICON seasonal analysis. A bit long.... :(

Takes about 5 minutes on my local system. I'm currently in the middle of a big computation taking so I thought that was slow.... Gonna check on heliocloud as well.

Issue with reducing the number of days is the plots don't come out complete. Perhaps I need to a bit of text as well.

@rstoneback
Copy link
Contributor Author

Only takes 90 seconds for 15 days on heliocloud. That works. 31 days cause ram use to exceed 4GB and the kernel restarts.

@rstoneback
Copy link
Contributor Author

MIHTI Temperature block:

ValueError                                Traceback (most recent call last)
/tmp/ipykernel_61/110224154.py in <module>
     54     # Make plot
     55     a.transpose().plot(ax=axs[i], x='average_local_time', y='Tangent_Altitude',
---> 56                        cbar_kwargs={'label': 'Temperature (K)'})
     57     axs[i].set_xlim((0, 24))
     58     axs[i].set_xticks([])

ValueError: operands could not be broadcast together with remapped shapes [original->remapped]: (247,) and requested shape (247,18)

Thanks! This is fixed in the summer-school repo I just haven't brought it back here yet.

@rstoneback
Copy link
Contributor Author

MIHTI Temperature block:

ValueError                                Traceback (most recent call last)
/tmp/ipykernel_61/110224154.py in <module>
     54     # Make plot
     55     a.transpose().plot(ax=axs[i], x='average_local_time', y='Tangent_Altitude',
---> 56                        cbar_kwargs={'label': 'Temperature (K)'})
     57     axs[i].set_xlim((0, 24))
     58     axs[i].set_xticks([])

ValueError: operands could not be broadcast together with remapped shapes [original->remapped]: (247,) and requested shape (247,18)

Thanks! This is fixed in the summer-school repo I just haven't brought it back here yet.

This is the result of 'Epoch' switching to 'time' in the data. Updated.

@rstoneback rstoneback requested a review from jklenzing May 19, 2022 13:46
@rstoneback
Copy link
Contributor Author

Actual merge to main pending release of pysat and such. Using review here as proxy for release to summer school.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants