[cmor] 74/190: 2010-11-11 : updated pywrapper from Jamie 2010-11-11 : new examples into Makefile for Python 2010-11-11 : added a flag that says need to cal cmor_grid on some axis (site and location)
Alastair McKinstry
mckinstry at moszumanska.debian.org
Tue Jul 21 12:54:39 UTC 2015
This is an automated email from the git hooks/post-receive script.
mckinstry pushed a commit to branch debian/master
in repository cmor.
commit b6fe27ad5ebbda837be268bd8c7dcd53a3bca38b
Author: Charles Doutriaux <doutriaux1 at llnl.gov>
Date: Thu Nov 11 17:00:35 2010 -0800
2010-11-11 : updated pywrapper from Jamie
2010-11-11 : new examples into Makefile for Python
2010-11-11 : added a flag that says need to cal cmor_grid on some axis (site and location)
---
Lib/pywrapper.py | 55 +++++----
RELEASE-NOTES | 3 +
Test/_cmor_stub.py | 7 ++
Test/test_compression.py | 5 +-
Test/test_grid_stub_jamie.py | 164 +++++++++++++++++++++++++++
Test/test_python_appending.py | 5 +-
Test/test_python_jamie.py | 4 +-
Test/test_python_jamie_2.py | 5 +-
Test/test_python_jamie_3.py | 1 +
Test/test_python_jamie_4.py | 1 +
Test/test_python_jamie_6.py | 1 +
Test/test_python_jamie_7.py | 1 +
Test/test_python_joerg_1.py | 1 +
Test/test_python_joerg_2.py | 5 +
Test/test_python_joerg_3.py | 1 +
Test/test_python_joerg_4.py | 1 +
Test/test_python_joerg_5.py | 1 +
Test/test_python_memory_check.py | 1 +
Test/test_python_new_tables.py | 5 +-
Test/test_python_open_close_cmor_multiple.py | 1 +
Test/test_python_region.py | 1 +
Test/test_python_user_interface_00.py | 4 +-
Test/test_python_user_interface_01.py | 4 +-
Test/test_python_user_interface_03.py | 5 +-
24 files changed, 246 insertions(+), 36 deletions(-)
diff --git a/Lib/pywrapper.py b/Lib/pywrapper.py
index 00be0b1..f64c385 100644
--- a/Lib/pywrapper.py
+++ b/Lib/pywrapper.py
@@ -61,6 +61,17 @@ def time_varying_grid_coordinate(grid_id, table_entry,units,type='f',missing_val
return _cmor.time_varying_grid_coordinate(grid_id,table_entry,units,type,missing_value)
+def _to_numpy(vals, message):
+ if isinstance(vals, (list, tuple)):
+ vals = numpy.ascontiguousarray(vals)
+ elif not isinstance(vals,numpy.ndarray):
+ try:
+ vals = numpy.ascontiguousarray(vals.filled())
+ except:
+ raise Exception, "Error could not convert %s to a numpy array" % message
+
+ return vals
+
def grid(axis_ids,latitude=None,longitude=None,latitude_vertices=None,longitude_vertices=None,nvertices=None):
""" Creates a cmor grid
Usage:
@@ -87,26 +98,21 @@ def grid(axis_ids,latitude=None,longitude=None,latitude_vertices=None,longitude_
raise Exception, "error axes list/array must be 1D"
if latitude is not None:
- if not isinstance(latitude,numpy.ndarray):
- try:
- latitude = numpy.ascontiguousarray(latitude.filled())
- except:
- raise Exception, "Error could not convert latitude to a numpy array"
- if numpy.rank(latitude)!=len(axis_ids):
- raise Exception, "latitude's rank does not match number of axes passed via axis_ids"
+ latitude = _to_numpy(latitude, 'latitude')
+
+ if numpy.rank(latitude)!=len(axis_ids):
+ raise Exception, "latitude's rank does not match number of axes passed via axis_ids"
type = latitude.dtype.char
nvert = 0
if not type in ['d','f','i','l']:
raise Exception, "latitude array must be of type 'd','f','l' or 'i'"
- if not isinstance(longitude,numpy.ndarray):
- try:
- longitude = numpy.ascontiguousarray(longitude.filled())
- except:
- raise Exception, "Error could not convert longitude to a numpy array"
- if numpy.rank(longitude)!=len(axis_ids):
- raise Exception, "longitude's rank does not match number of axes passed via axis_ids"
+ longitude = _to_numpy(longitude, 'longitude')
+
+ if numpy.rank(longitude)!=len(axis_ids):
+ raise Exception, "longitude's rank does not match number of axes passed via axis_ids"
+
## print 'longitude type:',longitude.dtype.char
if longitude.dtype.char!=type:
longitude = longitude.astype(type)
@@ -120,13 +126,10 @@ def grid(axis_ids,latitude=None,longitude=None,latitude_vertices=None,longitude_
nvert = nvertices
if latitude_vertices is not None:
- if not isinstance(latitude_vertices,numpy.ndarray):
- try:
- latitude_vertices = numpy.ascontiguousarray(latitude_vertices.filled())
- except:
- raise Exception, "Error could not convert latitude_vertices to a numpy array"
- if numpy.rank(latitude_vertices)!=len(axis_ids)+1:
- raise Exception, "latitude_vertices's rank does not match number of axes passed via axis_ids +1 (for vertices)"
+ latitude_vertices = _to_numpy(latitude_vertices, 'latitude_vertices')
+
+ if numpy.rank(latitude_vertices)!=len(axis_ids)+1:
+ raise Exception, "latitude_vertices's rank does not match number of axes passed via axis_ids +1 (for vertices)"
## print 'latitude_vert type:',latitude_vertices.dtype.char
if latitude_vertices.dtype.char!=type:
latitude_vertices = latitude_vertices.astype(type)
@@ -136,13 +139,9 @@ def grid(axis_ids,latitude=None,longitude=None,latitude_vertices=None,longitude_
raise Exception,"you passed nvertices as: %i, but from your latitude_vertices it seems to be: %i" % (nvertices,nvert)
if longitude_vertices is not None:
- if not isinstance(longitude_vertices,numpy.ndarray):
- try:
- longitude_vertices = numpy.ascontiguousarray(longitude_vertices.filled())
- except:
- raise Exception, "Error could not convert longitude_vertices to a numpy array"
- if numpy.rank(longitude_vertices)!=len(axis_ids)+1:
- raise Exception, "longitude_vertices's rank does not match number of axes passed via axis_ids +1 (for vertices)"
+ longitude_vertices = _to_numpy(longitude_vertices, 'longitude_vertices')
+ if numpy.rank(longitude_vertices)!=len(axis_ids)+1:
+ raise Exception, "longitude_vertices's rank does not match number of axes passed via axis_ids +1 (for vertices)"
## print 'longitude_vert type:',longitude_vertices.dtype.char
if longitude_vertices.dtype.char!=type:
longitude_vertices = longitude_vertices.astype(type)
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 04c0901..5d22d1e 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -1,3 +1,6 @@
+2010-11-11 : updated pywrapper from Jamie
+2010-11-11 : new examples into Makefile for Python
+2010-11-11 : added a flag that says need to cal cmor_grid on some axis (site and location)
2010-11-05 : new doc updated by Karl.
2010-11-05 : removed option, for now, to create non-standard calendars because the dates in filenames would be wrong.
2010-11-05 : file_name=True ignored in python if no var_id is passed to it as well.
diff --git a/Test/_cmor_stub.py b/Test/_cmor_stub.py
new file mode 100644
index 0000000..011796a
--- /dev/null
+++ b/Test/_cmor_stub.py
@@ -0,0 +1,7 @@
+'''stub implementation of the C functions'''
+
+def grid(*args):
+ return args
+
+def getCMOR_defaults_include(attr):
+ return attr
diff --git a/Test/test_compression.py b/Test/test_compression.py
index af9a1e9..b48efe5 100644
--- a/Test/test_compression.py
+++ b/Test/test_compression.py
@@ -26,7 +26,10 @@ cmor.dataset(
calendar = "standard",
contact="Tim Lincecum",
institute_id="PCMDI",
- model_id="GICCM1",forcing="Nat",parent_experiment_id="N/A",branch_time=0.)
+ model_id="GICCM1",forcing="Nat",
+ parent_experiment_id="N/A",
+ parent_experiment_rip="N/A",
+ branch_time=0.)
cmor.load_table("Tables/CMIP5_Amon")
diff --git a/Test/test_grid_stub_jamie.py b/Test/test_grid_stub_jamie.py
new file mode 100644
index 0000000..76bbff4
--- /dev/null
+++ b/Test/test_grid_stub_jamie.py
@@ -0,0 +1,164 @@
+'''Tests around pywrapper - need an environment to pick up the stub _cmor implementation'''
+import numpy
+
+import unittest
+from cmor import grid
+
+import _cmor_stub #this should be a stub cmor implementation
+
+class TestGrid(unittest.TestCase):
+
+ def test_pass_only_axis_ids(self):
+ for axis_ids in ([1,2], numpy.array([1,2])):
+ args = grid(axis_ids)
+ self.assert_on_axis_id_args(axis_ids, args)
+ self.assert_on_default_coordinates(args)
+ self.assert_on_default_vertices(args)
+
+ def test_lat_lon_grid(self):
+ axis_ids = [1, 2]
+ for atype in (numpy.array, list, tuple):
+ lats = atype(numpy.arange(2*3).reshape(2,3) + 0.1)
+ lons = atype(numpy.arange(2*3).reshape(2,3) - 0.1)
+ args = grid(axis_ids, latitude = lats, longitude = lons)
+ self.assert_on_axis_id_args(axis_ids, args)
+ self.assert_on_coordiantes(lats, lons, args)
+ self.assert_on_default_vertices(args)
+
+ def test_lat_lon_with_vertices(self):
+ axis_ids = [1, 2]
+ nvert = 4
+ for atype in (numpy.array, list, tuple):
+ lats = atype(numpy.arange(2*3).reshape(2,3) + 0.1)
+ lons = atype(numpy.arange(2*3).reshape(2,3) - 0.1)
+ lat_vert = atype(numpy.arange(2*3*nvert).reshape(2,3,nvert) + 0.5)
+ lon_vert = atype(numpy.arange(2*3*nvert).reshape(2,3,nvert) - 0.5)
+ args = grid(axis_ids,
+ latitude = lats,
+ longitude = lons,
+ latitude_vertices = lat_vert,
+ longitude_vertices = lon_vert)
+ self.assert_on_axis_id_args(axis_ids, args)
+ self.assert_on_coordiantes(lats, lons, args)
+ self.assert_on_vertices(nvert, lat_vert, lon_vert, args)
+
+ def assert_on_axis_id_args(self, axis_ids, args):
+ self.assertEquals(len(axis_ids), args[0])
+ self.assertTrue(((axis_ids) == args[1]).all())
+
+ def assert_on_coordiantes(self, lats, lons, args):
+ self.assertEquals('d', args[2])
+ self.assertTrue((lats == args[3]).all())
+ self.assertTrue((lons == args[4]).all())
+
+ def assert_on_vertices(self, nvert, lat_vert, lon_vert, args):
+ self.assertEquals(nvert, args[5])
+ self.assertTrue((lat_vert == args[6]).all())
+ self.assertTrue((lon_vert == args[7]).all())
+
+ def assert_on_default_coordinates(self, args):
+ self.assertEquals('f', args[2])
+ self.assertEquals(None, args[3])
+ self.assertEquals(None, args[4])
+
+ def assert_on_default_vertices(self, args):
+ self.assertEquals(0, args[5])
+ self.assertEquals(None, args[6])
+ self.assertEquals(None, args[7])
+
+class TestGridCallErrors(unittest.TestCase):
+ def test_error_rank_axis_ids(self):
+ try:
+ grid([[1], [2]])
+ self.fail('should raise exception')
+ except Exception, e:
+ self.assertEquals('error axes list/array must be 1D', str(e))
+
+ def test_error_on_axis_ids(self):
+ bad_axis_ids = ( 0, 'astring')
+ for axis_ids in bad_axis_ids:
+ try:
+ grid(axis_ids)
+ self.fail('should raise exception')
+ except Exception, e:
+ self.assertEquals('Error could not convert axis_ids list to a numpy array',
+ str(e))
+
+ def test_error_latitude_no_longitude(self):
+ try:
+ grid([0], latitude = numpy.arange(2))
+ self.fail('should raise exception')
+ except Exception, e:
+ self.assertEquals("Error could not convert longitude to a numpy array", str(e))
+
+ def test_error_longitude_no_latitude(self):
+ try:
+ grid([0], longitude = numpy.arange(2))
+ self.fail('should raise exception')
+ except Exception, e:
+ self.assertEquals("latitude and longitude must be BOTH an array or None", str(e))
+
+ def test_error_type_lats(self):
+ lons = numpy.arange(2*3).reshape(2,3)
+ for lats in (0, 0.1, 'string', {}):
+ try:
+ grid([0, 11], latitude = lats, longitude = lons)
+ self.fail('should raise exception')
+ except Exception, e:
+ self.assertEquals('Error could not convert latitude to a numpy array', str(e))
+ def test_error_type_lons(self):
+ lats = numpy.arange(2*3).reshape(2,3)
+ for lons in (0, 0.1, 'string', {}):
+ try:
+ grid([0, 1], latitude = lats, longitude = lons)
+ self.fail('should raise exception')
+ except Exception, e:
+ self.assertEquals('Error could not convert longitude to a numpy array', str(e))
+ def test_error_rank_lons(self):
+ axis_ids = [1, 2]
+ lats = numpy.arange(2*3).reshape(2,3)
+ lons = numpy.arange(3)
+ try:
+ grid(axis_ids, latitude = lats, longitude = lons)
+ self.fail('should raise exception')
+ except Exception, e:
+ self.assertEquals("longitude's rank does not match number of axes passed via axis_ids", str(e))
+
+ def test_error_rank_lats(self):
+ axis_ids = [1, 2]
+ lats = numpy.arange(2)
+ lons = numpy.arange(2*3).reshape(2,3)
+ try:
+ grid(axis_ids, latitude = lats, longitude = lons)
+ self.fail('should raise exception')
+ except Exception, e:
+ self.assertEquals("latitude's rank does not match number of axes passed via axis_ids", str(e))
+
+ def test_error_rank_lat_verts(self): # this test may be fragile?
+ axis_ids = [1, 2]
+ lats = numpy.arange(2*3).reshape(2,3)
+ lons = numpy.arange(2*3).reshape(2,3)
+ lat_verts = lats
+ try:
+ grid(axis_ids, latitude = lats, longitude = lons,
+ latitude_vertices = lat_verts)
+ self.fail('should raise exception')
+ except Exception, e:
+ self.assertEquals("latitude_vertices's rank does not match number of axes passed via axis_ids +1 (for vertices)",
+ str(e))
+
+ def test_error_rank_lon_verts(self): # this test may be fragile?
+ axis_ids = [1, 2]
+ lats = numpy.arange(2*3).reshape(2,3)
+ lons = numpy.arange(2*3).reshape(2,3)
+ lon_verts = lons
+ try:
+ grid(axis_ids, latitude = lats, longitude = lons,
+ longitude_vertices = lon_verts)
+ self.fail('should raise exception')
+ except Exception, e:
+ self.assertEquals("longitude_vertices's rank does not match number of axes passed via axis_ids +1 (for vertices)",
+ str(e))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/Test/test_python_appending.py b/Test/test_python_appending.py
index 2f62cac..f23f7b9 100644
--- a/Test/test_python_appending.py
+++ b/Test/test_python_appending.py
@@ -43,7 +43,10 @@ def mywrite(data = None, time_vals = None, append_to = None,cell_bounds=None):
institute_id="PCMDI",
calendar = "standard",
contact="Pablo Sandoval",
- model_id="GICCM1",forcing="Nat",parent_experiment_id="historical",branch_time=3.14159)
+ model_id="GICCM1",forcing="Nat",
+ parent_experiment_id="historical",
+ parent_experiment_rip="r1i3p2",
+ branch_time=3.14159)
cmor.load_table("Tables/CMIP5_Amon")
diff --git a/Test/test_python_jamie.py b/Test/test_python_jamie.py
index d92c624..0215ddd 100644
--- a/Test/test_python_jamie.py
+++ b/Test/test_python_jamie.py
@@ -6,7 +6,9 @@ def path_test():
cmor.dataset('historical', 'ukmo', 'HadCM3', '360_day',model_id='HadCM3',forcing='Nat',
contact="J.T. Snow",
institute_id="PCMDI",
- parent_experiment_id="N/A",branch_time=0)
+ parent_experiment_id="N/A",
+ parent_experiment_rip="N/A",
+ branch_time=0)
table='CMIP5_Amon'
cmor.load_table(table)
diff --git a/Test/test_python_jamie_2.py b/Test/test_python_jamie_2.py
index 6c4c36f..53b25d1 100644
--- a/Test/test_python_jamie_2.py
+++ b/Test/test_python_jamie_2.py
@@ -5,7 +5,10 @@ def multi_call_test():
cmor.dataset('historical', 'ukmo', 'HadCM3', '360_day',
institute_id="PCMDI",
- model_id='HadCM3',contact="Ron Nen",forcing='SO',parent_experiment_id="lgm",branch_time=0.)
+ model_id='HadCM3',contact="Ron Nen",forcing='SO',
+ parent_experiment_id="lgm",
+ parent_experiment_rip="r1i3p2",
+ branch_time=0.)
table='CMIP5_Amon'
cmor.load_table(table)
diff --git a/Test/test_python_jamie_3.py b/Test/test_python_jamie_3.py
index 209912a..0a04416 100644
--- a/Test/test_python_jamie_3.py
+++ b/Test/test_python_jamie_3.py
@@ -12,6 +12,7 @@ def main():
forcing = 'Nat',
model_id = 'HadCM3',
contact="Bleachers 140",
+ parent_experiment_rip="r1i3p2",
parent_experiment_id="lgm",branch_time=0.)
table = 'CMIP5_Amon'
diff --git a/Test/test_python_jamie_4.py b/Test/test_python_jamie_4.py
index 6bfc2d8..8d18995 100644
--- a/Test/test_python_jamie_4.py
+++ b/Test/test_python_jamie_4.py
@@ -10,6 +10,7 @@ def main():
institute_id = 'ukmo',
forcing = 'SO',
model_id = 'HadCM3',contact="Dusty Baker (even though he was a Dodgers",
+ parent_experiment_rip="r1i3p2",
parent_experiment_id="lgm",branch_time=0)
table = 'CMIP5_Amon'
diff --git a/Test/test_python_jamie_6.py b/Test/test_python_jamie_6.py
index 9b04a95..ae31d32 100644
--- a/Test/test_python_jamie_6.py
+++ b/Test/test_python_jamie_6.py
@@ -16,6 +16,7 @@ error_flag = cmor.dataset(
model_id="GICCM1",
institute_id="PCMDI",
forcing="TO",
+ parent_experiment_rip="r1i3p2",
parent_experiment_id="lgm",branch_time=0)
diff --git a/Test/test_python_jamie_7.py b/Test/test_python_jamie_7.py
index 19e2a89..3fca12e 100644
--- a/Test/test_python_jamie_7.py
+++ b/Test/test_python_jamie_7.py
@@ -16,6 +16,7 @@ error_flag = cmor.dataset(
model_id="GICCM1",
institute_id="PCMDI",
forcing="Nat, SO",
+ parent_experiment_rip="r1i3p2",
parent_experiment_id="lgm",branch_time=3.14159)
diff --git a/Test/test_python_joerg_1.py b/Test/test_python_joerg_1.py
index 21b395e..84a4dde 100644
--- a/Test/test_python_joerg_1.py
+++ b/Test/test_python_joerg_1.py
@@ -15,6 +15,7 @@ error_flag = cmor.dataset(
references='Model described by Koder and Tolkien ',
model_id="pcmdi-10a",
forcing="co2",
+ parent_experiment_rip="r1i3p2",
parent_experiment_id="lgm",branch_time=0)
diff --git a/Test/test_python_joerg_2.py b/Test/test_python_joerg_2.py
index f72dd0f..c1545ab 100644
--- a/Test/test_python_joerg_2.py
+++ b/Test/test_python_joerg_2.py
@@ -12,6 +12,7 @@ def test_mode(mode,i,suffix=''):
forcing="TO",
contact="Derek Jeter",
history = 'some global history',
+ parent_experiment_rip="r1i3p2",
parent_experiment_id="lgm",branch_time=0)
table = 'CMIP5_Amon'
@@ -79,5 +80,9 @@ def test_mode(mode,i,suffix=''):
fnm=''
for i in range(5):
print i,fnm
+ if i==0:
+ mode = cmor.CMOR_REPLACE
+ else:
+ mode = cmor.CMOR_APPEND
fnm = test_mode(cmor.CMOR_APPEND,i,fnm)
diff --git a/Test/test_python_joerg_3.py b/Test/test_python_joerg_3.py
index c06412c..4c07fa9 100644
--- a/Test/test_python_joerg_3.py
+++ b/Test/test_python_joerg_3.py
@@ -25,6 +25,7 @@ def prep(mode):
## month_lengths=[30,28,30,30,30,30,30,31,30,31,30,30],
## leap_year=3,
## leap_month=1,
+ parent_experiment_rip="r1i3p2",
parent_experiment_id="N/A",branch_time=1)
def prep_var(var,units):
diff --git a/Test/test_python_joerg_4.py b/Test/test_python_joerg_4.py
index d01f1ae..656b90e 100644
--- a/Test/test_python_joerg_4.py
+++ b/Test/test_python_joerg_4.py
@@ -16,6 +16,7 @@ error_flag = cmor.dataset(
model_id="GICCM1",
institute_id="PCMDI",
forcing="Nat, SO",
+ parent_experiment_rip="r1i3p2",
parent_experiment_id="lgm",branch_time=3.14159)
diff --git a/Test/test_python_joerg_5.py b/Test/test_python_joerg_5.py
index 47bc238..7668aba 100644
--- a/Test/test_python_joerg_5.py
+++ b/Test/test_python_joerg_5.py
@@ -16,6 +16,7 @@ error_flag = cmor.dataset(
model_id="GICCM1",
institute_id="PCMDI",
forcing="Nat, SO",
+ parent_experiment_rip="r1i3p2",
parent_experiment_id="lgm",branch_time=3.14159)
diff --git a/Test/test_python_memory_check.py b/Test/test_python_memory_check.py
index bdbe74d..6636bb0 100644
--- a/Test/test_python_memory_check.py
+++ b/Test/test_python_memory_check.py
@@ -65,6 +65,7 @@ def memory_check():
cmor.dataset('historical', 'ukmo', 'HadCM3', '360_day',
institute_id="PCMDI",
+ parent_experiment_rip="r1i3p2",
model_id='HadCM3',forcing='TO',parent_experiment_id="lgm",branch_time=0.,contact="Willie Mays")
table='CMIP5_Amon'
diff --git a/Test/test_python_new_tables.py b/Test/test_python_new_tables.py
index e924633..ced04ba 100644
--- a/Test/test_python_new_tables.py
+++ b/Test/test_python_new_tables.py
@@ -14,7 +14,10 @@ cmor.dataset(
institute_id="PCMDI",
calendar = "standard",
contact="Bengie Molina",
- model_id="GICCM1",forcing="SO",parent_experiment_id="historical",branch_time=0.)
+ model_id="GICCM1",forcing="SO",
+ parent_experiment_id="historical",
+ parent_experiment_rip="r3i8p1",
+ branch_time=0.)
cmor.load_table("Tables/CMIP5_Amon")
diff --git a/Test/test_python_open_close_cmor_multiple.py b/Test/test_python_open_close_cmor_multiple.py
index 7891bbc..3007873 100644
--- a/Test/test_python_open_close_cmor_multiple.py
+++ b/Test/test_python_open_close_cmor_multiple.py
@@ -25,6 +25,7 @@ cmor.setup(inpath='.',netcdf_file_action=cmor.CMOR_REPLACE)
cmor.dataset('historical', 'ukmo', 'HadCM3', 'gregorian',
model_id='HadCM3',outpath='Test',forcing='TO, Nat',
institute_id="PCMDI",
+ parent_experiment_rip="r1i3p2",
contact="Matt Cain",parent_experiment_id="lgm",branch_time=0)
table='TestTables/CMIP5_Amon'
cmor.load_table(table)
diff --git a/Test/test_python_region.py b/Test/test_python_region.py
index 55007c7..c817a59 100644
--- a/Test/test_python_region.py
+++ b/Test/test_python_region.py
@@ -6,6 +6,7 @@ cmor.setup("Test",netcdf_file_action=cmor.CMOR_REPLACE)
cmor.dataset('historical', 'ukmo', 'HadCM3', '360_day',
institute_id="PCMDI",
+ parent_experiment_rip="r1i3p2",
contact="Mark Teixera",model_id='HadCM3',forcing="SO",parent_experiment_id="N/A",branch_time=0.)
cmor.load_table("Tables/CMIP5_Omon")
diff --git a/Test/test_python_user_interface_00.py b/Test/test_python_user_interface_00.py
index 3306f6c..32ca102 100644
--- a/Test/test_python_user_interface_00.py
+++ b/Test/test_python_user_interface_00.py
@@ -32,7 +32,9 @@ cmor.dataset(
model_id="GICCM1",
forcing="TO",
institute_id="PCMDI",
- parent_experiment_id="N/A",branch_time=0)
+ parent_experiment_id="N/A",
+ parent_experiment_rip="N/A",
+ branch_time=0)
tables=[]
a = cmor.load_table(os.path.join(ipth,"../Tables/CMIP5_Omon"))
diff --git a/Test/test_python_user_interface_01.py b/Test/test_python_user_interface_01.py
index 24fa34f..7eaa222 100644
--- a/Test/test_python_user_interface_01.py
+++ b/Test/test_python_user_interface_01.py
@@ -33,7 +33,9 @@ cmor.dataset(
model_id="GICCM1",
forcing="Ant, Nat",
institute_id="pcmdi",
- parent_experiment_id="piControl",branch_time=18336.33)
+ parent_experiment_id="piControl",
+ parent_experiment_rip="r1i1p1",
+ branch_time=18336.33)
tables=[]
a = cmor.load_table("Tables/CMIP5_grids")
diff --git a/Test/test_python_user_interface_03.py b/Test/test_python_user_interface_03.py
index 51b3250..6debe7f 100644
--- a/Test/test_python_user_interface_03.py
+++ b/Test/test_python_user_interface_03.py
@@ -71,7 +71,10 @@ def prep_cmor():
leap_year=0,
leap_month=0,
institute_id="PCMDI",
- month_lengths=None,model_id="GICCM1",forcing="Nat",parent_experiment_id="N/A",branch_time=0.)
+ month_lengths=None,model_id="GICCM1",forcing="Nat",
+ parent_experiment_id="N/A",
+ parent_experiment_rip="N/A",
+ branch_time=0.)
tables=[]
a = cmor.load_table("Tables/CMIP5_Omon")
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cmor.git
More information about the debian-science-commits
mailing list