-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix #32 for input4MIPs * Fix #32: change Return 1 and return 0 -- to return True and return False * add test for inpu4MIPs
- Loading branch information
1 parent
5b6b0d6
commit 068bb93
Showing
5 changed files
with
69 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import pdb | ||
import urllib | ||
import cdms2 | ||
import os | ||
import sys | ||
import cdat_info | ||
import basetest | ||
|
||
|
||
class TestMIPS(basetest.CDMSBaseTest): | ||
def setUp(self): | ||
myurl = "http://uvcdat.llnl.gov/cdat/sample_data/161122_RobertPincus_multiple_input4MIPs_radiation_RFMIP_UColorado-RFMIP-20161122_none.nc" | ||
super(TestMIPS, self).setUp() | ||
urllib.urlretrieve(myurl, "161122_RobertPincus_multiple_input4MIPs_radiation_RFMIP_UColorado-RFMIP-20161122_none.nc") | ||
|
||
def tearDown(self): | ||
super(TestMIPS, self).tearDown() | ||
os.remove("161122_RobertPincus_multiple_input4MIPs_radiation_RFMIP_UColorado-RFMIP-20161122_none.nc") | ||
|
||
def testinput4MIPs(self): | ||
f=cdms2.open("161122_RobertPincus_multiple_input4MIPs_radiation_RFMIP_UColorado-RFMIP-20161122_none.nc") | ||
self.assertEqual(f['water_vapor'].getLatitude()[0:4].tolist(), [-28.5, 28.5, 31.5, 87.]) | ||
self.assertEqual(f['water_vapor'].getLongitude()[0:4].tolist(), [27., 24., 162., 126.]) | ||
|
||
if __name__ == "__main__": | ||
basetest.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,4 +79,4 @@ def testClosedOperations(self): | |
u[0:1]=-99.9 | ||
|
||
if __name__ == '__main__': | ||
basetest.run() | ||
basetest.run() |
This file was deleted.
Oops, something went wrong.