Index: XIOS/dev/XIOS_DEV_CMIP6/src/io/inetcdf4.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/io/inetcdf4.cpp	(revision 1446)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/io/inetcdf4.cpp	(revision 1447)
@@ -83,5 +83,5 @@
     std::pair<nc_type, StdSize> retvalue;
     int grpid = this->getGroup(path);
-    int varid = (var != NULL) ? this->getVariable(*var, path) : NC_GLOBAL;
+    int varid = (var != NULL && this->hasVariable(*var, path)) ? this->getVariable(*var, path) : NC_GLOBAL;
     CNetCdfInterface::inqAtt(grpid, varid, attname, retvalue.first, retvalue.second);
     return retvalue;
@@ -216,8 +216,8 @@
     int nbdim = 0, *dimid = NULL;
     int grpid = this->getGroup(path);
-    int varid = (var != NULL) ? this->getVariable(*var, path) : NC_GLOBAL;
+    int varid = (var != NULL && this->hasVariable(*var, path)) ? this->getVariable(*var, path) : NC_GLOBAL;
     std::list<StdString> retvalue;
 
-    if (var != NULL)
+    if (var != NULL && this->hasVariable(*var, path))
     {
       CNetCdfInterface::inqVarNDims(grpid, varid, nbdim);
@@ -247,8 +247,8 @@
     int nbdim = 0, *dimid = NULL;
     int grpid = this->getGroup(path);
-    int varid = (var != NULL) ? this->getVariable(*var, path) : NC_GLOBAL;
+    int varid = (var != NULL && this->hasVariable(*var, path)) ? this->getVariable(*var, path) : NC_GLOBAL;
     std::map<StdString, StdSize> retvalue;
 
-    if (var != NULL)
+    if (var != NULL && this->hasVariable(*var, path))
     {
       CNetCdfInterface::inqVarNDims(grpid, varid, nbdim);
@@ -282,7 +282,7 @@
     std::list<StdString> retvalue;
     int grpid = this->getGroup(path);
-    int varid = (var != NULL) ? this->getVariable(*var, path) : NC_GLOBAL;
-
-    if (var != NULL)
+    int varid = (var != NULL && this->hasVariable(*var, path)) ? this->getVariable(*var, path) : NC_GLOBAL;
+
+    if (var != NULL && this->hasVariable(*var, path))
       CNetCdfInterface::inqVarNAtts(grpid, varid, nbatt);
     else
@@ -376,5 +376,5 @@
   {
     int grpid = this->getGroup(path);
-    int varid = (var != NULL) ? this->getVariable(*var, path) : NC_GLOBAL;
+    int varid = (var != NULL && this->hasVariable(*var, path)) ? this->getVariable(*var, path) : NC_GLOBAL;
     std::pair<nc_type , StdSize> attinfos = this->getAttribute(name, var, path);
     std::vector<T> retvalue(attinfos.second);
@@ -494,22 +494,43 @@
   bool CINetCDF4::isRectilinear(const StdString& name, const CVarPath* const path)
   {
-    std::list<StdString> coords = this->getCoordinatesIdList(name, path);
-    std::list<StdString>::const_iterator it = coords.begin(), end = coords.end();
-    std::set<StdString> dimVarList;
-
+    std::list<StdString> varCoords = this->getCoordinatesIdList(name, path);
+    std::list<StdString> varDims = this->getDimensionsList(&name, path);
+    std::list<StdString>::const_iterator it = varCoords.begin(), end = varCoords.end();
+    std::set<StdString> varDims1D;
+
+    // Firstly, loop over coordinate list
     for (; it != end; it++)
     {
       const StdString& coord = *it;
-      if (this->hasVariable(coord, path) && !this->isTemporal(coord, path) && this->isLonOrLat(coord, path))
-      {
-        std::map<StdString, StdSize> dimvar = this->getDimensions(&coord, path);
-        if ((dimvar.size() == 1))
+      if (this->hasVariable(coord, path) && !this->isTemporal(coord, path) )
+      {
+        std::map<StdString, StdSize> coordDims = this->getDimensions(&coord, path);
+        for (std::map<StdString, StdSize>::const_iterator itTmp = coordDims.begin(); itTmp != coordDims.end(); itTmp++)
         {
-          dimVarList.insert(dimvar.begin()->first);
+          varDims.remove(itTmp->first);
+        }
+        if (this->isLonOrLat(coord, path) && coordDims.size() == 1)
+        {
+          varDims1D.insert(coordDims.begin()->first);
           continue;
         }
       }
     }
-    return (dimVarList.size() != 1);
+    // Secondly, loop over remaining dimensions
+    for (it= varDims.begin(); it != varDims.end(); it++)
+    {
+      const StdString& coord = *it;
+      std::map<StdString, StdSize> coordDims = this->getDimensions(&coord, path);
+      if (this->hasVariable(coord, path) && !this->isTemporal(coord, path) )
+      {
+        if (this->isLonOrLat(coord, path) && coordDims.size() == 1)
+        {
+          varDims1D.insert(coordDims.begin()->first);
+          continue;
+        }
+      }
+    }
+
+    return (varDims1D.size() == 2);
   }
 
Index: XIOS/dev/XIOS_DEV_CMIP6/src/io/nc4_data_input.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/io/nc4_data_input.cpp	(revision 1446)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/io/nc4_data_input.cpp	(revision 1447)
@@ -350,5 +350,5 @@
       StdString boundsLonName = this->getBoundsId(lonName);
 
-      int nbVertex = this->getNbVertex(fieldId);
+      int nbVertex = 4; //this->getNbVertex(fieldId);
       if (!domain->nvertex.isEmpty() && (domain->nvertex != nbVertex))
       {
