Skip to content

Commit

Permalink
tunring diurnal cycle tests back on
Browse files Browse the repository at this point in the history
  • Loading branch information
doutriaux1 committed Sep 20, 2018
1 parent 2770626 commit 03d22fd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/test_pmp_diurnal.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@ def compare_nc(self,test_name):

self.assertSame(test,good)

def teistDiurnaliComputeStdDailyMean(self):
def testDiurnaliComputeStdDailyMean(self):
cmd = 'computeStdDailyMeansWrapped.py --mp test_data --rd test_data/results/nc -t "sample_data_pr_%(model).nc" -m7'
p = subprocess.Popen(shlex.split(cmd))
p.communicate()

self.compare_nc("results/nc/pr_CMCC_Jul_1999-2005_std_of_dailymeans.nc")

def teistFourierDiurnalAllGridWrapped(self):
def testFourierDiurnalAllGridWrapped(self):
cmd = 'fourierDiurnalAllGridWrapped.py --mp test_data/results/nc --rd test_data/results/nc -m7'
p = subprocess.Popen(shlex.split(cmd))
p.communicate()
self.compare_nc("results/nc/pr_CMCC_Jul_1999-2005_tmean.nc")
self.compare_nc("results/nc/pr_CMCC_Jul_1999-2005_tS.nc")
self.compare_nc("results/nc/pr_CMCC_Jul_1999-2005_S.nc")

def teistDiurnalStdDailyVariance(self):
def testDiurnalStdDailyVariance(self):
self.runJsoner("std_of_dailymeansWrappedInOut.py","pr_Jul_1999_2005_std_of_dailymeans.json")
def runJsoner(self,script,json_file):
cmd = '{} --region_name=TROPICS --lat1=-30. --lat2=30. --lon1=0. --lon2=360 --mp tests/diurnal/results/nc --rd test_data/results/jsons -m7 -t "pr_%(model)_%(month)_%(firstyear)-%(lastyear)_S.nc"'.format(script)
Expand All @@ -65,24 +65,24 @@ def runJsoner(self,script,json_file):
good = json.load(good)
self.assertEqual(test["RESULTS"],good["RESULTS"])
"""
def teistCompositeDiurnalStatisticsWrapped(self):
def testCompositeDiurnalStatisticsWrapped(self):
cmd = 'compositeDiurnalStatisticsWrapped.py --mp test_data --rd test_data/results/nc -t "sample_data_pr_%(model).nc" -m7'
p = subprocess.Popen(shlex.split(cmd))
p.communicate()
self.compare_nc("results/nc/pr_CMCC_Jul_1999-2005_diurnal_avg.nc")
self.compare_nc("results/nc/pr_CMCC_Jul_1999-2005_diurnal_std.nc")
self.compare_nc("results/nc/pr_CMCC_LocalSolarTimes.nc")

def teistStd_of_hourlyvaluesWrappedInOut(self):
def testStd_of_hourlyvaluesWrappedInOut(self):
self.runJsoner("std_of_hourlyvaluesWrappedInOut.py","pr_Jul_1999-2005_std_of_hourlymeans.json")

def teistStd_of_meandiurnalcycWrappedInOut(self):
def testStd_of_meandiurnalcycWrappedInOut(self):
self.runJsoner("std_of_meandiurnalcycWrappedInOut.py","pr_Jul_1999-2005_std_of_meandiurnalcyc.json")

def testSavg_fourierWrappedInOut(self):
self.runJsoner("savg_fourierWrappedInOut.py","pr_Jul_1999-2005_savg_DiurnalFourier.json")

def teistfourierDiurnalGridpoints(self):
def testfourierDiurnalGridpoints(self):
cmd = 'fourierDiurnalGridpoints.py --mp tests/diurnal/results/nc --rd test_data/results/ascii'
p = subprocess.Popen(shlex.split(cmd))
p.communicate()
Expand Down

0 comments on commit 03d22fd

Please sign in to comment.