Changeset 1443


Ignore:
Timestamp:
02/28/18 11:18:22 (7 years ago)
Author:
oabramkina
Message:

Bugfix on reading of rectilinear domains:

taking into account that now scalar label is added to field coordinates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/io/inetcdf4.cpp

    r1432 r1443  
    496496    std::list<StdString> coords = this->getCoordinatesIdList(name, path); 
    497497    std::list<StdString>::const_iterator it = coords.begin(), end = coords.end(); 
    498     std::set<StdString> dimVarList; 
     498    int nb1Ddims = 0; 
    499499 
    500500    for (; it != end; it++) 
     
    504504      { 
    505505        std::map<StdString, StdSize> dimvar = this->getDimensions(&coord, path); 
    506 //        if ((dimvar.size() == 1) && (dimvar.find(coord) != dimvar.end())) 
    507506        if ((dimvar.size() == 1)) 
    508507        { 
    509           dimVarList.insert(dimvar.begin()->first); 
    510           continue; 
     508          // Check that the coordinate is not a scalar label 
     509          StdString dimTmp = dimvar.begin()->first; 
     510          if (dimTmp.compare("str_len") != 0) 
     511          { 
     512            nb1Ddims++; 
     513            continue; 
     514          } 
    511515        } 
    512516        else 
     
    515519    } 
    516520 
    517     return (dimVarList.size() != 1); 
     521    return (nb1Ddims != 1); 
    518522  } 
    519523 
Note: See TracChangeset for help on using the changeset viewer.