-
Notifications
You must be signed in to change notification settings - Fork 6
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
Module for interactive time series postprocessing in Python shell #22
base: master
Are you sure you want to change the base?
Conversation
@favba as stated in the description, this should help interactively plotting time series from MPAS raw output data in a Python shell. Could you please just test the usage example above, if you have some "history" data? Thanks! PS: I opened this branch from the previous gtm/time-series-at-grid-cell, but deleted the scripts that were created only there to make clearer which scripts are new here (compared to master). |
Hi @guilhermeltm , I'm finally downloading the history files to test this PR (and the other one). In this case, should the |
I just tested this but got an error at
I just checked the NC files; indeed, there is no |
Module for interactively plotting time series from MPAS raw output files
at particular points. Usage example from Python shell:
########################################################################
import matplotlib.pyplot as plt; from interactive_ts import ts, plot_ts
dir='/path/to/data';
stream='history'; t0='2021-01-01 00:00:00'; tf='2021-01-02 18:00:00';
dt='10800'; var='swdnb'; lat='-52'; lon='-2'; vertlevel='0'
t1,y1,label1=ts(dir=dir,stream=stream,t0=t0,tf=tf,dt=dt,var=var,lat=lat,
lon=lon,vertlevel=vertlevel)
var='swupb'
t2,y2,label2=ts(dir=dir,stream=stream,t0=t0,tf=tf,dt=dt,var=var,lat=lat,
lon=lon,vertlevel=vertlevel)
y3=y1+y2
label3='total'
plot_ts(t1,y1,label1,ofile='y1.png')
plot_ts(t2,y2,label2,ofile='y1_y2.png')
plot_ts(t2,y3,label3,ofile='y1_y2_y3.png')
########################################################################