Changeset 1487 for XIOS/trunk/src/node


Ignore:
Timestamp:
04/20/18 15:04:38 (6 years ago)
Author:
oabramkina
Message:

Trunk: minor modifications for reading UGRID.

Using attribute nvertex defined by a user and not deduced from metadata of a file being read.
Taking into account the fact that the bounds attribute is not required by UGRID.

Location:
XIOS/trunk/src/node
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/domain.cpp

    r1262 r1487  
    13691369               << "Since 'bounds_lat_2d' is defined, 'latvalue_2d' must be defined too." << std::endl); 
    13701370 
    1371        hasBounds = true; 
     1371       //hasBounds = true; 
     1372       // In case of reading UGRID bounds values are not required 
     1373       hasBounds = (!bounds_lat_1d.isEmpty() || !bounds_lat_2d.isEmpty() ); 
    13721374     } 
    13731375     else 
  • XIOS/trunk/src/node/file.cpp

    r1358 r1487  
    597597 
    598598      if (isOpen) data_out->closeFile(); 
    599       if (time_counter_name.isEmpty()) data_in = shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), fileComm, multifile, isCollective)); 
    600       else data_in = shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), fileComm, multifile, isCollective, time_counter_name)); 
     599      bool ugridConvention = !convention.isEmpty() ? (convention == convention_attr::UGRID) : false; 
     600      if (time_counter_name.isEmpty()) data_in = shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), fileComm, multifile, isCollective, ugridConvention)); 
     601      else data_in = shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), fileComm, multifile, isCollective, ugridConvention, time_counter_name)); 
    601602      isOpen = true; 
    602603    } 
Note: See TracChangeset for help on using the changeset viewer.