Beispiel #1
0
from sunpy import Spatial
import numpy as np
import matplotlib.pyplot as plt

runname='SFBay3D'
ncfile = '%s/%s_0*.nc'%('data',runname)
k = 1 # depth layer

plt.figure()
sun = Spatial(ncfile,klayer=[k],variable='salt')
sun.tstep=np.arange(0,len(sun.time))
sun.loadData()
sun.clim = [28.0,32.0]
sun.animate(vector_overlay=False)
sun.saveanim('plots/%s_salt.mov'%runname)

sun.clim=None
plt.figure()
sun = Spatial(ncfile,klayer=[k],variable='uc')
sun.tstep=np.arange(0,len(sun.time))
sun.loadData()
sun.animate(vector_overlay=False)
sun.saveanim('plots/%s_uc.mov'%runname)

sun.clim=None
plt.figure()
sun = Spatial(ncfile,klayer=[k],variable='eta')
sun.tstep=np.arange(0,len(sun.time))
sun.loadData()
sun.animate(vector_overlay=False)
Beispiel #2
0
Generates a series of animations from the suntans output

"""

from sunpy import Spatial
import numpy as np
import matplotlib.pyplot as plt

ncfile = 'rundata/Estuary_SUNTANS_00*nc'

plt.figure()
sun = Spatial(ncfile,klayer=[1],variable='salt')
sun.tstep=np.arange(0,len(sun.time))
sun.loadData()
sun.animate(vector_overlay=False)
sun.saveanim('plots/salt.mov')

plt.figure()
sun = Spatial(ncfile,klayer=[1],variable='temp')
sun.tstep=np.arange(0,len(sun.time))
sun.loadData()
sun.animate(vector_overlay=False)
sun.saveanim('plots/temp.mov')

plt.figure()
sun = Spatial(ncfile,variable='tau_y')
sun.tstep=np.arange(0,len(sun.time))
sun.loadData()
sun.animate(vector_overlay=False)
sun.saveanim('plots/tau_y.mov')