File: Detrend.py.test.in

package info (click to toggle)
cdo 2.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 49,836 kB
  • sloc: cpp: 185,271; ansic: 95,766; sh: 7,192; f90: 6,147; makefile: 1,977; ruby: 1,078; csh: 1,028; python: 995; fortran: 319; pascal: 219; perl: 9
file content (38 lines) | stat: -rw-r--r-- 895 bytes parent folder | download | duplicates (4)
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
#! @PYTHON@

from cdoTest import *

OPERATORS=["detrend","trend","subtrend","regres"]

IFILE=f'{DATAPATH}/detrend_data'

RFILE=f'{DATAPATH}/detrend_ref'
OFILE="detrend_res"

test_module = TestModule()
t = TAPTest(OPERATORS[0])
t.add(f'{CDO} {OPERATORS[0]} {IFILE} {OFILE}')
t.add(f'{CDO} diff {OFILE} {RFILE}')
t.clean(OFILE)
test_module.add(t)
#----------------------
t = TAPTest(OPERATORS[1])
t.add(f'{CDO} {OPERATORS[1]} {IFILE} ta tb')
t.clean(OFILE)
test_module.add(t)
#----------------------
t = TAPTest(OPERATORS[2])
t.add(f'{CDO} {OPERATORS[2]} {IFILE} ta tb {OFILE}')
t.add(f'{CDO} diff {OFILE} {RFILE}')
t.clean(OFILE,"ta","tb")
test_module.add(t)
#----------------------
RFILE=f'{DATAPATH}/regres_ref'
OFILE="regres_res"
t = TAPTest(OPERATORS[3])
t.add(f'{CDO} {OPERATORS[3]} {IFILE} {OFILE}')
t.add(f'{CDO} diff {OFILE} {RFILE}')
t.clean(OFILE)
test_module.add(t)

test_module.run()