Index: codes/icosagcm/devel/Python/test/py/DCMIP2008c5.py
===================================================================
--- codes/icosagcm/devel/Python/test/py/DCMIP2008c5.py	(revision 719)
+++ codes/icosagcm/devel/Python/test/py/DCMIP2008c5.py	(revision 747)
@@ -136,8 +136,7 @@
 plt.savefig('fig_DCMIP2008c5/Ai.png'); plt.close()
 
-
-if False: # time stepping in Python
+if False: # time stepping in Python => set precision to np_num
     caldyn = unst.Caldyn_HPE(caldyn_thermo,caldyn_eta, mesh,thermo,params,params.g)
-    scheme = time_step.ARK2(caldyn.bwd_fast_slow, dt, a32=0.7)
+    scheme = time_step.ARK2(caldyn.bwd_fast_slow, dt, precision=unst.np_num, a32=0.7)
     def next_flow(m,S,u): 
         m,S,u = scheme.advance((m,S,u),nt)
@@ -179,4 +178,7 @@
 z, vol = mesh.field_mass(), mesh.field_mass()
 m,S,u,Phi,W = flow0 
+
+print 'types of m,S,u :', m.dtype, S.dtype, u.dtype
+
 caldyn_step.geopot[:,0]=Phi[:,0]
 plots(0)
Index: codes/icosagcm/devel/Python/test/py/NH_3D_bubble.py
===================================================================
--- codes/icosagcm/devel/Python/test/py/NH_3D_bubble.py	(revision 719)
+++ codes/icosagcm/devel/Python/test/py/NH_3D_bubble.py	(revision 747)
@@ -4,4 +4,5 @@
 from dynamico import DCMIP
 from dynamico import meshes
+from dynamico import precision as prec
 from dynamico.meshes import Cartesian_mesh as Mesh
 import math as math
@@ -51,5 +52,5 @@
     params.rho_bot = 1e6/gas_bot.v
     
-    return thermo, mesh, params, (mass_ik,Sik,ujk,Phi_il,Wil), gas
+    return thermo, mesh, params, prec.asnum([mass_ik,Sik,ujk,Phi_il,Wil]), gas
 
 #Lx, nx, llm, thetac, T, Nslice, courant = 2000., 100, 50, 30., 5., 10, 2.8
@@ -63,4 +64,5 @@
 # compute hybrid coefs from initial distribution of mass
 mass_bl,mass_dak,mass_dbk = meshes.compute_hybrid_coefs(flow0[0])
+print 'Type of mass_bl, mass_dak, mass_dbk : ', [x.dtype for x in mass_bl, mass_dak, mass_dbk]
 unst.ker.dynamico_init_hybrid(mass_bl,mass_dak,mass_dbk)
 
Index: codes/icosagcm/devel/Python/test/py/RSW_2D.py
===================================================================
--- codes/icosagcm/devel/Python/test/py/RSW_2D.py	(revision 719)
+++ codes/icosagcm/devel/Python/test/py/RSW_2D.py	(revision 747)
@@ -18,7 +18,7 @@
 
 x1,x2,yy = mesh.xx[:,:,0]-1., mesh.xx[:,:,0]+1., mesh.yy[:,:,0]
-h0 = 1+0.1*(np.exp(-2.*(x1*x1+yy*yy))+
+h0, u0 = mesh.field_mass(), mesh.field_u()  # flow initally at rest
+h0[:] = 1+0.1*(np.exp(-2.*(x1*x1+yy*yy))+
             np.exp(-2.*(x2*x2+yy*yy)))
-u0 = mesh.field_u()  # flow initally at rest
 flow0=(h0,u0)
 
@@ -32,7 +32,10 @@
 scheme = time_step.ARK2(caldyn.bwd_fast_slow, dt)
 
+print 'types : yy, u0, h0, u0', yy.dtype, u0.dtype, h0.dtype, u0.dtype
+
 flow=flow0
 for i in range(10):
     h,u=flow
+    print 'types : h,u', h.dtype, u.dtype
     caldyn.bwd_fast_slow(flow, 0.)
     plt.figure(); plt.pcolor(mesh.x,mesh.y,caldyn.qv)
@@ -48,4 +51,6 @@
         unst.elapsed=0.
         flow = scheme.advance(flow,N)
+        h,u=flow
+        print 'types : h,u', h.dtype, u.dtype
         # flops
         # mass flux : 1add+1mul per edge          =>  4
Index: codes/icosagcm/devel/Python/test/py/RSW_2D_mesh.py
===================================================================
--- codes/icosagcm/devel/Python/test/py/RSW_2D_mesh.py	(revision 719)
+++ codes/icosagcm/devel/Python/test/py/RSW_2D_mesh.py	(revision 747)
@@ -45,5 +45,5 @@
 dx,dy=Lx/nx,Ly/ny
 
-filename, llm, nqdyn, g, f, radius = 'cart128.nc', 1, 1, 1., 1., 1.
+filename, llm, nqdyn, g, f, radius = 'cart128.nc', 1, 1, 1., 1., None
 unst.setvar('g',g)
 
@@ -64,8 +64,8 @@
 
 x1,x2,yy = xx-1., xx+1., yy
+u0 = mesh.field_u()  # flow initally at rest
 h0 = 1+0.1*(np.exp(-2.*(x1*x1+yy*yy))+
             np.exp(-2.*(x2*x2+yy*yy)))
-u0 = mesh.field_u()  # flow initally at rest
-flow0=(h0,u0)
+flow0=meshes.asnum([h0,u0])
 
 #print('h0 : ', h0[1234]-1.)
@@ -79,5 +79,6 @@
 dt=T/N
 print N,dt,Lx/nx
-scheme = time_step.ARK2(caldyn.bwd_fast_slow, dt)
+#scheme = time_step.ARK2(caldyn.bwd_fast_slow, dt, precision=unst.np_num)
+scheme = time_step.RK4(caldyn.bwd_fast_slow, dt, precision=unst.np_num)
 
 flow=flow0
@@ -90,5 +91,5 @@
 for i in range(10):
     h,u=flow
-    flow, fast, slow = caldyn.bwd_fast_slow(flow, 0.)
+    flow, fast, slow = caldyn.bwd_fast_slow(flow, unst.zero_num)
     junk, du_fast = fast
     dh, du_slow = slow
@@ -102,5 +103,6 @@
     plt.figure(); plt.pcolor(x,y,reshape(caldyn.qv))
     plt.colorbar(); plt.title('potential vorticity')
-    plt.savefig('fig_RSW_2D_mesh/%02d.png'%i)
+    plt.savefig('fig_RSW_2D_mesh/%03d.png'%i)
+    plt.close()
 #    plt.figure(); plt.pcolor(mesh.x,mesh.y,h)
 #    plt.colorbar(); plt.title('h')
@@ -112,4 +114,5 @@
         unst.elapsed=0.
         flow = scheme.advance(flow,N)
+#        flow = scheme.advance(flow,5)
         # flops
         # mass flux : 1add+1mul per edge          =>  4
Index: codes/icosagcm/devel/Python/test/py/RSW_MPAS_W02.py
===================================================================
--- codes/icosagcm/devel/Python/test/py/RSW_MPAS_W02.py	(revision 719)
+++ codes/icosagcm/devel/Python/test/py/RSW_MPAS_W02.py	(revision 747)
@@ -1,4 +1,5 @@
 print 'Loading DYNAMICO modules ...'
 from dynamico import unstructured as unst
+from dynamico.precision import asnum
 from dynamico.meshes import MPAS_Format, Unstructured_Mesh
 from dynamico import time_step
@@ -34,5 +35,5 @@
 dt = T/nt
 #scheme = time_step.RKn_simple(1,caldyn.bwd_fast_slow, dt)
-scheme = time_step.RK4(caldyn.bwd_fast_slow, dt)
+scheme = time_step.RK4(caldyn.bwd_fast_slow, dt, precision=unst.np_num)
     
 print dx, dt, dt*c0/dx
@@ -61,5 +62,7 @@
 fu_perp = mesh.ucov2D(0.*ulon,2*Omega*np.sin(mesh.lat_e)*ulon)
 
-flow = (Phi0,mesh.ucov2D(ulon,0.*ulon))
+flow = asnum([Phi0, mesh.ucov2D(ulon,0.*ulon)])
+print 'type of Phi0,u0 : ', flow[0].dtype, flow[1].dtype
+
 for i in range(N):
     h,u=flow
Index: codes/icosagcm/devel/Python/test/py/bubble.py
===================================================================
--- codes/icosagcm/devel/Python/test/py/bubble.py	(revision 719)
+++ codes/icosagcm/devel/Python/test/py/bubble.py	(revision 747)
@@ -1,7 +1,2 @@
-import math as math
-import numpy as np
-import matplotlib.pyplot as plt
-import matplotlib.animation as manimation
-
 from dynamico.meshes import Cartesian_mesh as Mesh
 import dynamico.dyn as dyn
@@ -10,4 +5,10 @@
 import dynamico.advect as advect
 from dynamico import unstructured as unst
+
+import math as math
+import numpy as np
+import matplotlib.pyplot as plt
+import matplotlib.animation as manimation
+
 
 def reldiff(a,b):
Index: codes/icosagcm/devel/Python/test/py/slice_GW_NH.py
===================================================================
--- codes/icosagcm/devel/Python/test/py/slice_GW_NH.py	(revision 719)
+++ codes/icosagcm/devel/Python/test/py/slice_GW_NH.py	(revision 747)
@@ -29,5 +29,5 @@
 
     u0=mesh.field_u() 
-    u0[:,range(0,2*nx,2),:] = u*mesh.dx # Doppler shift by u
+    u0[range(0,2*nx,2),:] = u*mesh.dx # Doppler shift by u
     flow0=(m0ik,S0ik,u0,Phi0_il,0*Phi0_il)
 
@@ -81,5 +81,5 @@
         plt.figure(figsize=(12,3))
         ucomp = mesh.ucomp(u)
-        plt.pcolor(xx,zz,ucomp[0,:,:]/dx)
+        plt.pcolor(xx,zz,ucomp[:,:]/dx)
         plt_axes()
         plt.title("u(t = %f s)" % ((i+1)*dt*nt))
Index: codes/icosagcm/devel/Python/test/py/slice_GW_hydro.py
===================================================================
--- codes/icosagcm/devel/Python/test/py/slice_GW_hydro.py	(revision 719)
+++ codes/icosagcm/devel/Python/test/py/slice_GW_hydro.py	(revision 747)
@@ -23,5 +23,5 @@
 
     u0=mesh.field_u()
-    u0[:,range(0,2*nx,2),:] = 100.*mesh.dx # Doppler shift 100 m/s
+    u0[range(0,2*nx,2),:] = 100.*mesh.dx # Doppler shift 100 m/s
     flow0=(m0ik,S0ik,u0)
 
@@ -60,5 +60,5 @@
         plt.figure(figsize=(12,3))
         ucomp = mesh.ucomp(u)
-        plt.pcolor(xx,zz,ucomp[0,:,:]/dx)
+        plt.pcolor(xx,zz,ucomp[:,:]/dx)
         plt.ylim(0,10.)
         plt.colorbar()
