[cmor] 49/190: 2010-08-24 : when writing time only variables, the time_bnds would fail to write if passed at cmor_write time.

Alastair McKinstry mckinstry at moszumanska.debian.org
Tue Jul 21 12:54:36 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 f0503b77d626135e8a3f8e894644b92e25e61ad7
Author: Charles Doutriaux <doutriaux1 at llnl.gov>
Date:   Mon Sep 13 10:18:41 2010 -0700

    2010-08-24 : when writing time only variables, the time_bnds would fail to write if passed at cmor_write time.
---
 Lib/check_CMOR_compliant.py              |   3 +-
 Test/test_python_alastair_1.py           |  87 ++++++++++++++++++++++++
 Test/test_python_cfmip_site_axis_test.py | 104 +++++++++++++++++++++++++++++
 Test/test_python_jamie_8.py              | 109 +++++++++++++++++++++++++++++++
 Test/test_python_joerg_4.py              |  86 ++++++++++++++++++++++++
 Test/test_python_joerg_5.py              |  31 +++++++++
 Test/test_python_joerg_6.py              |  30 +++++++++
 Test/test_python_joerg_7.py              |  50 ++++++++++++++
 configure                                |  22 +++----
 configure.ac                             |   2 +-
 include/cmor.h                           |   2 +-
 include/cmor_locale.h                    |   4 ++
 12 files changed, 516 insertions(+), 14 deletions(-)

diff --git a/Lib/check_CMOR_compliant.py b/Lib/check_CMOR_compliant.py
index 959f5cc..f8052be 100644
--- a/Lib/check_CMOR_compliant.py
+++ b/Lib/check_CMOR_compliant.py
@@ -320,7 +320,8 @@ def checkCMOR(fout,file,table,noerror=cmor.CMOR_CRITICAL,variable=None,from_boun
                 nwarn+=manageLog(fout,cmor.CMOR_WARNING,"You are using cmor version: %i.%i.%i, these files have been written with version: %i.%i.%i, you should consider rewriting these files" % (cmor.CMOR_VERSION_MAJOR,cmor.CMOR_VERSION_MINOR,cmor.CMOR_VERSION_PATCH,fmajor,minor,patch))
                 
         ## 32bit systems only
-        if os.uname()[-1].find("64")==-1:
+        ## if os.uname()[-1].find("64")==-1: # old way would fail on some system
+        if int(platform.architecture()[0].replace('bit', '')) < 64
             sz=os.path.getsize(fnm)
             manageLog(fout,VERBOSE, 'Checking file size (32bit systems only):',sz)
             if sz>2**31:
diff --git a/Test/test_python_alastair_1.py b/Test/test_python_alastair_1.py
new file mode 100644
index 0000000..2dcac5e
--- /dev/null
+++ b/Test/test_python_alastair_1.py
@@ -0,0 +1,87 @@
+import cmor,numpy
+
+error_flag = cmor.setup(inpath='Test', netcdf_file_action=cmor.CMOR_REPLACE)
+  
+error_flag = cmor.dataset(                                   
+       outpath='Test',                                         
+       experiment_id='noVolc2000',
+       institution= 'GICC (Generic International Climate Center, Geneva, Switzerland)',                                 
+       source='GICCM1 (2002): ',
+       calendar='360_day',                                      
+       realization=1,                                          
+       contact = 'Rusty Koder (koder at middle_earth.net) ',      
+       history='Output from archivcl_A1.nce/giccm_03_std_2xCO2_2256.', 
+       comment='Equilibrium reached after 30-year spin-up ',                                 
+       references='Model described by Koder and Tolkien ',
+       model_id="GICCM1", 
+       institute_id="PCMDI",
+       forcing="Nat, SO",
+       parent_experiment_id="lgm",branch_time=3.14159)
+  
+
+# creates 1 degree grid
+nlat=18
+nlon=36
+alats = numpy.arange(180)-89.5
+bnds_lat = numpy.arange(181)-90
+alons=numpy.arange(360)+.5
+bnds_lon=numpy.arange(361)
+cmor.load_table("Tables/CMIP5_Amon")
+ilat = cmor.axis(  
+    table_entry='latitude',       
+    units='degrees_north',          
+    length=nlat,                   
+    coord_vals=alats,              
+    cell_bounds=bnds_lat)        
+
+ilon = cmor.axis(  
+    table_entry='longitude',      
+    length=nlon,                   
+    units='degrees_east',         
+    coord_vals=alons,             
+    cell_bounds=bnds_lon)      
+
+ntimes=12
+plevs = numpy.array([100000., 92500, 85000, 70000, 60000, 50000, 40000, 30000, 25000,
+   20000, 15000, 10000, 7000, 5000, 3000, 2000, 1000, 999, 998, 997, 996,
+   995, 994])
+
+
+itim = cmor.axis(  
+    table_entry='time',           
+    units='months since 2030-1-1',  
+    length=ntimes,                
+    interval='1 month')
+
+ilev = cmor.axis(  
+        table_entry='plevs',       
+        units='Pa',
+        coord_vals=plevs,             
+        cell_bounds=None)
+    
+
+var3d_ids = cmor.variable(    
+    table_entry='ta',     
+    units='K',           
+    axis_ids=numpy.array((ilev, ilon, ilat, 1073743064)),
+    missing_value=numpy.array([1.0e28,],dtype=numpy.float32)[0], 
+    original_name='cloud')
+
+
+  
+for it in range(ntimes):
+
+    time = numpy.array((it))
+    bnds_time = numpy.array((it,it+1))
+    data3d = numpy.random.random((len(plevs),nlon,nlat))*30.+265.
+    data3d = data3d.astype('f')
+    error_flag = cmor.write(                                  
+        var_id        = var3d_ids,                        
+        data          = data3d,                              
+        ntimes_passed = 1,                                   
+        time_vals     = time,                                
+        time_bnds     = bnds_time   )
+
+  
+error_flag = cmor.close()  
+
diff --git a/Test/test_python_cfmip_site_axis_test.py b/Test/test_python_cfmip_site_axis_test.py
new file mode 100644
index 0000000..9b11af2
--- /dev/null
+++ b/Test/test_python_cfmip_site_axis_test.py
@@ -0,0 +1,104 @@
+#!/usr/bin/env python
+'''
+Test program for creating a sample CFMIP site axis.
+
+This program assumes that we want the output netcdf header to look something like this (in CDL):
+
+dimensions:
+   site = 119;
+   lev = 38;
+   time = UNLIMITED;
+   bnds = 2;
+variables:
+   float cl(time, site, lev);
+      cl:coordinates = "lat lon";
+      ...
+   double time(time);
+      ...
+   int site(site);    // integer id values for sites
+      ...
+   float lat(site);   // latitude values for sites
+      ...
+   float lon(site);   // longitude values for sites
+      ...
+   float orog(site);  // orography values for sites
+      ...
+   float lev(lev);    // hybrid_height
+      lev:formula = "z(k,m) = a(k) + b(k)*orog(m)";   // m = site index
+      lev:formula_terms = "a: lev b: b orog: orog";
+      ...
+'''
+import cmor
+import numpy
+
+MIP_TABLE_DIR = '/git/cmip5-cmor-tables/Tables'   # set according to your MIP table location
+
+#---------------------------------------------------------------------------------------------------
+def setup_cmor() :
+#---------------------------------------------------------------------------------------------------
+   # Initialise CMOR library
+   cmor.setup(inpath=MIP_TABLE_DIR, netcdf_file_action=cmor.CMOR_REPLACE_3,
+      set_verbosity=cmor.CMOR_NORMAL, create_subdirectories=0)
+
+   # Create CMOR dataset
+   cmor.dataset(outpath='Test', institution='Met Office Hadley Centre', institute_id="MOHC",
+      experiment_id='amip', model_id="HadGEM2-A", source='HadGEM2-A 2009',
+      calendar='360_day', contact='mark.webb at metoffice.gov.uk',
+      realization=1, initialization_method=1, physics_version=1,
+      history='history', comment='CMIP5 site axis test',
+      references='references', forcing="GHG, TO (yeah or some think)",
+      parent_experiment_id='N/A', branch_time=0
+   )
+
+#---------------------------------------------------------------------------------------------------
+if __name__ == '__main__' :
+#---------------------------------------------------------------------------------------------------
+
+   # Initialise CMOR dataset and table
+   setup_cmor()
+   
+   # Set dummy site lats and longs.
+   site_lats = numpy.array([-90.0, 0.0, 90.0], dtype=numpy.float32)
+   site_lons = numpy.array([0.0, 0.0, 0.0], dtype=numpy.float32)
+
+   # Create CMOR axes and grids
+   table_id = cmor.load_table('CMIP5_cfSites')
+   taxis_id = cmor.axis('time1', units='days since 2000-01-01 00:00:00') #, length=1, interval='30 minutes')
+   print 'ok: created time axis'
+
+   saxis_id = cmor.axis('site', units='1', coord_vals=[1,2,3])
+   print 'ok: created site axis',saxis_id
+
+   zaxis_id = cmor.axis('hybrid_height', units='m', coord_vals=[1.0], cell_bounds=[0.0,2.0])
+   print 'ok: created height axis',zaxis_id
+
+   # Create zfactors for b and orog for hybrid height axis.
+   # Where do these get used, if anywhere?
+   bfact_id = cmor.zfactor(zaxis_id, 'b', '1', [zaxis_id], 'd', zfactor_values=[1.0],
+      zfactor_bounds=[0.0,2.0])
+   print 'ok: created b zfactors'
+   ofact_id = cmor.zfactor(zaxis_id, 'orog', 'm', [saxis_id], 'd',
+      zfactor_values=[123.0])
+   print 'ok: created orog zfactors'
+
+   # Create grid object to link site-dimensioned variables to (lat,long).
+   # Need to make CMIP5_grids the current MIP table for this to work.
+   table_id = cmor.load_table('CMIP5_grids')
+   gaxis_id = cmor.grid([saxis_id], site_lats, site_lons)
+   print 'ok: created site grid'
+
+   # Create CMOR variable for cloud area fraction: MIP name = 'cl', STASH = m01s02i261*100
+   table_id = cmor.load_table('CMIP5_cfSites')
+   var_id = cmor.variable('cl', '%', [taxis_id, gaxis_id, zaxis_id], type='f',
+      missing_value=-99.0, original_name='STASH m01s02i261*100')
+   print 'ok: created variable for "cl"'
+
+   # Write some data to this variable. First convert raw data to numpy arrays.
+   shape = (1, 3, 1)
+   data = numpy.array([10, 20, 30], dtype=numpy.float32)
+   data = data.reshape(shape)
+   cmor.write(var_id, data, time_vals=[1.0])
+   print 'ok: wrote variable data'
+
+   # Close CMOR.
+   cmor.close()
diff --git a/Test/test_python_jamie_8.py b/Test/test_python_jamie_8.py
new file mode 100644
index 0000000..77859d9
--- /dev/null
+++ b/Test/test_python_jamie_8.py
@@ -0,0 +1,109 @@
+#!/usr/bin/env python
+
+import cmor
+import numpy
+
+def define_axes(axes):
+    axis_ids = list()
+    for axis in axes:
+        axis_id = cmor.axis(**axis)
+        axis_ids.append(axis_id)
+
+    print 'cmor.axis calls complete'
+    return axis_ids
+
+def define_write_var(axis_ids, entry, unit, values):
+    varid = cmor.variable(entry,
+                          unit,
+                          axis_ids,
+                          missing_value = -99
+                          )
+
+    print 'cmor.variable call complete'
+    
+    cmor.write(varid, values, time_vals = [15.0], time_bnds = [0., 30.0])
+
+    print 'cmor.write call complete'
+
+
+def cmor_ini():
+    cmor.setup(inpath='/git/cmip5-cmor-tables/Tables',
+               netcdf_file_action = cmor.CMOR_REPLACE)
+    cmor.dataset('pre-industrial control', 'mohc', 'HadGEM2: source',
+                 '360_day',
+                 institute_id = 'ukmo',
+                 model_id = 'HadGEM2',
+                 history = 'some global history',
+                 forcing = 'N/A',
+                 parent_experiment_id = 'N/A',
+                 branch_time = 0.,
+                 contact = 'bob')
+
+def define_write_clisccp():
+    cmor.load_table('CMIP5_cfMon')
+    axes = [ {'table_entry': 'time',
+              'units': 'days since 2000-01-01 00:00:00',
+              },
+             {'table_entry': 'latitude',
+              'units': 'degrees_north',
+              'coord_vals': [0],
+              'cell_bounds': [-1, 1]},             
+             {'table_entry': 'longitude',
+              'units': 'degrees_east',
+              'coord_vals': [90],
+              'cell_bounds': [89, 91]},
+             {'table_entry': 'plev7',
+              'coord_vals': [90000., 74000., 62000., 50000., 37500., 24500., 9000.],
+              'cell_bounds': [[100000., 80000.], [80000.,  68000.],  [68000.,  56000.],  [56000.,  44000.],  [44000.,  31000.],  [31000.,  18000.],  [18000.,   0.]],
+              'units': 'Pa',
+              },
+             {'table_entry': 'tau',
+              'coord_vals': [0.15, 0.8, 2.45, 6.5, 16.2, 41.5, 100.],
+              'cell_bounds':[ [0.0,  0.3],  [0.3,  1.3],  [1.3,  3.6],  [3.6,  9.4], [9.4, 23.0], [23.0, 60.0], [60.0, 100000]],
+              'units': '1'}
+             ]
+
+    axis_ids = define_axes(axes)
+
+
+    values = numpy.array([0.0004,]*49, numpy.float32)
+    values = numpy.reshape(values, (1, 1, 1, 7, 7))
+
+    define_write_var(axis_ids, 'clisccp', '1', values)
+
+def define_write_landcoverfrac():
+    cmor.load_table('CMIP5_Lmon')
+    axes = [ {'table_entry': 'time',
+              'units': 'days since 2000-01-01 00:00:00',
+              },
+             {'table_entry': 'latitude',
+              'units': 'degrees_north',
+              'coord_vals': [0],
+              'cell_bounds': [-1, 1]},             
+             {'table_entry': 'longitude',
+              'units': 'degrees_east',
+              'coord_vals': [90],
+              'cell_bounds': [89, 91]},
+             {'table_entry': 'vegtype',
+              'coord_vals': ['landcover'],
+              'units': '1',
+              },
+             ]
+
+    axis_ids = define_axes(axes)
+
+    values = numpy.array([2.], numpy.float32)
+    values = numpy.reshape(values, (1, 1, 1, 1))
+             
+    define_write_var(axis_ids, 'landCoverFrac', '1', values)
+    
+def main():
+
+    cmor_ini()
+    define_write_clisccp()
+    define_write_landcoverfrac()
+    cmor.close()
+    
+if __name__ == '__main__':
+
+    main()
diff --git a/Test/test_python_joerg_4.py b/Test/test_python_joerg_4.py
new file mode 100644
index 0000000..3234683
--- /dev/null
+++ b/Test/test_python_joerg_4.py
@@ -0,0 +1,86 @@
+import cmor,numpy
+
+error_flag = cmor.setup(inpath='Test', netcdf_file_action=cmor.CMOR_REPLACE)
+  
+error_flag = cmor.dataset(                                   
+       outpath='Test',                                         
+       experiment_id='noVolc2000',
+       institution= 'GICC (Generic International Climate Center, Geneva, Switzerland)',                                 
+       source='GICCM1 (2002): ',
+       calendar='360_day',                                      
+       realization=1,                                          
+       contact = 'Rusty Koder (koder at middle_earth.net) ',      
+       history='Output from archivcl_A1.nce/giccm_03_std_2xCO2_2256.', 
+       comment='Equilibrium reached after 30-year spin-up ',                                 
+       references='Model described by Koder and Tolkien ',
+       model_id="GICCM1", 
+       institute_id="PCMDI",
+       forcing="Nat, SO",
+       parent_experiment_id="lgm",branch_time=3.14159)
+  
+
+# creates 1 degree grid
+nlat=18
+nlon=36
+alats = numpy.arange(180)-89.5
+bnds_lat = numpy.arange(181)-90
+alons=numpy.arange(360)+.5
+bnds_lon=numpy.arange(361)
+cmor.load_table("Tables/CMIP5_Omon")
+ilat = cmor.axis(  
+    table_entry='latitude',       
+    units='degrees_north',          
+    length=nlat,                   
+    coord_vals=alats,              
+    cell_bounds=bnds_lat)        
+
+ilon = cmor.axis(  
+    table_entry='longitude',      
+    length=nlon,                   
+    units='degrees_east',         
+    coord_vals=alons,             
+    cell_bounds=bnds_lon)      
+
+ntimes=12
+plevs = numpy.array([-6.0, -17.0, -27.0, -37.0, -47.0, -57.0, -68.0, -82.0, -100.0, -122.0, -150.0, -182.0, -220.0, -262.0, -310.0, -362.0, -420.0, -485.0, -560.0, -645.0, -740.0, -845.0, -960.0, -1085.0, -357.0, -382.0, -407.0, -434.0, -461.0, -490.0, -520.0, -551.0, -584.0, -619.0, -655.0, -693.0, -732.0, -773.0, -816.0, -861.0, -908.0, -957.0, -1009.0, -1063.0, -1119.0, -1178.0, -1240.0, -1304.0, -1372.0, -1442.0, -1516.0, -1594.0, -1675.0, -1760.0, -1849.0, -1942.0, -2039.0, -2140.0, [...]
+
+plevs_bnds = numpy.array([0.0, -11.5, -22.0, -32.0, -42.0, -52.0, -62.5, -75.0, -91.0, -111.0, -136.0, -166.0, -201.0, -241.0, -286.0, -336.0, -391.0, -452.5, -522.5, -602.5, -692.5, -792.5, -902.5, -1022.5, -721.0, -369.5, -394.5, -420.5, -447.5, -475.5, -505.0, -535.5, -567.5, -601.5, -637.0, -674.0, -712.5, -752.5, -794.5, -838.5, -884.5, -932.5, -983.0, -1036.0, -1091.0, -1148.5, -1209.0, -1272.0, -1338.0, -1407.0, -1479.0, -1555.0, -1634.5, -1717.5, -1804.5, -1895.5, -1990.5, -2089. [...]
+
+itim = cmor.axis(  
+    table_entry='time',           
+    units='months since 2030-1-1',  
+    length=ntimes,                
+    interval='1 month')
+
+ilev = cmor.axis(  
+        table_entry='depth_coord',       
+        units='m',
+        coord_vals=plevs,             
+        cell_bounds=plevs_bnds)
+    
+
+var3d_ids = cmor.variable(    
+    table_entry='ta',     
+    units='K',           
+    axis_ids=numpy.array((ilev, ilon, ilat, itim)),
+    missing_value=numpy.array([1.0e28,],dtype=numpy.float32)[0], 
+    original_name='cloud')
+
+
+  
+for it in range(ntimes):
+
+    time = numpy.array((it))
+    bnds_time = numpy.array((it,it+1))
+    data3d = numpy.random.random((len(plevs),nlon,nlat))*30.+265.
+    data3d = data3d.astype('f')
+    error_flag = cmor.write(                                  
+        var_id        = var3d_ids,                        
+        data          = data3d,                              
+        ntimes_passed = 1,                                   
+        time_vals     = time,                                
+        time_bnds     = bnds_time   )
+
+  
+error_flag = cmor.close()  
+
diff --git a/Test/test_python_joerg_5.py b/Test/test_python_joerg_5.py
new file mode 100644
index 0000000..47bc238
--- /dev/null
+++ b/Test/test_python_joerg_5.py
@@ -0,0 +1,31 @@
+import cmor,numpy
+
+error_flag = cmor.setup(inpath='Test', netcdf_file_action=cmor.CMOR_REPLACE)
+  
+error_flag = cmor.dataset(                                   
+       outpath='Test',                                         
+       experiment_id='noVolc2000',
+       institution= 'GICC (Generic International Climate Center, Geneva, Switzerland)',                                 
+       source='GICCM1 (2002): ',
+       calendar='360_day',                                      
+       realization=1,                                          
+       contact = 'Rusty Koder (koder at middle_earth.net) ',      
+       history='Output from archivcl_A1.nce/giccm_03_std_2xCO2_2256.', 
+       comment='Equilibrium reached after 30-year spin-up ',                                 
+       references='Model described by Koder and Tolkien ',
+       model_id="GICCM1", 
+       institute_id="PCMDI",
+       forcing="Nat, SO",
+       parent_experiment_id="lgm",branch_time=3.14159)
+  
+
+# creates 1 degree grid
+nlat=18
+nlon=36
+alats = numpy.arange(180)-89.5
+bnds_lat = numpy.arange(181)-90
+alons=numpy.arange(360)+.5
+bnds_lon=numpy.arange(361)
+cmor.load_table("Tables/CMIP5_cf3hr")
+error_flag = cmor.close()  
+
diff --git a/Test/test_python_joerg_6.py b/Test/test_python_joerg_6.py
new file mode 100644
index 0000000..9bca3c0
--- /dev/null
+++ b/Test/test_python_joerg_6.py
@@ -0,0 +1,30 @@
+import cmor,numpy
+
+error_flag = cmor.setup(inpath='Test', netcdf_file_action=cmor.CMOR_REPLACE)
+  
+error_flag = cmor.dataset(                                   
+       outpath='Test',                                         
+       experiment_id='noVolc2000',
+       institution= 'GICC (Generic International Climate Center, Geneva, Switzerland)',                                 
+       source='GICCM1 (2002): ',
+       calendar='360_day',                                      
+       realization=1,                                          
+       contact = 'Rusty Koder (koder at middle_earth.net) ',      
+       history='Output from archivcl_A1.nce/giccm_03_std_2xCO2_2256.', 
+       comment='Equilibrium reached after 30-year spin-up ',                                 
+       references='Model described by Koder and Tolkien ',
+       model_id="GICCM1", 
+       institute_id="PCMDI",
+       forcing="Nat, SO",
+       parent_experiment_id="lgm",branch_time=3.14159)
+  
+
+cmor.load_table("/git/cmip5-cmor-tables/Tables/CMIP5_Omon")
+itime = cmor.axis(table_entry="time",units='months since 2010',coord_vals=numpy.array([0,1,2,3,4.]),cell_bounds=numpy.array([0,1,2,3,4,5.]))
+ivar = cmor.variable(table_entry="masso",axis_ids=[itime],units='kg')
+
+data=numpy.random.random(5)
+for i in range(0,5):
+    cmor.write(ivar,data[i:i])#,time_vals=numpy.array([i,]),time_bnds=numpy.array([i,i+1]))
+error_flag = cmor.close()  
+
diff --git a/Test/test_python_joerg_7.py b/Test/test_python_joerg_7.py
new file mode 100644
index 0000000..091126e
--- /dev/null
+++ b/Test/test_python_joerg_7.py
@@ -0,0 +1,50 @@
+import cmor,numpy
+
+error_flag = cmor.setup(inpath='Test', netcdf_file_action=cmor.CMOR_REPLACE)
+  
+error_flag = cmor.dataset(                                   
+       outpath='Test',                                         
+       experiment_id='noVolc2000',
+       institution= 'GICC (Generic International Climate Center, Geneva, Switzerland)',                                 
+       source='GICCM1 (2002): ',
+       calendar='360_day',                                      
+       realization=1,                                          
+       contact = 'Rusty Koder (koder at middle_earth.net) ',      
+       history='Output from archivcl_A1.nce/giccm_03_std_2xCO2_2256.', 
+       comment='Equilibrium reached after 30-year spin-up ',                                 
+       references='Model described by Koder and Tolkien ',
+       model_id="GICCM1", 
+       institute_id="PCMDI",
+       forcing="Nat, SO",
+       parent_experiment_id="lgm",branch_time=3.14159)
+  
+
+cmor.load_table("/git/cmip5-cmor-tables/Tables/CMIP5_Omon")
+itime = cmor.axis(table_entry="time",units='months since 2010',coord_vals=numpy.array([0,1,2,3,4.]),cell_bounds=numpy.array([0,1,2,3,4,5.]))
+# creates 1 degree grid
+nlat=18
+nlon=36
+alats = numpy.arange(180)-89.5
+bnds_lat = numpy.arange(181)-90
+alons=numpy.arange(360)+.5
+bnds_lon=numpy.arange(361)
+ilat = cmor.axis(  
+    table_entry='latitude',       
+    units='degrees_north',          
+    length=nlat,                   
+    coord_vals=alats,              
+    cell_bounds=bnds_lat)        
+
+ilon = cmor.axis(  
+    table_entry='longitude',      
+    length=nlon,                   
+    units='degrees_east',         
+    coord_vals=alons,             
+    cell_bounds=bnds_lon)      
+ivar = cmor.variable(table_entry="epc100",axis_ids=[itime,ilat,ilon],units='mol m-2 s-1',positive="up")
+
+data=numpy.random.random((5,nlat,nlon))
+for i in range(0,5):
+    cmor.write(ivar,data[i:i])#,time_vals=numpy.array([i,]),time_bnds=numpy.array([i,i+1]))
+error_flag = cmor.close()  
+
diff --git a/configure b/configure
index d78db44..56c0721 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for cmor 2.2.0.
+# Generated by GNU Autoconf 2.61 for cmor 2.2.1.
 #
 # Report bugs to <doutriaux1 at llnl.gov>.
 #
@@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='cmor'
 PACKAGE_TARNAME='cmor'
-PACKAGE_VERSION='2.2.0'
-PACKAGE_STRING='cmor 2.2.0'
+PACKAGE_VERSION='2.2.1'
+PACKAGE_STRING='cmor 2.2.1'
 PACKAGE_BUGREPORT='doutriaux1 at llnl.gov'
 
 ac_default_prefix=/usr/local/cmor
@@ -1185,7 +1185,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures cmor 2.2.0 to adapt to many kinds of systems.
+\`configure' configures cmor 2.2.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1251,7 +1251,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of cmor 2.2.0:";;
+     short | recursive ) echo "Configuration of cmor 2.2.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1350,7 +1350,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-cmor configure 2.2.0
+cmor configure 2.2.1
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1364,7 +1364,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by cmor $as_me 2.2.0, which was
+It was created by cmor $as_me 2.2.1, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -3741,7 +3741,7 @@ ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
 echo "$ac_fc_v_output" >&5
 FCFLAGS=$ac_save_FFLAGS
 
-rm -f conftest*
+rm -f -r conftest*
 
 # On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
 # /foo, /bar, and /baz are search directories for the Fortran linker.
@@ -3832,7 +3832,7 @@ ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
 echo "$ac_fc_v_output" >&5
 FCFLAGS=$ac_save_FFLAGS
 
-rm -f conftest*
+rm -f -r conftest*
 
 # On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
 # /foo, /bar, and /baz are search directories for the Fortran linker.
@@ -4989,7 +4989,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by cmor $as_me 2.2.0, which was
+This file was extended by cmor $as_me 2.2.1, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -5032,7 +5032,7 @@ Report bugs to <bug-autoconf at gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-cmor config.status 2.2.0
+cmor config.status 2.2.1
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
diff --git a/configure.ac b/configure.ac
index 2bd07fa..07bf233 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl                                                -*- Autoconf -*-
 dnl  Process this file with autoconf to produce a configure script.
 
 dnl AC_PREREQ(2.59)
-AC_INIT(cmor, 2.2.0, doutriaux1 at llnl.gov)
+AC_INIT(cmor, 2.2.1, doutriaux1 at llnl.gov)
 
 GIT_TAG=`./get_git_version.sh`
 
diff --git a/include/cmor.h b/include/cmor.h
index 711e642..c15522f 100644
--- a/include/cmor.h
+++ b/include/cmor.h
@@ -20,7 +20,7 @@
 
 #define CMOR_VERSION_MAJOR 2
 #define CMOR_VERSION_MINOR 2
-#define CMOR_VERSION_PATCH 0
+#define CMOR_VERSION_PATCH 1
 #define CMOR_CF_VERSION_MAJOR 1
 #define CMOR_CF_VERSION_MINOR 4
 
diff --git a/include/cmor_locale.h b/include/cmor_locale.h
new file mode 100644
index 0000000..045a3fe
--- /dev/null
+++ b/include/cmor_locale.h
@@ -0,0 +1,4 @@
+#ifndef _CMOR_LOCALE
+#define _CMOR_LOCALE
+#define CMOR_PREFIX  "/usr/local/cmor"
+#endif

-- 
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