[cmor] 53/190: merging from master

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 5a9e714868416306467108169047276d1b01c615
Merge: 7cc4879 05c9aba
Author: Charles Doutriaux <doutriaux1 at llnl.gov>
Date:   Fri Sep 17 11:31:16 2010 -0700

    merging from master

 Lib/check_CMOR_compliant.py              |   3 +-
 Src/cmor_variables.c                     |   2 +-
 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              |  29 ++++++++
 Test/test_python_joerg_7.py              |  50 ++++++++++++++
 configure                                |  22 +++----
 configure.ac                             |   2 +-
 include/cmor.h                           |   2 +-
 12 files changed, 512 insertions(+), 15 deletions(-)

diff --cc Src/cmor_variables.c
index 9da88d3,dd920ce..006966c
--- a/Src/cmor_variables.c
+++ b/Src/cmor_variables.c
@@@ -733,10 -731,9 +733,10 @@@ int cmor_variable(int *var_id, char *na
    if (refvar.ndims+aint!=lndims) {
      lndims=0;
      /* ok before we panic we check if there is a "dummy" dim */
 -    j=refvar.ndims-ndims+aint;
 +    j=refvar.ndims-olndims+aint;
 +/*     printf("at the start: refvar: %i, ndims: %i, aint: %i, lndims: %i, olndims: %i, j:%i\n",refvar.ndims,ndims,aint,lndims,olndims,j); */
      for (i=0;i<refvar.ndims;i++) {
- /*       printf("ok none matchng # of dims, i: %d, id: %s, value: %lf, lndims is: %d\n",i,cmor_tables[CMOR_TABLE].axes[refvar.dimensions[i]].id,cmor_tables[CMOR_TABLE].axes[refvar.dimensions[i]].value,olndims); */
+       /* printf("ok none matchng # of dims, i: %d, id: %s, value: %lf, lndims is: %d\n",i,cmor_tables[CMOR_TABLE].axes[refvar.dimensions[i]].id,cmor_tables[CMOR_TABLE].axes[refvar.dimensions[i]].value,olndims); */
        if (cmor_tables[CMOR_TABLE].axes[refvar.dimensions[i]].value!=1.e20) {
  	/* ok it could be a dummy but we need to check if the user already defined this dummy dimension or not */
  	l=-1;
diff --cc Test/test_python_joerg_6.py
index 978f9bc,9bca3c0..b301cd9
--- a/Test/test_python_joerg_6.py
+++ b/Test/test_python_joerg_6.py
@@@ -1,41 -1,30 +1,70 @@@
 + ntables(2) = CMIP5_grid,
 +! ntables(1) = CMIP5_Omon,
 +! the index i runs through a number of variables
 +
 +      call cmor_set_table(table_id=ntables(2))
 +       axes(1) = cmor_axis(                            &
 +         table_entry        = 'i_index',               &
 +         length             = nlon,                    &
 +         coord_vals         = xii,                     &
 +         units              = '1')
 +
 +       axes(2) = cmor_axis(                            &
 +         table_entry        = 'j_index',               &
 +         length             = nlat,                    &
 +         coord_vals         = yii,                     &
 +         units              = '1')
 +
 +       grid_id = cmor_grid(                            &
 +         axis_ids           = axes,                    &
 +         latitude           = olat_val,                &
 +         longitude          = olon_val,                &
 +         latitude_vertices  = bnds_olat,               &
 +         longitude_vertices = bnds_olon)
 +
 +       call cmor_set_table(table_id=ntables(1))
 +
 +        var_ids              = cmor_variable(           &
 +          table_entry        = vartabin(1,i),           & ! epc100
 +          units              = vartabin(2,i),           & ! mol m-2 s-1
 +          positive           = vartabin(3,i),           & ! down
 +          axis_ids           = (/ tim_id, grid_id /),   &
 +          missing_value      = miss_val(i) )
 +
 +        error_flag = cmor_write(                        &
 +           var_id            = var_ids,                 &
 +           data              = ar5all2d(:,:,:,i),       &
 +           ntimes_passed     = ntim,                    &
 +           file_suffix       = SUFFIX,                  &
 +           time_vals         = time,                    &
 +           time_bnds         = bnds_time)
+ 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()  
  

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