Changeset 790 for codes/icosagcm/devel/Python/dynamico
- Timestamp:
- 12/03/18 17:58:11 (6 years ago)
- Location:
- codes/icosagcm/devel/Python/dynamico
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/devel/Python/dynamico/wrap.py
r747 r790 1 1 #------------------- wrap C/Fortran routines -------------------# 2 2 import getargs 3 3 import numpy as np 4 4 from ctypes import * … … 55 55 name = prefix+name 56 56 soname = self.prefix_so+name 57 print 'wrap.Sharedlib : importing', soname57 if verbose : print 'wrap.Sharedlib : importing', soname 58 58 self.vardict[self.prefix_py+name] = Wrap(self.lib[soname], self.check_args, proto) 59 59 def addvars(self,*types_and_names): … … 72 72 for name,val in zip(names,vals): 73 73 self.vars[name].value=val 74 75 args = getargs.parse() 76 verbose = 'wrap' in args.debug -
codes/icosagcm/devel/Python/dynamico/xios.py
r787 r790 1 from __future__ import print_function 1 2 import numpy as np 2 3 import cxios … … 4 5 from dynamico.meshes import radian 5 6 from mpi4py import MPI 7 8 import getargs 9 args=getargs.parse() 10 verbose = 'xios' in args.debug 6 11 7 12 #----------------------------------------------------------------------------- … … 13 18 return self 14 19 def __exit__(self, type, value, traceback): 15 print 'xios_finalize()'20 print('xios_finalize()') 16 21 cxios.finalize() 17 22 def min(self,data): return self.comm.allreduce(data, op=MPI.MIN) … … 20 25 class Context: 21 26 def __enter__(self): 22 print 'cxios.context_close_definition()'27 print('cxios.context_close_definition()') 23 28 cxios.context_close_definition() 24 29 return self 25 30 def __exit__(self, type, value, traceback): 26 print 'xios_context_finalize()'31 print('xios_context_finalize()') 27 32 cxios.context_finalize() 28 33 def init_llm(self, mesh, nqtot): … … 62 67 def setup_curvilinear(cat,id,nx,ny,own,i_index,j_index,lon,lat): 63 68 mesh = cxios.Handle(cat,id) 64 def log(name,data) : print 'setup_curvilinear : %s shape min max'%name, data.shape, data.min(), data.max() 69 def log(name,data) : 70 if verbose : print('setup_curvilinear : %s shape min max'%name, data.shape, data.min(), data.max() ) 65 71 i_index, j_index, lon, lat = [ x[own] for x in i_index, j_index, lon, lat ] 66 72 log('i_index',i_index)
Note: See TracChangeset
for help on using the changeset viewer.