Index: vendors/XMLIO_SERVER/current/src/IOSERVER/mod_interface_ioipsl.f90
===================================================================
--- vendors/XMLIO_SERVER/current/src/IOSERVER/mod_interface_ioipsl.f90	(revision 1897)
+++ vendors/XMLIO_SERVER/current/src/IOSERVER/mod_interface_ioipsl.f90	(revision 2765)
@@ -64,82 +64,86 @@
     
     DO i=1,file_enabled%size
-      CALL sorted_list__new(axis_id)
       
       pt_file_dep=>file_enabled%at(i)%pt
-      pt_file=>pt_file_dep%file
-      
-      pt_grid=>pt_file_dep%grids%at(1)%pt
-      pt_domain=>pt_grid%domain
-      pt_zoom=>pt_file_dep%zooms%at(1)%pt
-!      print *,TRIM(pt_file%name),' ',TRIM(pt_zoom%id)
-!      print*,'Global --->',pt_zoom%ni_glo,pt_zoom%nj_glo,pt_zoom%ibegin_glo,pt_zoom%jbegin_glo
-!      print*,'Local  --->',pt_zoom%ni_loc,pt_zoom%nj_loc,pt_zoom%ibegin_loc,pt_zoom%jbegin_loc
-      
-      IF (pt_zoom%ni_loc*pt_zoom%nj_loc > 0) THEN
-        
-        full_name=TRIM(pt_file%name)
-        IF (pt_file%has_name_suffix) full_name=TRIM(full_name)//TRIM(pt_file%name_suffix) 
-        IF ( (pt_zoom%ni_loc == pt_zoom%ni_glo) .AND. (pt_zoom%nj_loc == pt_zoom%nj_glo) ) THEN 
-
-          CALL histbeg(TRIM(full_name),pt_domain%ni,pt_domain%lon, pt_domain%nj, pt_domain%lat, & 
-                     pt_zoom%ibegin_loc, pt_zoom%ni_loc,pt_zoom%jbegin_loc,pt_zoom%nj_loc,         &
-                     initial_timestep, initial_date, timestep_value,                               &
-                     ioipsl_hori_id, ioipsl_file_id)
-         ELSE                                              
-
-          CALL set_ioipsl_domain_id(pt_grid,nb_server,server_rank,ioipsl_domain_id)
-          CALL histbeg(TRIM(full_name),pt_domain%ni,pt_domain%lon, pt_domain%nj, pt_domain%lat,  &
-                     pt_zoom%ibegin_loc, pt_zoom%ni_loc,pt_zoom%jbegin_loc,pt_zoom%nj_loc,          &
-                     initial_timestep, initial_date, timestep_value,                                &
-                     ioipsl_hori_id, ioipsl_file_id,domain_id=ioipsl_domain_id)                                              
-       
-         ENDIF
-        
-      
-        DO j=1,pt_file_dep%axis%size
-          pt_axis=>pt_file_dep%axis%at(j)%pt
-          CALL sorted_list__find(axis_id,hash(Pt_axis%name),ioipsl_axis_id,found)
-          IF (.NOT. found) THEN
-            IF (TRIM(pt_axis%name) /= "none") THEN
+
+      IF (pt_file_dep%fields%size>0) THEN
+        CALL sorted_list__new(axis_id)
+
+        pt_file=>pt_file_dep%file
+      
+        pt_grid=>pt_file_dep%grids%at(1)%pt
+        pt_domain=>pt_grid%domain
+        pt_zoom=>pt_file_dep%zooms%at(1)%pt
+!        print *,TRIM(pt_file%name),' ',TRIM(pt_zoom%id)
+!        print*,'Global --->',pt_zoom%ni_glo,pt_zoom%nj_glo,pt_zoom%ibegin_glo,pt_zoom%jbegin_glo
+!        print*,'Local  --->',pt_zoom%ni_loc,pt_zoom%nj_loc,pt_zoom%ibegin_loc,pt_zoom%jbegin_loc
+      
+        IF (pt_zoom%ni_loc*pt_zoom%nj_loc > 0) THEN
+        
+          full_name=TRIM(pt_file%name)
+          IF (pt_file%has_name_suffix) full_name=TRIM(full_name)//TRIM(pt_file%name_suffix) 
+          IF ( (pt_zoom%ni_loc == pt_zoom%ni_glo) .AND. (pt_zoom%nj_loc == pt_zoom%nj_glo) ) THEN 
+
+            CALL histbeg(TRIM(full_name),pt_domain%ni,pt_domain%lon, pt_domain%nj, pt_domain%lat, & 
+                       pt_zoom%ibegin_loc, pt_zoom%ni_loc,pt_zoom%jbegin_loc,pt_zoom%nj_loc,         &
+                       initial_timestep, initial_date, timestep_value,                               &
+                       ioipsl_hori_id, ioipsl_file_id)
+           ELSE                                              
+
+            CALL set_ioipsl_domain_id(pt_grid,nb_server,server_rank,ioipsl_domain_id)
+            CALL histbeg(TRIM(full_name),pt_domain%ni,pt_domain%lon, pt_domain%nj, pt_domain%lat,  &
+                       pt_zoom%ibegin_loc, pt_zoom%ni_loc,pt_zoom%jbegin_loc,pt_zoom%nj_loc,          &
+                       initial_timestep, initial_date, timestep_value,                                &
+                       ioipsl_hori_id, ioipsl_file_id,domain_id=ioipsl_domain_id)                                              
+          
+           ENDIF
+        
+      
+          DO j=1,pt_file_dep%axis%size
+            pt_axis=>pt_file_dep%axis%at(j)%pt
+            CALL sorted_list__find(axis_id,hash(Pt_axis%name),ioipsl_axis_id,found)
+            IF (.NOT. found) THEN
+              IF (TRIM(pt_axis%name) /= "none") THEN
               
-              IF (pt_axis%has_positive) THEN 
-                IF (pt_axis%positive) THEN
-                  direction="up"
+                IF (pt_axis%has_positive) THEN 
+                  IF (pt_axis%positive) THEN
+                    direction="up"
+                  ELSE
+                    direction="down"
+                  ENDIF
                 ELSE
-                  direction="down"
+                  direction='unknown'
                 ENDIF
-              ELSE
-                direction='unknown'
+
+                CALL histvert(ioipsl_file_id, TRIM(pt_axis%name),TRIM(pt_axis%description),    &
+                             TRIM(pt_axis%unit), pt_axis%size,pt_axis%values, ioipsl_axis_id,  &
+                           pdirect=direction)
+                CALL sorted_list__add(axis_id,hash(Pt_axis%name),ioipsl_axis_id)
               ENDIF
-
-              CALL histvert(ioipsl_file_id, TRIM(pt_axis%name),TRIM(pt_axis%description),    &
-                           TRIM(pt_axis%unit), pt_axis%size,pt_axis%values, ioipsl_axis_id,  &
-                           pdirect=direction)
-              CALL sorted_list__add(axis_id,hash(Pt_axis%name),ioipsl_axis_id)
             ENDIF
-          ENDIF
-        ENDDO
-        
-        DO j=1,pt_file_dep%fields%size
-          pt_field=>pt_file_dep%fields%at(j)%pt
-          IF (pt_field%axis%name=="none") THEN
-            pt_field%internal(id_file)=ioipsl_file_id
-            CALL histdef(ioipsl_file_id, TRIM(pt_field%name), pt_field%description,            &
-                      &  pt_field%unit, pt_field%grid%domain%ni, pt_field%grid%domain%nj,      &
-                      &  ioipsl_hori_id, 1, 1, 1, -99, 32, pt_field%operation,                 &
-                      &  real(pt_field%freq_op), real(pt_file%output_freq) )
-          ELSE
-            pt_field%internal(id_file)=ioipsl_file_id
-            CALL sorted_list__find(axis_id,hash(Pt_field%axis%name),ioipsl_axis_id,found)
-            CALL histdef(ioipsl_file_id, TRIM(pt_field%name), pt_field%description,          &
-                       & pt_field%unit, pt_field%grid%domain%ni, pt_field%grid%domain%nj,    &
-                       & ioipsl_hori_id, pt_field%axis%size, 1, pt_field%axis%size,          &
-                       & ioipsl_axis_id, 32, pt_field%operation, real(pt_field%freq_op),     &
-                       & real(pt_file%output_freq) )
-          ENDIF
-        ENDDO
-        CALL histend(ioipsl_file_id)
+         ENDDO
+        
+          DO j=1,pt_file_dep%fields%size
+            pt_field=>pt_file_dep%fields%at(j)%pt
+            IF (pt_field%axis%name=="none") THEN
+              pt_field%internal(id_file)=ioipsl_file_id
+              CALL histdef(ioipsl_file_id, TRIM(pt_field%name), pt_field%description,            &
+                        &  pt_field%unit, pt_field%grid%domain%ni, pt_field%grid%domain%nj,      &
+                        &  ioipsl_hori_id, 1, 1, 1, -99, 32, pt_field%operation,                 &
+                        &  real(pt_field%freq_op), real(pt_file%output_freq) )
+            ELSE
+              pt_field%internal(id_file)=ioipsl_file_id
+              CALL sorted_list__find(axis_id,hash(Pt_field%axis%name),ioipsl_axis_id,found)
+              CALL histdef(ioipsl_file_id, TRIM(pt_field%name), pt_field%description,          &
+                         & pt_field%unit, pt_field%grid%domain%ni, pt_field%grid%domain%nj,    &
+                         & ioipsl_hori_id, pt_field%axis%size, 1, pt_field%axis%size,          &
+                         & ioipsl_axis_id, 32, pt_field%operation, real(pt_field%freq_op),     &
+                         & real(pt_file%output_freq) )
+            ENDIF
+          ENDDO
+          CALL histend(ioipsl_file_id)
+        ENDIF
+        CALL sorted_list__delete(axis_id)
       ENDIF
-      CALL sorted_list__delete(axis_id)
     ENDDO
     
