Changeset 825 for XIOS/trunk/src/io/inetcdf4.cpp
- Timestamp:
- 02/19/16 14:34:03 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/io/inetcdf4.cpp
r811 r825 28 28 this->timeCounterName = timeCounterName; 29 29 if (!CNetCdfInterface::isDimExisted(this->ncidp, this->timeCounterName)) this->timeCounterName=this->getUnlimitedDimensionName() ; 30 30 31 31 } 32 32 … … 63 63 int varid = 0; 64 64 int grpid = this->getGroup(path); 65 CNetCdfInterface::inqVarId(grpid, varname, varid); 65 if (this->hasVariable(varname, path)) 66 CNetCdfInterface::inqVarId(grpid, varname, varid); 66 67 return varid; 67 68 } … … 344 345 { 345 346 const StdString& varname = *it; 346 if ( varname.compare(0, name.size(), name) == 0)return true;347 if ((varname.compare(0, name.size(), name) == 0) && (0 != name.size())) return true; 347 348 } 348 349 return false; … … 726 727 const CVarPath* const path) 727 728 { 729 StdString lonName; 728 730 std::list<StdString>::const_iterator itbList, itList, iteList; 729 731 std::list<StdString> clist = this->getCoordinatesIdList(varname, path); … … 735 737 StdString unit = this->getAttributeValue(CCFKeywords::XIOS_CF_units, &(*itList), path); 736 738 if (CCFConvention::XIOS_CF_Longitude_units.end() != CCFConvention::XIOS_CF_Longitude_units.find(unit)) 737 return *itList; 738 } 739 } 739 { 740 lonName = *itList; 741 return lonName; 742 } 743 } 744 } 745 return lonName; 740 746 } 741 747 … … 743 749 const CVarPath* const path) 744 750 { 751 StdString latName; 745 752 std::list<StdString>::const_iterator itbList, itList, iteList; 746 753 std::list<StdString> clist = this->getCoordinatesIdList(varname, path); … … 752 759 StdString unit = this->getAttributeValue(CCFKeywords::XIOS_CF_units, &(*itList), path); 753 760 if (CCFConvention::XIOS_CF_Latitude_units.end() != CCFConvention::XIOS_CF_Latitude_units.find(unit)) 754 return *itList; 755 } 756 } 761 { 762 latName = *itList; 763 return latName; 764 } 765 } 766 } 767 return latName; 757 768 } 758 769
Note: See TracChangeset
for help on using the changeset viewer.