Index: codes/icosagcm/devel/Python/test/py/RSW_2D_mesh.py
===================================================================
--- codes/icosagcm/devel/Python/test/py/RSW_2D_mesh.py	(revision 758)
+++ codes/icosagcm/devel/Python/test/py/RSW_2D_mesh.py	(revision 759)
@@ -15,5 +15,5 @@
 dx,dy=Lx/nx,Ly/ny
 
-filename, llm, nqdyn, g, f, radius = 'cart_128.nc', 1, 1, 1., 1., None
+filename, llm, nqdyn, g, f, radius = 'cart_%03d_%03d.nc'%(nx,ny), 1, 1, 1., 1., None
 unst.setvar('g',g)
 
@@ -27,6 +27,7 @@
 caldyn = unst.Caldyn_RSW(mesh)
 
-xx = (mesh.lat_i-nx/2.)*dx
-yy = (mesh.lon_i-ny/2.)*dy
+#xx = (mesh.lat_i-nx/2.)*dx
+#yy = (mesh.lon_i-ny/2.)*dy
+xx,yy = mesh.lat_i, mesh.lon_i
 
 x1,x2,yy = xx-1., xx+1., yy
Index: codes/icosagcm/devel/Python/test/py/test_xios.py
===================================================================
--- codes/icosagcm/devel/Python/test/py/test_xios.py	(revision 758)
+++ codes/icosagcm/devel/Python/test/py/test_xios.py	(revision 759)
@@ -28,5 +28,5 @@
 #--------------------------------- write some data ----------------------------------------
 
-context=xios.XIOS_Context(pmesh,mesh,nqtot, 3600)
+context=xios.XIOS_Context_Unstructured(pmesh,mesh,nqtot, 3600)
 
 lat_i = radian*mesh.lat_i
Index: codes/icosagcm/devel/Python/test/py/test_xios_cartesian.py
===================================================================
--- codes/icosagcm/devel/Python/test/py/test_xios_cartesian.py	(revision 759)
+++ codes/icosagcm/devel/Python/test/py/test_xios_cartesian.py	(revision 759)
@@ -0,0 +1,57 @@
+from dynamico import cxios
+from dynamico import xios
+from dynamico import unstructured as unst
+from dynamico import meshes
+ker=unst.ker
+
+from mpi4py import MPI
+comm = MPI.COMM_WORLD
+mpi_rank, mpi_size = comm.Get_rank(), comm.Get_size()
+print '%d/%d starting'%(mpi_rank,mpi_size)
+
+import numpy as np
+
+nqdyn,nqtot,llm = 1,1,4
+
+if False:
+    nx,ny,llm = 64,64
+    Lx,Ly,f = 1.,1.,1.
+    mesh = meshes.Cartesian_Mesh(nx,ny,llm,nqdyn,Lx,Ly,f)
+else:
+    filename, g, f, radius = 'cart_128_128.nc', 1., 1., None
+    filename = 'cart_004_004.nc'
+    unst.setvar('g',g)
+    print 'Reading Cartesian mesh ...'
+    def coriolis(lon,lat):
+        return f+0.*lon
+    meshfile = meshes.DYNAMICO_Format(filename)
+    nx,ny=meshfile.nx,meshfile.ny
+
+    pmesh = meshes.Unstructured_PMesh(comm,meshfile)
+    mesh = meshes.Local_Mesh(pmesh, llm, nqdyn, radius, coriolis)
+
+#--------------------------------- write some data ----------------------------------------
+
+context=xios.XIOS_Context_Curvilinear(mesh,nqtot, 3600)
+#lon_i,lat_i = mesh.xx[:,:,0].flatten(), mesh.yy[:,:,0].flatten()
+lon_i,lat_i = mesh.lon_i, mesh.lat_i
+lat_ik, junk  = np.meshgrid(lat_i, np.arange(llm), indexing='ij')
+
+no_error=True
+try:
+    for i in range(3):
+        context.update_calendar(i)
+        print 'send_field', i, lat_ik.shape
+        context.send_field_primal('ps', lat_i)
+        context.send_field_primal('theta', lat_ik)
+except:
+    print 'An error has occured, trying to close XIOS properly'
+    no_error=False
+
+print 'xios.context_finalize()'
+context.finalize()
+print 'xios.finalize()'
+xios.finalize()
+print 'Done'
+
+if not no_error : raise
Index: codes/icosagcm/devel/Python/test/python.sh
===================================================================
--- codes/icosagcm/devel/Python/test/python.sh	(revision 758)
+++ codes/icosagcm/devel/Python/test/python.sh	(revision 759)
@@ -8,4 +8,10 @@
 {
     LD_PRELOAD=$PYTHON_PRELOAD python -u $*
+}
+
+function cmd_gdb()
+{
+    set -x
+    LD_PRELOAD=$PYTHON_PRELOAD gdb --args python -u $*
 }
 
Index: codes/icosagcm/devel/Python/test/xml/filedef_simple.xml
===================================================================
--- codes/icosagcm/devel/Python/test/xml/filedef_simple.xml	(revision 758)
+++ codes/icosagcm/devel/Python/test/xml/filedef_simple.xml	(revision 759)
@@ -44,6 +44,5 @@
     <variable name="time_frequency" type="string" > 24h </variable>    
 
-  </file>
--->
+  </file> -->
 
 </file_definition>
Index: codes/icosagcm/devel/Python/test/xml/link.sh
===================================================================
--- codes/icosagcm/devel/Python/test/xml/link.sh	(revision 758)
+++ codes/icosagcm/devel/Python/test/xml/link.sh	(revision 759)
@@ -7,5 +7,5 @@
 	ln -s xml/${name}_$1.xml ${name}.xml
     done
-    ln -s iodef.xml
+    ln -s xml/iodef.xml
 }
 
