File: testfermethods.py

package info (click to toggle)
pyferret 7.6.5-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 138,136 kB
  • sloc: fortran: 240,609; ansic: 25,235; python: 24,026; sh: 1,618; makefile: 1,123; pascal: 569; csh: 307; awk: 18
file content (49 lines) | stat: -rw-r--r-- 2,498 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# To be run in python after importing and starting pyferret
# such as from running "pyferret -python"

from __future__ import print_function

import sys ; sys.ps1 = '' ; sys.ps2 = ''
print()

print(">>> coads_uw  = pyferret.FerDSet('coads_uw.nc')")
coads_uw  = pyferret.FerDSet('coads_uw.nc')
print(">>> coads_uw.mywnd = (coads_uw.uwnd**2 + coads_uw.vwnd**2)**0.5")
coads_uw.mywnd = (coads_uw.uwnd**2 + coads_uw.vwnd**2)**0.5
print(">>> pyferret.showdata(brief=False)")
pyferret.showdata(brief=False)

print(">>> pyferret.setwindow(1, axisasp=0.75, color=(100,90,90), thick=0.75, logo=False)")
pyferret.setwindow(1, axisasp=0.75, color=(100,90,90), thick=0.75, logo=False)
print(">>> pyferret.settextstyle(font='helvetica', color='blue', bold=True, italic=True)")
pyferret.settextstyle(font='helvetica', color='blue', bold=True, italic=True)
print(">>> febreg = pyferret.FerRegion(T='15-FEB')")
febreg = pyferret.FerRegion(T='15-FEB')
print(">>> pyferret.contourplot(coads_uw.mywnd, region=febreg)")
pyferret.contourplot(coads_uw.mywnd, region=febreg)
print(">>> pyferret.saveplot('testfermethods_contour.pdf')")
pyferret.saveplot('testfermethods_contour.pdf')
print(">>> pyferret.fillplot(coads_uw.mywnd, line=True, region=febreg)")
pyferret.fillplot(coads_uw.mywnd, line=True, region=febreg)
print(">>> pyferret.saveplot('testfermethods_fill.pdf')")
pyferret.saveplot('testfermethods_fill.pdf')
print(">>> pyferret.shadeplot(coads_uw.mywnd, region=febreg)")
pyferret.shadeplot(coads_uw.mywnd, region=febreg)
print(">>> pyferret.saveplot('testfermethods_shade.pdf')")
pyferret.saveplot('testfermethods_shade.pdf')
print(">>> febeqreg = pyferret.FerRegion(Y=0,T='15-FEB')")
febeqreg = pyferret.FerRegion(Y=0,T='15-FEB')
print(">>> pyferret.pointplot(coads_uw.uwnd, vs=coads_uw.vwnd, color=coads_uw.mywnd, sym=18, symsize=0.1, line=True, region=febeqreg)")
pyferret.pointplot(coads_uw.uwnd, vs=coads_uw.vwnd, color=coads_uw.mywnd, sym=18, symsize=0.1, line=True, region=febeqreg)
print(">>> pyferret.saveplot('testfermethods_pointplot.pdf')")
pyferret.saveplot('testfermethods_pointplot.pdf')
print(">>> pyferret.lineplot(coads_uw.uwnd, vs=coads_uw.vwnd, color=coads_uw.mywnd, region=febeqreg)")
pyferret.lineplot(coads_uw.uwnd, vs=coads_uw.vwnd, color=coads_uw.mywnd, region=febeqreg)
print(">>> pyferret.saveplot('testfermethods_lineplot.pdf')")
pyferret.saveplot('testfermethods_lineplot.pdf')

print(">>> coads_uw.close()")
coads_uw.close()
print(">>> pyferret.showdata()")
pyferret.showdata()