Ignore:
Timestamp:
15/11/16 09:14:41 (3 years ago)
Author:
mjuckes
Message:

Updated setup for tag 01.beta.42

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMIP6dreq/trunk/dreqPy/examples/ex203.py

    r830 r863  
    1212    print ( 'Specified directory does not exist: %s' % sys.argv[1] ) 
    1313    sys.exit(0) 
    14 else: 
    15   from dreqPy import scope 
    16  
    17 sc = scope.dreqQuery() 
    18 print ('DREQ VERSION: %s' % str(sc.dq.version) ) 
    1914 
    2015## set bytes per floating point number to be 2, assuming 50% compression 
     
    2217 
    2318priorityMax = 3 
    24 def runExample( priorityMax ): 
     19def runExample( sc, priorityMax ): 
    2520    ll = ['C4MIP','CFMIP','LUMIP'] 
    2621    ee = {} 
     
    4338    print ( 'Combined, tier 1+2 only:  %5.1fTb'  % z2 ) 
    4439 
    45 print ( '######### All variables ###########' ) 
    46 priorityMax = 3 
    47 runExample( priorityMax ) 
    48 print ( '######### Top priority variables ###########' ) 
    49 priorityMax = 1 
    50 runExample( priorityMax ) 
     40def main(scope): 
     41 
     42  sc = scope.dreqQuery() 
     43  print ('DREQ VERSION: %s' % str(sc.dq.version) ) 
     44  print ( '######### All variables ###########' ) 
     45  priorityMax = 3 
     46  runExample( sc, priorityMax ) 
     47  print ( '######### Top priority variables ###########' ) 
     48  priorityMax = 1 
     49  runExample( sc, priorityMax ) 
     50 
     51if __name__ == '__main__': 
     52  main( scope ) 
Note: See TracChangeset for help on using the changeset viewer.